diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2023-05-19 08:56:49 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2023-05-21 20:34:03 -0400 |
commit | 5dc0e4e0bc8011918b58baf0d8b03a3840a7b213 (patch) | |
tree | 145848015c29853e0a0437e9731cd8235f0f22c7 /firmware/export/disk.h | |
parent | 8fbd44a3d37fddf323dea36e8f52193fd007bd75 (diff) | |
download | rockbox-5dc0e4e0bc8011918b58baf0d8b03a3840a7b213.tar.gz rockbox-5dc0e4e0bc8011918b58baf0d8b03a3840a7b213.zip |
disk: Support GUID Partition Tables (GPT)
Notes:
* Currently limited to 32-bit sector addresses due to internal Rockbox
APIs. So this means a practical limit of 2TiB per drive.
* Only 'General Data' GPT partition type is recognised, as that's
what SD cards seem to use for exFAT/FAT32.
Note that _booting_ off GPT-partitioned drive will require rebuilding
the various rockbox bootloaders, and even then there may be platform
limitations that preclude this.
Change-Id: Ibfaae1960adcb1e81976d4b60dd596c6d16318e4
Diffstat (limited to 'firmware/export/disk.h')
-rw-r--r-- | firmware/export/disk.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/export/disk.h b/firmware/export/disk.h index c66028fe45..e465552fdc 100644 --- a/firmware/export/disk.h +++ b/firmware/export/disk.h | |||
@@ -35,6 +35,9 @@ struct partinfo | |||
35 | #define PARTITION_TYPE_FAT32_LBA 0x0c | 35 | #define PARTITION_TYPE_FAT32_LBA 0x0c |
36 | #define PARTITION_TYPE_FAT16 0x06 | 36 | #define PARTITION_TYPE_FAT16 0x06 |
37 | #define PARTITION_TYPE_OS2_HIDDEN_C_DRIVE 0x84 | 37 | #define PARTITION_TYPE_OS2_HIDDEN_C_DRIVE 0x84 |
38 | #define PARTITION_TYPE_GPT_GUARD 0xee | ||
39 | |||
40 | #define MAX_PARTITIONS_PER_DRIVE 4 /* Needs to be at least 4 */ | ||
38 | 41 | ||
39 | bool disk_init(IF_MD_NONVOID(int drive)); | 42 | bool disk_init(IF_MD_NONVOID(int drive)); |
40 | bool disk_partinfo(int partition, struct partinfo *info); | 43 | bool disk_partinfo(int partition, struct partinfo *info); |