-
Notifications
You must be signed in to change notification settings - Fork 4
216 lines (204 loc) · 8.2 KB
/
stable.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
name: Build stable Kernel Package
on:
workflow_dispatch:
inputs:
release:
type: choice
description: Release type
options:
- none
- pre-release
- release
env:
HOME: /home/runner
KERNEL_STABLE_VER: 6.6.2
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Checkout Linux Kernel ${{ env.KERNEL_STABLE_VER }}
run: |
git clone --depth 1 --branch v${{ env.KERNEL_STABLE_VER }} https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux linux-${{ env.KERNEL_STABLE_VER }}
- name: Setup dependencies
run: |
sudo apt-get install -y build-essential \
bc kmod cpio flex libncurses-dev \
libelf-dev libssl-dev dwarves bison \
gawk openssl libssl-dev dkms libudev-dev \
libpci-dev libiberty-dev autoconf \
rpm debhelper lz4 ccache
- name: Apply patch
working-directory: linux-${{ env.KERNEL_STABLE_VER }}
run: |
git config user.name "GitHub Actions"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
curl -sSL https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.6/0002-amd-pref-core.patch | git apply -v --index \
&& git commit -m "Applied amd-pref-core.patch"
curl -sSL https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.6/0003-bbr3.patch | git apply -v --index \
&& git commit -m "Applied bbr3.patch"
curl -sSL https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.6/0007-zstd.patch | git apply -v --index \
&& git commit -m "Applied zstd.patch"
curl -sSL https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.6/misc/0001-lrng.patch | git apply -v --index \
&& git commit -m "Applied lrng.patch"
- name: Copy .config and setup some config
working-directory: linux-${{ env.KERNEL_STABLE_VER }}
run: |
cp ../config.stable .config
scripts/config --set-str LOCALVERSION "-l4t-bbr3"
# BBR3
scripts/config -m TCP_CONG_CUBIC \
-d DEFAULT_CUBIC \
-e TCP_CONG_BBR \
-e DEFAULT_BBR \
--set-str DEFAULT_TCP_CONG bbr
# BBR3 doesn't work properly with FQ_CODEL
scripts/config -m NET_SCH_FQ_CODEL \
-e NET_SCH_FQ \
-d DEFAULT_FQ_CODEL \
-e DEFAULT_FQ \
--set-str DEFAULT_NET_SCH fq
# MGLRU
scripts/config -e LRU_GEN -e LRU_GEN_ENABLED -d LRU_GEN_STATS
# Enable LRNG
scripts/config -d RANDOM_DEFAULT_IMPL \
-e LRNG \
-e LRNG_SHA256 \
-e LRNG_COMMON_DEV_IF \
-e LRNG_DRNG_ATOMIC \
-e LRNG_SYSCTL \
-e LRNG_RANDOM_IF \
-e LRNG_AIS2031_NTG1_SEEDING_STRATEGY \
-m LRNG_KCAPI_IF \
-m LRNG_HWRAND_IF \
-e LRNG_DEV_IF \
-e LRNG_RUNTIME_ES_CONFIG \
-e LRNG_IRQ_DFLT_TIMER_ES \
-d LRNG_SCHED_DFLT_TIMER_ES \
-e LRNG_TIMER_COMMON \
-d LRNG_COLLECTION_SIZE_256 \
-d LRNG_COLLECTION_SIZE_512 \
-e LRNG_COLLECTION_SIZE_1024 \
-d LRNG_COLLECTION_SIZE_2048 \
-d LRNG_COLLECTION_SIZE_4096 \
-d LRNG_COLLECTION_SIZE_8192 \
--set-val LRNG_COLLECTION_SIZE 1024 \
-e LRNG_HEALTH_TESTS \
--set-val LRNG_RCT_CUTOFF 31 \
--set-val LRNG_APT_CUTOFF 325 \
-e LRNG_IRQ \
-e LRNG_CONTINUOUS_COMPRESSION_ENABLED \
-d LRNG_CONTINUOUS_COMPRESSION_DISABLED \
-e LRNG_ENABLE_CONTINUOUS_COMPRESSION \
-e LRNG_SWITCHABLE_CONTINUOUS_COMPRESSION \
--set-val LRNG_IRQ_ENTROPY_RATE 256 \
-e LRNG_JENT \
--set-val LRNG_JENT_ENTROPY_RATE 16 \
-e LRNG_CPU \
--set-val LRNG_CPU_FULL_ENT_MULTIPLIER 1 \
--set-val LRNG_CPU_ENTROPY_RATE 8 \
-e LRNG_SCHED \
--set-val LRNG_SCHED_ENTROPY_RATE 4294967295 \
-e LRNG_DRNG_CHACHA20 \
-m LRNG_DRBG \
-m LRNG_DRNG_KCAPI \
-e LRNG_SWITCH \
-e LRNG_SWITCH_HASH \
-m LRNG_HASH_KCAPI \
-e LRNG_SWITCH_DRNG \
-m LRNG_SWITCH_DRBG \
-m LRNG_SWITCH_DRNG_KCAPI \
-e LRNG_DFLT_DRNG_CHACHA20 \
-d LRNG_DFLT_DRNG_DRBG \
-d LRNG_DFLT_DRNG_KCAPI \
-e LRNG_TESTING_MENU \
-d LRNG_RAW_HIRES_ENTROPY \
-d LRNG_RAW_JIFFIES_ENTROPY \
-d LRNG_RAW_IRQ_ENTROPY \
-d LRNG_RAW_RETIP_ENTROPY \
-d LRNG_RAW_REGS_ENTROPY \
-d LRNG_RAW_ARRAY \
-d LRNG_IRQ_PERF \
-d LRNG_RAW_SCHED_HIRES_ENTROPY \
-d LRNG_RAW_SCHED_PID_ENTROPY \
-d LRNG_RAW_SCHED_START_TIME_ENTROPY \
-d LRNG_RAW_SCHED_NVCSW_ENTROPY \
-d LRNG_SCHED_PERF \
-d LRNG_ACVT_HASH \
-d LRNG_RUNTIME_MAX_WO_RESEED_CONFIG \
-d LRNG_TEST_CPU_ES_COMPRESSION \
-e LRNG_SELFTEST \
-d LRNG_SELFTEST_PANIC \
-d LRNG_RUNTIME_FORCE_SEEDING_DISABLE
# Disable DEBUG
scripts/config -d DEBUG_INFO \
-d DEBUG_INFO_BTF \
-d DEBUG_INFO_DWARF4 \
-d DEBUG_INFO_DWARF5 \
-d PAHOLE_HAS_SPLIT_BTF \
-d DEBUG_INFO_BTF_MODULES \
-d SLUB_DEBUG \
-d PM_DEBUG \
-d PM_ADVANCED_DEBUG \
-d PM_SLEEP_DEBUG \
-d ACPI_DEBUG \
-d SCHED_DEBUG \
-d LATENCYTOP \
-d DEBUG_PREEMPT \
-d DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \
-e DEBUG_INFO_NONE
- name: Build
working-directory: linux-${{ env.KERNEL_STABLE_VER }}
env:
KBUILD_BUILD_TIMESTAMP: ''
KDEB_COMPRESS: "xz"
run: |
make \
LOCALVERSION="" \
CC="ccache gcc" \
olddefconfig
# Build deb
make \
LOCALVERSION="" \
CC="ccache gcc" \
-j`nproc` \
bindeb-pkg
# reset version
rm .version
# Build rpm
make \
LOCALVERSION="" \
CC="ccache gcc" \
RPMOPTS="--nodeps" \
-j`nproc` \
rpm-pkg
- name: Upload config
uses: actions/upload-artifact@v3
with:
name: config
path: linux-${{ env.KERNEL_STABLE_VER }}/.config
- name: Upload deb
uses: actions/upload-artifact@v3
with:
name: deb
path: |
linux-image-${{ env.KERNEL_STABLE_VER }}-l4t-bbr3_*.deb
linux-headers-${{ env.KERNEL_STABLE_VER }}-l4t-bbr3_*.deb
linux-libc-dev_${{ env.KERNEL_STABLE_VER }}*.deb
- name: Upload rpm
uses: actions/upload-artifact@v3
with:
name: rpm
path: linux-${{ env.KERNEL_STABLE_VER }}/rpmbuild/RPMS/x86_64/kernel*-${{ env.KERNEL_STABLE_VER }}_*.rpm
- name: Release
if: ${{ github.event.inputs.release != 'none' }}
uses: ncipollo/release-action@v1
with:
artifacts: |
linux-image-${{ env.KERNEL_STABLE_VER }}-l4t-bbr3_*.deb
linux-headers-${{ env.KERNEL_STABLE_VER }}-l4t-bbr3_*.deb
linux-libc-dev_${{ env.KERNEL_STABLE_VER }}*.deb
linux-${{ env.KERNEL_STABLE_VER }}/rpmbuild/RPMS/x86_64/kernel*-${{ env.KERNEL_STABLE_VER }}_*.rpm
prerelease: ${{ github.event.inputs.release == 'pre-release' }}
makeLatest: ${{ github.event.inputs.release == 'release' }}
tag: v${{ env.KERNEL_STABLE_VER }}-l4t-bbr3