From 93ca711e64d7a4d79aee15b4ce415688f5415fda Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Fri, 28 Sep 2012 18:29:43 +0200 Subject: 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 Signed-off-by: Sascha Hauer --- arch/arm/Makefile | 11 +++++++++++ arch/arm/mach-omap/Kconfig | 7 +++++++ 2 files changed, 18 insertions(+) (limited to 'arch/arm') 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 -- cgit v1.2.3