]> code.ossystems Code Review - openembedded-core.git/commitdiff
mkefidisk.sh: create a proper ESP
authorKoen Kooi <koen@dominion.thruhere.net>
Mon, 18 Mar 2013 15:23:55 +0000 (15:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Mar 2013 21:36:50 +0000 (21:36 +0000)
The script was creating a FAT fs with EFI files in it, but wasn't setting the GPT GUID.

Using 'gummiboot install' natively failed because of the missing GPT GUID, so fix that. While we're there also set the name to "EFI System Partition".

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/contrib/mkefidisk.sh

index 44ac130a68caeafcc1078b2253f821835d43d77f..b7db0a913421ba3d2b10e901c157768d2e0577c0 100755 (executable)
@@ -166,6 +166,14 @@ parted $DEVICE mklabel gpt
 echo "Creating boot partition on $BOOTFS"
 parted $DEVICE mkpart primary 0% $BOOT_SIZE
 
+# GPT doesn't have a real boot flag, parted will change the GUID to EFI System Partition, 
+# which is what we want
+echo "Enabling boot flag on $BOOTFS"
+parted $DEVICE set 1 boot on
+
+echo "Labeling $BOOTFS as EFI System Partition"
+parted $DEVICE name 1 "EFI System Partition"
+
 echo "Creating ROOTFS partition on $ROOTFS"
 parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END