From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 24 Mar 2023 10:04:09 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pfdLE-00D3kI-6R for lore@lore.pengutronix.de; Fri, 24 Mar 2023 10:04:09 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pfdLC-0008Ul-La; Fri, 24 Mar 2023 10:04:06 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfdKi-0008AM-2a; Fri, 24 Mar 2023 10:03:36 +0100 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pfdKh-006LCB-DV; Fri, 24 Mar 2023 10:03:35 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pfdKg-001Fdb-MG; Fri, 24 Mar 2023 10:03:34 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 24 Mar 2023 10:03:34 +0100 Message-Id: <20230324090334.298317-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230316165132.423488-1-rhi@pengutronix.de> References: <20230316165132.423488-1-rhi@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] image-hdimg: support using barebox with GPT X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 40a39c7a94d1f8821fab5a09a827937e00fe62af. Michael [sent from post-receive hook] On Fri, 24 Mar 2023 10:03:34 +0100, Roland Hieber 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 > Message-Id: <20230316165132.423488-1-rhi@pengutronix.de> > Signed-off-by: Michael Olbrich > > 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")' >