[U-Boot] [PATCH 1/2] Convert CONFIG_SPL_RAM_DEVICE to defconfig

From: Stefan Agner stefan.agner@toradex.com
This converts the following to Kconfig: CONFIG_SPL_RAM_DEVICE
Signed-off-by: Stefan Agner stefan.agner@toradex.com ---
common/spl/Kconfig | 8 ++++++++ configs/apalis_t30_defconfig | 1 + configs/beaver_defconfig | 1 + configs/cardhu_defconfig | 1 + configs/cei-tk1-som_defconfig | 1 + configs/colibri_t20_defconfig | 1 + configs/colibri_t30_defconfig | 1 + configs/dalmore_defconfig | 1 + configs/harmony_defconfig | 1 + configs/jetson-tk1_defconfig | 1 + configs/medcom-wide_defconfig | 1 + configs/nyan-big_defconfig | 1 + configs/paz00_defconfig | 1 + configs/plutux_defconfig | 1 + configs/seaboard_defconfig | 1 + configs/socfpga_arria5_defconfig | 1 + configs/socfpga_cyclone5_defconfig | 1 + configs/socfpga_de0_nano_soc_defconfig | 1 + configs/socfpga_de1_soc_defconfig | 1 + configs/socfpga_is1_defconfig | 1 + configs/socfpga_mcvevk_defconfig | 1 + configs/socfpga_sockit_defconfig | 1 + configs/socfpga_socrates_defconfig | 1 + configs/socfpga_sr1500_defconfig | 1 + configs/socfpga_vining_fpga_defconfig | 1 + configs/tec-ng_defconfig | 1 + configs/tec_defconfig | 1 + configs/topic_miami_defconfig | 1 + configs/topic_miamiplus_defconfig | 1 + configs/trimslice_defconfig | 1 + configs/venice2_defconfig | 1 + configs/ventana_defconfig | 1 + configs/whistler_defconfig | 1 + configs/zynq_microzed_defconfig | 1 + configs/zynq_picozed_defconfig | 1 + configs/zynq_zc702_defconfig | 1 + configs/zynq_zc706_defconfig | 1 + configs/zynq_zc770_xm010_defconfig | 1 + configs/zynq_zc770_xm011_defconfig | 1 + configs/zynq_zc770_xm012_defconfig | 1 + configs/zynq_zc770_xm013_defconfig | 1 + configs/zynq_zed_defconfig | 1 + configs/zynq_zybo_defconfig | 1 + include/configs/microblaze-generic.h | 1 - include/configs/socfpga_common.h | 1 - include/configs/tegra-common.h | 1 - include/configs/xilinx_zynqmp.h | 1 - include/configs/zynq-common.h | 1 - 48 files changed, 50 insertions(+), 5 deletions(-)
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index cba51f5..8f779e6 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -449,6 +449,14 @@ config SPL_POWER_SUPPORT in drivers/power, drivers/power/pmic and drivers/power/regulator as part of an SPL build.
+config SPL_RAM_DEVICE + bool "Support booting from preloaded image in RAM" + depends on SPL + help + Enable booting of an image already loaded in RAM. The image has to + be already in memory when SPL takes over, e.g. loaded by the boot + ROM. + config SPL_SATA_SUPPORT bool "Support loading from SATA" depends on SPL diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig index 691148c..68ada32 100644 --- a/configs/apalis_t30_defconfig +++ b/configs/apalis_t30_defconfig @@ -7,6 +7,7 @@ CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Apalis T30 # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/beaver_defconfig b/configs/beaver_defconfig index 5cb73c0..7af382d 100644 --- a/configs/beaver_defconfig +++ b/configs/beaver_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra30-beaver" CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra30 (Beaver) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/cardhu_defconfig b/configs/cardhu_defconfig index 0214758..9673387 100644 --- a/configs/cardhu_defconfig +++ b/configs/cardhu_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra30-cardhu" CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra30 (Cardhu) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/cei-tk1-som_defconfig b/configs/cei-tk1-som_defconfig index 909b367..f901296 100644 --- a/configs/cei-tk1-som_defconfig +++ b/configs/cei-tk1-som_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-cei-tk1-som" CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra124 (TK1-SOM) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig index a543246..7806799 100644 --- a/configs/colibri_t20_defconfig +++ b/configs/colibri_t20_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri" CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_STDIO_DEREGISTER=y # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Colibri T20 # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig index 2ab6764..fd27e4f 100644 --- a/configs/colibri_t30_defconfig +++ b/configs/colibri_t30_defconfig @@ -7,6 +7,7 @@ CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Colibri T30 # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/dalmore_defconfig b/configs/dalmore_defconfig index 0db2d1d..159e98a 100644 --- a/configs/dalmore_defconfig +++ b/configs/dalmore_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra114-dalmore" CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra114 (Dalmore) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/harmony_defconfig b/configs/harmony_defconfig index d8712d5..9d14df9 100644 --- a/configs/harmony_defconfig +++ b/configs/harmony_defconfig @@ -5,6 +5,7 @@ CONFIG_TARGET_HARMONY=y CONFIG_DEFAULT_DEVICE_TREE="tegra20-harmony" CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (Harmony) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig index b0aa3c7..3406abc 100644 --- a/configs/jetson-tk1_defconfig +++ b/configs/jetson-tk1_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-jetson-tk1" CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra124 (Jetson TK1) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/medcom-wide_defconfig b/configs/medcom-wide_defconfig index a65c3ad..2ed76c3 100644 --- a/configs/medcom-wide_defconfig +++ b/configs/medcom-wide_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra20-medcom-wide" CONFIG_FIT=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (Medcom-Wide) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig index e6f862d..7953531 100644 --- a/configs/nyan-big_defconfig +++ b/configs/nyan-big_defconfig @@ -7,6 +7,7 @@ CONFIG_FIT=y CONFIG_FIT_BEST_MATCH=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra124 (Nyan-big) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/paz00_defconfig b/configs/paz00_defconfig index b3d6f90..07f9d24 100644 --- a/configs/paz00_defconfig +++ b/configs/paz00_defconfig @@ -5,6 +5,7 @@ CONFIG_TARGET_PAZ00=y CONFIG_DEFAULT_DEVICE_TREE="tegra20-paz00" CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (Paz00) MOD # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/plutux_defconfig b/configs/plutux_defconfig index 3c45b9d..9e3b2f3 100644 --- a/configs/plutux_defconfig +++ b/configs/plutux_defconfig @@ -7,6 +7,7 @@ CONFIG_FIT=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (Plutux) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/seaboard_defconfig b/configs/seaboard_defconfig index c3119dc..f066c06 100644 --- a/configs/seaboard_defconfig +++ b/configs/seaboard_defconfig @@ -4,6 +4,7 @@ CONFIG_TEGRA20=y CONFIG_TARGET_SEABOARD=y CONFIG_DEFAULT_DEVICE_TREE="tegra20-seaboard" CONFIG_OF_SYSTEM_SETUP=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (SeaBoard) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig index d91990c..5f7615b 100644 --- a/configs/socfpga_arria5_defconfig +++ b/configs/socfpga_arria5_defconfig @@ -13,6 +13,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig index 905f766..11c4205 100644 --- a/configs/socfpga_cyclone5_defconfig +++ b/configs/socfpga_cyclone5_defconfig @@ -13,6 +13,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig index 7daf81a..8edbe06 100644 --- a/configs/socfpga_de0_nano_soc_defconfig +++ b/configs/socfpga_de0_nano_soc_defconfig @@ -13,6 +13,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig index d8a3b82..e306062 100644 --- a/configs/socfpga_de1_soc_defconfig +++ b/configs/socfpga_de1_soc_defconfig @@ -15,6 +15,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_is1_defconfig b/configs/socfpga_is1_defconfig index a0f04d0..84c5463 100644 --- a/configs/socfpga_is1_defconfig +++ b/configs/socfpga_is1_defconfig @@ -12,6 +12,7 @@ CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_mcvevk_defconfig b/configs/socfpga_mcvevk_defconfig index 5a53246..192a4b9 100644 --- a/configs/socfpga_mcvevk_defconfig +++ b/configs/socfpga_mcvevk_defconfig @@ -13,6 +13,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig index 9450d21..bd52885 100644 --- a/configs/socfpga_sockit_defconfig +++ b/configs/socfpga_sockit_defconfig @@ -13,6 +13,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig index 84a8890..9c5dd45 100644 --- a/configs/socfpga_socrates_defconfig +++ b/configs/socfpga_socrates_defconfig @@ -13,6 +13,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig index 641dd4d..b7b1bfc 100644 --- a/configs/socfpga_sr1500_defconfig +++ b/configs/socfpga_sr1500_defconfig @@ -14,6 +14,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig index 608cdf8..d95c399 100644 --- a/configs/socfpga_vining_fpga_defconfig +++ b/configs/socfpga_vining_fpga_defconfig @@ -14,6 +14,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set diff --git a/configs/tec-ng_defconfig b/configs/tec-ng_defconfig index f52f19b..d554688 100644 --- a/configs/tec-ng_defconfig +++ b/configs/tec-ng_defconfig @@ -7,6 +7,7 @@ CONFIG_FIT=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra30 (TEC-NG) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/tec_defconfig b/configs/tec_defconfig index 1ccec73..fe4b27c 100644 --- a/configs/tec_defconfig +++ b/configs/tec_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra20-tec" CONFIG_FIT=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (TEC) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/topic_miami_defconfig b/configs/topic_miami_defconfig index 3d6161e..4ecd00d 100644 --- a/configs/topic_miami_defconfig +++ b/configs/topic_miami_defconfig @@ -8,6 +8,7 @@ CONFIG_BOOTDELAY=0 CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="zynq-uboot> " # CONFIG_CMD_IMLS is not set diff --git a/configs/topic_miamiplus_defconfig b/configs/topic_miamiplus_defconfig index 3160f00..5edbf5c 100644 --- a/configs/topic_miamiplus_defconfig +++ b/configs/topic_miamiplus_defconfig @@ -8,6 +8,7 @@ CONFIG_BOOTDELAY=0 CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="zynq-uboot> " # CONFIG_CMD_IMLS is not set diff --git a/configs/trimslice_defconfig b/configs/trimslice_defconfig index a145ff8..3959689 100644 --- a/configs/trimslice_defconfig +++ b/configs/trimslice_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra20-trimslice" CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (TrimSlice) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/venice2_defconfig b/configs/venice2_defconfig index 8ff879f..635184c 100644 --- a/configs/venice2_defconfig +++ b/configs/venice2_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra124-venice2" CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra124 (Venice2) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/ventana_defconfig b/configs/ventana_defconfig index 1f2809a..a5ebda2 100644 --- a/configs/ventana_defconfig +++ b/configs/ventana_defconfig @@ -4,6 +4,7 @@ CONFIG_TEGRA20=y CONFIG_TARGET_VENTANA=y CONFIG_DEFAULT_DEVICE_TREE="tegra20-ventana" CONFIG_OF_SYSTEM_SETUP=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (Ventana) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/whistler_defconfig b/configs/whistler_defconfig index b7c3ed9..471a6b6 100644 --- a/configs/whistler_defconfig +++ b/configs/whistler_defconfig @@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra20-whistler" CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_SYS_PROMPT="Tegra20 (Whistler) # " # CONFIG_CMD_IMI is not set # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig index 16d26c0..02c64e1 100644 --- a/configs/zynq_microzed_defconfig +++ b/configs/zynq_microzed_defconfig @@ -8,6 +8,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_picozed_defconfig b/configs/zynq_picozed_defconfig index 3ba6b66..3502882 100644 --- a/configs/zynq_picozed_defconfig +++ b/configs/zynq_picozed_defconfig @@ -5,6 +5,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig index 117bfda..b4cef10 100644 --- a/configs/zynq_zc702_defconfig +++ b/configs/zynq_zc702_defconfig @@ -9,6 +9,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig index ef73849..007a547 100644 --- a/configs/zynq_zc706_defconfig +++ b/configs/zynq_zc706_defconfig @@ -9,6 +9,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_zc770_xm010_defconfig b/configs/zynq_zc770_xm010_defconfig index 1419efa..f338504 100644 --- a/configs/zynq_zc770_xm010_defconfig +++ b/configs/zynq_zc770_xm010_defconfig @@ -9,6 +9,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_zc770_xm011_defconfig b/configs/zynq_zc770_xm011_defconfig index 2f4fc1e..a64ead1 100644 --- a/configs/zynq_zc770_xm011_defconfig +++ b/configs/zynq_zc770_xm011_defconfig @@ -9,6 +9,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_zc770_xm012_defconfig b/configs/zynq_zc770_xm012_defconfig index d3116e1..08069ae 100644 --- a/configs/zynq_zc770_xm012_defconfig +++ b/configs/zynq_zc770_xm012_defconfig @@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM012" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " CONFIG_CMD_GPIO=y diff --git a/configs/zynq_zc770_xm013_defconfig b/configs/zynq_zc770_xm013_defconfig index add038c..baa192c 100644 --- a/configs/zynq_zc770_xm013_defconfig +++ b/configs/zynq_zc770_xm013_defconfig @@ -9,6 +9,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig index 96f00e4..f4f9d01 100644 --- a/configs/zynq_zed_defconfig +++ b/configs/zynq_zed_defconfig @@ -8,6 +8,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig index dfac764..b990d44 100644 --- a/configs/zynq_zybo_defconfig +++ b/configs/zynq_zybo_defconfig @@ -9,6 +9,7 @@ CONFIG_SYS_NO_FLASH=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SPL=y CONFIG_SPL_OS_BOOT=y +CONFIG_SPL_RAM_DEVICE=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Zynq> " # CONFIG_CMD_IMLS is not set diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 7abffdb..cc90b73 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -284,7 +284,6 @@
#define CONFIG_SPL_LDSCRIPT "arch/microblaze/cpu/u-boot-spl.lds"
-#define CONFIG_SPL_RAM_DEVICE #ifdef CONFIG_SYS_FLASH_BASE # define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_FLASH_BASE #endif diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 58a6550..7292469 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -309,7 +309,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void); * 0xFFFF_FF00 ...... End of SRAM */ #define CONFIG_SPL_FRAMEWORK -#define CONFIG_SPL_RAM_DEVICE #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR #define CONFIG_SPL_MAX_SIZE (64 * 1024)
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h index 63b711b..4d57b8d 100644 --- a/include/configs/tegra-common.h +++ b/include/configs/tegra-common.h @@ -104,7 +104,6 @@
/* Defines for SPL */ #define CONFIG_SPL_FRAMEWORK -#define CONFIG_SPL_RAM_DEVICE #define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_MAX_FOOTPRINT (CONFIG_SYS_TEXT_BASE - \ diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index d480990..7ee0e0b 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -261,7 +261,6 @@
#define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_BOARD_INIT -#define CONFIG_SPL_RAM_DEVICE
/* u-boot is like dtb */ #define CONFIG_SPL_FS_LOAD_ARGS_NAME "u-boot.bin" diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 953e731..e04be5c 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -296,7 +296,6 @@ #define CONFIG_CMD_SPL #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_BOARD_INIT -#define CONFIG_SPL_RAM_DEVICE
#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-zynq/u-boot-spl.lds"

