uboot in GPT partition table

Hello,

I am using a bbb with a Yocto build image.

The classic result is a sdcard image with a dos partition table including a FAT32 boot partition with the MLO and u-boot.

fdisk -l /dev/mmcblk0
Disque /dev/mmcblk0 : 7,31 GiB, 7850688512 octets, 15333376 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x54b3fbc6

Périphérique   Amorçage   Début     Fin Secteurs Taille Id Type
/dev/mmcblk0p1 *              8   65543    65536    32M  c W95 FAT32 (LBA)
/dev/mmcblk0p2            65544 1396743  1331200   650M 83 Linux
/dev/mmcblk0p3          1396744 2727943  1331200   650M 83 Linux
/dev/mmcblk0p4          2727944 3751943  1024000   500M 83 Linux

I wonder if it possible to have a GPT partition table with a boot partition. This is the output from yocto when the GPT option is activated :

Disque /dev/mmcblk0 : 7,31 GiB, 7850688512 octets, 15333376 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : gpt
Identifiant de disque : 22F7B34C-4575-412C-99EF-FCA4FDC3B24D

Périphérique     Début     Fin Secteurs Taille Type
/dev/mmcblk0p1      40   65575    65536    32M Données de base Microsoft
/dev/mmcblk0p2   65576 1396775  1331200   650M Système de fichiers Linux
/dev/mmcblk0p3 1396776 2727975  1331200   650M Système de fichiers Linux
/dev/mmcblk0p4 2727976 3751975  1024000   500M Système de fichiers Linux

It does not boot, I guess the early boot cannot load the boot partition, but why ?

Thanks,
Louis

BootRom only supports classic msdos/fat… If you dd MLO and u-boot.img directly to the microSD, vs storing them in the fat32 parition… Then you can rely on u-boot finding and loading data off the GPT partition table…

Regards,

2 Likes

Hello @RobertCNelson ,

That is good info. Very knowledgeable. Thank you.

Seth

Thank you ! Indeed I saw on archlinuxarm.org that dd trick.