From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 3/7] barebox: support custom barebox output image name
Date: Tue, 5 Apr 2016 01:20:13 +0200 [thread overview]
Message-ID: <5702F6AD.1030402@mind.be> (raw)
In-Reply-To: <1458513351-6556-4-git-send-email-pieter@boesman.nl>
On 03/20/16 23:35, Pieter Smith wrote:
> In preparation for building a 2nd barebox config, a configuration option is
> added to allow customization of the image filename when the built image is
> copied to the output/images directory.
>
> Signed-off-by: Pieter Smith <pieter@boesman.nl>
> ---
> boot/barebox/Config.in | 7 +++++++
> boot/barebox/barebox.mk | 9 +++++++--
> 2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
> index 4f6872c..7769866 100644
> --- a/boot/barebox/Config.in
> +++ b/boot/barebox/Config.in
> @@ -106,6 +106,13 @@ config BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE
>
> Set to barebox.bin for barebox versions older than 2012.10.
>
> +config BR2_TARGET_BAREBOX_OUTPUT_IMAGE_FILE
> + string "Output image filename"
With my suggestion of BR2_TARGET_BAREBOX_IMAGE_NAME, this should be changed
to e.g. BR2_TARGET_BAREBOX_OUTPUT_IMAGE_NAME. The prompt looks OK though.
However, on second thought I'm wondering if it is really needed. For u-boot or
the kernel, we always copy the images with the same name as they were built. If
that is not what the ROM boot loader expects, the name can be changed in the
image generation script. For example, genimage.cfg could contain:
image boot.vfat {
vfat {
file MLO {
"barebox-am33xx-beaglebone-mlo.img"
}
file barebox.img {
"barebox-am33xx-beaglebone.img"
}
}
size = 8M
}
What do you think?
Regards,
Arnout
> + default "barebox.bin"
> + help
> + Name to use when copying the barebox image to the output/images
> + directory.
> +
> config BR2_TARGET_BAREBOX_BAREBOXENV
> bool "bareboxenv tool in target"
> help
> diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
> index d0f28cf..4eea470 100644
> --- a/boot/barebox/barebox.mk
> +++ b/boot/barebox/barebox.mk
> @@ -93,9 +93,11 @@ endef
>
> define BAREBOX_INSTALL_IMAGES_CMDS
> if test -e $(@D)/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)); then \
> - cp -L $(@D)/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)) $(BINARIES_DIR)/barebox.bin ; \
> + cp -L $(@D)/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)) \
> + $(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_BAREBOX_OUTPUT_IMAGE_FILE)) ; \
> elif test -e $(@D)/images/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)); then \
> - cp $(@D)/images/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)) $(BINARIES_DIR)/barebox.bin ; \
> + cp $(@D)/images/$(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE)) \
> + $(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_BAREBOX_OUTPUT_IMAGE_FILE)) ; \
> else \
> echo "error: Specified built image file not found: $(call qstrip,$(BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE))" >&2 ; \
> echo " in: $(@D)/" >&2 ; \
> @@ -124,6 +126,9 @@ endif
> ifndef BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE
> $(error No barebox built image filename specified. Check your BR2_TARGET_BAREBOX_BUILT_IMAGE_FILE setting)
> endif
> +ifndef BR2_TARGET_BAREBOX_OUTPUT_IMAGE_FILE
> +$(error No barebox output image filename specified. Check your BR2_TARGET_BAREBOX_OUTPUT_IMAGE_FILE setting)
> +endif
> endif
>
> $(eval $(kconfig-package))
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2016-04-04 23:20 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-20 22:35 [Buildroot] [PATCH v4 0/7] Support building a second Barebox config (incl. BBB) Pieter Smith
2016-03-20 22:35 ` [Buildroot] [PATCH v4 1/7] barebox: support multi-image-build image selection Pieter Smith
2016-03-31 5:44 ` Yegor Yefremov
2016-04-06 20:28 ` Pieter Smith
2016-04-02 15:31 ` Thomas Petazzoni
2016-04-04 22:08 ` Arnout Vandecappelle
2016-04-04 22:16 ` Arnout Vandecappelle
2016-03-20 22:35 ` [Buildroot] [PATCH v4 2/7] barebox: friendly error on missing built image Pieter Smith
2016-03-31 6:01 ` Yegor Yefremov
2016-03-20 22:35 ` [Buildroot] [PATCH v4 3/7] barebox: support custom barebox output image name Pieter Smith
2016-03-31 6:03 ` Yegor Yefremov
2016-04-04 22:31 ` Arnout Vandecappelle
2016-04-04 23:20 ` Arnout Vandecappelle [this message]
2016-04-06 14:53 ` Thomas Petazzoni
2016-04-06 20:14 ` Pieter Smith
2016-04-06 23:06 ` Arnout Vandecappelle
2016-04-08 7:51 ` Pieter Smith
2016-03-20 22:35 ` [Buildroot] [PATCH v4 4/7] barebox: introduce barebox-package function Pieter Smith
2016-03-31 6:12 ` Yegor Yefremov
2016-04-04 22:59 ` Arnout Vandecappelle
2016-04-04 23:23 ` Arnout Vandecappelle
2016-04-06 20:26 ` Pieter Smith
2016-03-20 22:35 ` [Buildroot] [PATCH v4 5/7] barebox: extract package name argument Pieter Smith
2016-03-31 6:16 ` Yegor Yefremov
2016-04-04 23:01 ` Arnout Vandecappelle
2016-03-20 22:35 ` [Buildroot] [PATCH v4 6/7] barebox: support 2nd config build Pieter Smith
2016-03-31 6:17 ` Yegor Yefremov
2016-04-04 23:25 ` Arnout Vandecappelle
2016-04-24 7:53 ` Pieter Smith
2016-03-20 22:35 ` [Buildroot] [PATCH v4 7/7] beaglebone: adds barebox bootloader defconfig Pieter Smith
2016-03-31 6:21 ` Yegor Yefremov
2016-04-04 23:37 ` Arnout Vandecappelle
2016-04-19 20:26 ` Pieter Smith
2016-04-19 22:13 ` Arnout Vandecappelle
2016-04-23 11:39 ` Pieter Smith
2016-03-21 11:38 ` [Buildroot] [PATCH v4 0/7] Support building a second Barebox config (incl. BBB) Yegor Yefremov
2016-03-21 11:56 ` Pieter Smith
2016-04-19 19:24 ` Thomas Petazzoni
2016-04-19 20:17 ` Pieter Smith
2016-04-20 14:42 ` Yegor Yefremov
2016-04-20 16:42 ` Pieter Smith
2016-04-21 10:55 ` Yegor Yefremov
2016-04-21 11:29 ` Thomas Petazzoni
2016-04-23 13:01 ` Pieter Smith
2016-04-23 13:11 ` Thomas Petazzoni
2016-04-23 14:35 ` Pieter Smith
2016-04-23 14:50 ` Thomas Petazzoni
2016-04-23 16:18 ` Pieter Smith
2016-04-23 19:26 ` Thomas Petazzoni
2016-04-24 8:04 ` Pieter Smith
2016-04-24 8:16 ` Thomas Petazzoni
2016-04-24 8:32 ` Pieter Smith
2016-04-24 8:47 ` Thomas Petazzoni
2016-04-24 8:50 ` Pieter Smith
2016-04-24 8:47 ` Pieter Smith
2016-04-24 19:18 ` Peter Korsgaard
2016-04-24 21:26 ` Pieter Smith
2016-04-23 13:05 ` Pieter Smith
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=5702F6AD.1030402@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/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