Skip to content

Commit c26758b

Browse files
committed
add sample script to build r8125
1 parent beb42bd commit c26758b

File tree

3 files changed

+38
-21
lines changed

3 files changed

+38
-21
lines changed

.github/workflows/build.yml

+6-20
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
if: github.event.repository.owner.id == github.event.sender.id
3232
strategy:
3333
matrix:
34-
VERSION: [21.02, 23.05]
35-
SET: [docker, non-docker]
34+
VERSION: [23.05]
35+
SET: [non-docker]
3636

3737
steps:
3838
- name: Checkout
@@ -141,9 +141,9 @@ jobs:
141141

142142
strategy:
143143
matrix:
144-
VERSION: [21.02, 23.05]
145-
CPU: [rk3328, rk3528, rk3399, rk3566, rk3568, rk3588]
146-
SET: [docker, non-docker]
144+
VERSION: [23.05]
145+
CPU: [rk3568]
146+
SET: [non-docker]
147147
steps:
148148
- name: Checkout
149149
uses: actions/checkout@main
@@ -211,24 +211,9 @@ jobs:
211211
run: |
212212
cd project
213213
case ${{ matrix.CPU }} in
214-
rk3328)
215-
MODEL=R2S-R2C-Series
216-
;;
217-
rk3528)
218-
MODEL=NanoPi-Zero2
219-
;;
220-
rk3399)
221-
MODEL=R4S-Series
222-
;;
223214
rk3568)
224215
MODEL=R5S-R5C-Series
225216
;;
226-
rk3566)
227-
MODEL=R3S-Series
228-
;;
229-
rk3588)
230-
MODEL=T6-R6S-R6C-M6-Series
231-
;;
232217
*)
233218
echo "unknow cpu"
234219
exit 1
@@ -257,6 +242,7 @@ jobs:
257242
cd project
258243
./build.sh uboot
259244
./build.sh kernel
245+
source ../scripts/3rd/add_r8125.sh
260246
261247
- name: Build sd image
262248
id: build_sd_image

scripts/3rd/add_r8125.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
set -eu
3+
top_path=$(pwd)
4+
pushd kernel
5+
kernel_ver=`make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 kernelrelease`
6+
popd
7+
modules_dir=$(readlink -f ./out/output_*_kmodules/lib/modules/${kernel_ver})
8+
[ -d ${modules_dir} ] || {
9+
echo "please build kernel first."
10+
exit 1
11+
}
12+
13+
# fs overlay
14+
config_dir="${top_path}/r8125-3rd/etc/modules.d/"
15+
mkdir ${config_dir} -p
16+
17+
# build kernel driver
18+
git clone https://github.com/zeroday0619/r8125 -b main
19+
(cd r8125 && {
20+
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
21+
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -C ${top_path}/kernel M=$(pwd)
22+
cp *.ko ${modules_dir}/ -afv
23+
})
24+
25+
# load module on boot
26+
echo "r8125" > ${config_dir}/10-r8125
27+
28+
# add overlay to rootfs
29+
if ! grep -q r8125-3rd .current_config.mk; then
30+
echo "FRIENDLYWRT_FILES+=(r8125-3rd)" >> .current_config.mk
31+
fi

scripts/wifi/add_rtl8852be.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ wget https://github.com/armbian/firmware/blob/master/rtl8852bu_fw -O ${firmware_
2525
git clone https://github.com/lwfinger/rtw89.git -b main
2626
(cd rtw89 && {
2727
git reset 38b8a48d04b8440266db6ea730e9b9cf84463981 --hard
28-
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64:$PATH
28+
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
2929

3030
if grep 'symbol:backport' ${modules_dir}/modules.symbols >/dev/null; then
3131
# kernel with backports

0 commit comments

Comments
 (0)