UEFI Boot support (#84)

* EFI bootloader files need to be in /EFI/Boot in order to be portable

* EFI bootloader files need to be in /EFI/Boot on portable media to get picked up, I've retained the mixture of line endings in these files as requested (https://github.com/Tomas-M/linux-live/pull/84#issuecomment-623150025)

* Again, these files need to be in /EFI/Boot to be portable

* There will be an EFI structure under boot that is consistent with what EFI requires. Additionally, the syslinux build for EFI doesn't support the vesamenu properly at currently so we have to use the non-vesa menu

* EFI executables from syslinux 6.03

* to support the VESA menu we need additional files

* These are the syslinux 6.04pre-1 files that support vesamenu on EFI. All other builds are broken and all the post pre-1 builds are known to be unreliable according to the syslinux mailing list
This commit is contained in:
Rob Emery
2020-05-09 08:23:28 +01:00
committed by GitHub
parent 56dc040397
commit e51c6b7902
13 changed files with 41 additions and 6 deletions

View File

@@ -54,14 +54,19 @@ goto setup95
:setupNT
\slax\boot\syslinux.exe -maf -d /slax/boot/ %DISK%:
if %ERRORLEVEL% == 0 goto setupDone
if %ERRORLEVEL% == 0 goto setupEFI
goto errorFound
:setup95
\slax\boot\syslinux.com -maf -d /slax/boot/ %DISK%:
if %ERRORLEVEL% == 0 goto setupDone
if %ERRORLEVEL% == 0 goto setupEFI
goto errorFound
:setupEFI
mkdir %DISK%:\EFI\Boot
copy \slax\boot\EFI\Boot\* %DISK%:\EFI\Boot
goto setupDone
:setupDone
echo Installation finished.
goto pauseit

View File

@@ -148,6 +148,10 @@ if [ "$DEV" != "$PART" ]; then
) | fdisk $DEV >/dev/null 2>&1
fi
# UEFI boot loader
mkdir -p "$BOOT/../../EFI"
mv "EFI/Boot" "$BOOT/../../EFI/"
echo "Boot installation finished."
echo "Press Enter..."
read junk

View File

@@ -54,14 +54,19 @@ goto setup95
:setupNT
\slax\boot\syslinux.exe -maf -d /slax/boot/ %DISK%:
if %ERRORLEVEL% == 0 goto setupDone
if %ERRORLEVEL% == 0 goto setupEFI
goto errorFound
:setup95
\slax\boot\syslinux.com -maf -d /slax/boot/ %DISK%:
if %ERRORLEVEL% == 0 goto setupDone
if %ERRORLEVEL% == 0 goto setupEFI
goto errorFound
:setupEFI
mkdir %DISK%:\EFI\Boot
copy \slax\boot\EFI\Boot\* %DISK%:\EFI\Boot
goto setupDone
:setupDone
echo Installation finished.
goto pauseit

View File

@@ -148,6 +148,10 @@ if [ "$DEV" != "$PART" ]; then
) | fdisk $DEV >/dev/null 2>&1
fi
# UEFI boot loader
mkdir -p "$BOOT/../../EFI"
mv "EFI/Boot" "$BOOT/../../EFI/"
echo "Boot installation finished."
echo "Press Enter..."
read junk

Binary file not shown.

BIN
bootfiles/EFI/Boot/libcom32.c32 Executable file

Binary file not shown.

Binary file not shown.

BIN
bootfiles/EFI/Boot/menu.c32 Normal file

Binary file not shown.

BIN
bootfiles/EFI/Boot/syslinux.efi Executable file

Binary file not shown.

BIN
bootfiles/EFI/Boot/vesamenu.c32 Executable file

Binary file not shown.

View File

@@ -24,10 +24,16 @@ goto setup95
:setupNT
\boot\syslinux.exe -maf -d /boot/ %DISK%:
goto setupDone
goto setupEFI
:setup95
\boot\syslinux.com -maf -d /boot/ %DISK%:
goto setupEFI
:setupEFI
mkdir %DISK%:\EFI\Boot
copy \boot\EFI\Boot\* %DISK%:\EFI\Boot
goto setupDone
:setupDone
echo Installation finished.

View File

@@ -40,5 +40,9 @@ if [ "$DEV" != "$PART" ]; then
) | fdisk $DEV >/dev/null 2>&1
fi
# UEFI boot loader
mkdir -p "$BOOT/../../EFI"
mv "EFI/Boot" "$BOOT/../../EFI/"
echo "Boot installation finished."
cd "$CWD"

9
build
View File

@@ -49,11 +49,18 @@ if [ "$INITRAMFS" != "" ]; then
mv "$INITRAMFS" $BOOT/initrfs.img
fi
cp bootfiles/* $BOOT
# BIOS / MBR booting
cp -r bootfiles/* $BOOT
cat bootfiles/syslinux.cfg | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" > $BOOT/syslinux.cfg
cat bootfiles/bootinst.bat | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" | sed -r "s:\\\\boot\\\\:\\\\$LIVEKITNAME\\\\boot\\\\:" > $BOOT/bootinst.bat
cp $VMLINUZ $BOOT/ || exit
# UEFI booting
mkdir -p $BOOT/EFI/Boot
cp bootfiles/EFI/Boot/syslinux.efi $BOOT/EFI/Boot/bootx64.efi
cp bootfiles/EFI/Boot/{ldlinux.e64,menu.c32,libutil.c32,vesamenu.c32,libcom32.c32} $BOOT/EFI/Boot
cat $BOOT/syslinux.cfg | sed -r "s:/$LIVEKITNAME/boot/vesamenu:vesamenu:" > $BOOT/EFI/Boot/syslinux.cfg
# create compressed 01-core.sb
COREFS=""
for i in $MKMOD; do