From 08a875852e6233b973de5041dc04d8ccbdfbb69f Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Mon, 14 Sep 2026 16:46:45 -0400 Subject: [PATCH] Leave fresh-install kernel selection to the ISO --- install/hardware/all.sh | 4 +- install/hardware/kernel.sh | 9 --- test/shell.d/omarchy-kernel-install-test.sh | 84 --------------------- test/shell.d/xps13-sidecar-amps-test.sh | 7 -- 4 files changed, 1 insertion(+), 103 deletions(-) delete mode 100644 install/hardware/kernel.sh delete mode 100644 test/shell.d/omarchy-kernel-install-test.sh diff --git a/install/hardware/all.sh b/install/hardware/all.sh index d40069b2..12add110 100644 --- a/install/hardware/all.sh +++ b/install/hardware/all.sh @@ -1,5 +1,3 @@ -run_logged "$OMARCHY_INSTALL/hardware/kernel.sh" - run_logged "$OMARCHY_INSTALL/hardware/asus-rog.sh" run_logged "$OMARCHY_INSTALL/hardware/framework16.sh" run_logged "$OMARCHY_INSTALL/hardware/dell-xps-touchpad-haptics.sh" @@ -23,7 +21,7 @@ run_logged "$OMARCHY_INSTALL/hardware/intel/sof-firmware.sh" run_logged "$OMARCHY_INSTALL/hardware/fix-elgato-camlink-4k.sh" -# Rebuilds the boot image, so it follows kernel and camera module setup. +# Rebuilds the boot image, so it follows camera module setup. run_logged "$OMARCHY_INSTALL/hardware/dell-xps13-sidecar-amps.sh" run_logged "$OMARCHY_INSTALL/hardware/asus/fix-asus-ptl-display-backlight.sh" diff --git a/install/hardware/kernel.sh b/install/hardware/kernel.sh deleted file mode 100644 index ed259c66..00000000 --- a/install/hardware/kernel.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Install the default kernel before hardware setup pulls in DKMS modules. -# On a fresh T2 install linux-t2 is not installed yet, so also check the chip. -if [[ $(uname -m) == "x86_64" ]] && ! omarchy-pkg-present linux-t2; then - pci_devices=$(lspci -nn) - if ! grep "106b:180[12]" <<< "$pci_devices" >/dev/null; then - echo "Installing the Omarchy kernel..." - omarchy-pkg-add linux-omarchy linux-omarchy-headers - fi -fi diff --git a/test/shell.d/omarchy-kernel-install-test.sh b/test/shell.d/omarchy-kernel-install-test.sh deleted file mode 100644 index cee20d9c..00000000 --- a/test/shell.d/omarchy-kernel-install-test.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" - -leaf="$ROOT/install/hardware/kernel.sh" -scratch=$(mktemp -d) -trap 'rm -rf "$scratch"' EXIT -mkdir -p "$scratch/bin" -export PATH="$scratch/bin:$PATH" CALL_LOG="$scratch/calls" - -cat > "$scratch/bin/uname" <<'SH' -#!/bin/bash -[[ $* == "-m" ]] || exit 99 -printf '%s\n' "${TEST_ARCH:-x86_64}" -SH - -cat > "$scratch/bin/omarchy-pkg-present" <<'SH' -#!/bin/bash -[[ $* == "linux-t2" ]] || exit 99 -[[ ${T2_INSTALLED:-0} == "1" ]] -SH - -cat > "$scratch/bin/lspci" <<'SH' -#!/bin/bash -[[ $* == "-nn" ]] || exit 99 -[[ ${PCI_FAIL:-0} == "0" ]] || exit 1 -printf '%s\n' "${PCI_DEVICES:-00:02.0 VGA compatible controller: Intel [8086:1234]}" -SH - -cat > "$scratch/bin/omarchy-pkg-add" <<'SH' -#!/bin/bash -printf 'add %s\n' "$*" >> "$CALL_LOG" -[[ ${INSTALL_FAIL:-0} == "0" ]] -SH -chmod +x "$scratch/bin/"* - -run_leaf() { - : > "$CALL_LOG" - bash -euo pipefail "$leaf" > "$scratch/output" 2>&1 -} - -run_leaf -grep -Fxq 'add linux-omarchy linux-omarchy-headers' "$CALL_LOG" || fail "ordinary systems install the generic kernel and headers" -pass "ordinary x86_64 installs receive the Omarchy kernel without a Panther Lake hardware gate" - -T2_INSTALLED=1 run_leaf -[[ ! -s $CALL_LOG ]] || fail "an installed T2 kernel excludes the system" -pass "hardware setup skips systems with linux-t2 installed" - -for device in 1801 1802; do - PCI_DEVICES="04:00.0 Mass storage controller: Apple Inc. T2 [106b:$device]" run_leaf - [[ ! -s $CALL_LOG ]] || fail "fresh T2 hardware must not install the generic kernel" -done -pass "fresh T2 hardware is excluded before its specialized kernel has been installed" - -TEST_ARCH=aarch64 run_leaf -[[ ! -s $CALL_LOG ]] || fail "ARM hardware cannot install an x86_64 kernel" -pass "ARM hardware is excluded" - -if PCI_FAIL=1 run_leaf; then - fail "failed T2 hardware detection must stop kernel setup" -fi -[[ ! -s $CALL_LOG ]] || fail "unidentified hardware must not install the generic kernel" -pass "failed PCI detection prevents installing the generic kernel on unidentified hardware" - -if INSTALL_FAIL=1 run_leaf; then - fail "package installation failure must fail kernel setup" -fi -pass "kernel package installation failures stop hardware setup" - -kernel_line=$(grep -n 'hardware/kernel.sh' "$ROOT/install/hardware/all.sh" | cut -d: -f1) -for script in nvidia.sh intel/ipu7-camera.sh fix-elgato-camlink-4k.sh; do - driver_line=$(grep -n "hardware/$script" "$ROOT/install/hardware/all.sh" | cut -d: -f1) - (( kernel_line < driver_line )) || fail "the generic kernel is installed before $script pulls in DKMS drivers" -done -pass "kernel setup precedes NVIDIA, IPU7, and Cam Link DKMS setup" - -for package in linux-omarchy linux-omarchy-headers; do - grep -Fxq "$package" "$ROOT/install/omarchy-other.packages" || fail "the ISO includes $package" -done -! grep -q 'linux-omarchy-ptl-novrr-mm' "$ROOT/install/omarchy-other.packages" || fail "the ISO must not pull in the retired PTL variant" -pass "the ISO package list includes the generic kernel and headers" diff --git a/test/shell.d/xps13-sidecar-amps-test.sh b/test/shell.d/xps13-sidecar-amps-test.sh index b7935fb2..a8313a48 100755 --- a/test/shell.d/xps13-sidecar-amps-test.sh +++ b/test/shell.d/xps13-sidecar-amps-test.sh @@ -13,13 +13,6 @@ grep -q 'run_logged .*hardware/dell-xps13-sidecar-amps.sh' "$all" || fail "the sidecar amplifier workaround runs during hardware setup" pass "the sidecar amplifier workaround runs during hardware setup" -# The apply step rebuilds the boot image, so the default kernel must be installed. -kernel_line=$(grep -n 'hardware/kernel.sh' "$all" | cut -d: -f1) -amps_line=$(grep -n 'hardware/dell-xps13-sidecar-amps.sh' "$all" | cut -d: -f1) -((kernel_line < amps_line)) || - fail "the sidecar amplifier workaround runs after the default kernel is installed" -pass "the sidecar amplifier workaround runs after the default kernel is installed" - [[ -n $migration ]] || fail "a migration enables the workaround on existing installs" pass "a migration enables the workaround on existing installs"