diff options
author | Leon Anavi <leon.anavi@konsulko.com> | 2019-08-12 22:35:28 +0300 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-08-20 14:36:15 +0000 |
commit | c244b9d4fbef8624b6ad635a2c339407f3a81c90 (patch) | |
tree | 5555cbf9e4f7cc9f6dccb306c063f985bb21498b | |
parent | e8dac3cddae90f41d503bf0506f880fc19f6d7b7 (diff) |
uEnv.txt: Modify uEnv.txt for SOTA
Modify uEnv.txt and uEnv.cma.txt according to the recent
changes in layers meta-updater and meta-updater-raspberrypi
to ensure that AGL image with agl-sota feature will boot
properly on Raspberry Pi 3 B/B+.
Bug-AGL: SPEC-2729
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Change-Id: Ib8fe74bcd6e12208aaddc81f608fe84eee9de601
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt | 28 | ||||
-rw-r--r-- | meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt | 28 |
2 files changed, 42 insertions, 14 deletions
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt index 611119f09..062bddb93 100644 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt +++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt @@ -1,7 +1,21 @@ -fdt_addr_r=0x0c800000 -bootcmd_dtb=fdt addr $fdt_addr_r; fdt get value bootargs_fdt /chosen bootargs -bootcmd_otenv=ext2load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize -bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 coherent_pool=6M smsc95xx.turbo_mode=N" -bootcmd_load=ext2load mmc 0:2 $kernel_addr_r "/boot"$kernel_image; ext2load mmc 0:2 $ramdisk_addr_r "/boot"$ramdisk_image -bootcmd_run=bootm $kernel_addr_r $ramdisk_addr_r $fdt_addr_r -bootcmd=run bootcmd_dtb; run bootcmd_otenv; run bootcmd_args; run bootcmd_load; run bootcmd_run +bootcmd_resetvars=setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2 +bootcmd_otenv=run bootcmd_resetvars; load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize +bootcmd_rollbackenv=setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2} + +bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 panic=1 coherent_pool=6M smsc95xx.turbo_mode=N" + +bootcmd_getroot=setexpr ostree_root gsub "^.*ostree=([^ ]*).*$" "\\\\1" "${bootargs}"; + +bootcmd_fitconf=run bootcmd_getroot; if test -e mmc 0:2 "${ostree_root}/usr/lib/fit_conf"; then load mmc 0:2 $loadaddr "${ostree_root}/usr/lib/fit_conf"; env import -t $loadaddr $filesize; fi + +bootcmd_load=load mmc 0:2 $ramdisk_addr_r "/boot"$kernel_image +bootcmd_run=bootm "${ramdisk_addr_r}${fit_conf}" + +bootcmd_create_envfile=if test ! -e mmc 0:1 uboot.env; then saveenv; fi; + +bootlimit=3 + +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 ! "${upgrade_available}" = "1"; then setenv upgrade_available 1; saveenv; fi; reset; fi + +bootcmd_set_rollback=if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi +altbootcmd=run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_set_rollback; if test -n "${kernel_image2}"; then run bootcmd_rollbackenv; fi; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; reset diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt index f6c05709b..436fe95fe 100644 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt +++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt @@ -1,7 +1,21 @@ -fdt_addr_r=0x0c800000 -bootcmd_dtb=fdt addr $fdt_addr_r; fdt get value bootargs_fdt /chosen bootargs -bootcmd_otenv=ext2load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize -bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192" -bootcmd_load=ext2load mmc 0:2 $kernel_addr_r "/boot"$kernel_image; ext2load mmc 0:2 $ramdisk_addr_r "/boot"$ramdisk_image -bootcmd_run=bootm $kernel_addr_r $ramdisk_addr_r $fdt_addr_r -bootcmd=run bootcmd_dtb; run bootcmd_otenv; run bootcmd_args; run bootcmd_load; run bootcmd_run +bootcmd_resetvars=setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2 +bootcmd_otenv=run bootcmd_resetvars; load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize +bootcmd_rollbackenv=setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2} + +bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 panic=1" + +bootcmd_getroot=setexpr ostree_root gsub "^.*ostree=([^ ]*).*$" "\\\\1" "${bootargs}"; + +bootcmd_fitconf=run bootcmd_getroot; if test -e mmc 0:2 "${ostree_root}/usr/lib/fit_conf"; then load mmc 0:2 $loadaddr "${ostree_root}/usr/lib/fit_conf"; env import -t $loadaddr $filesize; fi + +bootcmd_load=load mmc 0:2 $ramdisk_addr_r "/boot"$kernel_image +bootcmd_run=bootm "${ramdisk_addr_r}${fit_conf}" + +bootcmd_create_envfile=if test ! -e mmc 0:1 uboot.env; then saveenv; fi; + +bootlimit=3 + +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 ! "${upgrade_available}" = "1"; then setenv upgrade_available 1; saveenv; fi; reset; fi + +bootcmd_set_rollback=if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi +altbootcmd=run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_set_rollback; if test -n "${kernel_image2}"; then run bootcmd_rollbackenv; fi; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; reset |