|
32 | 32 |
|
33 | 33 | #define CONFIG_PHYS_TO_BUS
|
34 | 34 |
|
| 35 | +/* |
| 36 | + *FIT Image |
| 37 | +*/ |
| 38 | +#define CONFIG_FIT |
| 39 | +#ifdef CONFIG_FIT |
| 40 | +#define CONFIG_FIT_BEST_MATCH |
| 41 | +#define CONFIG_FIT_SIGNATURE |
| 42 | +#define CONFIG_FIT_VERBOSE |
| 43 | +#define CONFIG_RSA |
| 44 | +#define CONFIG_RSA_SOFTWARE_EXP |
| 45 | +#define CONFIG_IMAGE_FORMAT_LEGACY |
| 46 | +#define FITBOOT_VARIABLES \ |
| 47 | + "fitfile=fitImage\0" \ |
| 48 | + "fitconf="PISTACHIO_BOARD_NAME"_config@1\0" \ |
| 49 | + "bootm_verify=y\0" |
| 50 | +#else |
| 51 | +#define FITBOOT_VARIABLES "" |
| 52 | +#endif |
| 53 | + |
35 | 54 | /*
|
36 | 55 | * Memory map
|
37 | 56 | */
|
|
278 | 297 | "ubifsload $fdtaddr $bootdir$fdtfile;" \
|
279 | 298 | "bootm $loadaddr - $fdtaddr;"
|
280 | 299 |
|
281 |
| -#define DUAL_NAND_BOOTCOMMAND \ |
| 300 | +#define DUAL_NAND_BOOT_INIT \ |
282 | 301 | "sf probe 1:0;" \
|
283 | 302 | "mtdparts default;" \
|
284 | 303 | "setenv nandroot ubi.mtd=firmware${boot_partition} root=ubi0:rootfs rootfstype=ubifs;" \
|
285 | 304 | "setenv bootargs $console $earlycon $nandroot $bootextra $mtdparts panic=2;" \
|
286 |
| - "setenv verify n;" \ |
287 |
| - "ubi part firmware${boot_partition};" \ |
288 |
| - "setenv ubifs_bootm_cmd \"ubifsmount ubi:rootfs && " \ |
289 |
| - "ubifsload $loadaddr $bootdir$bootfile && " \ |
290 |
| - "ubifsload $fdtaddr $bootdir$fdtfile && " \ |
291 |
| - "bootm $loadaddr - $fdtaddr\";" \ |
| 305 | + "setenv verify $bootm_verify;" \ |
| 306 | + "ubi part firmware${boot_partition};" \ |
| 307 | + "ubifsmount ubi:rootfs || reset;" |
| 308 | + |
| 309 | +#define DUAL_NAND_UIMAGE_BOOT \ |
| 310 | + "setenv ubifs_bootm_cmd \"ubifsload $loadaddr $bootdir$bootfile && " \ |
| 311 | + "ubifsload $fdtaddr $bootdir$fdtfile && " \ |
| 312 | + "bootm $loadaddr - $fdtaddr\";" |
| 313 | + |
| 314 | +#define DUAL_NAND_FITIMAGE_BOOT \ |
| 315 | + "setenv ubifs_bootm_cmd \"ubifsload $loadaddr $bootdir$fitfile && " \ |
| 316 | + "bootm $loadaddr#$fitconf\";" |
| 317 | + |
| 318 | + |
| 319 | +#ifdef CONFIG_FIT |
| 320 | +/* |
| 321 | + If fitImage file is found boot that, else try uImage |
| 322 | +*/ |
| 323 | +#define DUAL_NAND_BOOTCOMMAND \ |
| 324 | + DUAL_NAND_BOOT_INIT \ |
| 325 | + "if ubifsls $bootdir$fitfile; then " \ |
| 326 | + DUAL_NAND_FITIMAGE_BOOT \ |
| 327 | + "else " \ |
| 328 | + DUAL_NAND_UIMAGE_BOOT \ |
| 329 | + "fi;" \ |
292 | 330 | "run ubifs_bootm_cmd || reset;"
|
| 331 | +#else |
| 332 | +#define DUAL_NAND_BOOTCOMMAND \ |
| 333 | + DUAL_NAND_BOOT_INIT \ |
| 334 | + DUAL_NAND_UIMAGE_BOOT \ |
| 335 | + "run ubifs_bootm_cmd || reset;" |
| 336 | +#endif |
293 | 337 |
|
294 | 338 | #ifdef CONFIG_BOOTCOUNT_LIMIT
|
295 | 339 |
|
|
348 | 392 | "fdtaddr=0x0D000000\0" \
|
349 | 393 | "fdtfile="PISTACHIO_BOARD_NAME".dtb\0" \
|
350 | 394 | "bootfile=uImage\0" \
|
| 395 | + FITBOOT_VARIABLES \ |
351 | 396 | "loadaddr=0x0E000000\0" \
|
352 | 397 | "bootdir=/\0" \
|
353 | 398 | "usbdev=0\0" \
|
|
0 commit comments