]> code.delx.au - refind/blobdiff - mkcdimage
Misc. small changes.
[refind] / mkcdimage
index 613ab62dba39538973c773a44a517bf82ea6979c..a132ee6cf95d9e81179093e7cdbac6ae47ce7c9f 100755 (executable)
--- a/mkcdimage
+++ b/mkcdimage
@@ -23,11 +23,16 @@ rm -rf temp
 mkdir temp
 cd temp
 unzip ../refind-bin-$Version.zip
+cp $StartDir/SHELLS.txt ./refind-bin-$Version
 
-# Create hard links to the files so that they'll be suitable for an
-# EFI-boot CD...
+# Create a boot directory and (temporarily) copy the EFI shell
+# files to it....
 mkdir -p refind-bin-$Version/EFI/boot
 cd refind-bin-$Version/EFI/boot
+cp $StartDir/shell*.efi ./
+
+# Create hard links to the rEFInd files so that they'll be suitable for an
+# EFI-boot CD...
 ln ../../refind/refind_ia32.efi ./bootia32.efi
 ln ../../refind/refind_x64.efi ./bootx64.efi
 ln ../../refind/refind.conf-sample ./refind.conf
@@ -41,18 +46,58 @@ ToritoSize=`du -s EFI | cut -f 1`
 let ToritoSize=($ToritoSize)/28
 let ToritoSize=($ToritoSize)*32
 
+# Move the EFI shell files back to the root where they belong
+# (They were in EFI/boot just so they'd get counted in ToritoSize)
+mv EFI/boot/shell*.efi ./
+
 # Prepare a FAT filesystem image and populate it with the
 # EFI boot files....
 dd if=/dev/zero of=refind-bin-$Version.img bs=1024 count=$ToritoSize
 mkdosfs -n "rEFInd.ET" refind-bin-$Version.img
-mcopy -irefind-bin-$Version.img -s EFI ::/
+mcopy -irefind-bin-$Version.img -s EFI shell*.efi ::/
 
 # Make the ISO-9660 image file....
 mkisofs -A "Bootable rEFInd" -V "rEFInd $Version" -volset "rEFInd $Version" \
     -J -r -v -x ./lost+found -o ../../refind-cd-$Version.iso \
-    -b refind-bin-$Version.img -c boot.cat -no-emul-boot -boot-load-size 4 \
     -eltorito-alt-boot -efi-boot refind-bin-$Version.img \
     -no-emul-boot ./
 
-cd ../../
+# Below is like above, but also creates an El Torito entry for BIOS
+# booting. That's useless, but in case something flakes out without
+# it, I'll preserve this version for a while....
+#mkisofs -A "Bootable rEFInd" -V "rEFInd $Version" -volset "rEFInd $Version" \
+#    -J -r -v -x ./lost+found -o ../../refind-cd-$Version.iso \
+#    -b refind-bin-$Version.img -c boot.cat -no-emul-boot -boot-load-size 4 \
+#    -eltorito-alt-boot -efi-boot refind-bin-$Version.img \
+#    -no-emul-boot ./
+
+# Create a bootable USB flash drive image, using the FAT filesystem
+# created above and a stored partition table image (plus some empty
+# sectors)....
+#
+# Note: Seems to work on only a few systems, so I'm not distributing
+# the resulting images yet....
+#
+rm ../../refind-flashdrive-$Version.*
+cat $StartDir/flashparts.img refind-bin-$Version.img > refind-flashdrive-$Version.img
+cp $StartDir/README-flashdrive.txt ./
+cd ..
+mv refind-bin-$Version refind-flashdrive-$Version
+zip -9r ../refind-flashdrive-$Version.zip \
+    refind-flashdrive-$Version/refind-flashdrive-$Version.img \
+    refind-flashdrive-$Version/docs refind-flashdrive-$Version/LICENSE.txt \
+    refind-flashdrive-$Version/install.sh \
+    refind-flashdrive-$Version/COPYING.txt \
+    refind-flashdrive-$Version/CREDITS.txt \
+    refind-flashdrive-$Version/README.txt \
+    refind-flashdrive-$Version/SHELLS.txt \
+    refind-flashdrive-$Version/README-flashdrive.txt
+mv refind-flashdrive-$Version/refind-flashdrive-$Version.img ../
+
+cd ../
+
+# Zip up the optical disc image....
+rm -f refind-cd-$Version.zip
+zip -9 refind-cd-$Version.zip refind-cd-$Version.iso
+
 rm -r temp/