Skip to content
Snippets Groups Projects
Commit c6d32dfd authored by Valentin Longchamp's avatar Valentin Longchamp Committed by Tom Rini
Browse files

km: update the boot script to check for a DTB


If a DTB is found with cramfsls, the bootscript continues as expected.
If none is found, the cramfsloadfdt and boot subbootcmds are updated to
not load the DTB from cramfs and not pass it to the kernel. The kernel
thus must have an appended DTB otherwise the boot will fail.

This is required for the km_kirkwood boards that must support .esw where
the DTB sometimes is appended (for backwards compatibility) and sometimes
is passed correctly (as we do now for all newer boards).

Signed-off-by: default avatarValentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: default avatarHeiko Schocher <hs@denx.de>
parent 7f70460e
No related branches found
No related tags found
No related merge requests found
...@@ -141,8 +141,9 @@ ...@@ -141,8 +141,9 @@
* - 'release': for a standalone system kernel/rootfs from flash * - 'release': for a standalone system kernel/rootfs from flash
*/ */
#define CONFIG_KM_DEF_ENV_BOOTTARGETS \ #define CONFIG_KM_DEF_ENV_BOOTTARGETS \
"subbootcmds=ubiattach ubicopy cramfsloadfdt set_fdthigh " \ "subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt " \
"cramfsloadkernel flashargs add_default addpanic boot\0"\ "set_fdthigh cramfsloadkernel flashargs add_default " \
"addpanic boot\0" \
"develop=" \ "develop=" \
"tftp 200000 scripts/develop-${arch}.txt && " \ "tftp 200000 scripts/develop-${arch}.txt && " \
"env import -t 200000 ${filesize} && " \ "env import -t 200000 ${filesize} && " \
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
" ${filesize} && " \ " ${filesize} && " \
"protect on " __stringify(BOOTFLASH_START) " +${filesize}\0"\ "protect on " __stringify(BOOTFLASH_START) " +${filesize}\0"\
"set_fdthigh=true\0" \ "set_fdthigh=true\0" \
"checkfdt=true\0" \
"" ""
#endif /* __CONFIG_KEYMILE_POWERPC_H */ #endif /* __CONFIG_KEYMILE_POWERPC_H */
...@@ -82,6 +82,12 @@ ...@@ -82,6 +82,12 @@
"u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0" \ "u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0" \
CONFIG_KM_UPDATE_UBOOT \ CONFIG_KM_UPDATE_UBOOT \
"set_fdthigh=setenv fdt_high ${kernelmem}\0" \ "set_fdthigh=setenv fdt_high ${kernelmem}\0" \
"checkfdt=" \
"if cramfsls fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; " \
"then true; else setenv cramfsloadfdt true; " \
"setenv boot bootm ${load_addr_r}; " \
"echo No FDT found, booting with the kernel " \
"appended one; fi\0" \
"" ""
#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
......
...@@ -457,6 +457,7 @@ int get_scl(void); ...@@ -457,6 +457,7 @@ int get_scl(void);
"sf probe 0;sf erase 0 +${filesize};" \ "sf probe 0;sf erase 0 +${filesize};" \
"sf write ${load_addr_r} 0 ${filesize};\0" \ "sf write ${load_addr_r} 0 ${filesize};\0" \
"set_fdthigh=true\0" \ "set_fdthigh=true\0" \
"checkfdt=true\0" \
"" ""
#define CONFIG_HW_ENV_SETTINGS \ #define CONFIG_HW_ENV_SETTINGS \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment