- Add nvidia/nvidia-dkms/nvidia-libs-32bit/nvidia-vaapi-driver to niri live and installed profiles; wireless-regdb and sof-firmware to all profiles (fixes regulatory.db and SOF firmware dmesg errors) - iso/postsetup-nvidia.sh: new mklive -x hook that re-runs dracut inside the rootfs chroot after the overlay is applied; ensures the squashfs initramfs includes nvidia.ko and omits nouveau.ko at build time — no driver install needed at runtime (fixes /run tmpfs overflow that was killing wireplumber by corrupting D-Bus sockets) - Both ISO inner build scripts gain -x postsetup-nvidia.sh and the nonfree repo flag so nvidia packages resolve correctly - niri config: wireplumber started via supervisor loop (waits for PipeWire socket, auto-restarts on crash) replacing the one-shot exec — survives any D-Bus or pipewire disruption - build-niri-live-iso.sh: NVIDIA modprobe blacklist-nouveau.conf, btusb-quirks.conf, modules-load.d/nvidia.conf, dracut/10-nvidia.conf, Xorg intel/nvidia configs, prime-run helper, elogind run script loop guard, timezone Europe/Zurich overlay, updated BOOT_CMDLINE - build-live-iso.sh: same NVIDIA + timezone + sound udev rule overlays; live-setup.sh timezone and audio group fix - installer/lib/grub.sh: GRUB_CMDLINE_LINUX_DEFAULT gains nvidia-drm.modeset=1 rd.driver.blacklist=nouveau btusb.enable_autosuspend=0 - installer/lib/postinstall.sh: configure_nvidia_prime() adds blacklist-nouveau.conf, btusb-quirks.conf, dracut omit_drivers nouveau, modules-load.d with all four nvidia modules
64 lines
2.1 KiB
Bash
Executable File
64 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Runs INSIDE the docker container (as root). Invoked by iso/build-iso.sh.
|
|
# Expects the project bind-mounted at /work and the cache at /cache.
|
|
#
|
|
# Required env (set by build-iso.sh):
|
|
# ARCH, REPO_URL, KEYMAP, LOCALE, ISO_PKGS, ISO_TITLE, OUT_ISO_REL
|
|
|
|
set -Eeuo pipefail
|
|
|
|
: "${ARCH:?}"; : "${REPO_URL:?}"; : "${KEYMAP:?}"; : "${LOCALE:?}"
|
|
: "${ISO_PKGS:?}"; : "${ISO_TITLE:?}"; : "${OUT_ISO_REL:?}"
|
|
|
|
CACHE_DIR=/cache
|
|
PROJECT_DIR=/work
|
|
MKLIVE_DIR="$CACHE_DIR/void-mklive"
|
|
INCLUDE_DIR="$PROJECT_DIR/build/includes"
|
|
OUT_ISO="$PROJECT_DIR/$OUT_ISO_REL"
|
|
|
|
# xbps-static was downloaded by the host script; put it on PATH so mklive
|
|
# uses it instead of expecting a system xbps.
|
|
export PATH="$CACHE_DIR/xbps-static/usr/bin:$PATH"
|
|
|
|
# Sanity checks.
|
|
[[ -d "$MKLIVE_DIR" ]] || { echo "ERROR: $MKLIVE_DIR missing"; exit 1; }
|
|
[[ -d "$INCLUDE_DIR" ]] || { echo "ERROR: $INCLUDE_DIR missing"; exit 1; }
|
|
command -v xbps-install.static >/dev/null \
|
|
|| { echo "ERROR: xbps-install.static not on PATH"; exit 1; }
|
|
|
|
mkdir -p "$(dirname "$OUT_ISO")"
|
|
|
|
cd "$MKLIVE_DIR"
|
|
|
|
# Cleanup trap: lazy-unmount any leftover pseudo-fs from a previous abort.
|
|
_cleanup_mklive_builds() {
|
|
local d sub
|
|
for d in "$MKLIVE_DIR"/mklive-build.*/; do
|
|
[[ -d "$d" ]] || continue
|
|
for sub in tmp-rootfs/sys tmp-rootfs/proc tmp-rootfs/dev tmp-rootfs/run \
|
|
image/rootfs/sys image/rootfs/proc image/rootfs/dev image/rootfs/run; do
|
|
[[ -d "$d$sub" ]] && umount -R --lazy "$d$sub" 2>/dev/null || true
|
|
done
|
|
rm -rf "$d" 2>/dev/null || true
|
|
done
|
|
}
|
|
trap _cleanup_mklive_builds EXIT
|
|
|
|
./mklive.sh \
|
|
-a "$ARCH" \
|
|
-r "$REPO_URL" \
|
|
-r "${REPO_URL%/current}/current/nonfree" \
|
|
-c "$CACHE_DIR/xbps-live-pkgs" \
|
|
-H "$CACHE_DIR/xbps-host-pkgs" \
|
|
-k "$KEYMAP" \
|
|
-l "$LOCALE" \
|
|
-T "$ISO_TITLE" \
|
|
-p "$ISO_PKGS" \
|
|
-I "$INCLUDE_DIR" \
|
|
-x "$PROJECT_DIR/iso/postsetup-nvidia.sh" \
|
|
-C "${BOOT_CMDLINE:-}" \
|
|
-o "$OUT_ISO"
|
|
|
|
# Ensure the resulting file is writable by the host user.
|
|
chown "$(stat -c '%u:%g' "$PROJECT_DIR")" "$OUT_ISO" "${OUT_ISO}".* 2>/dev/null || true
|