summaryrefslogtreecommitdiff
path: root/disk/part.c
diff options
context:
space:
mode:
authorrichardretanubun <richardretanubun@ruggedcom.com>2008-09-26 11:13:22 -0400
committerWolfgang Denk <wd@denx.de>2008-10-18 21:54:01 +0200
commit07f3d789b9beb7ce3278c974f4d5c8f51b6ab567 (patch)
treecb0ae1f7368cf8de7146f3161315018ea7cac367 /disk/part.c
parentfbc87dc0546dff709b38f358e2c5d5e39c4ca374 (diff)
downloadu-boot-imx-07f3d789b9beb7ce3278c974f4d5c8f51b6ab567.zip
u-boot-imx-07f3d789b9beb7ce3278c974f4d5c8f51b6ab567.tar.gz
u-boot-imx-07f3d789b9beb7ce3278c974f4d5c8f51b6ab567.tar.bz2
Add support for CONFIG_EFI_PARTITION (GUID Partition Table)
The GUID (Globally Unique Identifier) Partition Table (GPT) is a part of EFI. See http://en.wikipedia.org/wiki/GUID_Partition_Table Based on linux/fs/partitions/efi.[ch] Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com>
Diffstat (limited to 'disk/part.c')
-rw-r--r--disk/part.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/disk/part.c b/disk/part.c
index 80532a7..e2bf4ab 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -212,7 +212,8 @@ void dev_print (block_dev_desc_t *dev_desc)
#if defined(CONFIG_MAC_PARTITION) || \
defined(CONFIG_DOS_PARTITION) || \
defined(CONFIG_ISO_PARTITION) || \
- defined(CONFIG_AMIGA_PARTITION)
+ defined(CONFIG_AMIGA_PARTITION) || \
+ defined(CONFIG_EFI_PARTITION)
void init_part (block_dev_desc_t * dev_desc)
{
@@ -230,6 +231,14 @@ void init_part (block_dev_desc_t * dev_desc)
}
#endif
+/* must be placed before DOS partition detection */
+#ifdef CONFIG_EFI_PARTITION
+ if (test_part_efi(dev_desc) == 0) {
+ dev_desc->part_type = PART_TYPE_EFI;
+ return;
+ }
+#endif
+
#ifdef CONFIG_DOS_PARTITION
if (test_part_dos(dev_desc) == 0) {
dev_desc->part_type = PART_TYPE_DOS;
@@ -286,6 +295,15 @@ int get_partition_info (block_dev_desc_t *dev_desc, int part
}
break;
#endif
+
+#ifdef CONFIG_EFI_PARTITION
+ case PART_TYPE_EFI:
+ if (get_partition_info_efi(dev_desc,part,info) == 0) {
+ PRINTF ("## Valid EFI partition found ##\n");
+ return (0);
+ }
+ break;
+#endif
default:
break;
}
@@ -356,14 +374,23 @@ void print_part (block_dev_desc_t * dev_desc)
print_part_amiga (dev_desc);
return;
#endif
+
+#ifdef CONFIG_EFI_PARTITION
+ case PART_TYPE_EFI:
+ PRINTF ("## Testing for valid EFI partition ##\n");
+ print_part_header ("EFI", dev_desc);
+ print_part_efi (dev_desc);
+ return;
+#endif
}
puts ("## Unknown partition table\n");
}
-#else /* neither MAC nor DOS nor ISO partition configured */
+#else /* neither MAC nor DOS nor ISO nor AMIGA nor EFI partition configured */
# error neither CONFIG_MAC_PARTITION nor CONFIG_DOS_PARTITION
-# error nor CONFIG_ISO_PARTITION configured!
+# error nor CONFIG_ISO_PARTITION nor CONFIG_AMIGA_PARTITION
+# error nor CONFIG_EFI_PARTITION configured!
#endif
#endif