board/orangepi/orangepi-r1/genimage.cfg: fix build after move to genimage 15
PATCH 1/2 board/orangepi/orangepi-r1/genimage.cfg: fix build after move to genimage 15
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935239
ERROR: hdimage(sdcard.img): part boot: 'partition-type' is only valid for mbr and hybrid partition-table-type
So change to partition-type-uuid instead. With that fixed, genimage-15 then also complains about the overlap between the u-boot partition and the GPT:
ERROR: hdimage(sdcard.img): partition [GPT array] (offset 0x100000, size 0x4000) overlaps previous partition u-boot (offset 0x2000, size 0x102000)
So adjust the u-boot partition to end just before the GPT.
--- board/orangepi/orangepi-r1/genimage.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
board/orangepi/orangepi-r1/genimage.cfg +3 -3
@@ -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 = "U" 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 }
Signature · 6 lines
2.20.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 board/*/genimage.cfg: use partition-table-type = "gpt" for genimage-15
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.
--- board/aarch64-efi/genimage-efi.cfg | 2 +- board/beaglev/genimage.cfg | 2 +- board/friendlyarm/nanopc-t4/genimage.cfg | 2 +- board/friendlyarm/nanopi-m4/genimage.cfg | 2 +- board/kontron/smarc-sal28/genimage.cfg | 2 +- board/minnowboard/genimage.cfg | 2 +- board/orangepi/orangepi-pc-plus/genimage.cfg | 2 +- board/orangepi/orangepi-r1/genimage.cfg | 2 +- board/orangepi/orangepi-rk3399/genimage.cfg | 2 +- board/orangepi/orangepi-zero-plus2/genimage.cfg | 2 +- board/pc/genimage-efi.cfg | 2 +- board/pine64/rockpro64/genimage.cfg | 2 +- board/qemu/aarch64-sbsa/genimage.cfg | 2 +- board/radxa/rockpi-4/genimage.cfg | 2 +- board/radxa/rockpi-n10/genimage.cfg | 2 +- board/radxa/rockpi-n8/genimage.cfg | 2 +- board/sifive/hifive-unleashed/genimage_sdcard.cfg | 2 +- board/sifive/hifive-unleashed/genimage_spi-nor.cfg | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-)
board/aarch64-efi/genimage-efi.cfg +1 -1
@@ -13,7 +13,7 @@ image efi-part.vfat { image disk.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition boot {
board/beaglev/genimage.cfg +1 -1
@@ -1,6 +1,6 @@ image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition rootfs {
board/friendlyarm/nanopc-t4/genimage.cfg +1 -1
@@ -12,7 +12,7 @@ image boot.vfat { image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition loader1 {
board/friendlyarm/nanopi-m4/genimage.cfg +1 -1
@@ -12,7 +12,7 @@ image boot.vfat { image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition loader1 {
board/kontron/smarc-sal28/genimage.cfg +1 -1
@@ -1,6 +1,6 @@ image sdcard-emmc.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition rcw {
board/minnowboard/genimage.cfg +1 -1
@@ -17,7 +17,7 @@ image efi-part.vfat { # * the efi-partition created above image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition boot {
board/orangepi/orangepi-pc-plus/genimage.cfg +1 -1
@@ -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 }
board/orangepi/orangepi-r1/genimage.cfg +1 -1
@@ -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 spl, move it after gpt-location = 1M }
board/orangepi/orangepi-rk3399/genimage.cfg +1 -1
@@ -12,7 +12,7 @@ image boot.vfat { image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition loader1 {
board/orangepi/orangepi-zero-plus2/genimage.cfg +1 -1
@@ -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 }
board/pc/genimage-efi.cfg +1 -1
@@ -14,7 +14,7 @@ image efi-part.vfat { image disk.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition boot {
board/pine64/rockpro64/genimage.cfg +1 -1
@@ -12,7 +12,7 @@ image boot.vfat { image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition loader1 {
board/qemu/aarch64-sbsa/genimage.cfg +1 -1
@@ -14,7 +14,7 @@ image efi-part.vfat { image disk.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition boot {
board/radxa/rockpi-4/genimage.cfg +1 -1
@@ -12,7 +12,7 @@ image boot.vfat { image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition loader1 {
board/radxa/rockpi-n10/genimage.cfg +1 -1
@@ -12,7 +12,7 @@ image boot.vfat { image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition loader1 {
board/radxa/rockpi-n8/genimage.cfg +1 -1
@@ -12,7 +12,7 @@ image boot.vfat { image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition loader1 {
board/sifive/hifive-unleashed/genimage_sdcard.cfg +1 -1
@@ -1,6 +1,6 @@ image sdcard.img { hdimage { - gpt = true + partition-table-type = "gpt" } partition u-boot-spl {
board/sifive/hifive-unleashed/genimage_spi-nor.cfg +1 -1
@@ -2,7 +2,7 @@ image spi-nor.img { size = 32M hdimage { - gpt = true + partition-table-type = "gpt" } partition u-boot-spl {
Signature · 6 lines
2.20.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] board/*/genimage.cfg: use partition-table-type = "gpt" for genimage-15
Hello Peter,
Quoted 8 lines
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 <[email protected]>
...
board/orangepi/orangepi-zero-plus2/genimage.cfg image boot.vfat { · line 19
Quoted 13 lines
board/orangepi/orangepi-zero-plus2/genimage.cfg +1
-1@@ -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:
board/orangepi/orangepi-pc-plus/genimage.cfg +4 -4
@@ -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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] board/*/genimage.cfg: use partition-table-type = "gpt" for genimage-15
Quoted 11 lines
Quoted 8 lines
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 <[email protected]>...
Quoted 16 lines
board/orangepi/orangepi-zero-plus2/genimage.cfg image boot.vfat { · line 19
Quoted 13 lines
board/orangepi/orangepi-zero-plus2/genimage.cfg +1
-1@@ -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:
Sorry, I meant orangepi-pc-plus board.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] board/*/genimage.cfg: use partition-table-type = "gpt" for genimage-15
In reply to Sergey MatyukevichHello Sergey,
Quoted 8 lines · On Sat, 25 Dec 2021 16:49:48 +0300 Sergey Matyukevich <[email protected]>…
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:
Quoted 7 lines
ERROR: hdimage(sdcard.img): partition [GPT array] (offset
0x100000, size0x4000) overlaps previous partition u-boot (offset0x2000, size0x102000)
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:
Have you looked at
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
which is PATCH 1/2 of this series? It fixes exactly the problem you're pointing to, just for a different board.
Do not hesitate to send patches to fix other boards.
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni
AppliedRe: [Buildroot] [PATCH 2/2] board/*/genimage.cfg: use partition-table-type = "gpt" for genimage-15
In reply to Peter KorsgaardQuoted 20 lines · On Sun, 19 Dec 2021 15:20:33 +0100 Peter Korsgaard <[email protected]> wrote:
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 <[email protected]>--- board/aarch64-efi/genimage-efi.cfg | 2 +- board/beaglev/genimage.cfg | 2 +- board/friendlyarm/nanopc-t4/genimage.cfg | 2 +- board/friendlyarm/nanopi-m4/genimage.cfg | 2 +- board/kontron/smarc-sal28/genimage.cfg | 2 +- board/minnowboard/genimage.cfg | 2 +- board/orangepi/orangepi-pc-plus/genimage.cfg | 2 +- board/orangepi/orangepi-r1/genimage.cfg | 2 +- board/orangepi/orangepi-rk3399/genimage.cfg | 2 +- board/orangepi/orangepi-zero-plus2/genimage.cfg | 2 +- board/pc/genimage-efi.cfg | 2 +-
Quoted 8 lines
board/pine64/rockpro64/genimage.cfg | 2 +- board/qemu/aarch64-sbsa/genimage.cfg | 2 +- board/radxa/rockpi-4/genimage.cfg | 2 +- board/radxa/rockpi-n10/genimage.cfg | 2 +- board/radxa/rockpi-n8/genimage.cfg | 2 +- board/sifive/hifive-unleashed/genimage_sdcard.cfg | 2 +- board/sifive/hifive-unleashed/genimage_spi-nor.cfg | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-)
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni
AppliedQuoted 8 lines · On Sun, 19 Dec 2021 15:20:32 +0100 Peter Korsgaard <[email protected]> wrote:
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935239ERROR: hdimage(sdcard.img): part boot: 'partition-type' is only valid for mbr and hybrid partition-table-type
So change to partition-type-uuid instead. With that fixed, genimage-15 then also complains about the overlap between the u-boot partition and the GPT:
Quoted 8 lines
ERROR: hdimage(sdcard.img): partition [GPT array] (offset
0x100000, size0x4000) overlaps previous partition u-boot (offset0x2000, size0x102000)So adjust the u-boot partition to end just before the GPT.
Signed-off-by Peter Korsgaard <[email protected]>--- board/orangepi/orangepi-r1/genimage.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot