[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

syslinux-efi 6.04 bug?

I think something is broken, but I'm hardly sure what I am doing.  I
should be using a script or something and not just moving files around
like I am.

so before I open a bug report I'd like someone to look over what I have:

The script below builds an image and boots it with qemu, first with
packaged files, then with kernel.org/.../syslinux-6.04-pre1.tar.gz

 ../bld/build_uefi.sh deb
script runs, qemu boots, see errors:
Undef symbol FAIL: memset
Failed to load libcom32.c32

script runs, qemu boots, see menu (no errors)

#!/bin/bash -x

# build_uefi.sh

# make an empty boot.img
# mkfs
# cp the files needed to uefi boot the installer
# from either tarbal or apt installed packaged files
# test it

# clean up leftovers
sudo umount target
set -e

dd if=/dev/zero of=boot.img bs=100M count=1
/sbin/mkfs.msdos boot.img

mkdir -p target
sudo mount -o user,uid=1000,loop boot.img target

mkdir -p $target/EFI/BOOT $target/EFI/BOOT/SYSLINUX/EFI64

if [ $1 = deb ]; then

    sudo apt install syslinux-common syslinux-efi -t stretch-backports
    cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi $target/EFI/BOOT/BOOTX64.EFI
    cp /usr/lib/syslinux/modules/efi64/ldlinux.e64 $target/EFI/BOOT/LDLINUX.E64
    cp /usr/lib/syslinux/modules/efi64/*.c32 $target/EFI/BOOT/SYSLINUX/EFI64


    wget -N https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.gz
    tar -xvf syslinux-6.04-pre1.tar.gz

    cp syslinux-6.04-pre1/efi64/efi/syslinux.efi $target/EFI/BOOT/BOOTX64.EFI

    cp syslinux-6.04-pre1/efi64/com32/elflink/ldlinux/ldlinux.e64
    cp syslinux-6.04-pre1/efi64/com32/modules/*.c32
    cp syslinux-6.04-pre1/efi64/com32/lib/*.c32 $target/EFI/BOOT/SYSLINUX/EFI64
    cp syslinux-6.04-pre1/efi64/com32/libutil/*.c32
    cp syslinux-6.04-pre1/efi64/com32/menu/*.c32 $target/EFI/BOOT/SYSLINUX/EFI64


cat > $target/EFI/BOOT/SYSLX64.CFG <<EOF
###  EFI/BOOT/SYSLX64.CFG  start ###


UI SYSLINUX/EFI64/vesamenu.c32
DEFAULT lslabel
SAY *** Press enter to boot the default label ***

LABEL lslabel

LABEL pwdlabel
COM32 SYSLINUX/EFI64/pwd.c32

LABEL mylabel
LINUX /linux
INITRD /initrd.gz

###  EFI/BOOT/SYSLX64.CFG  end ###

sudo umount $target

# test it
sudo apt install qemu qemu-utils qemu-system ovmf

# eufi
qemu-system-x86_64 -m 512 \
    -bios OVMF.fd \
    -drive file=boot.img,format=raw

Carl K

Reply to: