2007-09-23 08:04:46 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# lh_binary(1) - build binary images
|
2008-03-06 14:43:00 -01:00
|
|
|
# Copyright (C) 2006-2008 Daniel Baumann <daniel@debian.org>
|
2007-09-23 08:04:48 +00:00
|
|
|
#
|
|
|
|
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
|
|
|
# This is free software, and you are welcome to redistribute it
|
|
|
|
# under certain conditions; see COPYING for details.
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
set -e
|
|
|
|
|
2007-09-23 08:05:11 +00:00
|
|
|
# Including common functions
|
|
|
|
LH_BASE="${LH_BASE:-/usr/share/live-helper}"
|
|
|
|
|
|
|
|
for FUNCTION in "${LH_BASE}"/functions/*.sh
|
2007-09-23 08:04:48 +00:00
|
|
|
do
|
2007-09-23 08:05:11 +00:00
|
|
|
. "${FUNCTION}"
|
2007-09-23 08:04:48 +00:00
|
|
|
done
|
|
|
|
|
2007-09-23 08:05:11 +00:00
|
|
|
# Setting static variables
|
2007-09-23 08:04:48 +00:00
|
|
|
DESCRIPTION="build binary images"
|
|
|
|
HELP=""
|
|
|
|
USAGE="${PROGRAM} [--force]"
|
|
|
|
|
|
|
|
Arguments "${@}"
|
|
|
|
|
2007-09-23 08:05:16 +00:00
|
|
|
# Reading configuration files
|
2008-04-07 10:10:21 +00:00
|
|
|
Read_conffile config/all config/common config/bootstrap config/chroot config/binary config/source
|
2007-09-23 08:05:16 +00:00
|
|
|
Set_defaults
|
|
|
|
|
2007-09-23 08:04:48 +00:00
|
|
|
# Preparing root filesystem
|
2007-09-23 08:04:52 +00:00
|
|
|
lh_binary_chroot ${*}
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:17 +00:00
|
|
|
if [ "${LH_CHROOT_BUILD}" = "enabled" ]
|
2007-09-23 08:05:15 +00:00
|
|
|
then
|
|
|
|
# Configuring chroot
|
2007-10-31 09:20:03 -01:00
|
|
|
lh_chroot_devpts install ${*}
|
2007-09-23 08:05:15 +00:00
|
|
|
lh_chroot_proc install ${*}
|
2008-10-12 09:07:42 +00:00
|
|
|
lh_chroot_selinuxfs install ${*}
|
2007-09-23 08:05:15 +00:00
|
|
|
lh_chroot_sysfs install ${*}
|
|
|
|
lh_chroot_hosts install ${*}
|
|
|
|
lh_chroot_resolv install ${*}
|
|
|
|
lh_chroot_hostname install ${*}
|
2008-08-12 18:17:39 +00:00
|
|
|
lh_chroot_apt install-binary ${*}
|
2007-09-23 08:05:15 +00:00
|
|
|
lh_chroot_sources install ${*}
|
|
|
|
fi
|
2007-09-23 08:04:48 +00:00
|
|
|
|
|
|
|
# Building root filesystem
|
2007-09-23 08:04:52 +00:00
|
|
|
lh_binary_rootfs ${*}
|
|
|
|
lh_binary_manifest ${*}
|
|
|
|
lh_binary_encryption ${*}
|
2007-09-23 08:04:46 +00:00
|
|
|
|
|
|
|
# Prepare images
|
2007-10-18 20:28:54 +00:00
|
|
|
lh_binary_local-packageslists ${*}
|
2007-09-23 08:05:09 +00:00
|
|
|
lh_binary_linux-image ${*}
|
2007-09-23 08:04:52 +00:00
|
|
|
lh_binary_debian-installer ${*}
|
|
|
|
lh_binary_memtest ${*}
|
|
|
|
lh_binary_grub ${*}
|
|
|
|
lh_binary_syslinux ${*}
|
|
|
|
lh_binary_yaboot ${*}
|
2008-06-15 03:46:51 +00:00
|
|
|
lh_binary_silo ${*}
|
2007-09-23 08:05:13 +00:00
|
|
|
lh_binary_disk ${*}
|
2007-09-23 08:04:52 +00:00
|
|
|
lh_binary_includes ${*}
|
2007-09-23 08:05:09 +00:00
|
|
|
lh_binary_local-includes ${*}
|
2007-09-23 08:05:12 +00:00
|
|
|
lh_binary_local-hooks ${*}
|
2007-09-23 08:04:52 +00:00
|
|
|
lh_binary_md5sum ${*}
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-11-14 08:13:58 -01:00
|
|
|
if [ "${LH_CHROOT_BUILD}" != "enabled" ]
|
|
|
|
then
|
|
|
|
lh_chroot_devpts install ${*}
|
|
|
|
lh_chroot_proc install ${*}
|
2008-10-12 09:07:42 +00:00
|
|
|
lh_chroot_selinuxfs install ${*}
|
2007-11-14 08:13:58 -01:00
|
|
|
lh_chroot_sysfs install ${*}
|
|
|
|
fi
|
|
|
|
|
2007-09-23 08:04:46 +00:00
|
|
|
# Building images
|
2007-09-23 08:04:52 +00:00
|
|
|
lh_binary_iso ${*}
|
|
|
|
lh_binary_net ${*}
|
2007-09-23 08:05:11 +00:00
|
|
|
lh_binary_tar ${*}
|
2007-09-23 08:04:52 +00:00
|
|
|
lh_binary_usb-hdd ${*}
|
2007-09-23 08:04:46 +00:00
|
|
|
|
2007-09-23 08:05:17 +00:00
|
|
|
if [ "${LH_CHROOT_BUILD}" = "enabled" ]
|
2007-09-23 08:05:15 +00:00
|
|
|
then
|
|
|
|
# Deconfiguring chroot
|
|
|
|
rm -f .stage/chroot_sources
|
|
|
|
lh_chroot_hostname remove ${*}
|
|
|
|
lh_chroot_resolv remove ${*}
|
|
|
|
lh_chroot_hosts remove ${*}
|
|
|
|
fi
|
2007-11-14 08:13:58 -01:00
|
|
|
|
|
|
|
lh_chroot_sysfs remove ${*}
|
2008-10-12 09:07:42 +00:00
|
|
|
lh_chroot_selinuxfs remove ${*}
|
2007-11-14 08:13:58 -01:00
|
|
|
lh_chroot_proc remove ${*}
|
|
|
|
lh_chroot_devpts remove ${*}
|