mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH] image-hdimage: make barebox image configurable
Date: Fri, 17 Mar 2023 11:55:03 +0100	[thread overview]
Message-ID: <20230317105503.1278217-1-rhi@pengutronix.de> (raw)

The default name, 'barebox-image', is a symlink to the last installed
file by the barebox recipe, which is not always the barebox that we want
when multi-image support is enabled in the barebox config.

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 config/images/barebox_partitions.config |  2 +-
 platforms/image-hdimg.in                | 14 ++++++++++++++
 rules/image-hdimg.make                  |  1 +
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/config/images/barebox_partitions.config b/config/images/barebox_partitions.config
index 114b461d9099..450e055f213a 100644
--- a/config/images/barebox_partitions.config
+++ b/config/images/barebox_partitions.config
@@ -1,6 +1,6 @@
 partition barebox {
 	in-partition-table = false
-	image = "barebox-image"
+	image = "@BAREBOX_IMAGE@"
 	holes = {"(440; 1024)"}
 	size = 2M
 }
diff --git a/platforms/image-hdimg.in b/platforms/image-hdimg.in
index be37ba60feb2..b0b164230f60 100644
--- a/platforms/image-hdimg.in
+++ b/platforms/image-hdimg.in
@@ -46,4 +46,18 @@ config IMAGE_HDIMG_VFAT
 
 endchoice
 
+if IMAGE_HDIMG_BAREBOX
+
+config IMAGE_HDIMG_BAREBOX_IMAGE
+	string
+	prompt "barebox image name"
+	default "barebox-image"
+	help
+	  If barebox creates multiple images, configure the file name of the
+	  image (relative to $IMAGEDIR) which should be written into hd.img.
+
+	  The default is 'barebox-image', which is a symlink to the last image
+	  installed by the barebox recipe.
+endif
+
 endif
diff --git a/rules/image-hdimg.make b/rules/image-hdimg.make
index 02f7f84bfcad..2aa8aeddaf78 100644
--- a/rules/image-hdimg.make
+++ b/rules/image-hdimg.make
@@ -38,6 +38,7 @@ endif
 ifdef PTXCONF_IMAGE_HDIMG_BAREBOX
 IMAGE_HDIMG_BOOTLOADER_ENV := \
 	GPT_LOCATION='2M' \
+	BAREBOX_IMAGE=$(PTXCONF_IMAGE_HDIMG_BAREBOX_IMAGE) \
 	BOOTLOADER_IMAGES='' \
 	BOOTLOADER_PARTITIONS='include("barebox_partitions.config")'
 endif
-- 
2.30.2




             reply	other threads:[~2023-03-17 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 10:55 Roland Hieber [this message]
2023-03-24  9:03 ` [ptxdist] [APPLIED] " Michael Olbrich

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=20230317105503.1278217-1-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=ptxdist@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