Hi Thomas, On 05/08/2013 11:10 PM, Thomas Petazzoni wrote: > 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@xxxxxxxxxxxxxxxxxx> > --- > 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) if you replace this line by -c -i $(srctree)/$(BOARD)/kwbimage.cfg -d $(TEXT_BASE) -e $(TEXT_BASE) it works when barebox is built out of tree > + > +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)/$@ > -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox