Merge pull request #1159 from nmeum/lilo
lilo: Parallel make and revisited kernel hook
This commit is contained in:
commit
14ca62799f
4 changed files with 20 additions and 85 deletions
|
@ -4,32 +4,12 @@
|
|||
#
|
||||
# Arguments passed to this script: $1 pkgname, $2 version.
|
||||
#
|
||||
PKGNAME="${1}"
|
||||
VERSION="${2}"
|
||||
|
||||
boot="${ROOTDIR}/boot"
|
||||
etc="${ROOTDIR}/etc"
|
||||
entries="${etc}/lilo.d"
|
||||
name="void-${VERSION}"
|
||||
entry="${entries}/${name}.conf"
|
||||
[ -x "$(command -v lilo)" ] || \
|
||||
return 0
|
||||
|
||||
[ -d "${boot}" ] && [ -d "${etc}" ] || exit 0
|
||||
mkdir -p "${entries}"
|
||||
|
||||
cat <<-EOF > "${entry}"
|
||||
image = /${boot}/vmlinuz-${VERSION}
|
||||
label = "${name}"
|
||||
initrd = /${boot}/initramfs-${VERSION}.img
|
||||
EOF
|
||||
|
||||
# Replace existing default entry with this one
|
||||
echo "default=${name}" > "${entries}/default.conf"
|
||||
|
||||
conf="$(mktemp)"
|
||||
cat "${etc}/lilo.conf" "${entries}"/*.conf > "${conf}"
|
||||
|
||||
[ -x "$(command -v lilo)" ] && \
|
||||
lilo -C "${conf}"
|
||||
|
||||
# Remove temporary config file
|
||||
rm -f "${conf}"
|
||||
if [ -e /etc/lilo.conf ]; then
|
||||
lilo
|
||||
elif [ ! -e /etc/lilo.conf ]; then
|
||||
echo "Warning: Not updating LILO. Configuration file wasn't found." 1>&2
|
||||
fi
|
||||
|
|
|
@ -4,26 +4,9 @@
|
|||
#
|
||||
# Arguments passed to this script: $1 pkgname, $2 version.
|
||||
#
|
||||
PKGNAME="${1}"
|
||||
VERSION="${2}"
|
||||
|
||||
boot="${ROOTDIR}/boot"
|
||||
etc="${ROOTDIR}/etc"
|
||||
entries="${etc}/lilo.d"
|
||||
name="void-${VERSION}"
|
||||
entry="${entries}/${name}.conf"
|
||||
[ -x "$(command -v lilo)" ] || \
|
||||
return 0
|
||||
|
||||
[ -d "${boot}" ] && [ -d "${etc}" ] || exit 0
|
||||
rm -f "${entry}"
|
||||
|
||||
# No default entry if the removed one was the default
|
||||
sed "/^default=${name}\$/d" -i "${entries}/default.conf"
|
||||
|
||||
conf="$(mktemp)"
|
||||
cat "${etc}/lilo.conf" "${entries}"/*.conf > "${conf}"
|
||||
|
||||
[ -x "$(command -v lilo)" ] && \
|
||||
lilo -C "${conf}"
|
||||
|
||||
# Remove temporary config file
|
||||
rm -f "${conf}"
|
||||
# Do not abort in case of an error.
|
||||
lilo || true
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
# Example lilo(8) configuration.
|
||||
# See lilo.conf(5) for more information.
|
||||
|
||||
# Additional kernel parameter.
|
||||
append="quiet"
|
||||
|
||||
# Specifies the boot device.
|
||||
boot="/dev/sda"
|
||||
|
||||
# Devices which should be mounted as root.
|
||||
root="/dev/sda2"
|
||||
|
||||
# Enables map compaction.
|
||||
compact
|
||||
|
||||
# Prompt to start one certain kernel from the displayed menu.
|
||||
prompt
|
||||
|
||||
# Time to wait before booting the default kernel.
|
||||
timeout=100
|
||||
|
||||
# Allow use of partitions above 1024 cylinders.
|
||||
lba32
|
||||
|
||||
# Mount the root file system read-only.
|
||||
read-only
|
||||
|
||||
# Images are configured in /etc/lilo.d/*.conf
|
||||
# End of file
|
|
@ -1,11 +1,10 @@
|
|||
# Template file for 'lilo'
|
||||
pkgname=lilo
|
||||
version=24.1
|
||||
revision=2
|
||||
revision=4
|
||||
only_for_archs="i686 x86_64"
|
||||
hostmakedepends="bin86"
|
||||
makedepends="device-mapper-devel"
|
||||
make_dirs="/etc/lilo.d 0755 root root"
|
||||
conf_files="/etc/lilo.conf"
|
||||
short_desc="Standard Linux boot loader"
|
||||
maintainer="Sören Tempel <soeren+void@soeren-tempel.net>"
|
||||
|
@ -15,24 +14,26 @@ distfiles="${DEBIAN_SITE}/main/l/${pkgname}/${pkgname}_${version}.orig.tar.gz"
|
|||
checksum=a15280edacb8bca31b9163d65e61270b8c06cb9ffea74374a3a42164a13d4532
|
||||
|
||||
pre_build() {
|
||||
# Don't install images
|
||||
sed '/images install/d' -i Makefile
|
||||
sed '/images all/d' -i Makefile
|
||||
sed -i Makefile src/Makefile \
|
||||
-e 's|^\tmake|\t$(MAKE)|g' \
|
||||
-e '/images install/d' \
|
||||
-e '/images all/d'
|
||||
}
|
||||
|
||||
do_build() {
|
||||
# LILO needs LC_ALL=C
|
||||
export LC_ALL=C
|
||||
make CC=${CC} all
|
||||
make CC=${CC} ${makejobs} all
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make DESTDIR=${DESTDIR} install
|
||||
mv ${DESTDIR}/sbin/* ${DESTDIR}/usr/sbin
|
||||
|
||||
# Setup config files
|
||||
rm ${DESTDIR}/etc/lilo.conf_example
|
||||
vinstall ${FILESDIR}/lilo.conf 600 etc
|
||||
for file in sample/*.conf; do
|
||||
vsconf ${file}
|
||||
done
|
||||
|
||||
# Setup kernel hooks
|
||||
rm -rf ${DESTDIR}/etc/initramfs ${DESTDIR}/etc/kernel
|
||||
|
|
Loading…
Add table
Reference in a new issue