]> git.sur5r.net Git - u-boot/commitdiff
am335x_evm: Add NAND environment variables
authorChase Maupin <Chase.Maupin@ti.com>
Fri, 8 Feb 2013 11:20:11 +0000 (11:20 +0000)
committerTom Rini <trini@ti.com>
Mon, 18 Feb 2013 18:51:20 +0000 (13:51 -0500)
* Added support to the default environment variables for NAND
  boot.
* Add nandboot to the default bootcmd.

Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
include/configs/am335x_evm.h

index 45491906a6b5c422c903c0d86537c04d5563779a..77bd734e9594f54bb5c3d36c294fadb3592100c6 100644 (file)
        "mmcdev=0\0" \
        "mmcroot=/dev/mmcblk0p2 ro\0" \
        "mmcrootfstype=ext4 rootwait\0" \
+       "nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \
+       "nandrootfstype=ubifs rootwait=1\0" \
+       "nandsrcaddr=0x280000\0" \
+       "nandimgsize=0x500000\0" \
        "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
        "ramrootfstype=ext2\0" \
        "mmcargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=${mmcroot} " \
                "rootfstype=${mmcrootfstype}\0" \
+       "nandargs=setenv bootargs console=${console} " \
+               "${optargs} " \
+               "root=${nandroot} " \
+               "rootfstype=${nandrootfstype}\0" \
        "bootenv=uEnv.txt\0" \
        "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
        "importbootenv=echo Importing environment from mmc ...; " \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
                "bootm ${loadaddr}\0" \
+       "nandboot=echo Booting from nand ...; " \
+               "run nandargs; " \
+               "nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \
+               "bootm ${loadaddr}\0" \
        "ramboot=echo Booting from ramdisk ...; " \
                "run ramargs; " \
                "bootm ${loadaddr}\0" \
                "if run loaduimage; then " \
                        "run mmcboot;" \
                "fi;" \
+       "else " \
+               "run nandboot;" \
        "fi;" \
 
 /* Clock Defines */