mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] image-hdimage: make barebox image configurable
@ 2023-03-17 10:55 Roland Hieber
  2023-03-24  9:03 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Roland Hieber @ 2023-03-17 10:55 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

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




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

* Re: [ptxdist] [APPLIED] image-hdimage: make barebox image configurable
  2023-03-17 10:55 [ptxdist] [PATCH] image-hdimage: make barebox image configurable Roland Hieber
@ 2023-03-24  9:03 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2023-03-24  9:03 UTC (permalink / raw)
  To: ptxdist; +Cc: Roland Hieber

Thanks, applied as 5c36e112956b54b47c85bedd0429d4cf3ceac6ef.

Michael

[sent from post-receive hook]

On Fri, 24 Mar 2023 10:03:36 +0100, Roland Hieber <rhi@pengutronix.de> wrote:
> 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>
> Message-Id: <20230317105503.1278217-1-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> 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



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

end of thread, other threads:[~2023-03-24  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 10:55 [ptxdist] [PATCH] image-hdimage: make barebox image configurable Roland Hieber
2023-03-24  9:03 ` [ptxdist] [APPLIED] " Michael Olbrich

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