diff options
author | David Lechner <david@lechnology.com> | 2018-05-19 23:25:07 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-06-05 10:33:57 -0400 |
commit | f203a479e7415b539ebcf766591eeafaf481814d (patch) | |
tree | 9f03791b322dba0f76c23c320532af9cf3232af3 /include/configs/legoev3.h | |
parent | 71eb63e7ee10299e1edfbdfcec21592de6953d62 (diff) | |
download | u-boot-f203a479e7415b539ebcf766591eeafaf481814d.tar.gz |
ARM: legoev3: update boot script to load uEnv.txt and .dtb
This updates the LEGO MINDSTORMS EV3 boot script to try loading a
uEnv.txt file and a da850-lego-ev3.dtb device tree during boot.
Signed-off-by: David Lechner <david@lechnology.com>
Diffstat (limited to 'include/configs/legoev3.h')
-rw-r--r-- | include/configs/legoev3.h | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h index 9eb95bc030..7a0511f88e 100644 --- a/include/configs/legoev3.h +++ b/include/configs/legoev3.h @@ -84,34 +84,60 @@ "if run loadbootscr; then " \ "run bootscript; " \ "else " \ + "if run loadbootenv; then " \ + "echo Loaded env from ${bootenvfile};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd...;" \ + "run uenvcmd;" \ + "fi;" \ "if run loadimage; then " \ "run mmcargs; " \ + "if run loadfdt; then " \ + "echo Using ${fdtfile}...;" \ + "run fdtfixup; " \ + "run fdtboot; "\ + "fi; " \ "run mmcboot; " \ - "else " \ - "run flashargs; " \ - "run flashboot; " \ "fi; " \ "fi; " \ - "else " \ - "run flashargs; " \ - "run flashboot; " \ - "fi" + "fi; "\ + "run flashargs; " \ + "run flashboot" #define CONFIG_EXTRA_ENV_SETTINGS \ + "bootenvfile=uEnv.txt\0" \ + "fdtfile=da850-lego-ev3.dtb\0" \ "memsize=64M\0" \ "filesyssize=10M\0" \ "verify=n\0" \ "console=ttyS1,115200n8\0" \ "bootscraddr=0xC0600000\0" \ + "fdtaddr=0xC0600000\0" \ "loadaddr=0xC0007FC0\0" \ "filesysaddr=0xC1180000\0" \ "fwupdateboot=mw 0xFFFF1FFC 0x5555AAAA; reset\0" \ - "mmcargs=setenv bootargs mem=${memsize} console=${console} root=/dev/mmcblk0p2 rw rootwait lpj=747520\0" \ + "importbootenv=echo Importing environment...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ + "loadbootenv=fatload mmc 0 ${loadaddr} ${bootenvfile}\0" \ + "mmcargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 rw " \ + "rootwait ${optargs}\0" \ "mmcboot=bootm ${loadaddr}\0" \ - "flashargs=setenv bootargs mem=${memsize} initrd=${filesysaddr},${filesyssize} root=/dev/ram0 rw rootfstype=squashfs console=${console} lpj=747520\0" \ - "flashboot=sf probe 0; sf read ${loadaddr} 0x50000 0x400000; sf read ${filesysaddr} 0x450000 0xA00000; bootm ${loadaddr}\0" \ + "flashargs=setenv bootargs initrd=${filesysaddr},${filesyssize} " \ + "root=/dev/ram0 rw rootfstype=squashfs console=${console} " \ + "${optargs}\0" \ + "flashboot=sf probe 0; " \ + "sf read ${fdtaddr} 0x40000 0x10000; " \ + "sf read ${loadaddr} 0x50000 0x400000; " \ + "sf read ${filesysaddr} 0x450000 0xA00000; " \ + "run fdtfixup; " \ + "run fdtboot\0" \ "loadimage=fatload mmc 0 ${loadaddr} uImage\0" \ + "loadfdt=fatload mmc 0 ${fdtaddr} ${fdtfile}\0" \ + "fdtfixup=fdt addr ${fdtaddr}; fdt resize; fdt chosen\0" \ + "fdtboot=bootm ${loadaddr} - ${fdtaddr}\0" \ "loadbootscr=fatload mmc 0 ${bootscraddr} boot.scr\0" \ - "bootscript=source ${bootscraddr}\0" \ + "bootscript=source ${bootscraddr}\0" #ifdef CONFIG_CMD_BDI #define CONFIG_CLOCKS |