From bfeec530621dd8b30d81917abe94c3c55eed0fba Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Wed, 2 Jun 2010 18:27:38 -0500 Subject: [PATCH] BeagleBoard: Check for ramdisk on boot To simplify booting into various boot configurations, there is now a test for an existing ramdisk.gz image if loading the boot script fails. Adding additional boot arguments can also be done using optargs. (cherry picked from commit e96988f27cfa51f353ae4f678c59445deb161c5e) Signed-off-by: Jason Kridner --- include/configs/omap3_beagle.h | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index acca697..c2fc6ba 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -181,9 +181,12 @@ #define CONFIG_BOOTDELAY 3 #define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=0x82000000\0" \ + "loadaddr=0x80200000\0" \ + "rdaddr=0x81600000\0" \ "usbtty=cdc_acm\0" \ "console=ttyS2,115200n8\0" \ + "optargs=\0" \ + "bootscr=boot.scr\0" \ "mpurate=500\0" \ "buddy=none\0" \ "vram=12M\0" \ @@ -195,6 +198,7 @@ "nandroot=/dev/mtdblock4 rw\0" \ "nandrootfstype=jffs2\0" \ "mmcargs=setenv bootargs console=${console} " \ + "${optargs} " \ "mpurate=${mpurate} " \ "buddy=${buddy} "\ "vram=${vram} " \ @@ -203,6 +207,7 @@ "root=${mmcroot} " \ "rootfstype=${mmcrootfstype}\0" \ "nandargs=setenv bootargs console=${console} " \ + "${optargs} " \ "mpurate=${mpurate} " \ "buddy=${buddy} "\ "vram=${vram} " \ @@ -210,7 +215,18 @@ "omapdss.def_disp=${defaultdisplay} " \ "root=${nandroot} " \ "rootfstype=${nandrootfstype}\0" \ - "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \ + "ramargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "mpurate=${mpurate} " \ + "buddy=${buddy} "\ + "vram=${vram} " \ + "omapfb.mode=dvi:${dvimode} " \ + "omapdss.def_disp=${defaultdisplay} " \ + "root=/dev/ram0 rw ramdisk_size=65536 " \ + "initrd=${rdaddr},64M " \ + "rootfstype=\0" \ + "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source ${loadaddr}\0" \ "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ @@ -221,6 +237,9 @@ "run nandargs; " \ "nand read ${loadaddr} 280000 400000; " \ "bootm ${loadaddr}\0" \ + "ramboot=echo Booting from ramdisk ...; " \ + "run ramargs; " \ + "bootm ${loadaddr}\0" \ #define CONFIG_BOOTCOMMAND \ "if mmc init ${mmcdev}; then " \ @@ -228,7 +247,11 @@ "run bootscript; " \ "else " \ "if run loaduimage; then " \ - "run mmcboot; " \ + "if run loadramdisk; then " \ + "run ramboot; " \ + "else " \ + "run mmcboot; " \ + "fi; " \ "else run nandboot; " \ "fi; " \ "fi; " \ -- 1.5.6.4