summaryrefslogtreecommitdiff
path: root/meta-aspeed
diff options
context:
space:
mode:
authorEddie James <eajames@linux.ibm.com>2021-04-01 16:30:02 +0300
committerJoel Stanley <joel@jms.id.au>2021-06-21 09:15:04 +0300
commit34b3077d0643563c0487f47ab39680d30874d7e4 (patch)
treedc861179367c6b9b25488777fdfc690434b74ee5 /meta-aspeed
parent06bb2750c274397ca44fd7d98a2827653d420dc9 (diff)
downloadopenbmc-34b3077d0643563c0487f47ab39680d30874d7e4.tar.xz
AST2600: Update default env for multiple FIT config
Add environment variables to the AST2600 to boot a certain FIT configuration of the kernel based on the "fitconfig" environment variable. The boot command will fall back to the default FIT config in case all other boot attempts fail. Also fix the kernel boot arguments in the case that boot failure occurs. The boot sequence would be: - boota with fitconfig, if it fails: - boota without fitconfig, if it fails: - bootb with fitconfig, if it fails: - bootb without fitconfig Tested: Set fitconfig to a dummy variable, and also changed the bootm command to a dummy command to force a boot failure, and verified the sequence was as expected: ast# boot boota Error loading kernel FIT image with fitconfig rainier-dummy Unknown command 'bootm-dummy' - try 'help' Error loading kernel FIT image bootb Error loading kernel FIT image with fitconfig rainier-dummy Unknown command 'bootm-dummy' - try 'help' Error loading kernel FIT image Signed-off-by: Eddie James <eajames@linux.ibm.com> Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Change-Id: I14cf935a707bdb95b0a6e4e607919ea0e027d18c
Diffstat (limited to 'meta-aspeed')
-rw-r--r--meta-aspeed/recipes-bsp/u-boot/files/u-boot-env-ast2600.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/meta-aspeed/recipes-bsp/u-boot/files/u-boot-env-ast2600.txt b/meta-aspeed/recipes-bsp/u-boot/files/u-boot-env-ast2600.txt
index 47a474c92..15dd2f522 100644
--- a/meta-aspeed/recipes-bsp/u-boot/files/u-boot-env-ast2600.txt
+++ b/meta-aspeed/recipes-bsp/u-boot/files/u-boot-env-ast2600.txt
@@ -1,9 +1,11 @@
bootargs=console=ttyS4,115200n8
-boota=setenv bootpart 2; setenv rootfs rofs-a; run setmmcargs; ext4load mmc 0:${bootpart} ${loadaddr} fitImage && bootm; echo Error loading kernel FIT image
-bootb=setenv bootpart 3; setenv rootfs rofs-b; run setmmcargs; ext4load mmc 0:${bootpart} ${loadaddr} fitImage && bootm; echo Error loading kernel FIT image
-bootcmd=if test "${bootside}" = "b"; then run bootb; run boota; else run boota; run bootb; fi
+boota=setenv bootpart 2; setenv rootfs rofs-a; run bootmmc
+bootb=setenv bootpart 3; setenv rootfs rofs-b; run bootmmc
+bootcmd=setenv origbootargs ${bootargs}; run bootconfcmd; run bootsidecmd
+bootconfcmd=if test ${fitconfig} -n; then setenv bootmconf "#${fitconfig}"; fi
bootdelay=2
+bootmmc=run setmmcargs; ext4load mmc 0:${bootpart} ${loadaddr} fitImage && bootm ${loadaddr}${bootmconf}; echo Error loading kernel FIT image with fitconfig ${fitconfig}; bootm ${loadaddr}; echo Error loading kernel FIT image
bootside=a
+bootsidecmd=if test ${bootside} = b; then run bootb; run boota; else run boota; run bootb; fi
loadaddr=0x83000000
-rootfs=rofs-a
-setmmcargs=setenv bootargs ${bootargs} rootwait root=PARTLABEL=${rootfs}
+setmmcargs=setenv bootargs ${origbootargs} rootwait root=PARTLABEL=${rootfs}