summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2021-10-21 17:02:18 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2021-10-26 09:33:45 +0000
commitebd108076039578d77cb591ec473290ebb7a6712 (patch)
treee0440db1e79d14f729fc9ca1bb9165ecd897dc86
parentef50f542dfceafe930cb694b35b5c560f12b9a30 (diff)
colibri-imx8x: make select_dt_from_module_version a command
When booting the Toradex Easy Installer from USB recovery select_dt_from_module_version is not automatically executed and thus ${soc} is not set correctly. Make the function available as a cli command so it can be executed as part of the bootcmd_mfg. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--board/toradex/colibri-imx8x/colibri-imx8x.c11
-rw-r--r--include/configs/colibri-imx8x.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c
index 84e44ddafe..0758ad3f57 100644
--- a/board/toradex/colibri-imx8x/colibri-imx8x.c
+++ b/board/toradex/colibri-imx8x/colibri-imx8x.c
@@ -184,6 +184,17 @@ static void select_dt_from_module_version(void)
env_set("soc", "imx8qxp");
}
+static int do_select_dt_from_module_version(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[]) {
+ select_dt_from_module_version();
+ return 0;
+}
+
+U_BOOT_CMD(
+ select_dt_from_module_version, CONFIG_SYS_MAXARGS, 1, do_select_dt_from_module_version,
+ "\n", " - select devicetree from module version"
+);
+
int board_init(void)
{
init_gpio_expander();
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h
index 13bdf3f760..a884a794b0 100644
--- a/include/configs/colibri-imx8x.h
+++ b/include/configs/colibri-imx8x.h
@@ -85,7 +85,7 @@
MEM_LAYOUT_ENV_SETTINGS \
"boot_scripts=" BOOT_SCRIPT "\0" \
"boot_script_dhcp=" BOOT_SCRIPT "\0" \
- "bootcmd_mfg=fastboot 0\0" \
+ "bootcmd_mfg=select_dt_from_module_version && fastboot 0\0" \
"console=ttyLP3,115200 earlycon=lpuart32,0x5a090000,115200\0" \
"fdt_addr=0x83000000\0" \
"fdt_high=\0" \