Fix ARM64 ISO build: pacman.conf repos, kernel preset, mkinitcpio
Three fixes for the 'vmlinuz-* not found' failure: 1. Override releng profile's pacman.conf to add [alarm] and [aur] repos. linux-aarch64 lives in [alarm] — without this the kernel package was silently missing from the airootfs and /boot was empty. 2. Remove linux.preset from releng airootfs (references vmlinuz-linux, the x86_64 kernel name that doesn't exist on ALARM). 3. Add linux-aarch64.preset to the airootfs with an 'archiso' preset entry (ALL_kver=/boot/vmlinuz-linux-aarch64, archiso_image=initramfs-linux-aarch64.img). mkarchiso looks for this 'archiso' preset to build the live initramfs. 4. Switch customize_airootfs.sh from mkinitcpio -P to mkinitcpio -p linux-aarch64 so only the aarch64 preset runs (not the stale x86_64 linux preset). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
58446c1f32
commit
56031c8c6f
1 file changed
+43
-1
@@ -16,6 +16,32 @@ echo "════════════════════════
|
|||||||
echo ">>> Copying archiso releng profile..."
|
echo ">>> Copying archiso releng profile..."
|
||||||
cp -r /usr/share/archiso/configs/releng "$PROFILE"
|
cp -r /usr/share/archiso/configs/releng "$PROFILE"
|
||||||
|
|
||||||
|
# Override the releng pacman.conf: it only has Arch Linux x86_64 repos.
|
||||||
|
# ALARM's linux-aarch64 kernel lives in [alarm] — without this the kernel
|
||||||
|
# package silently fails to install and /boot/vmlinuz-* is never created.
|
||||||
|
cat > "$PROFILE/pacman.conf" <<'PACMANCONF'
|
||||||
|
[options]
|
||||||
|
HoldPkg = pacman glibc
|
||||||
|
Architecture = aarch64
|
||||||
|
|
||||||
|
[core]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[extra]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[alarm]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[aur]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
PACMANCONF
|
||||||
|
|
||||||
|
# The releng profile ships linux.preset in its airootfs for x86_64 linux kernel.
|
||||||
|
# It references /boot/vmlinuz-linux which doesn't exist on ALARM; remove it so
|
||||||
|
# mkinitcpio doesn't try to process it and fail.
|
||||||
|
rm -f "$PROFILE/airootfs/etc/mkinitcpio.d/linux.preset"
|
||||||
|
|
||||||
# ── 2. Package list — ARM64 (no syslinux, no Intel GPU, no broadcom-wl)
|
# ── 2. Package list — ARM64 (no syslinux, no Intel GPU, no broadcom-wl)
|
||||||
cat > "$PROFILE/packages.aarch64" <<'PKGS'
|
cat > "$PROFILE/packages.aarch64" <<'PKGS'
|
||||||
base
|
base
|
||||||
@@ -187,6 +213,20 @@ FILES=()
|
|||||||
HOOKS=(base udev plymouth archiso block filesystems keyboard)
|
HOOKS=(base udev plymouth archiso block filesystems keyboard)
|
||||||
MKCONF
|
MKCONF
|
||||||
|
|
||||||
|
# mkinitcpio preset for the aarch64 live boot image.
|
||||||
|
# mkarchiso looks for a preset named 'archiso' to build the live initramfs.
|
||||||
|
# The linux-aarch64 package only ships 'default'/'fallback' presets, so we
|
||||||
|
# provide our own with the archiso hooks and the correct kernel path.
|
||||||
|
mkdir -p "$AIROOTFS/etc/mkinitcpio.d"
|
||||||
|
cat > "$AIROOTFS/etc/mkinitcpio.d/linux-aarch64.preset" <<'PRESET'
|
||||||
|
ALL_config="/etc/mkinitcpio.conf.d/archiso.conf"
|
||||||
|
ALL_kver="/boot/vmlinuz-linux-aarch64"
|
||||||
|
|
||||||
|
PRESETS=('archiso')
|
||||||
|
|
||||||
|
archiso_image="/boot/initramfs-linux-aarch64.img"
|
||||||
|
PRESET
|
||||||
|
|
||||||
cat > "$AIROOTFS/etc/hostname" <<'EOF'
|
cat > "$AIROOTFS/etc/hostname" <<'EOF'
|
||||||
orionos
|
orionos
|
||||||
EOF
|
EOF
|
||||||
@@ -630,7 +670,9 @@ update-desktop-database 2>/dev/null || true
|
|||||||
fc-cache -f 2>/dev/null || true
|
fc-cache -f 2>/dev/null || true
|
||||||
|
|
||||||
plymouth-set-default-theme orionos 2>/dev/null || true
|
plymouth-set-default-theme orionos 2>/dev/null || true
|
||||||
mkinitcpio -P 2>&1 | tail -5 || true
|
# Run only the aarch64 preset — mkinitcpio -P would also try linux.preset
|
||||||
|
# (which references the x86_64 vmlinuz-linux) and fail.
|
||||||
|
mkinitcpio -p linux-aarch64 2>&1 | tail -10 || true
|
||||||
|
|
||||||
mkdir -p /etc/skel
|
mkdir -p /etc/skel
|
||||||
cat > /etc/skel/.xscreensaver <<'SS'
|
cat > /etc/skel/.xscreensaver <<'SS'
|
||||||
|
|||||||
Reference in new issue
Block a user