From: Stefan Agner stefan.agner@toradex.com
Add a new top-level config option so support booting an image stored in RAM. This allows to move the RAM boot support into a sparate file and having a single condition to compile that file.
Signed-off-by: Stefan Agner stefan.agner@toradex.com --- The series has been build tested using buildman.
Building current source for 1230 boards (8 threads, 1 job per thread) 1019 0 211 /1230 0:00:03 : P1022DS_NAND
-- Stefan
common/spl/Kconfig | 11 ++++++++-- common/spl/Makefile | 1 + common/spl/spl.c | 58 ----------------------------------------------------- 3 files changed, 10 insertions(+), 60 deletions(-)
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 8f779e6..802779b 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -449,9 +449,16 @@ config SPL_POWER_SUPPORT in drivers/power, drivers/power/pmic and drivers/power/regulator as part of an SPL build.
+config SPL_RAM_SUPPORT + bool "Support booting from RAM" + depends on SPL + help + Enable booting of an image in RAM. The image can be preloaded or + it can be loaded by SPL directly into RAM (e.g. using USB). + config SPL_RAM_DEVICE bool "Support booting from preloaded image in RAM" - depends on SPL + depends on SPL_RAM_SUPPORT help Enable booting of an image already loaded in RAM. The image has to be already in memory when SPL takes over, e.g. loaded by the boot @@ -557,7 +564,7 @@ choice
config SPL_DFU_RAM bool "RAM device" - depends on SPL_DFU_SUPPORT + depends on SPL_DFU_SUPPORT && SPL_RAM_SUPPORT help select RAM/DDR memory device for loading binary images (u-boot/kernel) to the selected device partition using diff --git a/common/spl/Makefile b/common/spl/Makefile index ed02635..1933cbd 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -26,4 +26,5 @@ obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o obj-$(CONFIG_SPL_SATA_SUPPORT) += spl_sata.o obj-$(CONFIG_SPL_DFU_SUPPORT) += spl_dfu.o obj-$(CONFIG_SPL_SPI_LOAD) += spl_spi.o +obj-$(CONFIG_SPL_RAM_SUPPORT) += spl_ram.o endif diff --git a/common/spl/spl.c b/common/spl/spl.c index f7df834..2f3b6a4 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -170,64 +170,6 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) image_entry(); }
-#ifndef CONFIG_SPL_LOAD_FIT_ADDRESS -# define CONFIG_SPL_LOAD_FIT_ADDRESS 0 -#endif - -#if defined(CONFIG_SPL_RAM_DEVICE) || defined(CONFIG_SPL_DFU_SUPPORT) -static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, - ulong count, void *buf) -{ - debug("%s: sector %lx, count %lx, buf %lx\n", - __func__, sector, count, (ulong)buf); - memcpy(buf, (void *)(CONFIG_SPL_LOAD_FIT_ADDRESS + sector), count); - return count; -} - -static int spl_ram_load_image(struct spl_image_info *spl_image, - struct spl_boot_device *bootdev) -{ - struct image_header *header; - - header = (struct image_header *)CONFIG_SPL_LOAD_FIT_ADDRESS; - -#if defined(CONFIG_SPL_DFU_SUPPORT) - if (bootdev->boot_device == BOOT_DEVICE_DFU) - spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0"); -#endif - - if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) && - image_get_magic(header) == FDT_MAGIC) { - struct spl_load_info load; - - debug("Found FIT\n"); - load.bl_len = 1; - load.read = spl_ram_load_read; - spl_load_simple_fit(spl_image, &load, 0, header); - } else { - debug("Legacy image\n"); - /* - * Get the header. It will point to an address defined by - * handoff which will tell where the image located inside - * the flash. For now, it will temporary fixed to address - * pointed by U-Boot. - */ - header = (struct image_header *) - (CONFIG_SYS_TEXT_BASE - sizeof(struct image_header)); - - spl_parse_image_header(spl_image, header); - } - - return 0; -} -#if defined(CONFIG_SPL_RAM_DEVICE) -SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image); -#endif -#if defined(CONFIG_SPL_DFU_SUPPORT) -SPL_LOAD_IMAGE_METHOD("USB DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image); -#endif -#endif - int spl_init(void) { int ret;

