Reworking iso-hybrid as an independent binary image type.
This commit is contained in:
parent
728f74d9b4
commit
77664c045c
|
@ -59,28 +59,29 @@ Check_multiarchitecture ()
|
|||
if [ "$(echo ${LH_ARCHITECTURE} | wc -w)" -gt "1" ]
|
||||
then
|
||||
# First, only support multiarch on iso
|
||||
if [ "${LH_BINARY_IMAGES}" = "iso" ]
|
||||
then
|
||||
# Assemble multi-arch
|
||||
case "${LH_CURRENT_ARCHITECTURE}" in
|
||||
amd64)
|
||||
DESTDIR="${DESTDIR}.amd"
|
||||
DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
|
||||
DESTDIR_INSTALL="${DESTDIR_INSTALL}.amd"
|
||||
;;
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso*)
|
||||
# Assemble multi-arch
|
||||
case "${LH_CURRENT_ARCHITECTURE}" in
|
||||
amd64)
|
||||
DESTDIR="${DESTDIR}.amd"
|
||||
DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
|
||||
DESTDIR_INSTALL="${DESTDIR_INSTALL}.amd"
|
||||
;;
|
||||
|
||||
i386)
|
||||
DESTDIR="${DESTDIR}.386"
|
||||
DESTDIR_LIVE="${DESTDIR_LIVE}.386"
|
||||
DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
|
||||
;;
|
||||
i386)
|
||||
DESTDIR="${DESTDIR}.386"
|
||||
DESTDIR_LIVE="${DESTDIR_LIVE}.386"
|
||||
DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
|
||||
;;
|
||||
|
||||
powerpc)
|
||||
DESTDIR="${DESTDIR}.ppc"
|
||||
DESTDIR_LIVE="${DESTDIR_LIVE}.ppc"
|
||||
DESTDIR_INSTALL="${DESTDIR_INSTALL}.ppc"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
powerpc)
|
||||
DESTDIR="${DESTDIR}.ppc"
|
||||
DESTDIR_LIVE="${DESTDIR_LIVE}.ppc"
|
||||
DESTDIR_INSTALL="${DESTDIR_INSTALL}.ppc"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -669,8 +669,23 @@ Set_defaults ()
|
|||
esac
|
||||
|
||||
# Setting image type
|
||||
LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso}"
|
||||
LH_BINARY_ISO_HYRBID="${LH_BINARY_ISO_HYBRID:-false}"
|
||||
case "${LH_DISTRIBUTION}" in
|
||||
squeeze|sid)
|
||||
case "${LH_ARCHITECTURE}" in
|
||||
amd64|i386)
|
||||
LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso-hybrid}"
|
||||
;;
|
||||
|
||||
*)
|
||||
LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso}"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
*)
|
||||
LH_BINARY_IMAGES="${LH_BINARY_IMAGES:-iso}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setting apt indices
|
||||
if echo ${LH_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b"
|
||||
|
@ -753,7 +768,7 @@ Set_defaults ()
|
|||
if [ -n "${LH_DEBIAN_INSTALLER_PRESEEDFILE}" ]
|
||||
then
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso)
|
||||
iso*)
|
||||
_LH_BOOTAPPEND_PRESEED="file=/cdrom/install/${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
|
||||
;;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Read_conffiles config/all config/common config/bootstrap config/chroot config/bi
|
|||
Set_defaults
|
||||
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso|usb*)
|
||||
iso*)
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
|
|
|
@ -128,7 +128,7 @@ esac
|
|||
|
||||
# Setting destination directory
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso|tar)
|
||||
iso*|tar)
|
||||
case "${LH_INITRAMFS}" in
|
||||
casper)
|
||||
DESTDIR_LIVE="binary/casper"
|
||||
|
@ -276,7 +276,7 @@ mkdir -p binary/boot/grub
|
|||
cp -r "${TEMPLATES}"/* binary/boot/grub
|
||||
|
||||
case ${LH_BINARY_IMAGES} in
|
||||
iso)
|
||||
iso*)
|
||||
FILES="chroot/usr/lib/grub/*/stage2_eltorito"
|
||||
;;
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ esac
|
|||
|
||||
# Setting destination directory
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso|tar)
|
||||
iso*|tar)
|
||||
case "${LH_INITRAMFS}" in
|
||||
casper)
|
||||
DESTDIR_LIVE="binary/casper"
|
||||
|
@ -249,7 +249,7 @@ mkdir -p binary/boot/grub
|
|||
cp -r "${TEMPLATES}"/* binary/boot/grub
|
||||
|
||||
case ${LH_BINARY_IMAGES} in
|
||||
iso)
|
||||
iso*)
|
||||
FILES="chroot/usr/lib/grub/i386-pc/*.mod chroot/usr/lib/grub/i386-pc/*.lst chroot/usr/lib/grub/i386-pc/efiemu??.o chroot/usr/share/grub/*.pf2"
|
||||
;;
|
||||
|
||||
|
|
|
@ -23,10 +23,19 @@ Arguments "${@}"
|
|||
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
|
||||
Set_defaults
|
||||
|
||||
if ! In_list iso "${LH_BINARY_IMAGES}"
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso)
|
||||
IMAGE="binary.iso"
|
||||
;;
|
||||
|
||||
iso-hybrid)
|
||||
IMAGE="binary-hybrid.iso"
|
||||
;;
|
||||
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
Echo_message "Begin building binary iso image..."
|
||||
|
||||
|
@ -45,7 +54,7 @@ Create_lockfile .lock
|
|||
# Checking depends
|
||||
Check_package chroot/usr/bin/genisoimage genisoimage
|
||||
|
||||
if [ "${LH_BINARY_ISO_HYBRID}" = "true" ]
|
||||
if [ "${LH_BINARY_IMAGES}" = "iso-hybrid" ]
|
||||
then
|
||||
Check_package chroot/usr/bin/isohybrid syslinux-common
|
||||
fi
|
||||
|
@ -57,9 +66,9 @@ Restore_cache cache/packages_binary
|
|||
Install_package
|
||||
|
||||
# Remove old iso image
|
||||
if [ -f binary.iso ]
|
||||
if [ -f ${IMAGE} ]
|
||||
then
|
||||
rm -f binary.iso
|
||||
rm -f ${IMAGE}
|
||||
fi
|
||||
|
||||
# Handle genisoimage generic options
|
||||
|
@ -177,15 +186,15 @@ fi
|
|||
|
||||
cat >> binary.sh << EOF
|
||||
|
||||
genisoimage ${GENISOIMAGE_OPTIONS} -o binary.iso binary
|
||||
genisoimage ${GENISOIMAGE_OPTIONS} -o ${IMAGE} binary
|
||||
EOF
|
||||
|
||||
if [ "${LH_BINARY_ISO_HYRBID}" = "true" ]
|
||||
if [ "${LH_BINARY_IMAGES}" = "iso-hybrid" ]
|
||||
then
|
||||
|
||||
cat >> binary.sh << EOF
|
||||
|
||||
isohybrid binary.iso
|
||||
isohybrid ${IMAGE}
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
@ -199,7 +208,7 @@ case "${LH_CHROOT_BUILD}" in
|
|||
Chroot chroot "sh binary.sh"
|
||||
|
||||
# Move image
|
||||
mv chroot/binary chroot/binary.iso ./
|
||||
mv chroot/binary chroot/${IMAGE} ./
|
||||
rm -f chroot/binary.sh
|
||||
;;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ fi
|
|||
|
||||
# Check image type
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso|usb*|tar)
|
||||
iso*|usb*|tar)
|
||||
;;
|
||||
|
||||
net)
|
||||
|
@ -225,7 +225,7 @@ fi
|
|||
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
|
||||
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso|usb*)
|
||||
iso*|usb*)
|
||||
# Copying silo
|
||||
mkdir -p binary/boot
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ Syslinux_live_entry ()
|
|||
APPEND="${5}"
|
||||
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso|usb*)
|
||||
iso*|usb*)
|
||||
NUMBER="$(ls -1 ${KERNEL_PATH} | grep 'vmlinuz[0-9]\+$' | wc -l)"
|
||||
NUMBER="$((${NUMBER} +1))"
|
||||
|
||||
|
@ -363,7 +363,7 @@ esac
|
|||
|
||||
# Setting boot method specific variables
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso)
|
||||
iso*)
|
||||
SYSLINUX_PATH="binary/isolinux"
|
||||
KERNEL_PATH="binary/${INITFS}"
|
||||
SCREEN_PATH="${SYSLINUX_PATH}"
|
||||
|
@ -581,7 +581,7 @@ Configure_syslinux_templates
|
|||
|
||||
# Configure syslinux setup per boot method
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso)
|
||||
iso*)
|
||||
case "${LH_CHROOT_BUILD}" in
|
||||
true)
|
||||
cp chroot/usr/lib/syslinux/isolinux.bin ${SCREEN_PATH}
|
||||
|
|
|
@ -135,7 +135,7 @@ esac
|
|||
|
||||
# Setting destination directory
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso)
|
||||
iso*)
|
||||
case "${LH_INITRAMFS}" in
|
||||
casper)
|
||||
DESTDIR_LIVE="binary/casper"
|
||||
|
@ -272,7 +272,7 @@ fi
|
|||
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
|
||||
|
||||
case "${LH_BINARY_IMAGES}" in
|
||||
iso|usb*)
|
||||
iso*|usb*)
|
||||
# Copying yaboot
|
||||
mkdir -p binary/yaboot
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ do
|
|||
--binary)
|
||||
${LH_ROOT_COMMAND} umount -f binary.tmp > /dev/null 2>&1 || true
|
||||
rm -rf binary.tmp binary.deb binary.udeb
|
||||
rm -f binary.iso
|
||||
rm -f binary*.iso
|
||||
rm -f binary*.img
|
||||
rm -f binary*.tar.gz
|
||||
rm -f binary.sh
|
||||
|
@ -122,7 +122,7 @@ do
|
|||
;;
|
||||
|
||||
--source)
|
||||
rm -f source.iso
|
||||
rm -f source*.iso
|
||||
rm -f source*.img
|
||||
rm -f source*.tar
|
||||
rm -f source*.tar.gz
|
||||
|
|
|
@ -23,10 +23,14 @@ Arguments "${@}"
|
|||
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
|
||||
Set_defaults
|
||||
|
||||
if [ "${LH_SOURCE_IMAGES}" != "iso" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
case "${LH_SOURCE_IMAGES}" in
|
||||
iso*)
|
||||
;;
|
||||
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
Echo_message "Begin installing disk information..."
|
||||
|
||||
|
|
|
@ -28,10 +28,14 @@ then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if ! In_list iso "${LH_SOURCE_IMAGES}"
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
case "${LH_SOURCE_IMAGES}" in
|
||||
iso*)
|
||||
;;
|
||||
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
Echo_message "Begin building source iso image..."
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ lh_config \- create configuration for live\-helper
|
|||
.br
|
||||
[\-a|\fB\-\-architecture\fR \fIARCHITECTURE\fR]
|
||||
.br
|
||||
[\-b|\fB\-\-binary\-images\fR iso|net|tar|usb\-hdd]
|
||||
[\-b|\fB\-\-binary\-images\fR iso|iso-hybrid|net|tar|usb\-hdd]
|
||||
.br
|
||||
[\fB\-\-binary\-filesystem\fR fat16|fat32|ext2]
|
||||
.br
|
||||
|
@ -226,8 +226,8 @@ defines if apt should install recommended packages automatically. By default, th
|
|||
defines if apt should check repository signatures. This is true by default.
|
||||
.IP "\-a|\fB\-\-architecture\fR \fIARCHITECTURE\fR" 4
|
||||
defines the architecture of the to be build image. By default, this is set to the host architecture. Note that you cannot crossbuild for another architecture if your host system is not able to execute binaries for the target architecture natively. For example, building amd64 images on i386 and vice versa is possile if you have a 64bit capable i386 processor and the right kernel. But building powerpc images on an i386 system is not possible.
|
||||
.IP "\-b|\fB\-\-binary\-images\fR iso|net|tar|usb\-hdd" 4
|
||||
defines the image type to build. By default this is set to iso to build CD/DVD images.
|
||||
.IP "\-b|\fB\-\-binary\-images\fR iso|iso-hybrid|net|tar|usb\-hdd" 4
|
||||
defines the image type to build. By default this is set to iso to build CD/DVD images, for squeeze and newer it defaults to iso-hybrid.
|
||||
.IP "\fB\-\-binary\-filesystem\fR fat16|fat32|ext2" 4
|
||||
defines the filesystem to be used in the image type. This only has an effect if the selected binary image type does allow to choose a filesystem. For example, when selection iso the resulting CD/DVD has always the filesystem ISO9660. When building usb-hdd images for usb sticks, this is active. Note that it defaults to fat16 on all architectures except sparc where it defaults to ext2. Also note that if you choose fat16 and your resulting binary image gets bigger than 2GB, the binary filesystem automatically gets switched to fat32.
|
||||
.IP "\fB\-\-binary\-indices\fR true|false|none" 4
|
||||
|
|
Loading…
Reference in New Issue