mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Rolf Evers-Fischer <embedded24@evers-fischer.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: AM3xxx: Add support for building AM33xx spi images
Date: Mon, 2 Jun 2014 11:41:23 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140602T130705-338@post.gmane.org> (raw)
In-Reply-To: <1400147030-16936-1-git-send-email-s.hauer@pengutronix.de>

Dear Sascha and Jan,

Sascha Hauer <s.hauer@...> writes:

> 
> From: Jan Luebbe <jlu@...>
> 
> mk-am35xx-spi-image can only build AM35xx images. Rename
> the tool to mk-am3xxx-spi-image and add support for the AM33xx.
> 
> Signed-off-by: Sascha Hauer <s.hauer@...>
> ---
>  arch/arm/Makefile                                  |  7 ++-
>  scripts/Makefile                                   |  2 +-
>  ...mk-am35xx-spi-image.c => mk-am3xxx-spi-image.c} | 52


I tried to use the changes from this patch in order to create a SPI image.
But I was not successful.

1.a) When I set the CONFIG_OMAP_BUILD_SPI option to "yes" and the
CONFIG_OMAP_BUILD_IFT option to "no", there is no SPI image built. These are
the last line from barebox_mlo compilation:
" (...)
  CHK     include/generated/compile.h
images built:
finished target barebox_mlo.compile"
It seems to me that the parameter "image-y" is never set.

1.b) When I set both config options to "yes", there is an MLO image built,
but no SPI image.

How do I have to configure my project in order to get an SPI image?

2.) Additionally, I'm not sure if we really need the changes in the
mk-am35xx-spi-image.c file, since especially the am3358/am3359 are
using the same format as the am35xx:
 - 32 bit image size in big-endian
 - 32 bit load address in big-endian
 - binary image converted from little- to big-endian

But it may be different for other am33xx SoCs.


A couple of weeks ago I have been able to create a SPI image in
barebox-2014.03 by modification of the file "images/Makefile.am33xx" only.
Maybe, you can take a look into my patch as well (of course the
"CONFIG_MACH_SPR" option and filenames have to match the name of your board
accordingly):

diff --git a/images/Makefile.am33xx b/images/Makefile.am33xx
index dacc2d1..0a6c019 100644
--- a/images/Makefile.am33xx
+++ b/images/Makefile.am33xx
@@ -7,6 +7,12 @@ quiet_cmd_mlo_image = MLO     $@
 $(obj)/%.mlo: $(obj)/% FORCE
 	$(call if_changed,mlo_image)
 
+quiet_cmd_spi_image = SPI     $@
+      cmd_spi_image = scripts/mk-am35xx-spi-image -a 0x402f0400 $< > $@
+
+$(obj)/%.spi: $(obj)/% FORCE
+	$(call if_changed,spi_image)
+
 pblx-$(CONFIG_MACH_PCM051) += start_am33xx_phytec_phycore_sdram
 FILE_barebox-am33xx-phytec-phycore.img = start_am33xx_phytec_phycore_sdram.pblx
 am33xx-barebox-$(CONFIG_MACH_PCM051) += barebox-am33xx-phytec-phycore.img
@@ -23,8 +29,20 @@ pblx-$(CONFIG_MACH_BEAGLEBONE) +=
start_am33xx_beaglebone_sram
 FILE_barebox-am33xx-beaglebone-mlo.img = start_am33xx_beaglebone_sram.pblx.mlo
 am33xx-mlo-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone-mlo.img
 
+pblx-$(CONFIG_MACH_SPR) += start_am33xx_spr_sdram
+FILE_barebox-am33xx-spr.img = start_am33xx_spr_sdram.pblx
+am33xx-barebox-$(CONFIG_MACH_SPR) += barebox-am33xx-spr.img
+
+pblx-$(CONFIG_MACH_SPR) += start_am33xx_spr_sram
+FILE_barebox-am33xx-spr-spi.img = start_am33xx_spr_sram.pblx.spi
+am33xx-spi-$(CONFIG_MACH_SPR) += barebox-am33xx-spr-spi.img
+
 ifdef CONFIG_OMAP_BUILD_IFT
 image-y += $(am33xx-mlo-y)
 else
+ifdef CONFIG_OMAP_BUILD_SPI
+image-y += $(am33xx-spi-y)
+else
 image-y += $(am33xx-barebox-y)
 endif
+endif

Nevertheless I'd like to keep my code as close as possible to the
barebox-mainline. Therefore I'm interested to find a common solution
together with you.


Kind regards,
 Rolf



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2014-06-02 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15  9:43 Sascha Hauer
2014-06-02 11:41 ` Rolf Evers-Fischer [this message]

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=loom.20140602T130705-338@post.gmane.org \
    --to=embedded24@evers-fischer.de \
    --cc=barebox@lists.infradead.org \
    /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