Skip to content

Commit 3d4b775

Browse files
committed
feat: support gpl patch
1 parent 8f4b8f1 commit 3d4b775

File tree

4 files changed

+1064
-633
lines changed

4 files changed

+1064
-633
lines changed

README.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,24 @@
1010
#### 2. 更新 config 文件
1111
在本地将您获取的 config 文件替换根目录下的 `config`,可以从您系统的 `/boot/config*` 文件复制,或者手动编辑
1212

13-
#### 3. 编写自定义修改脚本
14-
当前 `/patch.d/` 目录下的修改脚本是只针对我自己的需求编写的,建议您先将其删掉,然后编写自己的脚本放在这个目录下,在脚本执行过程中会自动应用该目录下的所有脚本
13+
#### 3. 编写自定义path
14+
首先下载一份需要编译的内核源码,然后cp一份整个源码目录
15+
~~~bash
16+
xz -d linux-5.15.102.tar.xz
17+
tar -xvf linux-5.15.102.tar
18+
cp -r linux-5.15.102 linux-5.15.102-modify
19+
~~~
20+
21+
之后在linux-5.15.102-modify中修改后,在上级目录中 生成patch
22+
~~~bash
23+
diff -Nur linux-5.15.102 linux-5.15.102-modify > xxx.patch
24+
~~~
25+
26+
应用patch方法
27+
~~~bash
28+
cd linux-5.15.102
29+
path -p1 < /path/to/xxx.path
30+
~~~
1531

1632
#### 4. 推送修改
1733
推送后,action 自动触发,可以在您的仓库页面的 `Actions` 选项卡查看进度详情。

build_action.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
VERSION=$(grep 'Kernel Configuration' < config | awk '{print $3}')
3+
VERSION="5.15.102"
44

55
# add deb-src to sources.list
66
sed -i "/deb-src/s/# //g" /etc/apt/sources.list
@@ -26,7 +26,7 @@ scripts/config --disable DEBUG_INFO
2626

2727
# apply patches
2828
# shellcheck source=src/util.sh
29-
source ../patch.d/*.sh
29+
patch -p1 < ../patch.d/gpl.patch
3030

3131
# build deb packages
3232
CPU_CORES=$(($(grep -c processor < /proc/cpuinfo)*2))

0 commit comments

Comments
 (0)