Allow disabling non-FIT image loading from SPL
v6 cover Allow disabling non-FIT image loading from SPL
Hello all,
To address a needed feature brought up by Andreas[0], we need a way to disable SPL from loading non-FIT images.
The function spl_parse_image_header is common to all SPL loading paths (common/spl/spl_(nand|net|nor|etc..)) so we add the check here.
This version of the series is a bit different than the first few due to suggestions by Simon, instead of a negative option disabling non-FIT images, we allow the other image format's support to be toggled off, and do that on HS boards.
Thanks,
Andrew
[0] https://www.mail-archive.com/u-boot at lists.denx.de/msg219253.html
Changes from v5:
- Set the default to y only on non-HS boards
Changes from v4:
- Finish conversion of SPL_RAW_IMAGE_SUPPORT
Changes from v3:
- Add debug print as suggested by Simon
Andrew F. Davis (3):
spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option
spl: Add option to enable SPL Legacy image support
Kconfig: Disable non-FIT SPL loading for TI secure devices
Kconfig | 15 +++++++++++++++ README | 4 ---- common/spl/spl.c | 20 ++++++++++++++------ configs/apalis_imx6_defconfig | 1 + configs/cgtqmx6eval_defconfig | 1 + configs/cm_fx6_defconfig | 1 + configs/colibri_imx6_defconfig | 1 + configs/gwventana_defconfig | 1 + configs/imx6dl_icore_mmc_defconfig | 1 + configs/imx6dl_icore_rqs_mmc_defconfig | 1 + configs/imx6q_icore_mmc_defconfig | 1 + configs/imx6q_icore_rqs_mmc_defconfig | 1 + configs/imx6ul_geam_mmc_defconfig | 1 + configs/liteboard_defconfig | 1 + configs/mccmon6_sd_defconfig | 1 + configs/mx6cuboxi_defconfig | 1 + configs/mx6sabresd_spl_defconfig | 1 + configs/mx6slevk_spl_defconfig | 1 + configs/mx6sxsabresd_spl_defconfig | 1 + configs/mx6ul_14x14_evk_defconfig | 1 + configs/mx6ul_9x9_evk_defconfig | 1 + configs/novena_defconfig | 1 + configs/pcm058_defconfig | 1 + configs/platinum_picon_defconfig | 1 + configs/platinum_titanium_defconfig | 1 + configs/socfpga_de1_soc_defconfig | 1 + configs/udoo_defconfig | 1 + configs/udoo_neo_defconfig | 1 + configs/wandboard_defconfig | 1 + configs/xpress_spl_defconfig | 1 + configs/zc5202_defconfig | 1 + configs/zc5601_defconfig | 1 + include/configs/imx6_spl.h | 2 -- include/configs/socfpga_de1_soc.h | 2 -- include/spl.h | 2 +- 35 files changed, 59 insertions(+), 15 deletions(-)
Signature · 1 line
2.11.0
PATCH v6 1/3 spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option
CONFIG_SPL_ABORT_ON_RAW_IMAGE causes SPL to abort and move on when it encounters RAW images, express this same functionality as a positive option enabling support for RAW images: CONFIG_SPL_RAW_IMAGE_SUPPORT
Also move uses of this to defconfigs.
--- Kconfig | 7 +++++++ README | 4 ---- common/spl/spl.c | 10 ++++++---- configs/apalis_imx6_defconfig | 1 + configs/cgtqmx6eval_defconfig | 1 + configs/cm_fx6_defconfig | 1 + configs/colibri_imx6_defconfig | 1 + configs/gwventana_defconfig | 1 + configs/imx6dl_icore_mmc_defconfig | 1 + configs/imx6dl_icore_rqs_mmc_defconfig | 1 + configs/imx6q_icore_mmc_defconfig | 1 + configs/imx6q_icore_rqs_mmc_defconfig | 1 + configs/imx6ul_geam_mmc_defconfig | 1 + configs/liteboard_defconfig | 1 + configs/mccmon6_sd_defconfig | 1 + configs/mx6cuboxi_defconfig | 1 + configs/mx6sabresd_spl_defconfig | 1 + configs/mx6slevk_spl_defconfig | 1 + configs/mx6sxsabresd_spl_defconfig | 1 + configs/mx6ul_14x14_evk_defconfig | 1 + configs/mx6ul_9x9_evk_defconfig | 1 + configs/novena_defconfig | 1 + configs/pcm058_defconfig | 1 + configs/platinum_picon_defconfig | 1 + configs/platinum_titanium_defconfig | 1 + configs/socfpga_de1_soc_defconfig | 1 + configs/udoo_defconfig | 1 + configs/udoo_neo_defconfig | 1 + configs/wandboard_defconfig | 1 + configs/xpress_spl_defconfig | 1 + configs/zc5202_defconfig | 1 + configs/zc5601_defconfig | 1 + include/configs/imx6_spl.h | 2 -- include/configs/socfpga_de1_soc.h | 2 -- include/spl.h | 2 +- 35 files changed, 43 insertions(+), 13 deletions(-)
Kconfig +7 -0
@@ -291,6 +291,13 @@ config SYS_TEXT_BASE help TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture +config SPL_RAW_IMAGE_SUPPORT + bool "Support SPL loading and booting of RAW images" + default y + help + SPL will support loading and booting a RAW image when this option + is y. If this is not set, SPL will move on to other available + boot media to find a suitable image. config SYS_CLK_FREQ depends on ARC || ARCH_SUNXI
README +0 -4
@@ -3279,10 +3279,6 @@ FIT uImage format: consider that a completely unreadable NAND block is bad, and thus should be skipped silently. - CONFIG_SPL_ABORT_ON_RAW_IMAGE - When defined, SPL will proceed to another boot method - if the image it has loaded does not have a signature. - CONFIG_SPL_RELOC_STACK Adress of the start of the stack SPL will use after relocation. If unspecified, this is equal to
common/spl/spl.c +6 -4
@@ -146,16 +146,18 @@ int spl_parse_image_header(struct spl_image_info *spl_image, }#endif -#ifdef CONFIG_SPL_ABORT_ON_RAW_IMAGE -/* Signature not found, proceed to other boot methods. */ -return -EINVAL ; -#else +#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT /* Signature not found - assume u-boot.bin */ debug ("mkimage signature not found - ih_magic = %x\n" , header->ih_magic);spl_set_header_raw_uboot (spl_image); +#else +/* RAW image not supported, proceed to other boot methods. */ +debug ("Raw boot image support not enabled, proceeding to other boot methods" ); +return -EINVAL ;#endif } +return 0 ; }
configs/apalis_imx6_defconfig +1 -0
@@ -9,6 +9,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_VIDEO=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=1 # CONFIG_CONSOLE_MUX is not set # CONFIG_DISPLAY_BOARDINFO is not set
configs/cgtqmx6eval_defconfig +1 -0
@@ -14,6 +14,7 @@ CONFIG_SPL_SPI_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_VIDEO=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6QDL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
configs/cm_fx6_defconfig +1 -0
@@ -13,6 +13,7 @@ CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_VIDEO=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL,SPL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_SPL=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x80
configs/colibri_imx6_defconfig +1 -0
@@ -9,6 +9,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_VIDEO=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6DL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=1 # CONFIG_CONSOLE_MUX is not set # CONFIG_DISPLAY_BOARDINFO is not set
configs/gwventana_defconfig +1 -0
@@ -16,6 +16,7 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 # CONFIG_SYS_STDIO_DEREGISTER is not set # CONFIG_DISPLAY_BOARDINFO is not set
configs/imx6dl_icore_mmc_defconfig +1 -0
@@ -14,6 +14,7 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_MMC" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6dl-icore.dtb" CONFIG_SPL=y
configs/imx6dl_icore_rqs_mmc_defconfig +1 -0
@@ -13,6 +13,7 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_MMC" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6dl-icore-rqs.dtb" CONFIG_SPL=y
configs/imx6q_icore_mmc_defconfig +1 -0
@@ -14,6 +14,7 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_MMC" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6q-icore.dtb" CONFIG_SPL=y
configs/imx6q_icore_rqs_mmc_defconfig +1 -0
@@ -13,6 +13,7 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_MMC" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6q-icore-rqs.dtb" CONFIG_SPL=y
configs/imx6ul_geam_mmc_defconfig +1 -0
@@ -13,6 +13,7 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,ENV_IS_IN_MMC" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6ul-geam-kit.dtb" CONFIG_SPL=y
configs/liteboard_defconfig +1 -0
@@ -8,6 +8,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=1 CONFIG_DEFAULT_FDT_FILE="imx6ul-liteboard.dtb" CONFIG_BOARD_EARLY_INIT_F=y
configs/mccmon6_sd_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/liebherr/mccmon6/mon6_imximage_sd.cfg,MX6QDL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL=y CONFIG_SPL_NOR_SUPPORT=y CONFIG_HUSH_PARSER=y
configs/mx6cuboxi_defconfig +1 -0
@@ -13,6 +13,7 @@ CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_VIDEO=y CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SYS_STDIO_DEREGISTER is not set CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y
configs/mx6sabresd_spl_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_VIDEO=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6Q" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
configs/mx6slevk_spl_defconfig +1 -0
@@ -11,6 +11,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6SL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y
configs/mx6sxsabresd_spl_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_VIDEO=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
configs/mx6ul_14x14_evk_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_VIDEO=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
configs/mx6ul_9x9_evk_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_VIDEO=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y
configs/novena_defconfig +1 -0
@@ -16,6 +16,7 @@ CONFIG_VIDEO=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y
configs/pcm058_defconfig +1 -0
@@ -15,6 +15,7 @@ CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y
configs/platinum_picon_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6DL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y
configs/platinum_titanium_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y
configs/socfpga_de1_soc_defconfig +1 -0
@@ -7,6 +7,7 @@ CONFIG_SPL_STACK_R_ADDR=0x00800000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de1_soc" CONFIG_FIT=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
configs/udoo_defconfig +1 -0
@@ -11,6 +11,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y
configs/udoo_neo_defconfig +1 -0
@@ -11,6 +11,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL=y CONFIG_HUSH_PARSER=y
configs/wandboard_defconfig +1 -0
@@ -13,6 +13,7 @@ CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_VIDEO=y CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_CONSOLE_MUX is not set CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
configs/xpress_spl_defconfig +1 -0
@@ -11,6 +11,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_BOARD_EARLY_INIT_F=y
configs/zc5202_defconfig +1 -0
@@ -14,6 +14,7 @@ CONFIG_SPL_SPI_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6q-zc5202.dtb" CONFIG_BOARD_EARLY_INIT_F=y
configs/zc5601_defconfig +1 -0
@@ -14,6 +14,7 @@ CONFIG_SPL_SPI_SUPPORT=y CONFIG_SPL_WATCHDOG_SUPPORT=y CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_BOOTDELAY=3 CONFIG_DEFAULT_FDT_FILE="imx6q-zc5601.dtb" CONFIG_BOARD_EARLY_INIT_F=y
include/configs/imx6_spl.h +0 -2
@@ -45,14 +45,12 @@#if defined(CONFIG_SPL_MMC_SUPPORT )#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1#define CONFIG_SYS_MONITOR_LEN 409600/* 400 KB */ -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE #endif /* SATA support */ #if defined(CONFIG_SPL_SATA_SUPPORT )#define CONFIG_SPL_SATA_BOOT_DEVICE 0#define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1 -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE #endif /* Define the payload for FAT/EXT support */
include/configs/socfpga_de1_soc.h +0 -2
@@ -50,6 +50,4 @@/* The rest of the configuration is shared */ #include <configs/socfpga_common.h> -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE -#endif /* __CONFIG_TERASIC_DE1_SOC_H__ */
include/spl.h +1 -1
@@ -85,7 +85,7 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image);* This parses the legacy image header information at @header and sets up * @spl_image according to what is found. If no image header is found, then * a raw image or bootz is assumed. If CONFIG_SPL_PANIC_ON_RAW_IMAGE is -* enabled, then this causes a panic. If CONFIG_SPL_ABORT_ON_RAW_IMAGE is +* enabled, then this causes a panic. If CONFIG_SPL_RAW_IMAGE_SUPPORT is not * enabled then U-Boot gives up. Otherwise U-Boot sets up the image using * spl_set_header_raw_uboot(), or possibly the bootz header. *
Signature · 1 line
2.11.0
PATCH v6 1/3 spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option
Quoted 7 lines · Andrew F. Davis
CONFIG_SPL_ABORT_ON_RAW_IMAGEcauses SPL to abort and move on when it encounters RAW images, express this same functionality as a positive option enabling support for RAW images:CONFIG_SPL_RAW_IMAGE_SUPPORTAlso move uses of this to defconfigs.
Signed-off-by Andrew F. Davis <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170217/bfd20b29/attachment.sig>
PATCH v6 1/3 spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option
In reply to Andrew F. DavisQuoted 6 lines · Andrew F. Davis
CONFIG_SPL_ABORT_ON_RAW_IMAGEcauses SPL to abort and move on when it encounters RAW images, express this same functionality as a positive option enabling support for RAW images:CONFIG_SPL_RAW_IMAGE_SUPPORTAlso move uses of this to defconfigs.
Quoted 7 lines
Signed-off-by Andrew F. Davis <[email protected]>--- Kconfig | 7 +++++++ README | 4 ---- common/spl/spl.c | 10 ++++++---- configs/apalis_imx6_defconfig | 1 + configs/cgtqmx6eval_defconfig | 1 +
PATCH v6 1/3 spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option
In reply to Andrew F. DavisQuoted 9 lines · Andrew F. Davis
CONFIG_SPL_ABORT_ON_RAW_IMAGEcauses SPL to abort and move on when it encounters RAW images, express this same functionality as a positive option enabling support for RAW images:CONFIG_SPL_RAW_IMAGE_SUPPORTAlso move uses of this to defconfigs.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
With a minor tweak to the Kconfig logic so we get the imx6 case right by default, and moved to common/spl/Kconfig, applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170318/7c27e9d7/attachment.sig>
PATCH v6 2/3 spl: Add option to enable SPL Legacy image support
In reply to Andrew F. DavisAdd a Kconfig option that enables Legacy image support, this allows boards to explicitly disable this, for instance when needed for security reasons.
--- Kconfig | 8 ++++++++ common/spl/spl.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-)
Kconfig +8 -0
@@ -299,6 +299,14 @@ config SPL_RAW_IMAGE_SUPPORT is y. If this is not set, SPL will move on to other available boot media to find a suitable image. +config SPL_LEGACY_IMAGE_SUPPORT + bool "Support SPL loading and booting of Legacy images" + default y + help + SPL will support loading and booting Legacy images when this option + is y. If this is not set, SPL will move on to other available + boot media to find a suitable image. + config SYS_CLK_FREQ depends on ARC || ARCH_SUNXI int "CPU clock frequency"
common/spl/spl.c +8 -2
@@ -93,9 +93,10 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image)int spl_parse_image_header (struct spl_image_info *spl_image,const struct image_header *header) { -u32 header_size =sizeof (struct image_header ); -if (image_get_magic (header) ==IH_MAGIC ) { +#ifdef CONFIG_SPL_LEGACY_IMAGE_SUPPORT +u32 header_size =sizeof (struct image_header ); +if (spl_image->flags &SPL_COPY_PAYLOAD_ONLY ) {/* * On some system (e.g. powerpc), the load-address and
@@ -118,6 +119,11 @@ int spl_parse_image_header(struct spl_image_info *spl_image,debug ("spl: payload image: %.*s load addr: 0x%lx size: %d\n" , (int )sizeof (spl_image->name), spl_image->name, spl_image->load_addr, spl_image->size); +#else +/* LEGACY image not supported */ +debug ("Legacy boot image support not enabled, proceeding to other boot methods" ); +return -EINVAL ; +#endif }else {#ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE /*
Signature · 1 line
2.11.0
PATCH v6 2/3 spl: Add option to enable SPL Legacy image support
Quoted 6 lines · Andrew F. Davis
Add a
Kconfigoption that enables Legacy image support, this allows boards to explicitly disable this, for instance when needed for security reasons.Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Simon Glass <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170217/ec62626e/attachment.sig>
PATCH v6 2/3 spl: Add option to enable SPL Legacy image support
In reply to Andrew F. DavisQuoted 7 lines · Andrew F. Davis
Add a
Kconfigoption that enables Legacy image support, this allows boards to explicitly disable this, for instance when needed for security reasons.Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170318/1506ef13/attachment.sig>
PATCH v6 3/3 Kconfig: Disable non-FIT SPL loading for TI secure devices
In reply to Andrew F. DavisNon-FIT SPL image loading support should be disabled for TI secure devices as the image handlers for those image types do not follow our secure boot flow.
--- Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Kconfig +2 -2
@@ -293,7 +293,7 @@ config SYS_TEXT_BASE config SPL_RAW_IMAGE_SUPPORT bool "Support SPL loading and booting of RAW images" - default y + default y if !TI_SECURE_DEVICE help SPL will support loading and booting a RAW image when this option is y. If this is not set, SPL will move on to other available
@@ -301,7 +301,7 @@ config SPL_RAW_IMAGE_SUPPORT config SPL_LEGACY_IMAGE_SUPPORT bool "Support SPL loading and booting of Legacy images" - default y + default y if !TI_SECURE_DEVICE help SPL will support loading and booting Legacy images when this option is y. If this is not set, SPL will move on to other available
Signature · 1 line
2.11.0
PATCH v6 3/3 Kconfig: Disable non-FIT SPL loading for TI secure devices
Quoted 5 lines · Andrew F. Davis
Non-FIT SPL image loading support should be disabled for TI secure devices as the image handlers for those image types do not follow our secure boot flow.
Signed-off-by Andrew F. Davis <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170217/ca819263/attachment.sig>
PATCH v6 3/3 Kconfig: Disable non-FIT SPL loading for TI secure devices
In reply to Andrew F. DavisQuoted 8 lines · Andrew F. Davis
Non-FIT SPL image loading support should be disabled for TI secure devices as the image handlers for those image types do not follow our secure boot flow.
Signed-off-by Andrew F. Davis <[email protected]>--- Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
PATCH v6 3/3 Kconfig: Disable non-FIT SPL loading for TI secure devices
In reply to Andrew F. DavisQuoted 7 lines · Andrew F. Davis
Non-FIT SPL image loading support should be disabled for TI secure devices as the image handlers for those image types do not follow our secure boot flow.
Signed-off-by Andrew F. Davis <[email protected]>Reviewed-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170318/e3c4139d/attachment.sig>