molecules/boot/u-boot_patches/sabayon+genkernel+initrd-boot+beaglebone.patch

56 lines
1.7 KiB
Diff

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 0170e11..89a46eb 100755
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -46,7 +46,9 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"bootfile=uImage\0" \
+ "ramdiskfile=uInitrd\0" \
"loadaddr=0x82000000\0" \
+ "rdaddr=0x81000000\0" \
"script_addr=0x81900000\0" \
"console=ttyO0,115200n8\0" \
"mmc_dev=0\0" \
@@ -75,6 +77,8 @@
"importbootenv=echo Importing environment from mmc ...; " \
"env import -t $loadaddr $filesize\0" \
"mmc_load_uimage=fatload mmc ${mmc_dev} 0x80007fc0 ${bootfile}\0" \
+ "mmc_load_ext_uimage=ext2load mmc ${mmc_dev}:2 ${loadaddr} /boot/${bootfile}\0" \
+ "mmc_load_ext_initrd=ext2load mmc ${mmc_dev}:2 ${rdaddr} /boot/${ramdiskfile}\0" \
"optargs=\0" \
"bootargs_defaults=setenv bootargs " \
"console=${console} " \
@@ -101,8 +105,14 @@
"nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
"ip=dhcp\0" \
"mmc_boot=run mmc_args; " \
- "run mmc_load_uimage; " \
- "bootm\0" \
+ "if run mmc_load_uimage; then " \
+ "bootm;" \
+ "fi;" \
+ "if run mmc_load_ext_uimage; then " \
+ "run mmc_load_ext_initrd;" \
+ "bootm;" \
+ "fi;" \
+ "\0" \
"nand_boot=echo Booting from nand ...; " \
"run nand_args; " \
"nand read.i ${loadaddr} ${nand_src_addr} ${nand_img_siz}; " \
@@ -138,6 +148,14 @@
"run mmc_args;" \
"bootm;" \
"fi;" \
+ "if run mmc_load_ext_uimage; then " \
+ "run mmc_args;" \
+ "if run mmc_load_ext_initrd; then " \
+ "bootm ${loadaddr} ${rdaddr};" \
+ "else " \
+ "bootm ${loadaddr};" \
+ "fi;" \
+ "fi;" \
"fi;" \
"run nand_boot;" \