summaryrefslogtreecommitdiff
path: root/common/spl/spl.c
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-10-31 08:31:00 +0100
committerTom Rini <trini@ti.com>2014-11-17 08:47:17 -0500
commit0c3117b1f740405ae16f267b4d0534906df433ba (patch)
tree0cd63bedcc0f162894694ea1348886711e4969a6 /common/spl/spl.c
parentbd1bb3c6a7364145fd781aeef56fa661e918f707 (diff)
downloadu-boot-imx-0c3117b1f740405ae16f267b4d0534906df433ba.zip
u-boot-imx-0c3117b1f740405ae16f267b4d0534906df433ba.tar.gz
u-boot-imx-0c3117b1f740405ae16f267b4d0534906df433ba.tar.bz2
spl, nand: add option to boot raw u-boot.bin image only
enable to boot only a raw u-boot.bin image from nand with the CONFIG_SPL_NAND_RAW_ONLY define. This option saves space on boards where spl space is low. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com> Reviewed-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r--common/spl/spl.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d85bab3..f01a21c 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -62,6 +62,15 @@ __weak void spl_board_prepare_for_linux(void)
/* Nothing to do! */
}
+void spl_set_header_raw_uboot(void)
+{
+ spl_image.size = CONFIG_SYS_MONITOR_LEN;
+ spl_image.entry_point = CONFIG_SYS_UBOOT_START;
+ spl_image.load_addr = CONFIG_SYS_TEXT_BASE;
+ spl_image.os = IH_OS_U_BOOT;
+ spl_image.name = "U-Boot";
+}
+
void spl_parse_image_header(const struct image_header *header)
{
u32 header_size = sizeof(struct image_header);
@@ -93,11 +102,7 @@ void spl_parse_image_header(const struct image_header *header)
/* Signature not found - assume u-boot.bin */
debug("mkimage signature not found - ih_magic = %x\n",
header->ih_magic);
- spl_image.size = CONFIG_SYS_MONITOR_LEN;
- spl_image.entry_point = CONFIG_SYS_UBOOT_START;
- spl_image.load_addr = CONFIG_SYS_TEXT_BASE;
- spl_image.os = IH_OS_U_BOOT;
- spl_image.name = "U-Boot";
+ spl_set_header_raw_uboot();
}
}