summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2012-09-28 18:29:43 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-02 08:22:30 +0200
commit93ca711e64d7a4d79aee15b4ce415688f5415fda (patch)
treec4197291232609480276c1f3ea626818274321be /arch/arm
parent3fc5a7545729d5b12399df970f5470e3494a616e (diff)
downloadbarebox-93ca711e64d7a4d79aee15b4ce415688f5415fda.tar.gz
barebox-93ca711e64d7a4d79aee15b4ce415688f5415fda.tar.xz
scripts: add tool to create image for SPI boot on AM35xx
Booting from SPI on an AM35xx (and possibly other TI SOCs) requires a special format: - 32 bit image size in big-endian - 32 bit load address in big-endian - binary image converted from little- to big-endian The mk-am35xx-spi-image tool converts barebox.bin to this format. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Makefile11
-rw-r--r--arch/arm/mach-omap/Kconfig7
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 8e660bea2b..f02b1602d8 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -212,6 +212,17 @@ KBUILD_TARGET := barebox.ubl
KBUILD_BINARY := $(KBUILD_TARGET)
endif
+quiet_cmd_am35xx_spi_image = SPI-IMG $@
+ cmd_am35xx_spi_image = scripts/mk-am35xx-spi-image $< > $@
+
+barebox.spi: $(KBUILD_BINARY) FORCE
+ $(call if_changed,am35xx_spi_image)
+
+ifeq ($(CONFIG_OMAP_BUILD_SPI),y)
+KBUILD_TARGET := barebox.spi
+KBUILD_IMAGE := barebox.spi
+endif
+
pbl := arch/arm/pbl
zbarebox.S zbarebox.bin zbarebox: barebox.bin
$(Q)$(MAKE) $(build)=$(pbl) $(pbl)/$@
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index 150358b0d1..98750c4eb2 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -78,6 +78,13 @@ config OMAP_BUILD_IFT
prompt "build ift binary"
bool
+config OMAP_BUILD_SPI
+ prompt "build SPI binary"
+ bool
+ help
+ Say Y here if you want to build an barebox.spi image as used
+ on the AM35xx chips when booting form SPI NOR flash.
+
config ARCH_TEXT_BASE
hex
default 0x80e80000 if MACH_OMAP343xSDP