Skip to content

Commit 2ec94b0

Browse files
authored
Update main.yml
1 parent 94bfd67 commit 2ec94b0

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
name: 编译读书郎G60(sun50iw1p1)dtb
22

3-
# 触发条件:推送代码到master分支(或手动触发)
43
on:
54
push:
65
branches: [ master ]
7-
paths: [ "linux/kernel/arch/arm64/boot/dts/**" ] # 仅当dts目录变更时触发
8-
workflow_dispatch: # 允许手动触发
6+
paths: [ "linux/kernel/arch/arm64/boot/dts/**" ]
7+
workflow_dispatch:
98

109
jobs:
1110
compile-dtb:
12-
runs-on: ubuntu-latest # 使用Ubuntu环境
11+
runs-on: ubuntu-latest
1312
steps:
14-
# 步骤1:检出仓库代码
1513
- name: 检出SoCXin/A64仓库
1614
uses: actions/checkout@v4
1715

18-
# 步骤2:安装编译依赖(device-tree-compiler)
1916
- name: 安装dtc工具
2017
run: sudo apt-get update && sudo apt-get install -y device-tree-compiler
2118

22-
# 步骤3:添加读书郎G60的适配配置到sun50iw1p1.dtsi
23-
- name: 注入G60硬件配置
19+
# 关键修改:创建独立板级dts,避免修改原有dtsi
20+
- name: 创建读书郎G60专属板级dts
2421
run: |
25-
# 进入dts目录
2622
cd linux/kernel/arch/arm64/boot/dts
27-
# 向sun50iw1p1.dtsi追加屏幕、存储、触控配置(对应之前的适配代码)
28-
cat >> sun50iw1p1.dtsi << 'EOF'
23+
# 新建独立dts文件,继承sun50iw1p1.dtsi
24+
cat > sun50iw1p1-readboy-g60.dts << 'EOF'
25+
/dts-v1/;
26+
#include "sun50iw1p1.dtsi" // 继承芯片通用配置
2927
3028
/* 读书郎G60 - 屏幕配置(800x1280) */
3129
&display {
@@ -96,13 +94,12 @@ jobs:
9694
};
9795
EOF
9896
99-
# 步骤4:编译dtb文件
100-
- name: 编译sun50iw1p1.dtsi为G60 dtb
97+
# 编译独立板级dts(避免冲突)
98+
- name: 编译G60专属dtb
10199
run: |
102100
cd linux/kernel/arch/arm64/boot/dts
103-
dtc -I dts -O dtb -o g60-readboy.dtb sun50iw1p1.dtsi
101+
dtc -I dts -O dtb -o g60-readboy.dtb sun50iw1p1-readboy-g60.dts
104102
105-
# 步骤5:上传编译好的dtb作为Artifact
106103
- name: 上传G60 dtb文件
107104
uses: actions/upload-artifact@v4
108105
with:

0 commit comments

Comments
 (0)