forked from SoCXin/A64
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (120 loc) · 4.48 KB
/
Copy pathmain.yml
File metadata and controls
134 lines (120 loc) · 4.48 KB
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
name: 编译读书郎G60(sun50iw1p1)dtb
on:
push:
branches: [ master ]
paths: [ "linux/kernel/arch/arm64/boot/dts/**" ]
workflow_dispatch:
jobs:
compile-dtb:
runs-on: ubuntu-latest
steps:
- name: 检出SoCXin/A64仓库
uses: actions/checkout@v4
- name: 安装dtc工具
run: sudo apt-get update && sudo apt-get install -y device-tree-compiler
- name: 创建读书郎G60专属板级dts(修正语法)
run: |
cd linux/kernel/arch/arm64/boot/dts
cat > sun50iw1p1-readboy-g60.dts << 'EOF'
/dts-v1/;
#include "sun50iw1p1.dtsi"
#include <dt-bindings/interrupt-controller/irq.h> // 补充中断相关头文件
#include <dt-bindings/gpio/gpio.h> // 补充GPIO相关头文件
/ {
model = "Readboy G60 (sun50iw1p1)"; // 设备型号(必填)
compatible = "readboy,g60", "allwinner,sun50iw1p1"; // 兼容属性(必填)
};
/* 屏幕配置(修正属性格式) */
&display {
status = "okay";
display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <50000000>;
hactive = <800>;
vactive = <1280>;
hfront-porch = <20>;
hback-porch = <20>;
hsync-len = <10>;
vfront-porch = <10>;
vback-porch = <10>;
vsync-len = <5>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
};
&lcd0 {
status = "okay";
lcd_used = <1>;
lcd_driver_name = "default_lcd";
lcd_if = <0>;
lcd_width = <800>;
lcd_height = <1280>;
lcd_dclk_freq = <50>;
lcd_pwm_used = <1>;
lcd_pwm_ch = <0>;
lcd_pwm_freq = <1000>;
lcd_pwm_pol = <1>;
};
/* 存储分区配置(修正reg格式) */
&mmc0 {
status = "okay";
bus-width = <8>;
cap-mmc-highspeed;
mmc-hs200-1_8v;
max-frequency = <150000000>;
non-removable;
partitions {
compatible = "fixed-partitions";
#address-cells = <2>;
#size-cells = <2>;
partition@0 {
label = "bootloader";
reg = <0x0 0x0 0x0 0x400000>; // 修正reg格式(64位地址:高32位 低32位)
};
partition@400000 {
label = "env";
reg = <0x0 0x400000 0x0 0x100000>;
};
partition@500000 {
label = "boot";
reg = <0x0 0x500000 0x0 0x800000>;
};
partition@d00000 {
label = "system";
reg = <0x0 0xd00000 0x0 0x40000000>;
};
partition@40d00000 {
label = "data";
reg = <0x0 0x40d00000 0x0 0x7f300000>;
};
};
};
/* 触控配置(修正中断和GPIO格式) */
&i2c0 {
status = "okay";
clock-frequency = <400000>;
gt911@14 {
compatible = "goodix,gt911";
reg = <0x14>;
interrupt-parent = <&pio>;
interrupts = <4 10 IRQ_TYPE_EDGE_FALLING>; // 依赖irq.h头文件
reset-gpios = <&pio 4 9 GPIO_ACTIVE_LOW>; // 依赖gpio.h头文件
touchscreen-size-x = <800>;
touchscreen-size-y = <1280>;
};
};
EOF
- name: 编译G60专属dtb(添加调试输出)
run: |
cd linux/kernel/arch/arm64/boot/dts
# 用verbose模式编译,便于排查剩余错误
dtc -v -I dts -O dtb -o g60-readboy.dtb sun50iw1p1-readboy-g60.dts
- name: 上传G60 dtb文件
uses: actions/upload-artifact@v4
with:
name: g60-readboy-dtb
path: linux/kernel/arch/arm64/boot/dts/g60-readboy.dtb