-
Notifications
You must be signed in to change notification settings - Fork 4
190 lines (179 loc) · 6.95 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
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: v6.5.10
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Checkout Kernel ${{ env.KERNEL_STABLE_VER }}
run: |
git clone --depth 1 --branch ${{ env.KERNEL_STABLE_VER }} https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-${{ env.KERNEL_STABLE_VER }}
- name: Setup dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get install -y build-essential \
bc kmod cpio flex libncurses5-dev \
libelf-dev libssl-dev dwarves bison \
gawk openssl libssl-dev dkms libudev-dev \
libpci-dev libiberty-dev autoconf \
gcc-13 rpm debhelper lz4
- 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.5/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.5/0003-bbr3.patch | git apply -v --index \
&& git commit -m "Applied bbr3.patch"
curl -sSL https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.5/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
- name: Build
working-directory: linux-${{ env.KERNEL_STABLE_VER }}
env:
KDEB_COMPRESS: "xz"
KCFLAGS: "-O3"
run: |
make \
LOCALVERSION="" \
CC="gcc-13" \
olddefconfig
# Build deb
make \
LOCALVERSION="" \
CC="gcc-13" \
-j`nproc` \
bindeb-pkg
# reset version
rm .version
# Build rpm
make \
LOCALVERSION="" \
CC="gcc-13" \
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-*.deb
- name: Upload rpm
uses: actions/upload-artifact@v3
with:
name: rpm
path: /home/runner/rpmbuild/RPMS/x86_64/*.rpm
- name: Release
if: ${{ github.event.inputs.release != 'none' }}
uses: ncipollo/release-action@v1
with:
artifacts: "linux-*.deb,/home/runner/rpmbuild/RPMS/x86_64/*.rpm"
prerelease: ${{ github.event.inputs.release == 'pre-release' }}
makeLatest: ${{ github.event.inputs.release == 'release' }}
tag: ${{ env.KERNEL_STABLE_VER }}