Commit 951d582778a221a79682c4a2619dfcdb7d05d54e
Committed by
Tom Rini
1 parent
73a27a84e5
Exists in
master
and in
53 other branches
am335x_evm: Add more variables and switch to DT booting.
Make bootcmd run findfdt so that we know what dtb file to load. Add a loadfdt command to load this file in. Make mmcboot pass in ${fdtaddr} and make the mmc section of bootcmd run loadfdt. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Showing 1 changed file with 10 additions and 5 deletions Side-by-side Diff
include/configs/am335x_evm.h
... | ... | @@ -56,7 +56,8 @@ |
56 | 56 | "fdtaddr=0x80F80000\0" \ |
57 | 57 | "fdt_high=0xffffffff\0" \ |
58 | 58 | "rdaddr=0x81000000\0" \ |
59 | - "bootfile=/boot/uImage\0" \ | |
59 | + "bootdir=/boot\0" \ | |
60 | + "bootfile=uImage\0" \ | |
60 | 61 | "fdtfile=\0" \ |
61 | 62 | "console=ttyO0,115200n8\0" \ |
62 | 63 | "optargs=\0" \ |
63 | 64 | |
... | ... | @@ -105,10 +106,11 @@ |
105 | 106 | "root=${ramroot} " \ |
106 | 107 | "rootfstype=${ramrootfstype}\0" \ |
107 | 108 | "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ |
108 | - "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootfile}\0" \ | |
109 | + "loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ | |
110 | + "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ | |
109 | 111 | "mmcboot=echo Booting from mmc ...; " \ |
110 | 112 | "run mmcargs; " \ |
111 | - "bootm ${loadaddr}\0" \" \ | |
113 | + "bootm ${loadaddr} - ${fdtaddr}\0" \" \ | |
112 | 114 | "nandboot=echo Booting from nand ...; " \ |
113 | 115 | "run nandargs; " \ |
114 | 116 | "nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; " \ |
115 | 117 | |
116 | 118 | |
... | ... | @@ -122,11 +124,12 @@ |
122 | 124 | "setenv autoload no; " \ |
123 | 125 | "dhcp; " \ |
124 | 126 | "tftp ${loadaddr} ${bootfile}; " \ |
127 | + "tftp ${fdtaddr} ${fdtfile}; " \ | |
125 | 128 | "run netargs; " \ |
126 | - "bootm ${loadaddr}\0" \" \ | |
129 | + "bootm ${loadaddr} - ${fdtaddr}\0" \" \ | |
127 | 130 | "ramboot=echo Booting from ramdisk ...; " \ |
128 | 131 | "run ramargs; " \ |
129 | - "bootm ${loadaddr}\0" \" \ | |
132 | + "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \" \ | |
130 | 133 | "findfdt="\ |
131 | 134 | "if test $board_name = A335BONE; then " \ |
132 | 135 | "setenv fdtfile am335x-bone.dtb; fi; " \ |
... | ... | @@ -140,6 +143,7 @@ |
140 | 143 | #endif |
141 | 144 | |
142 | 145 | #define CONFIG_BOOTCOMMAND \ |
146 | + "run findfdt; " \ | |
143 | 147 | "mmc dev ${mmcdev}; if mmc rescan; then " \ |
144 | 148 | "echo SD/MMC found on device ${mmcdev};" \ |
145 | 149 | "if run loadbootenv; then " \ |
... | ... | @@ -151,6 +155,7 @@ |
151 | 155 | "run uenvcmd;" \ |
152 | 156 | "fi;" \ |
153 | 157 | "if run loaduimage; then " \ |
158 | + "run loadfdt;" \ | |
154 | 159 | "run mmcboot;" \ |
155 | 160 | "fi;" \ |
156 | 161 | "else " \ |