Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Matyukevich <geomatsi@gmail.com>
To: Peter Korsgaard <peter@korsgaard.com>
Cc: Alistair Francis <alistair@alistair23.me>,
	Suniel Mahesh <sunil@amarulasolutions.com>,
	Gerome Burlats <gerome.burlats@smile.fr>,
	Michael Walle <michael@walle.cc>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Romain Naour <romain.naour@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/2] board/*/genimage.cfg: use partition-table-type = "gpt" for genimage-15
Date: Sat, 25 Dec 2021 16:49:48 +0300	[thread overview]
Message-ID: <YcchfJG1EDtyepcy@curiosity> (raw)
In-Reply-To: <20211219142035.6220-2-peter@korsgaard.com>

Hello Peter,

> Genimage 15 deprecated the gpt option and now prints a warning when it is
> used:
> 
> INFO: hdimage(sdcard.img): The option 'gpt' is deprecated. Use 'partition-table-type' instead
> 
> So change the genimage configuration files to use that instead.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

...

> diff --git a/board/orangepi/orangepi-zero-plus2/genimage.cfg b/board/orangepi/orangepi-zero-plus2/genimage.cfg
> index f51ce3f854..aee9719ae4 100644
> --- a/board/orangepi/orangepi-zero-plus2/genimage.cfg
> +++ b/board/orangepi/orangepi-zero-plus2/genimage.cfg
> @@ -13,7 +13,7 @@ image boot.vfat {
>  image sdcard.img {
>  	hdimage {
>  		# for root=PARTLABEL support
> -		gpt = true
> +		partition-table-type = "gpt"
>  		# default GPT location conflicts with bootloaders, move it after
>  		gpt-location = 1M
>  	}

Build still fails for orangepi-zero-plus2 with this patch. I get the
following subsequent error messages from genimage:

ERROR: hdimage(sdcard.img): part boot: 'partition-type' is only valid for mbr and hybrid partition-table-type

After changing 'partition-type' entries to the appropriate 'partition-type-uuid',
genimage complains about overlaps:

ERROR: hdimage(sdcard.img): partition [GPT array] (offset 0x100000, size 0x4000) overlaps previous partition u-boot (offset 0x2000, size 0x102000)
ERROR: hdimage(sdcard.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.

It looks like new genimage is able to keep track of partition table.
IIUC this can be fixed either using new 'holes' feature or just updating
size of the bootloader file. For instance, with the following patch
applied orangepi-pc-plus builds and boots fine:

diff --git a/board/orangepi/orangepi-pc-plus/genimage.cfg b/board/orangepi/orangepi-pc-plus/genimage.cfg
index 7c3b4cd746..8930adfc2a 100644
--- a/board/orangepi/orangepi-pc-plus/genimage.cfg
+++ b/board/orangepi/orangepi-pc-plus/genimage.cfg
@@ -15,7 +15,7 @@ image boot.vfat {
 image sdcard.img {
        hdimage {
                # for root=PARTLABEL support
-               gpt = true
+               partition-table-type = "gpt"
                # default GPT location conflicts with bootloaders, move it after
                gpt-location = 1M
        }
@@ -24,11 +24,11 @@ image sdcard.img {
                in-partition-table = "no"
                image = "u-boot-sunxi-with-spl.bin"
                offset = 8K
-               size = 1032K # 1MB - 8KB + 16KB(GPT)
+               size = 1016K # 1MB - 8KB
        }

        partition boot {
-               partition-type = 0xC
+               partition-type-uuid  = F
                bootable = "true"
                image = "boot.vfat"
        }
@@ -36,7 +36,7 @@ image sdcard.img {
        # 'rootfs' will be used as the partition label, used
        # with root=PARTLABEL=rootfs kernel command line
        partition rootfs {
-               partition-type = 0x83
+               partition-type-uuid = L
                image = "rootfs.ext4"
                size = 512M
        }


Do you want me to send this orange-pc-plus patch separately
or you plan to respin yours ?

Regards,
Sergey


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-12-25 13:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-19 14:20 [Buildroot] [PATCH 1/2] board/orangepi/orangepi-r1/genimage.cfg: fix build after move to genimage 15 Peter Korsgaard
2021-12-19 14:20 ` [Buildroot] [PATCH 2/2] board/*/genimage.cfg: use partition-table-type = "gpt" for genimage-15 Peter Korsgaard
2021-12-25 13:49   ` Sergey Matyukevich [this message]
2021-12-25 13:58     ` Sergey Matyukevich
2021-12-27 14:43     ` Thomas Petazzoni
2021-12-27 14:43   ` Thomas Petazzoni
2021-12-27 14:43 ` [Buildroot] [PATCH 1/2] board/orangepi/orangepi-r1/genimage.cfg: fix build after move to genimage 15 Thomas Petazzoni

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=YcchfJG1EDtyepcy@curiosity \
    --to=geomatsi@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=buildroot@buildroot.org \
    --cc=gerome.burlats@smile.fr \
    --cc=jagan@amarulasolutions.com \
    --cc=michael@walle.cc \
    --cc=peter@korsgaard.com \
    --cc=romain.naour@gmail.com \
    --cc=sunil@amarulasolutions.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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