[U-Boot] [PATCH 1/2] spl: define kernel and dtb name for falcon mode from menuconfig

Fabien Lahoudere fabien.lahoudere at collabora.com
Tue Nov 13 08:07:57 UTC 2018


If we use falcon mode with ext or fat filesystem, we have to define
CONFIG_SPL_FS_LOAD_KERNEL_NAME and CONFIG_SPL_FS_LOAD_ARGS_NAME in
the board header.

However a header can be used for different boards (e.g Marsboard and
riotboardlike use embestmx6boards.h).
We can aslo have some project with binaries in different places.

The two previous problem let me think that it can be easier to add
this information in the config file and have an entry in menuconfig
to define them, instead of patching source code.

This patch propose a solution.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere at collabora.com>
---
 common/spl/Kconfig                | 18 ++++++++++++++++++
 configs/riotboard_spl_defconfig   |  2 +-
 include/configs/embestmx6boards.h |  2 --
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index d0564621d4..dd0c4eb8ac 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -551,6 +551,24 @@ config SPL_OS_BOOT
 	  Enable booting directly to an OS from SPL.
 	  for more info read doc/README.falcon
 
+config SPL_FS_LOAD_KERNEL_NAME
+	string "Falcon mode image name"
+	depends on (SPL_OS_BOOT && (SPL_EXT_SUPPORT || SPL_FAT_SUPPORT))
+	default "uImage"
+	help
+	  If falcon mode is enabled (SPL_OS_BOOT) and you chose to boot
+	  from ext or fat partition, you need to define the name of the
+	  kernel to boot.
+
+config SPL_FS_LOAD_ARGS_NAME
+	string "Falcon mode device tree name"
+	depends on (SPL_OS_BOOT && SPL_OF_LIBFDT && (SPL_EXT_SUPPORT || SPL_FAT_SUPPORT))
+	default "args"
+	help
+	  If falcon mode is enabled (SPL_OS_BOOT) and you need a device
+	  tree to bootchose to boot from ext or fat partition, define here
+	  the name of the dtb.
+
 if SPL_OS_BOOT
 config SYS_OS_BASE
 	hex "addr, where OS is found"
diff --git a/configs/riotboard_spl_defconfig b/configs/riotboard_spl_defconfig
index 8b5459aa1a..6561cc91f9 100644
--- a/configs/riotboard_spl_defconfig
+++ b/configs/riotboard_spl_defconfig
@@ -17,9 +17,9 @@ CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_BOARD_EARLY_INIT_F=y
-CONFIG_SPL_RAW_IMAGE_SUPPORT=y
 CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
+CONFIG_SPL_FS_LOAD_ARGS_NAME="imx6dl-riotboard.dtb"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h
index 7e7de4dae6..98681fb3e0 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -113,8 +113,6 @@
 #include "imx6_spl.h"
 /* RiOTboard */
 #define CONFIG_SYS_SPL_ARGS_ADDR 0x13000000
-#define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage"
-#define CONFIG_SPL_FS_LOAD_ARGS_NAME "imx6dl-riotboard.dtb"
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR        0 /* offset 69KB */
 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR  0 /* offset 69KB */
-- 
2.19.1



More information about the U-Boot mailing list