From: Ralph Ronnquist Date: Sat, 5 Oct 2024 01:39:49 +0000 (+1000) Subject: Fixes towards arm64/ceres installer X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=dc97c08863fbc55fbcbdfdbf2da2c82421541dbe;p=rrq%2Fbespoke-installer.git Fixes towards arm64/ceres installer --- diff --git a/build-arm64.sh b/build-arm64.sh index 567de36..0e91b1b 100755 --- a/build-arm64.sh +++ b/build-arm64.sh @@ -1,7 +1,3 @@ #!/bin/sh -exec env \ - LINUX=linux-image-6.1.0-25-arm64 \ - TARGET_ARCH=arm64 \ - DISTNAME=daedalus \ - ./build-installer.sh +exec env TARGET_ARCH=arm64 DISTNAME=ceres ./build-installer.sh diff --git a/build-installer.sh b/build-installer.sh index 949cf04..0c5545b 100755 --- a/build-installer.sh +++ b/build-installer.sh @@ -5,7 +5,6 @@ export http_proxy=http://10.10.10.100:3142 -: ${LINUX:=linux-image-6.1.0-25-arm64} : ${DISTNAME:=daedalus} : ${DISTVERS:=5.1.0} : ${TARGET_ARCH:=arm64} @@ -54,6 +53,18 @@ for S in $SECTIONS ; do [ -f $INTO ] || die "Cannot get $BASE" done +###################################################################### +# Determine the linux kernel version from $LINUX or via +# linux-image-$TARGET_ARCH +if [ -z "$LINUX" ] ; then + M='/Package: \(linux\|kernel\)-image-'"$TARGET_ARCH"'$/' + M+=',/^$/!d;/^Depends:/!d;s|^[^ ]* ||;s| .*||' + LINUX="$(sed "$M" $SOURCES/main-Packages)" +fi +echo "LINUX=$LINUX" >&2 +export KERNELVERSION="${LINUX#linux-image-}" +KERNELVERSION="${KERNELVERSION#kernel-mage-}" # jic + ###################################################################### # Populate DEBURL and DEBDIR from the $SOURCES/*-Packages files as # mappings from package name to download filename and pool section @@ -107,6 +118,7 @@ EOF # already installed, and /sbin/losetup is retained (due to being hard # link). target_dpkg -E --unpack $(debs busybox-static) +rm -f $INITRD/bin/sh executable $INITRD/bin/sh <&2 @@ -124,8 +136,7 @@ target_dpkg -E --install $(debs libc6) # Note that udebs are installed with "--force-overwrite" because some # of them compete about adding some configuration files. UDEBS=( - $( KERNELVERSION="${LINUX#linux-image-}" envsubst '${KERNELVERSION}' \ - < $UDEBSLIST | sed '/#/d;/^$/d' ) + $( envsubst '${KERNELVERSION}' < $UDEBSLIST | sed '/#/d;/^$/d' ) ) for P in ${UDEBS[@]} ; do echo "UDEB install = $P" >&2 @@ -138,6 +149,12 @@ ln -sTf busybox $INITRD/bin/sh echo ${DISTNAME} > $INITRD/etc/default-release mkdir $INITRD/etc/console-setup mkdir -p $INITRD/cdrom +sed '/TAR_OPTIONS/d' -i $INITRD/usr/share/debootstrap/scripts/ceres + +# Add a udev rule to recognize /dev/loop0 as possible media device +heredoc $INITRD/lib/udev/rules.d/70-loop0-is-media.rules < $TARGET_ARCH/initrd.gz -VMLINUZ=( $INITRD/boot/vmlinu* ) +VMLINUZ=$INITRD/boot/vmlinuz-$KERNELVERSION #-- Note that this renames it to vmlinuz regarless of its real name #-- Eg the riscv64 kernel is actually not compressed cp $VMLINUZ $TARGET_ARCH/vmlinuz diff --git a/installer-packages-arm64.list b/installer-packages-arm64.list index 317a4ce..b4c8ce8 100644 --- a/installer-packages-arm64.list +++ b/installer-packages-arm64.list @@ -46,7 +46,7 @@ kbd-chooser kmod-udeb libfribidi0-udeb libkmod2 -libpcre3-udeb +#libpcre3-udeb #not in ceres libelogind0 libtinfo6-udeb load-cdrom @@ -83,7 +83,7 @@ f2fs-modules-${KERNELVERSION}-di fat-modules-${KERNELVERSION}-di fb-modules-${KERNELVERSION}-di #firewire-core-modules-${KERNELVERSION}-di -fuse-modules-${KERNELVERSION}-di +#fuse-modules-${KERNELVERSION}-di # not in ceres i2c-modules-${KERNELVERSION}-di input-modules-${KERNELVERSION}-di isofs-modules-${KERNELVERSION}-di @@ -93,7 +93,7 @@ md-modules-${KERNELVERSION}-di #mmc-core-modules-${KERNELVERSION}-di mmc-modules-${KERNELVERSION}-di #mouse-modules-${KERNELVERSION}-di -mtd-core-modules-${KERNELVERSION}-di +#mtd-core-modules-${KERNELVERSION}-di # not in ceres multipath-modules-${KERNELVERSION}-di nbd-modules-${KERNELVERSION}-di nic-modules-${KERNELVERSION}-di diff --git a/pool-packages-installer-arm64.list b/pool-packages-installer-arm64.list index 6dd095c..299f797 100644 --- a/pool-packages-installer-arm64.list +++ b/pool-packages-installer-arm64.list @@ -111,3 +111,4 @@ sysv-rc tasksel wireless-tools wpasupplicant +usr-is-merged