Commit 5047d3e58d95f84838cd52fd306e0ce87b15391b
1 parent
708782f145
Exists in
smarc-imx-l5.0.0_1.0.0-ga
MLK-9734 imx: mx6sxsabreauto: Add NAND boot environment variables
For NAND boot, the kernel zImage and rootfs also need to load from NAND. Add the environment variables for this. Signed-off-by: Ye.Li <B37916@freescale.com>
Showing 1 changed file with 23 additions and 0 deletions Side-by-side Diff
include/configs/mx6sxsabreauto.h
... | ... | @@ -158,19 +158,41 @@ |
158 | 158 | #define CONFIG_VIDEO_MODE "" |
159 | 159 | #endif |
160 | 160 | |
161 | +#ifdef CONFIG_SYS_BOOT_NAND | |
162 | +#define CONFIG_MFG_NAND_PARTITION "mtdparts=gpmi-nand:16m(boot),16m(kernel),16m(dtb),-(rootfs) " | |
163 | +#else | |
164 | +#define CONFIG_MFG_NAND_PARTITION "" | |
165 | +#endif | |
166 | + | |
161 | 167 | #define CONFIG_MFG_ENV_SETTINGS \ |
162 | 168 | "mfgtool_args=setenv bootargs console=${console},${baudrate} " \ |
163 | 169 | "rdinit=/linuxrc " \ |
164 | 170 | "g_mass_storage.stall=0 g_mass_storage.removable=1 " \ |
165 | 171 | "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\ |
166 | 172 | "g_mass_storage.iSerialNumber=\"\" "\ |
173 | + CONFIG_MFG_NAND_PARTITION \ | |
167 | 174 | "\0" \ |
168 | 175 | "initrd_addr=0x83800000\0" \ |
169 | 176 | "initrd_high=0xffffffff\0" \ |
170 | 177 | "bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \ |
171 | 178 | |
179 | +#if defined(CONFIG_SYS_BOOT_NAND) | |
172 | 180 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
173 | 181 | CONFIG_MFG_ENV_SETTINGS \ |
182 | + CONFIG_VIDEO_MODE \ | |
183 | + "fdt_addr=0x83000000\0" \ | |
184 | + "fdt_high=0xffffffff\0" \ | |
185 | + "console=ttymxc0\0" \ | |
186 | + "bootargs=console=ttymxc0,115200 ubi.mtd=3 " \ | |
187 | + "root=ubi0:rootfs rootfstype=ubifs " \ | |
188 | + "mtdparts=gpmi-nand:16m(boot),16m(kernel),16m(dtb),-(rootfs)\0"\ | |
189 | + "bootcmd=nand read ${loadaddr} 0x1000000 0x800000;"\ | |
190 | + "nand read ${fdt_addr} 0x2000000 0x100000;"\ | |
191 | + "bootz ${loadaddr} - ${fdt_addr}\0" | |
192 | + | |
193 | +#else | |
194 | +#define CONFIG_EXTRA_ENV_SETTINGS \ | |
195 | + CONFIG_MFG_ENV_SETTINGS \ | |
174 | 196 | UPDATE_M4_ENV \ |
175 | 197 | CONFIG_VIDEO_MODE \ |
176 | 198 | "script=boot.scr\0" \ |
... | ... | @@ -246,6 +268,7 @@ |
246 | 268 | "fi; " \ |
247 | 269 | "fi; " \ |
248 | 270 | "else run netboot; fi" |
271 | +#endif | |
249 | 272 | |
250 | 273 | /* Miscellaneous configurable options */ |
251 | 274 | #define CONFIG_SYS_LONGHELP |