[oe-commits] Koen Kooi : mkefidisk.sh: create a proper ESP

git at git.openembedded.org git at git.openembedded.org
Mon Mar 18 21:41:56 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: 203ca80ee27948e2c68aab8ea48e51ff1c1157d5
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=203ca80ee27948e2c68aab8ea48e51ff1c1157d5

Author: Koen Kooi <koen at dominion.thruhere.net>
Date:   Mon Mar 18 15:23:55 2013 +0000

mkefidisk.sh: create a proper ESP

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 at dominion.thruhere.net>
Acked-by: Darren Hart <dvhart at linux.intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 scripts/contrib/mkefidisk.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index 44ac130..b7db0a9 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -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
 





More information about the Openembedded-commits mailing list