[PATCH 02/13] scripts: add tool to create image for SPI boot on AM35xx
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Tue Aug 21 09:04:56 EDT 2012
On 08:51 Tue 21 Aug , Jan Luebbe wrote:
> On Mon, Aug 20, 2012 at 04:40:48PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 16:20 Mon 20 Aug , Jan Luebbe wrote:
> > > --- a/arch/arm/Makefile
> > > +++ b/arch/arm/Makefile
> > > @@ -186,6 +186,14 @@ endif
> > >
> > > all: $(KBUILD_IMAGE)
> > >
> > > +barebox.spi: barebox.bin
> > > + @echo " SPI " $@
> > > + $(Q)scripts/mk-am35xx-spi-image barebox.bin > barebox.spi
> > you need to use cmd_ style and be in sync wtih the next branch
>
> Ok.
>
> > > +
> > > + /* image size */
> > > + temp = htobe32((uint32_t)pos);
> > > + fwrite(&temp, sizeof(uint32_t), 1, stdout);
> > > +
> > > + /* memory address */
> > > + temp = htobe32(addr);
> > > + fwrite(&temp, sizeof(uint32_t), 1, stdout);
> > why this??
> >
> > you just need to create a PRE_IMAGE
> >
> > so no need ot this
>
> What do you mean by PRE_IMAGE?
>
> The image needs to be endian-swapped. Is that possible with the linker?
you need to check the ld manual
but I guess you can can via c macro
Best Regards,
J.
More information about the barebox
mailing list