]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option
authorAndrew F. Davis <afd@ti.com>
Thu, 16 Feb 2017 17:18:38 +0000 (11:18 -0600)
committerTom Rini <trini@konsulko.com>
Sat, 18 Mar 2017 18:28:50 +0000 (14:28 -0400)
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>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Rework Kconfig logic a little, move to common/spl/Kconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
README
common/spl/Kconfig
common/spl/spl.c
configs/socfpga_de1_soc_defconfig
include/configs/imx6_spl.h
include/configs/socfpga_de1_soc.h
include/spl.h

diff --git a/README b/README
index 3174b18d9a894737bccd47c0aaa1943ed4c974bb..ac6eaa5c7746e1d7093a83779f46451284bf8a86 100644 (file)
--- a/README
+++ b/README
@@ -3255,10 +3255,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
index 60ae60c17e3e8582160a3a071fec0655daa51732..6abbccdde03d69f32e10f52af377506ff457387c 100644 (file)
@@ -13,6 +13,16 @@ config SPL
        help
          If you want to build SPL as well as the normal image, say Y.
 
+config SPL_RAW_IMAGE_SUPPORT
+       bool "Support SPL loading and booting of RAW images"
+       depends on SPL
+       default n if (ARCH_MX6 && (SPL_MMC_SUPPORT || SPL_SATA_SUPPORT))
+       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 SPL_SYS_MALLOC_SIMPLE
        bool
        depends on SPL
index 2bc8b4202746fc70b6f8c7291489d570088fabbc..586d75f4398f01801123d9b2db88c3277292863c 100644 (file)
@@ -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;
 }
 
index 7702f49a71defc94324038a9bddaf490e08eecd6..135dfac12c11467ab3aeb881e74b022793593a08 100644 (file)
@@ -12,6 +12,7 @@ CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
 CONFIG_VERSION_VARIABLE=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_YMODEM_SUPPORT=y
index c5a035fccfa207dd675504564e4d4578cdb80030..3a389ede4b5125bb743f9d49e763c3db4fcfbac1 100644 (file)
 #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 */
index 2278357fc6e252872cc6f916a8a0bf764cc840fb..c6e8d81be6fba981d04b67eacddeca9f6595f4df 100644 (file)
@@ -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__ */
index cdd196d187c0115cebd9f408473d64f30d09a6b8..2e5b885c8d66062158a70d945fe609353e58a8be 100644 (file)
@@ -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.
  *