#!/usr/bin/env bash # scripts/04-kernel.sh — configure + build Linux 7.1 and install into chroot. source "$(dirname "${BASH_SOURCE[0]}")/lib/common.sh" require_root LFS="$AEROS_ROOT" KVER="$(pkg_version linux)" trap 'mountpoint -q "$LFS/sources" && umount -l "$LFS/sources"; umount_vkfs 2>/dev/null || true' EXIT step "Linux kernel $KVER (x86-64)" mount_vkfs mkdir -p "$LFS/sources" mountpoint -q "$LFS/sources" || mount --bind "$AEROS_SOURCES" "$LFS/sources" install -Dm644 "$AEROS_TOP/config/kernel/aeros.config" "$LFS/root/aeros.config" [[ -x "$LFS/usr/bin/bc" ]] || die "stage 04 requires bc inside the chroot; run: sudo ./build.sh stage 03" [[ -x "$LFS/usr/bin/rsync" ]] || die "stage 04 requires rsync inside the chroot; run: sudo ./build.sh stage 03" # Inner build: defconfig + merge our fragment + build + modules_install + install cat > "$LFS/root/build-kernel.sh" <