lh_binary_syslinux: fix usb-hdd etch images
I did not realize that the syslinux boot methods, iso, net, & hdd do not have feature parity for any given version. As per old comments etch syslinux v3.31 does not support sub directories on FAT images
This commit is contained in:
parent
cede7843d2
commit
293ef95b91
|
@ -47,10 +47,7 @@ Check_lockfile .lock
|
|||
# Creating lock file
|
||||
Create_lockfile .lock
|
||||
|
||||
# Setting destination directory
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso)
|
||||
case "${LH_INITRAMFS}" in
|
||||
case "${LH_INITRAMFS}" in
|
||||
casper)
|
||||
DESTDIR="binary/casper"
|
||||
;;
|
||||
|
@ -58,22 +55,6 @@ case "${LH_BINARY_IMAGES}" in
|
|||
live-initramfs)
|
||||
DESTDIR="binary/live"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
net)
|
||||
DESTDIR="tftpboot"
|
||||
;;
|
||||
|
||||
tar|usb-hdd)
|
||||
DESTDIR="binary/live"
|
||||
|
||||
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
|
||||
if [ "${LH_DISTRIBUTION}" = "etch" ] && [ "${LH_BOOTLOADER}" = "syslinux" ]
|
||||
then
|
||||
DESTDIR="binary"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${LH_ARCHITECTURE}" in
|
||||
|
|
|
@ -88,9 +88,7 @@ Restore_cache cache/packages_binary
|
|||
Install_package
|
||||
|
||||
# Setting destination directory
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso)
|
||||
case "${LH_INITRAMFS}" in
|
||||
case "${LH_INITRAMFS}" in
|
||||
casper)
|
||||
DESTDIR="binary/casper"
|
||||
;;
|
||||
|
@ -98,30 +96,6 @@ case "${LH_BINARY_IMAGES}" in
|
|||
live-initramfs)
|
||||
DESTDIR="binary/live"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
net)
|
||||
DESTDIR="tftpboot"
|
||||
;;
|
||||
|
||||
tar|usb-hdd)
|
||||
case "${LH_INITRAMFS}" in
|
||||
casper)
|
||||
DESTDIR="binary/casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
DESTDIR="binary/live"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
|
||||
if [ "${LH_DISTRIBUTION}" = "etch" ] && [ "${LH_BOOTLOADER}" = "syslinux" ]
|
||||
then
|
||||
DESTDIR="binary"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
Check_multiarchitecture
|
||||
|
|
|
@ -166,9 +166,11 @@ Copy_syslinux_templates ()
|
|||
|
||||
if [ "${LH_SYSLINUX_MENU}" = "disabled" ]
|
||||
then
|
||||
cp -r "${TEMPLATES}"/normal/* ${SCREEN_PATH}
|
||||
cp "${TEMPLATES}"/normal/*.cfg ${SCREEN_PATH}
|
||||
cp "${TEMPLATES}"/normal/data/* ${DATA_PATH}
|
||||
else
|
||||
cp -r "${TEMPLATES}"/menu/* ${SCREEN_PATH}
|
||||
cp "${TEMPLATES}"/menu/*.cfg ${SCREEN_PATH}
|
||||
cp "${TEMPLATES}"/menu/data/* ${DATA_PATH}
|
||||
# Grab menu binary from chroot
|
||||
MENUMODULE=$(grep 'menu.c32' ${TEMPLATES}/menu/header.cfg | sed 's,default\s*.*/\(.*menu.c32\)$,\1,g')
|
||||
cp chroot/usr/lib/syslinux/"${MENUMODULE}" ${DATA_PATH}
|
||||
|
@ -257,26 +259,35 @@ Configure_syslinux_templates ()
|
|||
$template_file
|
||||
done
|
||||
|
||||
# Syslinux v3.31 in etch does not support include statement
|
||||
# Syslinux v3.31 in etch does not support include statements
|
||||
if [ "${LH_DISTRIBUTION}" = "etch" ]
|
||||
then
|
||||
while grep -q ^include ${SYSLINUX_PATH}/syslinux.cfg
|
||||
while grep -q ^include ${SCREEN_PATH}/syslinux.cfg
|
||||
do
|
||||
INCLUDES=$(grep ^include ${SYSLINUX_PATH}/syslinux.cfg |awk '{print $2}')
|
||||
INCLUDES=$(grep ^include ${SCREEN_PATH}/syslinux.cfg |awk '{print $2}')
|
||||
for FILE_PATH in ${INCLUDES}
|
||||
do
|
||||
FILE_NAME=$(basename ${FILE_PATH})
|
||||
sed -i -e '\@include '${FILE_PATH}'@ {
|
||||
r '${SYSLINUX_PATH}/${FILE_NAME}'
|
||||
r '${SCREEN_PATH}/${FILE_NAME}'
|
||||
d
|
||||
}' ${SYSLINUX_PATH}/syslinux.cfg
|
||||
}' ${SCREEN_PATH}/syslinux.cfg
|
||||
# remove the files, which were included
|
||||
if [ -e ${SYSLINUX_PATH}/${FILE_NAME} ]
|
||||
if [ -e ${SCREEN_PATH}/${FILE_NAME} ]
|
||||
then
|
||||
rm ${SYSLINUX_PATH}/${FILE_NAME}
|
||||
rm ${SCREEN_PATH}/${FILE_NAME}
|
||||
fi
|
||||
done
|
||||
done
|
||||
# Syslinux v3.31 in etch does not support sub directories, /path/kernel,
|
||||
# when using FAT hard drive images, remove leading /'s
|
||||
if [ "${LH_BINARY_IMAGES}" = "usb-hdd" ]
|
||||
then
|
||||
for FILE in ${SCREEN_PATH}/syslinux.cfg ${SCREEN_PATH}/boot.txt
|
||||
do
|
||||
sed -i -e 's@/@@' ${FILE}
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -326,6 +337,19 @@ case "${LH_BINARY_IMAGES}" in
|
|||
LIVE_INSTALL_KERNEL_PATH="/install"
|
||||
LIVE_SCREEN_PATH="/syslinux"
|
||||
LIVE_DATA_PATH="${LIVE_SCREEN_PATH}/data"
|
||||
# Syslinux v3.31 in etch does not support sub directories, /path/kernel,
|
||||
# when using FAT hard drive images
|
||||
if [ "${LH_DISTRIBUTION}" = "etch" ] && [ "${LH_BINARY_IMAGES}" = "usb-hdd" ]
|
||||
then
|
||||
SYSLINUX_PATH="binary"
|
||||
KERNEL_PATH="binary"
|
||||
SCREEN_PATH="binary"
|
||||
DATA_PATH="binary"
|
||||
LIVE_KERNEL_PATH=""
|
||||
LIVE_INSTALL_KERNEL_PATH=""
|
||||
LIVE_SCREEN_PATH=""
|
||||
LIVE_DATA_PATH=""
|
||||
fi
|
||||
MEDIA="hd-media"
|
||||
;;
|
||||
esac
|
||||
|
@ -408,12 +432,12 @@ LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')"
|
|||
# Parameters are listed at: linux/Documentation/kernel-parameters.txt
|
||||
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
|
||||
|
||||
# Assembling kernel configuration
|
||||
if [ ${LH_BINARY_IMAGES} = "net" ]
|
||||
# Moving kernels into place
|
||||
if [ "binary/${LH_INITRAMFS}" != "${KERNEL_PATH}" ]
|
||||
then
|
||||
mv ${SYSLINUX_PATH}/vmlinuz* ${KERNEL_PATH}
|
||||
mv ${SYSLINUX_PATH}/initrd* ${KERNEL_PATH}
|
||||
mv ${SYSLINUX_PATH}/memtest ${KERNEL_PATH}
|
||||
mv binary/${LH_INITRAMFS}/vmlinuz* ${KERNEL_PATH}
|
||||
mv binary/${LH_INITRAMFS}/initrd* ${KERNEL_PATH}
|
||||
mv binary/${LH_INITRAMFS}/memtest ${KERNEL_PATH}
|
||||
fi
|
||||
|
||||
# Default entries
|
||||
|
|
Loading…
Reference in New Issue