53 lines
1.1 KiB
Bash
Executable File
53 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script will update the file ../bootfiles/isolinux.bin to match
|
|
# your LiveKit name. Note you may need to run this on a 32bit system.
|
|
#
|
|
# Requires: Debian
|
|
#
|
|
|
|
set -e
|
|
|
|
CWD=$(pwd)
|
|
|
|
echo
|
|
echo "--------------------------------------"
|
|
echo "Add directory to isolinux search paths"
|
|
echo -n "(for example /slax/boot): "
|
|
read DIR
|
|
|
|
|
|
# download, unpack, and patch syslinux
|
|
|
|
apt-get --yes build-dep syslinux
|
|
mkdir -m 0777 /tmp/syslinux
|
|
cd /tmp/syslinux
|
|
apt-get source syslinux
|
|
cd syslinux*/core
|
|
|
|
for file in fs/iso9660/iso9660.c fs/lib/loadconfig.c elflink/load_env32.c; do
|
|
sed -i -r 's:"/",:"'$DIR'",\n\t"/",:' $file
|
|
done
|
|
|
|
cd ../
|
|
|
|
make -j 8
|
|
|
|
echo
|
|
echo "Copying files to $CWD ..."
|
|
|
|
cp bios/core/isolinux.bin $CWD
|
|
cp bios/com32/elflink/ldlinux/ldlinux.c32 $CWD
|
|
cp bios/com32/lib/libcom32.c32 $CWD
|
|
cp bios/com32/libutil/libutil.c32 $CWD
|
|
cp bios/com32/menu/vesamenu.c32 $CWD
|
|
|
|
ARCH=$(uname -m)
|
|
if [ "$ARCH" = "x86_64" ]; then ARCH=64; else ARCH=32; fi
|
|
EXTLINUX=extlinux.x$ARCH
|
|
|
|
strip --strip-unneeded bios/extlinux/extlinux
|
|
cp bios/extlinux/extlinux $CWD/extlinux.x$ARCH
|
|
|
|
echo "done"
|