mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jan Luebbe <jlu@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] kbuild: keep the barebox binary accessible
Date: Thu, 6 Sep 2012 19:32:18 +0200	[thread overview]
Message-ID: <20120906173218.GD26594@pengutronix.de> (raw)
In-Reply-To: <1346926816-6695-1-git-send-email-jlu@pengutronix.de>

On Thu, Sep 06, 2012 at 12:20:15PM +0200, Jan Luebbe wrote:
> When building a special image  from the original (compressed or
> not) binary, to not overwrite KBUILD_BINARY.
> 
> This allows producing multiple images (such as MLO, UBL, ...)
> from the (z)barebox.bin. In the case where no special image is
> used, KBUILD_IMAGE is set to KBUILD_BINARY.
> 
> This patch was developed together with Sascha Hauer. Thanks!
> 
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>

Applied (only this one for now), thanks

Sascha

> ---
>  Makefile          |   16 +++++++++++-----
>  arch/arm/Makefile |   10 +++++-----
>  2 files changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index c6264d3..0f1a319 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -462,12 +462,18 @@ CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
>  # disable pointer signed / unsigned warnings in gcc 4.0
>  CFLAGS += $(call cc-option,-Wno-pointer-sign,)
>  
> -# Default kernel image to build when no specific target is given.
> -# KBUILD_IMAGE may be overruled on the command line or
> -# set in the environment
> -# Also any assignments in arch/$(ARCH)/Makefile take precedence over
> -# this default value
> +# KBUILD_IMAGE: Default barebox image to build
> +# Depending on the architecture, this can be either compressed or not.
> +# It will also include any necessary headers to be bootable.
>  export KBUILD_IMAGE ?= barebox.bin
> +# KBUILD_BINARY: Raw barebox binary
> +# This variable is set in case the architecture prepends a header and
> +# points to a binary that can be loaded directly into RAM and executed.
> +export KBUILD_BINARY ?= barebox.bin
> +# KBUILD_IMAGE and _BINARY may be overruled on the command line or
> +# set in the environment.
> +# Also any assignments in arch/$(ARCH)/Makefile take precedence over
> +# the default value.
>  
>  barebox-flash-image: $(KBUILD_IMAGE)
>  	$(call if_changed,ln)
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 8e660be..94ee073 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -179,7 +179,7 @@ barebox.netx: $(KBUILD_BINARY)
>  
>  ifeq ($(machine-y),netx)
>  KBUILD_TARGET := barebox.netx
> -KBUILD_BINARY := $(KBUILD_TARGET)
> +KBUILD_IMAGE := barebox.netx
>  endif
>  
>  barebox.s5p: $(KBUILD_BINARY)
> @@ -187,7 +187,7 @@ barebox.s5p: $(KBUILD_BINARY)
>  
>  ifeq ($(CONFIG_ARCH_S5PCxx),y)
>  KBUILD_TARGET := barebox.s5p
> -KBUILD_BINARY := $(KBUILD_TARGET)
> +KBUILD_IMAGE := barebox.s5p
>  endif
>  
>  quiet_cmd_mlo ?= IFT     $@
> @@ -199,7 +199,7 @@ MLO: $(KBUILD_BINARY)
>  
>  ifeq ($(CONFIG_OMAP_BUILD_IFT),y)
>  KBUILD_TARGET := MLO
> -KBUILD_BINARY := $(KBUILD_TARGET)
> +KBUILD_IMAGE := MLO
>  endif
>  
>  barebox.ubl: $(KBUILD_BINARY)
> @@ -209,7 +209,7 @@ barebox.ubl: $(KBUILD_BINARY)
>  
>  ifeq ($(CONFIG_ARCH_DAVINCI),y)
>  KBUILD_TARGET := barebox.ubl
> -KBUILD_BINARY := $(KBUILD_TARGET)
> +KBUILD_IMAGE := barebox.ubl
>  endif
>  
>  pbl := arch/arm/pbl
> @@ -219,7 +219,7 @@ zbarebox.S zbarebox.bin zbarebox: barebox.bin
>  archclean:
>  	$(MAKE) $(clean)=$(pbl)
>  
> -KBUILD_IMAGE := $(KBUILD_BINARY)
> +KBUILD_IMAGE ?= $(KBUILD_BINARY)
>  
>  archprepare: maketools
>  maketools:
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      parent reply	other threads:[~2012-09-06 17:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 10:20 Jan Luebbe
2012-09-06 10:20 ` [PATCH 2/2] Makefile: add target to produce a SPL compatible uImage Jan Luebbe
2012-09-06 10:32   ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-06 12:41   ` [PATCH v5] xload: get barebox size from barebox_arm_head Jan Weitzel
2012-09-06 13:23     ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-06 17:39     ` Sascha Hauer
2012-09-07 10:25     ` Sascha Hauer
2012-09-06 17:32 ` Sascha Hauer [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=20120906173218.GD26594@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jlu@pengutronix.de \
    /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