* [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL @ 2017-02-15 19:45 Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 1/6] spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option Andrew F. Davis ` (6 more replies) 0 siblings, 7 replies; 13+ messages in thread From: Andrew F. Davis @ 2017-02-15 19:45 UTC (permalink / raw) To: u-boot 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 last 2 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 v4: - Finish conversion of SPL_RAW_IMAGE_SUPPORT Changes from v3: - Add debug print as suggested by Simon Andrew F. Davis (6): spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option spl: Add option to enable SPL Legacy image support ARM: AM335x: Disable non-FIT based image loading for HS devices ARM: AM43xx: Disable non-FIT based image loading for HS devices ARM: AM57xx: Disable non-FIT based image loading for HS devices ARM: DRA7xx: Disable non-FIT based image loading for HS devices Kconfig | 15 +++++++++++++++ README | 4 ---- common/spl/spl.c | 20 ++++++++++++++------ configs/am335x_hs_evm_defconfig | 2 ++ configs/am43xx_hs_evm_defconfig | 2 ++ configs/am57xx_hs_evm_defconfig | 2 ++ configs/apalis_imx6_defconfig | 1 + configs/cgtqmx6eval_defconfig | 1 + configs/cm_fx6_defconfig | 1 + configs/colibri_imx6_defconfig | 1 + configs/dra7xx_hs_evm_defconfig | 2 ++ 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 +- 39 files changed, 67 insertions(+), 15 deletions(-) -- 2.11.0 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 1/6] spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option 2017-02-15 19:45 [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Andrew F. Davis @ 2017-02-15 19:45 ` Andrew F. Davis 2017-02-15 23:59 ` Tom Rini 2017-02-15 19:45 ` [U-Boot] [PATCH v5 2/6] spl: Add option to enable SPL Legacy image support Andrew F. Davis ` (5 subsequent siblings) 6 siblings, 1 reply; 13+ messages in thread From: Andrew F. Davis @ 2017-02-15 19:45 UTC (permalink / raw) To: u-boot 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. Signed-off-by: Andrew F. Davis <afd@ti.com> --- 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(-) diff --git a/Kconfig b/Kconfig index 81b4226463..cfc8f929ee 100644 --- a/Kconfig +++ b/Kconfig @@ -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 diff --git a/README b/README index 4f0dbd4fca..a45c6b88bf 100644 --- a/README +++ b/README @@ -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 diff --git a/common/spl/spl.c b/common/spl/spl.c index 766fb3d6f4..da8f55eef6 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -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; } diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig index 6b2daa9b47..d76b828c7d 100644 --- a/configs/apalis_imx6_defconfig +++ b/configs/apalis_imx6_defconfig @@ -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 diff --git a/configs/cgtqmx6eval_defconfig b/configs/cgtqmx6eval_defconfig index 2e4ed36cc1..7c73ac185a 100644 --- a/configs/cgtqmx6eval_defconfig +++ b/configs/cgtqmx6eval_defconfig @@ -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 diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index dc7544a17f..01ba6a7029 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -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 diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig index ba06a55a26..4d12443f6c 100644 --- a/configs/colibri_imx6_defconfig +++ b/configs/colibri_imx6_defconfig @@ -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 diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig index 6cc58970cd..ab115c15e0 100644 --- a/configs/gwventana_defconfig +++ b/configs/gwventana_defconfig @@ -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 diff --git a/configs/imx6dl_icore_mmc_defconfig b/configs/imx6dl_icore_mmc_defconfig index a74ae8bb55..af6e239af2 100644 --- a/configs/imx6dl_icore_mmc_defconfig +++ b/configs/imx6dl_icore_mmc_defconfig @@ -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 diff --git a/configs/imx6dl_icore_rqs_mmc_defconfig b/configs/imx6dl_icore_rqs_mmc_defconfig index d9d4a0e155..4aa3cafcfe 100644 --- a/configs/imx6dl_icore_rqs_mmc_defconfig +++ b/configs/imx6dl_icore_rqs_mmc_defconfig @@ -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 diff --git a/configs/imx6q_icore_mmc_defconfig b/configs/imx6q_icore_mmc_defconfig index 9957e928ff..ac04c1bbdb 100644 --- a/configs/imx6q_icore_mmc_defconfig +++ b/configs/imx6q_icore_mmc_defconfig @@ -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 diff --git a/configs/imx6q_icore_rqs_mmc_defconfig b/configs/imx6q_icore_rqs_mmc_defconfig index 480a2a3495..ce78a3d166 100644 --- a/configs/imx6q_icore_rqs_mmc_defconfig +++ b/configs/imx6q_icore_rqs_mmc_defconfig @@ -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 diff --git a/configs/imx6ul_geam_mmc_defconfig b/configs/imx6ul_geam_mmc_defconfig index 1d224607f6..5032095676 100644 --- a/configs/imx6ul_geam_mmc_defconfig +++ b/configs/imx6ul_geam_mmc_defconfig @@ -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 diff --git a/configs/liteboard_defconfig b/configs/liteboard_defconfig index f09647132d..89956a8716 100644 --- a/configs/liteboard_defconfig +++ b/configs/liteboard_defconfig @@ -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 diff --git a/configs/mccmon6_sd_defconfig b/configs/mccmon6_sd_defconfig index 23f0a31685..d3e154effa 100644 --- a/configs/mccmon6_sd_defconfig +++ b/configs/mccmon6_sd_defconfig @@ -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 diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig index 0b37be9b79..5f8dc3a71a 100644 --- a/configs/mx6cuboxi_defconfig +++ b/configs/mx6cuboxi_defconfig @@ -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 diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig index a488979285..a732a0e624 100644 --- a/configs/mx6sabresd_spl_defconfig +++ b/configs/mx6sabresd_spl_defconfig @@ -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 diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig index 29e179da7c..59902b6e99 100644 --- a/configs/mx6slevk_spl_defconfig +++ b/configs/mx6slevk_spl_defconfig @@ -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 diff --git a/configs/mx6sxsabresd_spl_defconfig b/configs/mx6sxsabresd_spl_defconfig index f7cbc25cfd..a2238108de 100644 --- a/configs/mx6sxsabresd_spl_defconfig +++ b/configs/mx6sxsabresd_spl_defconfig @@ -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 diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig index 9f972c4e52..55eb4a92b5 100644 --- a/configs/mx6ul_14x14_evk_defconfig +++ b/configs/mx6ul_14x14_evk_defconfig @@ -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 diff --git a/configs/mx6ul_9x9_evk_defconfig b/configs/mx6ul_9x9_evk_defconfig index 7663709db9..cb5ba39e1a 100644 --- a/configs/mx6ul_9x9_evk_defconfig +++ b/configs/mx6ul_9x9_evk_defconfig @@ -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 diff --git a/configs/novena_defconfig b/configs/novena_defconfig index 641928d811..f7a25b20c7 100644 --- a/configs/novena_defconfig +++ b/configs/novena_defconfig @@ -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 diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig index b15e25e6cd..555624729e 100644 --- a/configs/pcm058_defconfig +++ b/configs/pcm058_defconfig @@ -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 diff --git a/configs/platinum_picon_defconfig b/configs/platinum_picon_defconfig index 186c489882..a7ab826b1e 100644 --- a/configs/platinum_picon_defconfig +++ b/configs/platinum_picon_defconfig @@ -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 diff --git a/configs/platinum_titanium_defconfig b/configs/platinum_titanium_defconfig index d84e02ae68..93dfc07f47 100644 --- a/configs/platinum_titanium_defconfig +++ b/configs/platinum_titanium_defconfig @@ -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 diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig index 032deef497..154ba726dd 100644 --- a/configs/socfpga_de1_soc_defconfig +++ b/configs/socfpga_de1_soc_defconfig @@ -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 diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig index a74bd901bb..1cc76045cb 100644 --- a/configs/udoo_defconfig +++ b/configs/udoo_defconfig @@ -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 diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig index f9b1337cb7..87edd68406 100644 --- a/configs/udoo_neo_defconfig +++ b/configs/udoo_neo_defconfig @@ -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 diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig index ccf8250d0a..46030ed65d 100644 --- a/configs/wandboard_defconfig +++ b/configs/wandboard_defconfig @@ -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 diff --git a/configs/xpress_spl_defconfig b/configs/xpress_spl_defconfig index be7c87a352..719896750e 100644 --- a/configs/xpress_spl_defconfig +++ b/configs/xpress_spl_defconfig @@ -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 diff --git a/configs/zc5202_defconfig b/configs/zc5202_defconfig index c1da56cca3..d52aaec3fe 100644 --- a/configs/zc5202_defconfig +++ b/configs/zc5202_defconfig @@ -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 diff --git a/configs/zc5601_defconfig b/configs/zc5601_defconfig index d48fcf158c..120d790b05 100644 --- a/configs/zc5601_defconfig +++ b/configs/zc5601_defconfig @@ -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 diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h index c5a035fccf..3a389ede4b 100644 --- a/include/configs/imx6_spl.h +++ b/include/configs/imx6_spl.h @@ -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 */ diff --git a/include/configs/socfpga_de1_soc.h b/include/configs/socfpga_de1_soc.h index 2278357fc6..c6e8d81be6 100644 --- a/include/configs/socfpga_de1_soc.h +++ b/include/configs/socfpga_de1_soc.h @@ -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__ */ diff --git a/include/spl.h b/include/spl.h index bde44374ea..270798c988 100644 --- a/include/spl.h +++ b/include/spl.h @@ -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. * -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 1/6] spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option 2017-02-15 19:45 ` [U-Boot] [PATCH v5 1/6] spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option Andrew F. Davis @ 2017-02-15 23:59 ` Tom Rini 0 siblings, 0 replies; 13+ messages in thread From: Tom Rini @ 2017-02-15 23:59 UTC (permalink / raw) To: u-boot On Wed, Feb 15, 2017 at 01:45:46PM -0600, Andrew F. Davis wrote: > 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. > > Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> -- 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/20170215/89a6e15e/attachment.sig> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 2/6] spl: Add option to enable SPL Legacy image support 2017-02-15 19:45 [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 1/6] spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option Andrew F. Davis @ 2017-02-15 19:45 ` Andrew F. Davis 2017-02-15 23:59 ` Tom Rini 2017-02-15 19:45 ` [U-Boot] [PATCH v5 3/6] ARM: AM335x: Disable non-FIT based image loading for HS devices Andrew F. Davis ` (4 subsequent siblings) 6 siblings, 1 reply; 13+ messages in thread From: Andrew F. Davis @ 2017-02-15 19:45 UTC (permalink / raw) To: u-boot Add a Kconfig option 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 <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> --- Kconfig | 8 ++++++++ common/spl/spl.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Kconfig b/Kconfig index cfc8f929ee..8504199493 100644 --- a/Kconfig +++ b/Kconfig @@ -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" diff --git a/common/spl/spl.c b/common/spl/spl.c index da8f55eef6..3d6c0ecba1 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -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 /* -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 2/6] spl: Add option to enable SPL Legacy image support 2017-02-15 19:45 ` [U-Boot] [PATCH v5 2/6] spl: Add option to enable SPL Legacy image support Andrew F. Davis @ 2017-02-15 23:59 ` Tom Rini 0 siblings, 0 replies; 13+ messages in thread From: Tom Rini @ 2017-02-15 23:59 UTC (permalink / raw) To: u-boot On Wed, Feb 15, 2017 at 01:45:47PM -0600, Andrew F. Davis wrote: > Add a Kconfig option 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 <afd@ti.com> > Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> -- 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/20170215/65b8af4b/attachment.sig> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 3/6] ARM: AM335x: Disable non-FIT based image loading for HS devices 2017-02-15 19:45 [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 1/6] spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 2/6] spl: Add option to enable SPL Legacy image support Andrew F. Davis @ 2017-02-15 19:45 ` Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 4/6] ARM: AM43xx: " Andrew F. Davis ` (3 subsequent siblings) 6 siblings, 0 replies; 13+ messages in thread From: Andrew F. Davis @ 2017-02-15 19:45 UTC (permalink / raw) To: u-boot Disable support for loading non-FIT images for AM335x platforms using the high-security (HS) device variant. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> --- configs/am335x_hs_evm_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig index f2f92f70f6..fbb8f18912 100644 --- a/configs/am335x_hs_evm_defconfig +++ b/configs/am335x_hs_evm_defconfig @@ -14,6 +14,8 @@ CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y CONFIG_SYS_EXTRA_OPTIONS="NAND" +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y CONFIG_SPL=y -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 4/6] ARM: AM43xx: Disable non-FIT based image loading for HS devices 2017-02-15 19:45 [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Andrew F. Davis ` (2 preceding siblings ...) 2017-02-15 19:45 ` [U-Boot] [PATCH v5 3/6] ARM: AM335x: Disable non-FIT based image loading for HS devices Andrew F. Davis @ 2017-02-15 19:45 ` Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 5/6] ARM: AM57xx: " Andrew F. Davis ` (2 subsequent siblings) 6 siblings, 0 replies; 13+ messages in thread From: Andrew F. Davis @ 2017-02-15 19:45 UTC (permalink / raw) To: u-boot Disable support for loading non-FIT images for AM43xx platforms using the high-security (HS) device variant. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> --- configs/am43xx_hs_evm_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig index 8bb1b3535a..fabf876621 100644 --- a/configs/am43xx_hs_evm_defconfig +++ b/configs/am43xx_hs_evm_defconfig @@ -10,6 +10,8 @@ CONFIG_FIT=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1, NAND" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 5/6] ARM: AM57xx: Disable non-FIT based image loading for HS devices 2017-02-15 19:45 [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Andrew F. Davis ` (3 preceding siblings ...) 2017-02-15 19:45 ` [U-Boot] [PATCH v5 4/6] ARM: AM43xx: " Andrew F. Davis @ 2017-02-15 19:45 ` Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 6/6] ARM: DRA7xx: " Andrew F. Davis 2017-02-15 23:59 ` [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Tom Rini 6 siblings, 0 replies; 13+ messages in thread From: Andrew F. Davis @ 2017-02-15 19:45 UTC (permalink / raw) To: u-boot Disable support for loading non-FIT images for AM57xx platforms using the high-security (HS) device variant. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> --- configs/am57xx_hs_evm_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig index 7e84ccddf3..4adbde427b 100644 --- a/configs/am57xx_hs_evm_defconfig +++ b/configs/am57xx_hs_evm_defconfig @@ -14,6 +14,8 @@ CONFIG_FIT=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 6/6] ARM: DRA7xx: Disable non-FIT based image loading for HS devices 2017-02-15 19:45 [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Andrew F. Davis ` (4 preceding siblings ...) 2017-02-15 19:45 ` [U-Boot] [PATCH v5 5/6] ARM: AM57xx: " Andrew F. Davis @ 2017-02-15 19:45 ` Andrew F. Davis 2017-02-15 23:59 ` [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Tom Rini 6 siblings, 0 replies; 13+ messages in thread From: Andrew F. Davis @ 2017-02-15 19:45 UTC (permalink / raw) To: u-boot Disable support for loading non-FIT images for DRA7xx platforms using the high-security (HS) device variant. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> --- configs/dra7xx_hs_evm_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index 244940cd6c..c5e7b16c8b 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -15,6 +15,8 @@ CONFIG_FIT=y CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y -- 2.11.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL 2017-02-15 19:45 [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Andrew F. Davis ` (5 preceding siblings ...) 2017-02-15 19:45 ` [U-Boot] [PATCH v5 6/6] ARM: DRA7xx: " Andrew F. Davis @ 2017-02-15 23:59 ` Tom Rini 2017-02-16 14:40 ` Andrew F. Davis 6 siblings, 1 reply; 13+ messages in thread From: Tom Rini @ 2017-02-15 23:59 UTC (permalink / raw) To: u-boot On Wed, Feb 15, 2017 at 01:45:45PM -0600, Andrew F. Davis wrote: > 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 last 2 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. I think this would be cleaner if we introduce the symbols to be default n if TI_SECURE_DEVICE and then we don't have to modify the defconfig files. That said, we should probably do that as a new patch #3 so it's clear in the commit history when we default it off. Thanks! -- 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/20170215/4aed6b34/attachment.sig> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL 2017-02-15 23:59 ` [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Tom Rini @ 2017-02-16 14:40 ` Andrew F. Davis 2017-02-16 14:51 ` Tom Rini 0 siblings, 1 reply; 13+ messages in thread From: Andrew F. Davis @ 2017-02-16 14:40 UTC (permalink / raw) To: u-boot On 02/15/2017 05:59 PM, Tom Rini wrote: > On Wed, Feb 15, 2017 at 01:45:45PM -0600, Andrew F. Davis wrote: > >> 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 last 2 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. > > I think this would be cleaner if we introduce the symbols to be default > n if TI_SECURE_DEVICE and then we don't have to modify the defconfig > files. That said, we should probably do that as a new patch #3 so it's > clear in the commit history when we default it off. Thanks! > Hmmm, I'm really not a fan of this, disabling these options is only needed on a couple boards and so should go in their defconfig, adding the per-board exceptions to the symbol definition itself will start to cause massive kconfig bloat. If you strongly disagree, below is a patch #3, if you take this you can drop the defconfig patches from this series. --- Author: Andrew F. Davis <afd@ti.com> Date: Thu Feb 16 08:36:08 2017 -0600 Kconfig: Disable non-FIT SPL loading for TI secure devices 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 <afd@ti.com> diff --git a/Kconfig b/Kconfig index 70fd616cb1..3d42e8e06c 100644 --- a/Kconfig +++ b/Kconfig @@ -295,7 +295,7 @@ config FIT_IMAGE_POST_PROCESS 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 @@ -303,7 +303,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 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL 2017-02-16 14:40 ` Andrew F. Davis @ 2017-02-16 14:51 ` Tom Rini 2017-02-16 17:14 ` Andrew F. Davis 0 siblings, 1 reply; 13+ messages in thread From: Tom Rini @ 2017-02-16 14:51 UTC (permalink / raw) To: u-boot On Thu, Feb 16, 2017 at 08:40:37AM -0600, Andrew F. Davis wrote: > On 02/15/2017 05:59 PM, Tom Rini wrote: > > On Wed, Feb 15, 2017 at 01:45:45PM -0600, Andrew F. Davis wrote: > > > >> 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 last 2 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. > > > > I think this would be cleaner if we introduce the symbols to be default > > n if TI_SECURE_DEVICE and then we don't have to modify the defconfig > > files. That said, we should probably do that as a new patch #3 so it's > > clear in the commit history when we default it off. Thanks! > > Hmmm, I'm really not a fan of this, disabling these options is only > needed on a couple boards and so should go in their defconfig, adding > the per-board exceptions to the symbol definition itself will start to > cause massive kconfig bloat. > > If you strongly disagree, below is a patch #3, if you take this you can > drop the defconfig patches from this series. One thing that I feel is different in U-Boot from the Linux kernel is that I'm OK with putting more logic into the Kconfig files so that we get reasonable default output, even if it's only a "handful" of boards. I imagine that a follow up patch would change the logic to "default y if !TI_SECURE_DEVICES && !FSL_SIMILAR_SYMBOL" Or perhaps even doing another line of "default n if TI_SECURE_DEVICES || FSL_... || ..." -- 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/20170216/0a53dfe3/attachment.sig> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL 2017-02-16 14:51 ` Tom Rini @ 2017-02-16 17:14 ` Andrew F. Davis 0 siblings, 0 replies; 13+ messages in thread From: Andrew F. Davis @ 2017-02-16 17:14 UTC (permalink / raw) To: u-boot On 02/16/2017 08:51 AM, Tom Rini wrote: > On Thu, Feb 16, 2017 at 08:40:37AM -0600, Andrew F. Davis wrote: >> On 02/15/2017 05:59 PM, Tom Rini wrote: >>> On Wed, Feb 15, 2017 at 01:45:45PM -0600, Andrew F. Davis wrote: >>> >>>> 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 last 2 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. >>> >>> I think this would be cleaner if we introduce the symbols to be default >>> n if TI_SECURE_DEVICE and then we don't have to modify the defconfig >>> files. That said, we should probably do that as a new patch #3 so it's >>> clear in the commit history when we default it off. Thanks! >> >> Hmmm, I'm really not a fan of this, disabling these options is only >> needed on a couple boards and so should go in their defconfig, adding >> the per-board exceptions to the symbol definition itself will start to >> cause massive kconfig bloat. >> >> If you strongly disagree, below is a patch #3, if you take this you can >> drop the defconfig patches from this series. > > One thing that I feel is different in U-Boot from the Linux kernel is > that I'm OK with putting more logic into the Kconfig files so that we > get reasonable default output, even if it's only a "handful" of boards. > I imagine that a follow up patch would change the logic to "default y if > !TI_SECURE_DEVICES && !FSL_SIMILAR_SYMBOL" Or perhaps even doing > another line of "default n if TI_SECURE_DEVICES || FSL_... || ..." > Okay, if that's your preference I'll post v6 with this change. Thanks, Andrew ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-02-16 17:14 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-02-15 19:45 [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 1/6] spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option Andrew F. Davis 2017-02-15 23:59 ` Tom Rini 2017-02-15 19:45 ` [U-Boot] [PATCH v5 2/6] spl: Add option to enable SPL Legacy image support Andrew F. Davis 2017-02-15 23:59 ` Tom Rini 2017-02-15 19:45 ` [U-Boot] [PATCH v5 3/6] ARM: AM335x: Disable non-FIT based image loading for HS devices Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 4/6] ARM: AM43xx: " Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 5/6] ARM: AM57xx: " Andrew F. Davis 2017-02-15 19:45 ` [U-Boot] [PATCH v5 6/6] ARM: DRA7xx: " Andrew F. Davis 2017-02-15 23:59 ` [U-Boot] [PATCH v5 0/6] Allow disabling non-FIT image loading from SPL Tom Rini 2017-02-16 14:40 ` Andrew F. Davis 2017-02-16 14:51 ` Tom Rini 2017-02-16 17:14 ` Andrew F. Davis
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.