Hello @vishalg,
Thanks for reaching out to us. About your question, the support I will be limited since we do not offer official information about GPT partitioning in any BSP version. With that said, I was able to add GPT partition support to BSP39 u-boot by first generating the default RDB3 configuration and then adding the following configuration en the .config file:
CONFIG_CMD_GPT=y
You should be able to find the option already present but undefined.
Then compile u-boot and you will get prompted to activate other GPT related configurations, le the following:
$ make CROSS_COMPILE="/home/user/LinuxBSP/gcc-toolchain/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-"
scripts/kconfig/conf --syncconfig Kconfig
*
* Restart config...
*
*
* Device access commands
*
armflash (CMD_ARMFLASH) [N/y/?] n
adc - Access Analog to Digital Converters info and data (CMD_ADC) [Y/n/?] y
bcb (CMD_BCB) [N/y/?] n
bind/unbind - Bind or unbind a device to/from a driver (CMD_BIND) [N/y/?] n
clk - Show clock frequencies (CMD_CLK) [Y/n/?] y
demo - Demonstration commands for driver model (CMD_DEMO) [N/y/?] n
dfu (CMD_DFU) [N/y/?] n
dm - Access to driver model information (CMD_DM) [Y/n/?] y
flinfo, erase, protect (CMD_FLASH) [Y/n/?] y
fpgad - dump FPGA registers (CMD_FPGAD) [N/y/?] n
fuse - support for the fuse subssystem (CMD_FUSE) [Y/n/?] y
gpio (CMD_GPIO) [Y/n/?] y
GPT (GUID Partition Table) command (CMD_GPT) [Y/n/?] y
GPT Random UUID generation (RANDOM_UUID) [N/y/?] n
GPT partition renaming commands (CMD_GPT_RENAME) [N/y/?] (NEW) y
ide - Support for IDE drivers (CMD_IDE) [N/y/?] n
io - Support for performing I/O accesses (CMD_IO) [N/y/?] n
iotrace - Support for tracing I/O activity (CMD_IOTRACE) [N/y/?] n
i2c (CMD_I2C) [Y/n/?] y
loadb (CMD_LOADB) [Y/n/?] y
loads (CMD_LOADS) [Y/n/?] y
lsblk - list block drivers and devices (CMD_LSBLK) [N/y/?] n
MBR (Master Boot Record) command (CMD_MBR) [N/y/?] n
misc (CMD_MISC) [N/y/?] n
mmc (CMD_MMC) [Y/n/?] y
mmc bkops enable (CMD_BKOPS_ENABLE) [N/y/?] n
mmc swrite (CMD_MMC_SWRITE) [N/y/?] n
clone (CMD_CLONE) [N/y/?] n
mtd (CMD_MTD) [Y/n/?] y
nvme (CMD_NVME) [Y/n/?] y
onenand - access to onenand device (CMD_ONENAND) [N/y/?] n
osd (CMD_OSD) [N/y/?] n
part (CMD_PART) [Y/n/?] y
pci - Access PCI devices (CMD_PCI) [Y/n/?] y
pinmux - show pins muxing (CMD_PINMUX) [Y/n/?] y
poweroff (CMD_POWEROFF) [N/y/?] n
read - Read binary data from a partition (CMD_READ) [N/y/?] n
sata - Access SATA subsystem (CMD_SATA) [N/y/?] n
saves - Save a file over serial in S-Record format (CMD_SAVES) [N/y/?] n
scsi - Access to SCSI devices (CMD_SCSI) [N/y/?] n
sdram - Print SDRAM configuration information (CMD_SDRAM) [N/y/?] n
sf (CMD_SF) [Y/n/?] y
sf test - Allow testing of SPI flash (CMD_SF_TEST) [N/y/?] n
sspi - Command to access spi device (CMD_SPI) [Y/n/?] y
default spi bus used by sspi command (DEFAULT_SPI_BUS) [0] 0
default spi mode used by sspi command (see include/spi.h) (DEFAULT_SPI_MODE) [0] 0
tsi148 - Command to access tsi148 device (CMD_TSI148) [N/y/?] n
universe - Command to set up the Turndra Universe controller (CMD_UNIVERSE) [N/y/?] n
sdp (CMD_USB_SDP) [N/y/?] n
*
* Partition Types
*
Enable Partition Labels (disklabels) support (PARTITIONS) [Y/n/?] y
Enable Apple's MacOS partition table (MAC_PARTITION) [N/y/?] n
Enable MS Dos partition table (DOS_PARTITION) [Y/n/?] y
Enable ISO partition table (ISO_PARTITION) [N/y/?] n
Enable AMIGA partition table (AMIGA_PARTITION) [N/y/?] n
Enable EFI GPT partition table (EFI_PARTITION) [Y/?] y
Number of the EFI partition entries (EFI_PARTITION_ENTRIES_NUMBERS) [128] (NEW)
Offset (in bytes) of the EFI partition entries (EFI_PARTITION_ENTRIES_OFF) [0] (NEW)
Enable support of UUID for partition (PARTITION_UUIDS) [Y/?] y
Enable support of GUID for partition type (PARTITION_TYPE_GUID) [N/y/?] (NEW) y
After that the compilation will proceed as always.
I am attaching the final configuration I got as an example, also, here is the diff against the RDB3 defconfig:
diff --git a/a b/b
index ee38503..98f4d1f 100755
--- a/a
+++ b/b
@@ -534,8 +534,9 @@ CONFIG_CMD_FLASH=y
# CONFIG_CMD_FPGAD is not set
CONFIG_CMD_FUSE=y
CONFIG_CMD_GPIO=y
-# CONFIG_CMD_GPT is not set
+CONFIG_CMD_GPT=y
# CONFIG_RANDOM_UUID is not set
+CONFIG_CMD_GPT_RENAME=y
# CONFIG_CMD_IDE is not set
# CONFIG_CMD_IO is not set
# CONFIG_CMD_IOTRACE is not set
@@ -692,8 +693,11 @@ CONFIG_PARTITIONS=y
CONFIG_DOS_PARTITION=y
# CONFIG_ISO_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
+CONFIG_EFI_PARTITION=y
+CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=128
+CONFIG_EFI_PARTITION_ENTRIES_OFF=0
CONFIG_PARTITION_UUIDS=y
+CONFIG_PARTITION_TYPE_GUID=y
CONFIG_SUPPORT_OF_CONTROL=y
#
Please also check the official u-boot documentation: https://docs.u-boot.org/en/latest/usage/cmd/gpt.html
Let me know if this information was useful.