1
1
#! /usr/bin/bash
2
- set -e
2
+ set -ex
3
3
4
4
KERNEL_VERSION=6.11.2-300.fc41
5
5
@@ -13,7 +13,7 @@ rm -r "kernel-$KERNEL_VERSION.src.rpm" "kernel-$KERNEL_VERSION.src"
13
13
sed -i ' s/# define buildid .local/%define buildid .t2/g' " kernel.spec"
14
14
15
15
# Bump release
16
- # sed -i 's/%define specrelease 200/%define specrelease 202 /g' "kernel.spec"
16
+ sed -i ' s/%define specrelease 200/%define specrelease 210 /g' " kernel.spec"
17
17
18
18
# Disable debug kernels
19
19
sed -i " /%define with_debug /c %define with_debug 0" " kernel.spec"
@@ -26,12 +26,18 @@ sed -i "/Patch1:/a Patch2: t2linux-combined.patch" "kernel.spec"
26
26
sed -i " /ApplyOptionalPatch patch-%{patchversion}-redhat.patch/a ApplyOptionalPatch t2linux-combined.patch" " kernel.spec"
27
27
28
28
cat " linux-t2-patches/extra_config" > " kernel-local"
29
- cat << EOF >> "kernel-local"
30
- CONFIG_MODULE_FORCE_UNLOAD=y
31
- EOF
32
- cat << EOF | tee -a "kernel-x86_64-*.config" > /dev/null
33
- CONFIG_CMDLINE="intel_iommu=on iommu=pt mem_sleep=s2idle pcie_ports=native"
34
- CONFIG_CMDLINE_BOOL=y
35
- CONFIG_CMDLINE_OVERRIDE=n
36
- EOF
29
+
30
+ function apply_kconfig {
31
+ kconfig=" kernel-x86_64-fedora.config"
32
+ config_opt=$( echo " $1 " | cut -d' =' -f1)
33
+ sed -i " /# $config_opt is not set/d" " $kconfig "
34
+ sed -i " /$config_opt =/d" " $kconfig "
35
+ echo " $1 " >> " $kconfig "
36
+ }
37
+
38
+ apply_kconfig ' CONFIG_MODULE_FORCE_UNLOAD=y'
39
+ apply_kconfig ' CONFIG_CMDLINE="intel_iommu=on iommu=pt mem_sleep=s2idle pcie_ports=native"'
40
+ apply_kconfig ' CONFIG_CMDLINE_BOOL=y'
41
+ echo " # CONFIG_CMDLINE_OVERRIDE is not set" >> kernel-x86_64-fedora.config
42
+
37
43
cat " linux-t2-patches" /* .patch > " t2linux-combined.patch"
0 commit comments