mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: barebox@lists.infradead.org
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Lior Amsalem <alior@marvell.com>, Willy Tarreau <w@1wt.eu>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Subject: [PATCH v2 4/7] arm: integrate kwbimage in the image generation
Date: Wed,  8 May 2013 23:10:19 +0200	[thread overview]
Message-ID: <1368047422-3397-5-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1368047422-3397-1-git-send-email-thomas.petazzoni@free-electrons.com>

When a ARCH_MVEBU platform is selected, generate barebox.kwb and
barebox.kwbuart images from barebox.bin, using kwbimage.

barebox.kwb is generated by executing kwbimage on the board
kwbimage.cfg file, and is therefore designed to be booted from the
default boot media of the board, as defined by kwbimage.cfg (typically
a NAND flash or SPI flash).

barebox.kwbuart is generated by executing kwbimage on the board
kwbimage.cfg file, but by overriding the boot media to be UART. This
image is suitable for usage with the kwbtool and is generally useful
for recovery purposes.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile          |    2 +-
 arch/arm/Makefile |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f919993..9fcdd78 100644
--- a/Makefile
+++ b/Makefile
@@ -970,7 +970,7 @@ CLEAN_FILES +=	barebox System.map include/generated/barebox_default_env.h \
 		.tmp_kallsyms* common/barebox_default_env* barebox.ldr \
 		scripts/bareboxenv-target barebox-flash-image \
 		Doxyfile.version barebox.srec barebox.s5p barebox.ubl \
-		barebox.uimage barebox.spi
+		barebox.uimage barebox.spi barebox.kwb barebox.kwbuart
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include2 usr/include
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index bb47506..3103db4 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -263,6 +263,26 @@ KBUILD_TARGET := barebox.zynq
 KBUILD_IMAGE := barebox.zynq
 endif
 
+KWBIMAGE_OPTS = \
+	-c -i $(BOARD)/kwbimage.cfg -d $(TEXT_BASE) -e $(TEXT_BASE)
+
+quiet_cmd_kwbimage = KWB     $@
+      cmd_kwbimage = scripts/kwbimage -p $< $(KWBIMAGE_OPTS) -o $@
+
+quiet_cmd_kwbimage_uart = KWBUART $@
+      cmd_kwbimage_uart = scripts/kwbimage -m uart -p $< $(KWBIMAGE_OPTS) -o $@
+
+barebox.kwb: $(KBUILD_BINARY) FORCE
+	$(call if_changed,kwbimage)
+
+barebox.kwbuart: $(KBUILD_BINARY) FORCE
+	$(call if_changed,kwbimage_uart)
+
+ifeq ($(CONFIG_ARCH_MVEBU),y)
+KBUILD_TARGET := barebox.kwb barebox.kwbuart
+KBUILD_IMAGE  := barebox.kwb barebox.kwbuart
+endif
+
 pbl := arch/arm/pbl
 zbarebox.S zbarebox.bin zbarebox: barebox.bin
 	$(Q)$(MAKE) $(build)=$(pbl) $(pbl)/$@
-- 
1.7.9.5


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

  parent reply	other threads:[~2013-05-08 21:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08 21:10 [PATCH v2 0/7] Basic support for Armada 370/XP SOCs Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 1/7] scripts: new kwbimage manipulation tool for Marvell SoC boot images Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 2/7] scripts: add kwboot tool Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 3/7] arm: initial support for Marvell Armada 370/XP SoCs Thomas Petazzoni
2013-05-08 21:10 ` Thomas Petazzoni [this message]
2013-05-08 22:18   ` [PATCH v2 4/7] arm: integrate kwbimage in the image generation Gregory CLEMENT
2013-05-08 21:10 ` [PATCH v2 5/7] arm: add basic support for Armada XP OpenBlocks AX3 platform Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 6/7] arm: add basic support for the Armada 370 Mirabox platform Thomas Petazzoni
2013-05-08 21:10 ` [PATCH v2 7/7] arm: add basic support for the Armada XP GP platform Thomas Petazzoni
2013-05-08 21:53 ` [PATCH v2 0/7] Basic support for Armada 370/XP SOCs Gregory CLEMENT
2013-05-08 21:59   ` Thomas Petazzoni
2013-05-08 22:11     ` Gregory CLEMENT

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=1368047422-3397-5-git-send-email-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=barebox@lists.infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=w@1wt.eu \
    /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