diff --git a/iso/docker/entrypoint-arm64.sh b/iso/docker/entrypoint-arm64.sh index 000c202..9c879f9 100755 --- a/iso/docker/entrypoint-arm64.sh +++ b/iso/docker/entrypoint-arm64.sh @@ -16,6 +16,32 @@ echo "════════════════════════ echo ">>> Copying archiso 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) cat > "$PROFILE/packages.aarch64" <<'PKGS' base @@ -187,6 +213,20 @@ FILES=() HOOKS=(base udev plymouth archiso block filesystems keyboard) 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' orionos EOF @@ -630,7 +670,9 @@ update-desktop-database 2>/dev/null || true fc-cache -f 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 cat > /etc/skel/.xscreensaver <<'SS'