Browse code

Adding a test signed efi boot image

Sharath George authored on 2015/08/29 09:29:58
Showing 2 changed files
1 1
new file mode 100644
2 2
Binary files /dev/null and b/installer/efi/bootx64.efi differ
... ...
@@ -15,11 +15,21 @@
15 15
 grub_efi_install()
16 16
 {
17 17
     mkdir $BUILDROOT/boot/efi
18
-    mkfs.vfat /dev/sda1
19
-    mount -t vfat /dev/sda1 $BUILDROOT/boot/efi
18
+    #
19
+    # if it is a loop device then we should mount the dev mapped boot partition
20
+    #
21
+    if [[ $HDD == *"loop"* ]]
22
+    then
23
+         BOOT_PARTITION=/dev/mapper/`basename ${HDD}`p1
24
+    else
25
+         BOOT_PARTITION=${HDD}1
26
+    fi
27
+    mkfs.vfat $BOOT_PARITION
28
+    mount -t vfat $BOOT_PARTITION $BUILDROOT/boot/efi
20 29
     cp boot/unifont.pf2 /usr/share/grub/
21 30
     grub2-efi-install --target=x86_64-efi --efi-directory=$BUILDROOT/boot/efi --bootloader-id=Boot --root-directory=$BUILDROOT --recheck --debug
22
-    mv $BUILDROOT/boot/efi/EFI/Boot/grubx64.efi $BUILDROOT/boot/efi/EFI/Boot/bootx64.efi
31
+    rm $BUILDROOT/boot/efi/EFI/Boot/grubx64.efi
32
+    cp efi/bootx64.efi $BUILDROOT/boot/efi/EFI/Boot/bootx64.efi
23 33
     umount $BUILDROOT/boot/efi
24 34
 }
25 35
 
... ...
@@ -44,8 +54,8 @@ ARCH=$(uname -m)	# host architecture
44 44
 if [ $# -eq 3 ] 
45 45
 	then
46 46
         BOOTMODE=$1
47
-		HDD=$2
48
-		PARTITION=$3
47
+	HDD=$2
48
+	PARTITION=$3
49 49
 fi
50 50
 
51 51
 #