From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jan Luebbe <jlu@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 04/10] scripts: add tool to create image for SPI boot on AM35xx
Date: Tue, 4 Sep 2012 10:27:39 +0200 [thread overview]
Message-ID: <20120904082739.GQ26594@pengutronix.de> (raw)
In-Reply-To: <1346672765-16162-5-git-send-email-jlu@pengutronix.de>
On Mon, Sep 03, 2012 at 01:45:59PM +0200, Jan Luebbe wrote:
> 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>
> ---
> arch/arm/Makefile | 8 +++
> arch/arm/mach-omap/Kconfig | 7 +++
> scripts/.gitignore | 1 +
> scripts/Makefile | 2 +-
> scripts/mk-am35xx-spi-image.c | 126 +++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 143 insertions(+), 1 deletion(-)
> create mode 100644 scripts/mk-am35xx-spi-image.c
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 1b60261..ff96299 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -199,6 +199,14 @@ endif
>
> all: $(KBUILD_IMAGE)
>
> +barebox.spi: barebox.bin
> + @echo " SPI " $@
> + $(Q)scripts/mk-am35xx-spi-image barebox.bin > barebox.spi
> +
> +ifeq ($(CONFIG_OMAP_BUILD_SPI),y)
> +all: barebox.spi
> +endif
> +
> archprepare: maketools
> maketools:
> $(Q)$(MAKE) $(build)=arch/arm/tools include/generated/mach-types.h
> diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
> index d735284..a781287 100644
> --- a/arch/arm/mach-omap/Kconfig
> +++ b/arch/arm/mach-omap/Kconfig
> @@ -91,6 +91,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
> diff --git a/scripts/.gitignore b/scripts/.gitignore
> index 6e63f85..3f1cbdb 100644
> --- a/scripts/.gitignore
> +++ b/scripts/.gitignore
> @@ -2,6 +2,7 @@ bareboxenv
> bin2c
> gen_netx_image
> kallsyms
> +mk-am35xx-spi-image
> mkimage
> mkublheader
> omap_signGP
> diff --git a/scripts/Makefile b/scripts/Makefile
> index 7ca5e29..55ccdac 100644
> --- a/scripts/Makefile
> +++ b/scripts/Makefile
> @@ -9,7 +9,7 @@ hostprogs-y += bin2c
> hostprogs-y += mkimage
> hostprogs-y += bareboxenv
> hostprogs-$(CONFIG_ARCH_NETX) += gen_netx_image
> -hostprogs-$(CONFIG_ARCH_OMAP) += omap_signGP
> +hostprogs-$(CONFIG_ARCH_OMAP) += omap_signGP mk-am35xx-spi-image
> hostprogs-$(CONFIG_ARCH_S5PCxx) += s5p_cksum
> hostprogs-$(CONFIG_ARCH_DAVINCI) += mkublheader
>
> diff --git a/scripts/mk-am35xx-spi-image.c b/scripts/mk-am35xx-spi-image.c
> new file mode 100644
> index 0000000..133f2b7
> --- /dev/null
> +++ b/scripts/mk-am35xx-spi-image.c
> @@ -0,0 +1,126 @@
> +/*
> + * mkublheader.c - produce the header needed to load barebox on OMAP-L138
We already have scripts/mkublheader.c:
/*
* mkublheader.c - produce the header needed to load barebox on OMAP-L138
*/
This indeed seems to be a different tool. Can we clarify this a bit,
maybe by adding the purpose of the different tools to the header?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-09-04 8:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 11:45 Prepare support for TI AM35xx Jan Luebbe
2012-09-03 11:45 ` [PATCH 01/10] drivers/nor/m25p80: add JEDEC ID for Micron/Numonyx SPI NOR flash Jan Luebbe
2012-09-03 11:45 ` [PATCH 02/10] drivers/nor/m25p80: add MEMGETINFO ioctl Jan Luebbe
2012-09-04 8:20 ` Sascha Hauer
2012-09-03 11:45 ` [PATCH 03/10] Makefile: add target to produce a SPL compatible uimage Jan Luebbe
2012-09-03 16:22 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-03 11:45 ` [PATCH 04/10] scripts: add tool to create image for SPI boot on AM35xx Jan Luebbe
2012-09-04 8:27 ` Sascha Hauer [this message]
2012-09-03 11:46 ` [PATCH 05/10] common: split out meminfo output and make it optional Jan Luebbe
2012-09-03 11:46 ` [PATCH 06/10] omap: add SPI as a boot mode for xload Jan Luebbe
2012-09-03 16:24 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-04 7:41 ` Jan Weitzel
2012-09-03 11:46 ` [PATCH 07/10] drivers/net/ksz8864rmn: add driver for Micrel KSZ8864RMN Ethernet Switch Jan Luebbe
2012-09-03 11:46 ` [PATCH 08/10] drivers/net: add driver for the EMAC device found in some TI SoCs Jan Luebbe
2012-09-03 16:27 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-04 8:42 ` Sascha Hauer
2012-09-03 11:46 ` [PATCH 09/10] omap3: allow enabling clocks for UART3, MMC1 and SPI Jan Luebbe
2012-09-04 8:48 ` Sascha Hauer
2012-09-05 9:28 ` Jan Lübbe
2012-09-03 11:46 ` [PATCH 10/10] drivers/spi: add driver for the Multichannel SPI controller found in TI SoCs Jan Luebbe
2012-09-03 16:32 ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-04 8:58 ` Sascha Hauer
2012-09-05 9:20 ` Jan Lübbe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120904082739.GQ26594@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jlu@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox