Skip to content

终极兜底:编译芯片原生dtb(必成功版) #3

终极兜底:编译芯片原生dtb(必成功版)

终极兜底:编译芯片原生dtb(必成功版) #3

Workflow file for this run

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