Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] barebox: support multiple image files
@ 2017-06-21  7:03 Marcin Niestroj
  2017-06-21 19:43 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Niestroj @ 2017-06-21  7:03 UTC (permalink / raw)
  To: buildroot

Add support for specifying multiple image files in
BR2_TARGET_BAREBOX_IMAGE_FILE config option.

This is usefull for boards with several RAM size variants.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
Changes v1 -> v2:
 * Improve Config.in description (suggested by Thomas)

 boot/barebox/barebox-aux/Config.in | 4 ++--
 boot/barebox/barebox.mk            | 2 +-
 boot/barebox/barebox/Config.in     | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/boot/barebox/barebox-aux/Config.in b/boot/barebox/barebox-aux/Config.in
index ec3b97cb8..d39d24f76 100644
--- a/boot/barebox/barebox-aux/Config.in
+++ b/boot/barebox/barebox-aux/Config.in
@@ -30,9 +30,9 @@ config BR2_TARGET_BAREBOX_AUX_CONFIG_FRAGMENT_FILES
 	  that will be merged to the main Barebox configuration file.
 
 config BR2_TARGET_BAREBOX_AUX_IMAGE_FILE
-	string "Image filename"
+	string "Image file names"
 	help
-	  Name of the generated barebox image, which will be copied to
+	  Space-separated list of barebox images which will be copied to
 	  the images directory.
 
 	  If left empty, defaults to:
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 1690e8fa5..8bc9594ff 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -113,7 +113,7 @@ $(1)_IMAGE_FILE = $$(call qstrip,$$(BR2_TARGET_$(1)_IMAGE_FILE))
 
 define $(1)_INSTALL_IMAGES_CMDS
 	if test -n "$$($(1)_IMAGE_FILE)"; then \
-		cp -L $$(@D)/$$($(1)_IMAGE_FILE) $$(BINARIES_DIR) ; \
+		cp -L $$(foreach image,$$($(1)_IMAGE_FILE),$$(@D)/$$(image)) $$(BINARIES_DIR) ; \
 	elif test -h $$(@D)/barebox-flash-image ; then \
 		cp -L $$(@D)/barebox-flash-image $$(BINARIES_DIR)/barebox.bin ; \
 	else \
diff --git a/boot/barebox/barebox/Config.in b/boot/barebox/barebox/Config.in
index 3d8d01456..0be26adf9 100644
--- a/boot/barebox/barebox/Config.in
+++ b/boot/barebox/barebox/Config.in
@@ -31,9 +31,9 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
 	  that will be merged to the main Barebox configuration file.
 
 config BR2_TARGET_BAREBOX_IMAGE_FILE
-	string "Image filename"
+	string "Image file names"
 	help
-	  Name of the generated barebox image, which will be copied to
+	  Space-separated list of barebox images which will be copied to
 	  the images directory.
 
 	  If left empty, defaults to:
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH v2] barebox: support multiple image files
  2017-06-21  7:03 [Buildroot] [PATCH v2] barebox: support multiple image files Marcin Niestroj
@ 2017-06-21 19:43 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2017-06-21 19:43 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 21 Jun 2017 09:03:53 +0200, Marcin Niestroj wrote:

>  define $(1)_INSTALL_IMAGES_CMDS
>  	if test -n "$$($(1)_IMAGE_FILE)"; then \

I've renamed this variable to $(1)_IMAGE_FILES, because it now contains
potentially multiple files.

Applied with this fixed.

BTW, it would be nice to provide a test case for this feature in our
testing infrastructure, see support/testing/. I think in the long run
we should require the addition of test cases when such features are
added.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-21 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-21  7:03 [Buildroot] [PATCH v2] barebox: support multiple image files Marcin Niestroj
2017-06-21 19:43 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox