Commit dcfb01c5 authored by jan.koester's avatar jan.koester
Browse files

test

parent 185d064a
Loading
Loading
Loading
Loading
+30 −7
Changes for build-chroot.sh: 30 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -1022,8 +1022,8 @@ fetch_url() {
# USB sticks and the file systems an ISO file may lie on (Ventoy: exFAT,
# also NTFS, FAT, ext4), so the initramfs finds a live ISO that isn't a CD;
# the hwmon temperature sensors webctl's dashboard reads from
# /sys/class/hwmon: coretemp (Intel), k10temp (AMD), NVMe and SATA drives
# (X86_PKG_TEMP_THERMAL alone is only a thermal zone, it has no hwmon).
# /sys/class/hwmon of NVMe and SATA drives (coretemp, k10temp and
# x86_pkg_temp_thermal are KERNEL_MODULES).
KERNEL_OPTIONS="SYSFB SYSFB_SIMPLEFB DRM DRM_SIMPLEDRM DRM_FBDEV_EMULATION FB FB_CORE
    FRAMEBUFFER_CONSOLE FRAMEBUFFER_CONSOLE_DETECT_PRIMARY SQUASHFS SQUASHFS_ZSTD SQUASHFS_XATTR
    SQUASHFS_FILE_DIRECT NETDEVICES ETHERNET NET_VENDOR_REALTEK PHYLIB REALTEK_PHY BLK_DEV_NVME
@@ -1038,8 +1038,8 @@ KERNEL_OPTIONS="SYSFB SYSFB_SIMPLEFB DRM DRM_SIMPLEDRM DRM_FBDEV_EMULATION FB FB
    BPF_JIT_ALWAYS_ON NET_CLS_BPF NET_ACT_BPF NET_SCH_INGRESS XDP_SOCKETS BPF_STREAM_PARSER
    FUNCTION_TRACER DYNAMIC_FTRACE FTRACE_SYSCALLS BPF_LSM IKHEADERS
    SCSI_LOWLEVEL SCSI_ISCSI_ATTRS ISCSI_TCP
    CONFIGFS_FS TARGET_CORE TCM_IBLOCK TCM_FILEIO ISCSI_TARGET X86_PKG_TEMP_THERMAL
    SENSORS_CORETEMP SENSORS_K10TEMP NVME_HWMON SENSORS_DRIVETEMP
    CONFIGFS_FS TARGET_CORE TCM_IBLOCK TCM_FILEIO ISCSI_TARGET
    NVME_HWMON SENSORS_DRIVETEMP
    USB_STORAGE USB_UAS EXFAT_FS NTFS3_FS FAT_FS VFAT_FS NLS NLS_CODEPAGE_437 NLS_ISO8859_1 NLS_UTF8"
# DEBUG_INFO_BTF needs DWARF (pahole turns it into BTF): DWARF5 replaces
# defconfig's DEBUG_INFO_NONE in that choice
@@ -1056,10 +1056,30 @@ KERNEL_OPTIONS_OFF="DEBUG_INFO_NONE"
# which a built-in driver could not (no root file system yet). simpledrm
# keeps the console on the firmware framebuffer until they take over.
# NICs: the Realtek, Intel and Aquantia ones of KERNEL_OPTIONS and the
# ones defconfig builds in.
# ones defconfig builds in. Sound (the HDA controller by modalias, its
# codecs by request_module; defconfig has none, so no sound before): the
# generic parser, Realtek, HDMI/DisplayPort of the GPUs, Conexant, Cirrus,
# SigmaTel/IDT, Analog Devices, VIA. The CPU temperature sensors
# webctl's dashboard reads (coretemp, k10temp; cpu modalias), the WLAN
# stack, the NFS and 9p clients (fs-<type> when mounted), Intel MEI, the
# i801 SMBus and USB printers.
# Built in although not needed to boot: what the daemons expect to be
# there without loading it -- ksmbd, nfsd (sharedd mounts its file system
# on /proc/fs/nfsd, which only the module makes), LIO (sharedd), md and
# device-mapper (storaged), iscsi_tcp (iscsid), the bond/bridge/veth/
# wireguard devices (syslite, containerd), drivetemp (no modalias).
KERNEL_MODULES="DRM_AMDGPU DRM_RADEON DRM_NOUVEAU DRM_I915 DRM_XE
    R8169 E100 E1000 E1000E IGB IGC IGBVF IXGBE IXGBEVF I40E ICE AQTION
    8139TOO FORCEDETH SKY2 TIGON3"
    8139TOO FORCEDETH SKY2 TIGON3
    SOUND SND SND_HDA_INTEL SND_HDA_GENERIC SND_HDA_CODEC_REALTEK SND_HDA_CODEC_HDMI
    SND_HDA_CODEC_CONEXANT SND_HDA_CODEC_CIRRUS SND_HDA_CODEC_SIGMATEL
    SND_HDA_CODEC_ANALOG SND_HDA_CODEC_VIA
    SENSORS_CORETEMP SENSORS_K10TEMP X86_PKG_TEMP_THERMAL
    CFG80211 MAC80211 RFKILL NFS_FS 9P_FS NET_9P
    INTEL_MEI INTEL_MEI_ME I2C_I801 USB_PRINTER"
# the kernel's request_module() helper: fresh's modprobe (-q, aliases from
# depmod's modules.alias, built-in modules); fresh has no /sbin/modprobe
KERNEL_MODPROBE_PATH="/bin/modprobe"

# kernel_config <version> -- kernel.spec's Source2: defconfig plus
# KERNEL_OPTIONS, generated inside the chroot (kconfig needs flex/bison,
@@ -1072,7 +1092,7 @@ kernel_config() {
    # needs >= 1.22), so a config made before dwarves was installed is stale
    local pahole
    pahole="$(in_chroot /bin/sh -c 'pahole --version' 2>/dev/null </dev/null || true)"
    local opts="$KERNEL_OPTIONS | $KERNEL_OPTIONS_OFF | $KERNEL_MODULES | pahole ${pahole:-none}"
    local opts="$KERNEL_OPTIONS | $KERNEL_OPTIONS_OFF | $KERNEL_MODULES | $KERNEL_MODPROBE_PATH | pahole ${pahole:-none}"
    if [[ -s $out && ${KERNEL_CONFIG_FORCE:-0} != 1 && -f $out.options && "$(cat "$out.options")" == "$opts" ]]; then
        return
    fi
@@ -1086,6 +1106,7 @@ kernel_config() {
    for o in $KERNEL_MODULES; do
        sets+="sed -i -e '/^CONFIG_$o=/d' -e '/^# CONFIG_$o is not set/d' .config; echo CONFIG_$o=m >>.config; "
    done
    sets+="sed -i '/^CONFIG_MODPROBE_PATH=/d' .config; echo 'CONFIG_MODPROBE_PATH=\"$KERNEL_MODPROBE_PATH\"' >>.config; "
    cat >"$CHROOT/tmp/kconfig.sh" <<EOF
set -e
rm -rf /build/kconfig; mkdir -p /build/kconfig; cd /build/kconfig
@@ -1113,6 +1134,8 @@ EOF
        grep -q "^CONFIG_$o=m" "$out" || missing+=" $o"
    done
    [[ -z $missing ]] || warn "kernel-config-$v: not a module (unknown symbol, unmet dependency or selected by a built-in option):$missing"
    grep -qx "CONFIG_MODPROBE_PATH=\"$KERNEL_MODPROBE_PATH\"" "$out" ||
        warn "kernel-config-$v: CONFIG_MODPROBE_PATH is not $KERNEL_MODPROBE_PATH"
}

# llvm_wrappers <version> <tarball> -- llvm-project.spec's Source1: the