diff options
Diffstat (limited to 'recipes-sota/ota-u-boot-script/files/uEnv.txt')
-rw-r--r-- | recipes-sota/ota-u-boot-script/files/uEnv.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes-sota/ota-u-boot-script/files/uEnv.txt b/recipes-sota/ota-u-boot-script/files/uEnv.txt new file mode 100644 index 0000000..d890257 --- /dev/null +++ b/recipes-sota/ota-u-boot-script/files/uEnv.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | bootcmd_fitconf= | ||
2 | bootcmd_create_envfile= | ||
3 | fit_conf= | ||
4 | |||
5 | sota_bootcommand=@@SOTA_BOOTLOADER_BOOTCOMMAND@@ | ||
6 | sota_kernel_addr=@@SOTA_BOOTLOADER_KERNEL_ADDR@@ | ||
7 | sota_ramdisk_addr=@@SOTA_BOOTLOADER_RAMDISK_ADDR@@ | ||
8 | sota_fdt_addr=@@SOTA_BOOTLOADER_FDT_ADDR@@ | ||
9 | sota_boot_part=@@SOTA_BOOTLOADER_BOOT_PART@@ | ||
10 | sota_main_part=@@SOTA_BOOTLOADER_MAIN_PART@@ | ||
11 | sota_root_device=@@SOTA_BOOTLOADER_ROOT_DEVICE@@ | ||
12 | |||
13 | @@INITFINISHED@@ | ||
14 | |||
15 | bootcmd_resetvars=setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2 | ||
16 | bootcmd_otenv=run bootcmd_resetvars; load ${sota_main_part} $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize | ||
17 | |||
18 | bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=$sota_root_device root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 panic=1 @@SOTA_BOOTLOADER_EXTRA_PARAMS@@" | ||
19 | |||
20 | bootcmd_getroot=setexpr ostree_root gsub "^.*ostree=([^ ]*).*$" "\\\\1" "${bootargs}"; | ||
21 | |||
22 | bootcmd_load_kernel=load $sota_main_part $sota_kernel_addr "/boot"$kernel_image | ||
23 | |||
24 | bootcmd_load_ramdisk=if test -n "${sota_ramdisk_addr}"; then load $sota_main_part $sota_ramdisk_addr "/boot"$ramdisk_image; fi | ||
25 | |||
26 | bootcmd_load_fdt=if test -n "${sota_fdt_addr}"; then load $sota_main_part $sota_fdt_addr "/boot"$fdt_file; fi | ||
27 | |||
28 | bootcmd_load=run bootcmd_load_kernel; run bootcmd_load_ramdisk; run bootcmd_load_fdt; | ||
29 | |||
30 | bootcmd_run=$sota_bootcommand $sota_kernel_addr$fit_conf $sota_ramdisk_addr $sota_fdt_addr | ||
31 | |||
32 | bootcmd=if test "${rollback}" = "1"; then run altbootcmd; else run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; if test ! "${upgrade_available}" = "1"; then setenv upgrade_available 1; saveenv; fi; reset; fi | ||
33 | |||
34 | |||