-
Notifications
You must be signed in to change notification settings - Fork 10
93 lines (87 loc) · 3 KB
/
rk3308.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
name: Build u-boot for RK3308
run-name: u-boot ${{ inputs.uboot_ref }} for RK3308
on:
workflow_dispatch:
inputs:
uboot_ref:
description: u-boot ref
required: true
default: master
type: string
rkbin_ref:
description: rkbin ref
required: true
default: master
type: string
jobs:
build:
name: ${{ matrix.boards.name }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
boards:
[
{
"name": "rk3308-roc-cc",
"config": "roc-cc-rk3308_defconfig",
"uart": "2",
"iomux": "0",
"baudrate": "1500000",
},
{
"name": "rk3308-rock-pi-s",
"config": "rock-pi-s-rk3308_defconfig",
"uart": "0",
"iomux": "0",
"baudrate": "1500000",
},
{
"name": "rk3308-rock-s0",
"config": "rock-s0-rk3308_defconfig",
"uart": "0",
"iomux": "0",
"baudrate": "1500000",
},
]
steps:
- name: Toolchain
run: |
sudo apt-get update
sudo apt-get install gcc gcc-aarch64-linux-gnu python3-pyelftools confget libgnutls28-dev uuid-dev
- name: Checkout rkbin - ${{ inputs.rkbin_ref }}
uses: actions/checkout@v4
with:
repository: rockchip-linux/rkbin
ref: ${{ inputs.rkbin_ref }}
path: rkbin
- name: Checkout u-boot - ${{ inputs.uboot_ref }}
uses: actions/checkout@v4
with:
repository: Kwiboo/u-boot-rockchip
ref: ${{ inputs.uboot_ref }}
path: u-boot
- name: Build u-boot - ${{ matrix.boards.config }}
id: build
if: ${{ hashFiles(format('u-boot/configs/{0}', matrix.boards.config)) != '' }}
run: |
DDRBIN=$(confget -f rkbin/RKBOOT/RK3308MINIALL.ini -s LOADER_OPTION FlashData)
sed -i 's/uart id=/uart id=${{ matrix.boards.uart }}/' rkbin/tools/ddrbin_param.txt
sed -i 's/uart iomux=/uart iomux=${{ matrix.boards.iomux }}/' rkbin/tools/ddrbin_param.txt
sed -i 's/uart baudrate=/uart baudrate=${{ matrix.boards.baudrate }}/' rkbin/tools/ddrbin_param.txt
rkbin/tools/ddrbin_tool rk3308 rkbin/tools/ddrbin_param.txt rkbin/$DDRBIN
export ROCKCHIP_TPL=../rkbin/$DDRBIN
export BL31=../rkbin/$(confget -f rkbin/RKTRUST/RK3308TRUST.ini -s BL31_OPTION PATH)
cd u-boot
make mrproper
make ${{ matrix.boards.config }}
make KCFLAGS="-Werror" CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc)
tools/mkimage -l u-boot.itb
- name: Upload artifacts
if: ${{ success() && steps.build.conclusion != 'skipped' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.boards.name }}
path: |
u-boot/u-boot-rockchip.bin
u-boot/u-boot-rockchip-spi.bin