On 16.12.2016 03:00, Stefan Agner wrote:
From: Stefan Agner stefan.agner@toradex.com
Add a new top-level config option so support booting an image stored in RAM. This allows to move the RAM boot support into a sparate file and having a single condition to compile that file.
Signed-off-by: Stefan Agner stefan.agner@toradex.com
The series has been build tested using buildman.
Building current source for 1230 boards (8 threads, 1 job per thread) 1019 0 211 /1230 0:00:03 : P1022DS_NAND
-- Stefan
common/spl/Kconfig | 11 ++++++++-- common/spl/Makefile | 1 + common/spl/spl.c | 58 ----------------------------------------------------- 3 files changed, 10 insertions(+), 60 deletions(-)
Looks like you forgot to add the newly created file.
Thanks, Stefan
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 8f779e6..802779b 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -449,9 +449,16 @@ config SPL_POWER_SUPPORT in drivers/power, drivers/power/pmic and drivers/power/regulator as part of an SPL build.
+config SPL_RAM_SUPPORT
- bool "Support booting from RAM"
- depends on SPL
- help
Enable booting of an image in RAM. The image can be preloaded or
it can be loaded by SPL directly into RAM (e.g. using USB).
config SPL_RAM_DEVICE bool "Support booting from preloaded image in RAM"
- depends on SPL
- depends on SPL_RAM_SUPPORT help Enable booting of an image already loaded in RAM. The image has to be already in memory when SPL takes over, e.g. loaded by the boot
@@ -557,7 +564,7 @@ choice
config SPL_DFU_RAM bool "RAM device"
- depends on SPL_DFU_SUPPORT
- depends on SPL_DFU_SUPPORT && SPL_RAM_SUPPORT help select RAM/DDR memory device for loading binary images (u-boot/kernel) to the selected device partition using
diff --git a/common/spl/Makefile b/common/spl/Makefile index ed02635..1933cbd 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -26,4 +26,5 @@ obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o obj-$(CONFIG_SPL_SATA_SUPPORT) += spl_sata.o obj-$(CONFIG_SPL_DFU_SUPPORT) += spl_dfu.o obj-$(CONFIG_SPL_SPI_LOAD) += spl_spi.o +obj-$(CONFIG_SPL_RAM_SUPPORT) += spl_ram.o endif diff --git a/common/spl/spl.c b/common/spl/spl.c index f7df834..2f3b6a4 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -170,64 +170,6 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) image_entry(); }
-#ifndef CONFIG_SPL_LOAD_FIT_ADDRESS -# define CONFIG_SPL_LOAD_FIT_ADDRESS 0 -#endif
-#if defined(CONFIG_SPL_RAM_DEVICE) || defined(CONFIG_SPL_DFU_SUPPORT) -static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector,
ulong count, void *buf)
-{
- debug("%s: sector %lx, count %lx, buf %lx\n",
__func__, sector, count, (ulong)buf);
- memcpy(buf, (void *)(CONFIG_SPL_LOAD_FIT_ADDRESS + sector), count);
- return count;
-}
-static int spl_ram_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
-{
- struct image_header *header;
- header = (struct image_header *)CONFIG_SPL_LOAD_FIT_ADDRESS;
-#if defined(CONFIG_SPL_DFU_SUPPORT)
- if (bootdev->boot_device == BOOT_DEVICE_DFU)
spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0");
-#endif
- if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
image_get_magic(header) == FDT_MAGIC) {
struct spl_load_info load;
debug("Found FIT\n");
load.bl_len = 1;
load.read = spl_ram_load_read;
spl_load_simple_fit(spl_image, &load, 0, header);
- } else {
debug("Legacy image\n");
/*
* Get the header. It will point to an address defined by
* handoff which will tell where the image located inside
* the flash. For now, it will temporary fixed to address
* pointed by U-Boot.
*/
header = (struct image_header *)
(CONFIG_SYS_TEXT_BASE - sizeof(struct image_header));
spl_parse_image_header(spl_image, header);
- }
- return 0;
-} -#if defined(CONFIG_SPL_RAM_DEVICE) -SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image); -#endif -#if defined(CONFIG_SPL_DFU_SUPPORT) -SPL_LOAD_IMAGE_METHOD("USB DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image); -#endif -#endif
int spl_init(void) { int ret;
Viele Grüße, Stefan

On 2016-12-16 06:08, Stefan Roese wrote:
On 16.12.2016 03:00, Stefan Agner wrote:
From: Stefan Agner stefan.agner@toradex.com
Add a new top-level config option so support booting an image stored in RAM. This allows to move the RAM boot support into a sparate file and having a single condition to compile that file.
Signed-off-by: Stefan Agner stefan.agner@toradex.com
The series has been build tested using buildman.
Building current source for 1230 boards (8 threads, 1 job per thread) 1019 0 211 /1230 0:00:03 : P1022DS_NAND
-- Stefan
common/spl/Kconfig | 11 ++++++++-- common/spl/Makefile | 1 + common/spl/spl.c | 58 ----------------------------------------------------- 3 files changed, 10 insertions(+), 60 deletions(-)
Looks like you forgot to add the newly created file.
Oops, you are right. Will send out v2.
-- Stefan
Thanks, Stefan
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 8f779e6..802779b 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -449,9 +449,16 @@ config SPL_POWER_SUPPORT in drivers/power, drivers/power/pmic and drivers/power/regulator as part of an SPL build.
+config SPL_RAM_SUPPORT
- bool "Support booting from RAM"
- depends on SPL
- help
Enable booting of an image in RAM. The image can be preloaded or
it can be loaded by SPL directly into RAM (e.g. using USB).
config SPL_RAM_DEVICE bool "Support booting from preloaded image in RAM"
- depends on SPL
- depends on SPL_RAM_SUPPORT help Enable booting of an image already loaded in RAM. The image has to be already in memory when SPL takes over, e.g. loaded by the boot
@@ -557,7 +564,7 @@ choice
config SPL_DFU_RAM bool "RAM device"
- depends on SPL_DFU_SUPPORT
- depends on SPL_DFU_SUPPORT && SPL_RAM_SUPPORT help select RAM/DDR memory device for loading binary images (u-boot/kernel) to the selected device partition using
diff --git a/common/spl/Makefile b/common/spl/Makefile index ed02635..1933cbd 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -26,4 +26,5 @@ obj-$(CONFIG_SPL_EXT_SUPPORT) += spl_ext.o obj-$(CONFIG_SPL_SATA_SUPPORT) += spl_sata.o obj-$(CONFIG_SPL_DFU_SUPPORT) += spl_dfu.o obj-$(CONFIG_SPL_SPI_LOAD) += spl_spi.o +obj-$(CONFIG_SPL_RAM_SUPPORT) += spl_ram.o endif diff --git a/common/spl/spl.c b/common/spl/spl.c index f7df834..2f3b6a4 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -170,64 +170,6 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) image_entry(); }
-#ifndef CONFIG_SPL_LOAD_FIT_ADDRESS -# define CONFIG_SPL_LOAD_FIT_ADDRESS 0 -#endif
-#if defined(CONFIG_SPL_RAM_DEVICE) || defined(CONFIG_SPL_DFU_SUPPORT) -static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector,
ulong count, void *buf)
-{
- debug("%s: sector %lx, count %lx, buf %lx\n",
__func__, sector, count, (ulong)buf);
- memcpy(buf, (void *)(CONFIG_SPL_LOAD_FIT_ADDRESS + sector), count);
- return count;
-}
-static int spl_ram_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
-{
- struct image_header *header;
- header = (struct image_header *)CONFIG_SPL_LOAD_FIT_ADDRESS;
-#if defined(CONFIG_SPL_DFU_SUPPORT)
- if (bootdev->boot_device == BOOT_DEVICE_DFU)
spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0");
-#endif
- if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
image_get_magic(header) == FDT_MAGIC) {
struct spl_load_info load;
debug("Found FIT\n");
load.bl_len = 1;
load.read = spl_ram_load_read;
spl_load_simple_fit(spl_image, &load, 0, header);
- } else {
debug("Legacy image\n");
/*
* Get the header. It will point to an address defined by
* handoff which will tell where the image located inside
* the flash. For now, it will temporary fixed to address
* pointed by U-Boot.
*/
header = (struct image_header *)
(CONFIG_SYS_TEXT_BASE - sizeof(struct image_header));
spl_parse_image_header(spl_image, header);
- }
- return 0;
-} -#if defined(CONFIG_SPL_RAM_DEVICE) -SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image); -#endif -#if defined(CONFIG_SPL_DFU_SUPPORT) -SPL_LOAD_IMAGE_METHOD("USB DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image); -#endif -#endif
int spl_init(void) { int ret;
Viele Grüße, Stefan
participants (2)
-
Stefan Agner
-
Stefan Roese