diff options
Diffstat (limited to 'meta-aspeed/recipes-bsp/u-boot')
-rw-r--r-- | meta-aspeed/recipes-bsp/u-boot/files/u-boot-env-ast2600.txt | 9 | ||||
-rw-r--r-- | meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb | 14 |
2 files changed, 23 insertions, 0 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 new file mode 100644 index 000000000..47a474c92 --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/files/u-boot-env-ast2600.txt @@ -0,0 +1,9 @@ +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 +bootdelay=2 +bootside=a +loadaddr=0x83000000 +rootfs=rofs-a +setmmcargs=setenv bootargs ${bootargs} rootwait root=PARTLABEL=${rootfs} diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb index 3ecd17ce6..99bcafc09 100644 --- a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb +++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb @@ -6,3 +6,17 @@ require u-boot-aspeed.inc PROVIDES += "u-boot" DEPENDS += "bc-native dtc-native" + +SRC_URI_append_df-phosphor-mmc = " file://u-boot-env-ast2600.txt" + +UBOOT_ENV_SIZE_df-phosphor-mmc = "0x10000" +UBOOT_ENV_df-phosphor-mmc = "u-boot-env" +UBOOT_ENV_SUFFIX_df-phosphor-mmc = "bin" + +do_compile_append() { + if [ -n "${UBOOT_ENV}" ] + then + # Generate redundant environment image + ${B}/tools/mkenvimage -r -s ${UBOOT_ENV_SIZE} -o ${WORKDIR}/${UBOOT_ENV_BINARY} ${WORKDIR}/u-boot-env-ast2600.txt + fi +} |