mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] image-hdimg: support using barebox with GPT
Date: Fri, 24 Mar 2023 10:03:34 +0100	[thread overview]
Message-ID: <20230324090334.298317-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20230316165132.423488-1-rhi@pengutronix.de>

Thanks, applied as 40a39c7a94d1f8821fab5a09a827937e00fe62af.

Michael

[sent from post-receive hook]

On Fri, 24 Mar 2023 10:03:34 +0100, Roland Hieber <rhi@pengutronix.de> wrote:
> Currently, choosing IMAGE_HDIMG_GPT together with IMAGE_HDIMG_BAREBOX
> leads to an error in genimage because the full GPT array is larger than
> the hole in the barebox image. However, the hole in the barebox images
> is large enough to fit the protective MBR and the primary GPT header.
> The rest of the GPT array needs to moved after the barebox image, so set
> the gpt-location setting to the size of the barebox image.
> 
> For the other bootloaders, nothing needs to change, so set the
> gpt-location to its default value of 1024.
> 
> For MBR, this config setting is ignored.
> 
> Link: https://www.barebox.org/doc/latest/boards/imx.html#using-gpt-on-i-mx
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> Message-Id: <20230316165132.423488-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 a5c55e69e952..114b461d9099 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"
> -	holes = {"(440; 512)"}
> +	holes = {"(440; 1024)"}
>  	size = 2M
>  }
> diff --git a/config/images/hd.config b/config/images/hd.config
> index d33ddc43490a..0ae3c27b46b7 100644
> --- a/config/images/hd.config
> +++ b/config/images/hd.config
> @@ -5,6 +5,7 @@ image @IMAGE@ {
>  	hdimage {
>  		align = 1M
>  		partition-table-type = "@PARTITION_TABLE_TYPE@"
> +		gpt-location = "@GPT_LOCATION@"
>  	}
>  	@BOOTLOADER_PARTITIONS@
>  	partition root {
> diff --git a/rules/image-hdimg.make b/rules/image-hdimg.make
> index b470c0fb6b1a..02f7f84bfcad 100644
> --- a/rules/image-hdimg.make
> +++ b/rules/image-hdimg.make
> @@ -30,17 +30,20 @@ IMAGE_HDIMG_BOOTLOADER_ENV := \
>  
>  ifdef PTXCONF_IMAGE_HDIMG_GRUB
>  IMAGE_HDIMG_BOOTLOADER_ENV = \
> +	GPT_LOCATION='1024' \
>  	GRUB_STAGE_DIR=$(GRUB_STAGE_DIR) \
>  	BOOTLOADER_IMAGES='include("grub.config")' \
>  	BOOTLOADER_PARTITIONS='include("grub_partitions.config")'
>  endif
>  ifdef PTXCONF_IMAGE_HDIMG_BAREBOX
>  IMAGE_HDIMG_BOOTLOADER_ENV := \
> +	GPT_LOCATION='2M' \
>  	BOOTLOADER_IMAGES='' \
>  	BOOTLOADER_PARTITIONS='include("barebox_partitions.config")'
>  endif
>  ifdef PTXCONF_IMAGE_HDIMG_VFAT
>  IMAGE_HDIMG_BOOTLOADER_ENV := \
> +	GPT_LOCATION='1024' \
>  	BOOTLOADER_IMAGES='' \
>  	BOOTLOADER_PARTITIONS='include("vfat_partitions.config")'
>  



      reply	other threads:[~2023-03-24  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 16:41 [ptxdist] [PATCH] image-hdimg: support " Roland Hieber
2023-03-16 16:51 ` [ptxdist] [PATCH v2] image-hdimg: support using " Roland Hieber
2023-03-24  9:03   ` Michael Olbrich [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=20230324090334.298317-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=rhi@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