From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.free-electrons.com ([94.23.35.102]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UaBdR-0002SZ-Fq for barebox@lists.infradead.org; Wed, 08 May 2013 21:10:50 +0000 From: Thomas Petazzoni Date: Wed, 8 May 2013 23:10:19 +0200 Message-Id: <1368047422-3397-5-git-send-email-thomas.petazzoni@free-electrons.com> In-Reply-To: <1368047422-3397-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1368047422-3397-1-git-send-email-thomas.petazzoni@free-electrons.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 4/7] arm: integrate kwbimage in the image generation To: barebox@lists.infradead.org Cc: Thomas Petazzoni , Lior Amsalem , Willy Tarreau , Ezequiel Garcia 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 --- 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