Updated the status on the UEFI issue.

This commit is contained in:
Ivan Davidov 2017-12-07 01:35:41 +02:00
parent 8ba50573cf
commit 23d6e351ea

View File

@ -8,9 +8,8 @@ set -e
echo "*** PREPARE ISO BEGIN ***" echo "*** PREPARE ISO BEGIN ***"
# Find the Syslinux build directory. # Find the Syslinux build directory.
cd work/syslinux cd `ls -d $WORK_DIR/syslinux/*`
cd $(ls -d *) WORK_SYSLINUX_DIR=$PWD
WORK_SYSLINUX_DIR=$(pwd)
# Remove the old ISO generation area if it exists. # Remove the old ISO generation area if it exists.
echo "Removing old ISO image work area. This may take a while." echo "Removing old ISO image work area. This may take a while."
@ -69,18 +68,52 @@ LABEL mll_nomodeset
INITRD rootfs.xz INITRD rootfs.xz
CEOF CEOF
# Create UEFI start script '/efi/boot/startup.nsh'. This script is executed # Create UEFI start script '/efi/boot/startup.nsh'. This script should be
# by the firmware on boot. Currently MLL doesn't provide native UEFI stub # executed by the firmware on boot if there is no UEFI compatible 'eltorito'
# for boot manager and this script is the only UEFI compliant way to pass # boot image in the ISO image *and* the UEFI boot shell is enabled.
# the execution from the firmware to the kernel. #
mkdir -p $ISOIMAGE/efi/boot # Currently MLL doesn't provide native UEFI stub for boot manager and this
cat << CEOF > $ISOIMAGE/efi/boot/startup.nsh # script is the only UEFI compliant way to pass the execution from the
# firmware to the kernel. All this script does is to execute the kernel
# which is masquaraded as PE/COFF image and pass arguments to the kernel,
# e.g. 'initrd=<initramfs_archive>' and 'nomodeset'.
#
# Currently the 'startup.nsh' approach is most likely not universally
# compatible. For example, this approach most probably will fail on UEFI
# systems where the boot shell is missing or it is disabled.
mkdir -p $ISOIMAGE/EFI/boot
cat << CEOF > $ISOIMAGE/EFI/boot/startup.nsh
echo -off echo -off
echo Minimal Linux Live is starting. echo Minimal Linux Live is starting.
\\kernel.xz initrd=\\rootfs.xz \\kernel.xz initrd=\\rootfs.xz nomodeset
CEOF CEOF
# UEFI hacks BEGIN
#
# These files have no impact on the BIOS boot process. In
# UEFI boot shell navigate to 'EFI/minimal' and try to
# execute 'bootia32.efi' or 'bootx64.efi'.
#
# TODO - remove before next MLL release or fix the UEFI issue.
# The proper way to fix the UEFI issue is to provide
# secondary 'eltorito' boot image which is FAT32 and
# contains proper /EFI/boot/xxx files.
mkdir -p $ISOIMAGE/EFI/minimal
cp $WORK_SYSLINUX_DIR/efi32/efi/syslinux.efi \
$ISOIMAGE/EFI/minimal/bootia32.efi
cp $WORK_SYSLINUX_DIR/efi32/com32/elflink/ldlinux/ldlinux.e32 \
$ISOIMAGE/EFI/minimal
cp $WORK_SYSLINUX_DIR/efi64/efi/syslinux.efi \
$ISOIMAGE/EFI/minimal/bootx64.efi
cp $WORK_SYSLINUX_DIR/efi64/com32/elflink/ldlinux/ldlinux.e64 \
$ISOIMAGE/EFI/minimal
# UEFI hacks END
cd $SRC_DIR cd $SRC_DIR
echo "*** PREPARE ISO END ***" echo "*** PREPARE ISO END ***"