Skip to content

Commit

Permalink
瑞芯微机型增加用户预设置拨号功能
Browse files Browse the repository at this point in the history
  • Loading branch information
wukongdaily authored Jan 9, 2025
1 parent a2558b4 commit b755e40
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 46 deletions.
54 changes: 52 additions & 2 deletions .github/workflows/build-rockchip-immortalWrt-23.05.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,53 @@ on:
workflow_dispatch:
inputs:
profile:
type: choice
description: |
输入 软路由型号(用逗号分隔的多个值),可选值如下:
ariaboard_photonicat,armsom_sige3,ezpro_mrkaio-m68s,firefly_roc-rk3328-cc,firefly_roc-rk3568-pc,friendlyarm_nanopc-t4,friendlyarm_nanopi-r2c,friendlyarm_nanopi-r2c-plus,friendlyarm_nanopi-r2s,friendlyarm_nanopi-r4s,friendlyarm_nanopi-r4s-enterprise,friendlyarm_nanopi-r4se,friendlyarm_nanopi-r5c,friendlyarm_nanopi-r5s,huake_guangmiao-g4c,lunzn_fastrhino-r66s,lunzn_fastrhino-r68s,lyt_t68m,pine64_rockpro64,radxa_rock-pi-4a,radxa_rock-pi-e,xunlong_orangepi-r1-plus,xunlong_orangepi-r1-plus-lts
输入 软路由型号 可选值如下:
required: true
options:
- ariaboard_photonicat
- armsom_sige3
- ezpro_mrkaio-m68s
- firefly_roc-rk3328-cc
- firefly_roc-rk3568-pc
- friendlyarm_nanopc-t4
- friendlyarm_nanopi-r2c
- friendlyarm_nanopi-r2c-plus
- friendlyarm_nanopi-r2s
- friendlyarm_nanopi-r4s
- friendlyarm_nanopi-r4s-enterprise
- friendlyarm_nanopi-r4se
- friendlyarm_nanopi-r5c
- friendlyarm_nanopi-r5s
- huake_guangmiao-g4c
- lunzn_fastrhino-r66s
- lunzn_fastrhino-r68s
- lyt_t68m
- pine64_rockpro64
- radxa_rock-pi-4a
- radxa_rock-pi-e
- xunlong_orangepi-r1-plus
- xunlong_orangepi-r1-plus-lts
default: 'friendlyarm_nanopi-r4s'
rootfs_partsize:
description: '设置软件包大小 单位(MB)'
required: true
default: '1024'
enable_pppoe:
description: "是否配置PPPoE拨号信息?"
required: true
default: 'no'
type: choice
options:
- 'yes'
- 'no'
pppoe_account:
description: "宽带账号 (若启用PPPoE)"
required: false
pppoe_password:
description: "宽带密码 (若启用PPPoE)"
required: false

jobs:
build:
Expand All @@ -25,6 +63,15 @@ jobs:
- name: Set executable permissions
run: chmod +x ${{ github.workspace }}/rockchip/23.05.4/build.sh

- name: Validate PPPoE Inputs
run: |
if [[ "${{ inputs.enable_pppoe }}" == "yes" ]]; then
if [[ -z "${{ inputs.pppoe_account }}" || -z "${{ inputs.pppoe_password }}" ]]; then
echo "Error: PPPoE account and password must be provided when PPPoE is enabled!"
exit 1
fi
fi
- name: Building Rockchip ImmortalWrt
run: |
profiles="${{ github.event.inputs.profile }}"
Expand All @@ -43,6 +90,9 @@ jobs:
-v "${{ github.workspace }}/rockchip/23.05.4/build.sh:/home/build/immortalwrt/build.sh" \
-e PROFILE=$profile \
-e ROOTFS_PARTSIZE=$rootfs_partsize \
-e ENABLE_PPPOE=${{ inputs.enable_pppoe }} \
-e PPPOE_ACCOUNT=${{ inputs.pppoe_account }} \
-e PPPOE_PASSWORD=${{ inputs.pppoe_password }} \
immortalwrt/imagebuilder:rockchip-armv8-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh
done
Expand Down
116 changes: 72 additions & 44 deletions .github/workflows/build-rockchip-immortalWrt-24.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,73 @@ on:
workflow_dispatch:
inputs:
profile:
type: choice
description: |
输入 软路由型号(用逗号分隔的多个值),可选值如下:
,ariaboard_photonicat
,armsom_sige3
,armsom_sige7
,cyber_cyber3588-aib
,ezpro_mrkaio-m68s
,firefly_roc-rk3328-cc
,firefly_roc-rk3568-pc
,friendlyarm_nanopc-t4
,friendlyarm_nanopc-t6
,friendlyarm_nanopi-r2c
,friendlyarm_nanopi-r2c-plus
,friendlyarm_nanopi-r2s
,friendlyarm_nanopi-r3s
,friendlyarm_nanopi-r4s
,friendlyarm_nanopi-r4se
,friendlyarm_nanopi-r4s-enterprise
,friendlyarm_nanopi-r5c
,friendlyarm_nanopi-r5s
,friendlyarm_nanopi-r6c
,friendlyarm_nanopi-r6s
,huake_guangmiao-g4c
,lunzn_fastrhino-r66s
,lunzn_fastrhino-r68s
,lyt_t68m
,pine64_rock64
,pine64_rockpro64
,radxa_cm3_io
,radxa_e25
,radxa_rock-3a
,radxa_rock-3b
,radxa_rock-3c
,radxa_rock-5a
,radxa_rock-5b
,radxa_rock-pi-4a
,radxa_rock-pi-e
,radxa_rock-pi-s
,radxa_zero-3e
,radxa_zero-3w
,sinovoip_bpi-r2-pro
,xunlong_orangepi-5
,xunlong_orangepi-5-plus
,xunlong_orangepi-r1-plus
,xunlong_orangepi-r1-plus-lts
输入 软路由型号 可选值如下:
options:
- ariaboard_photonicat
- armsom_sige3
- armsom_sige7
- cyber_cyber3588-aib
- ezpro_mrkaio-m68s
- firefly_roc-rk3328-cc
- firefly_roc-rk3568-pc
- friendlyarm_nanopc-t4
- friendlyarm_nanopc-t6
- friendlyarm_nanopi-r2c
- friendlyarm_nanopi-r2c-plus
- friendlyarm_nanopi-r2s
- friendlyarm_nanopi-r3s
- friendlyarm_nanopi-r4s
- friendlyarm_nanopi-r4se
- friendlyarm_nanopi-r4s-enterprise
- friendlyarm_nanopi-r5c
- friendlyarm_nanopi-r5s
- friendlyarm_nanopi-r6c
- friendlyarm_nanopi-r6s
- huake_guangmiao-g4c
- lunzn_fastrhino-r66s
- lunzn_fastrhino-r68s
- lyt_t68m
- pine64_rock64
- pine64_rockpro64
- radxa_cm3_io
- radxa_e25
- radxa_rock-3a
- radxa_rock-3b
- radxa_rock-3c
- radxa_rock-5a
- radxa_rock-5b
- radxa_rock-pi-4a
- radxa_rock-pi-e
- radxa_rock-pi-s
- radxa_zero-3e
- radxa_zero-3w
- sinovoip_bpi-r2-pro
- xunlong_orangepi-5
- xunlong_orangepi-5-plus
- xunlong_orangepi-r1-plus
- xunlong_orangepi-r1-plus-lts
required: true
default: 'friendlyarm_nanopi-r3s'
rootfs_partsize:
description: '设置软件包大小 单位(MB)'
required: true
default: '1024'
enable_pppoe:
description: "是否配置PPPoE拨号信息?"
required: true
default: 'no'
type: choice
options:
- 'yes'
- 'no'
pppoe_account:
description: "宽带账号 (若启用PPPoE)"
required: false
pppoe_password:
description: "宽带密码 (若启用PPPoE)"
required: false

jobs:
build:
Expand All @@ -66,6 +82,15 @@ jobs:

- name: Set executable permissions
run: chmod +x ${{ github.workspace }}/rockchip/build.sh

- name: Validate PPPoE Inputs
run: |
if [[ "${{ inputs.enable_pppoe }}" == "yes" ]]; then
if [[ -z "${{ inputs.pppoe_account }}" || -z "${{ inputs.pppoe_password }}" ]]; then
echo "Error: PPPoE account and password must be provided when PPPoE is enabled!"
exit 1
fi
fi
- name: Building Rockchip ImmortalWrt
run: |
Expand All @@ -85,6 +110,9 @@ jobs:
-v "${{ github.workspace }}/rockchip/build.sh:/home/build/immortalwrt/build.sh" \
-e PROFILE=$profile \
-e ROOTFS_PARTSIZE=$rootfs_partsize \
-e ENABLE_PPPOE=${{ inputs.enable_pppoe }} \
-e PPPOE_ACCOUNT=${{ inputs.pppoe_account }} \
-e PPPOE_PASSWORD=${{ inputs.pppoe_password }} \
immortalwrt/imagebuilder:rockchip-armv8-openwrt-24.10.0-rc3 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
Expand Down
15 changes: 15 additions & 0 deletions rockchip/23.05.4/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
#!/bin/bash
# Log file for debugging
LOGFILE="/tmp/uci-defaults-log.txt"
echo "Starting 99-custom.sh at $(date)" >> $LOGFILE
# yml 传入的路由器型号 PROFILE
echo "Building for profile: $PROFILE"
# yml 传入的固件大小 ROOTFS_PARTSIZE
echo "Building for ROOTFS_PARTSIZE: $ROOTFS_PARTSIZE"

echo "Create pppoe-settings"
mkdir -p /home/build/immortalwrt/files/etc/config

# 创建pppoe配置文件 yml传入环境变量ENABLE_PPPOE等 写入配置文件 供99-custom.sh读取
cat << EOF > /home/build/immortalwrt/files/etc/config/pppoe-settings
enable_pppoe=${ENABLE_PPPOE}
pppoe_account=${PPPOE_ACCOUNT}
pppoe_password=${PPPOE_PASSWORD}
EOF

echo "cat pppoe-settings"
cat /home/build/immortalwrt/files/etc/config/pppoe-settings


# 输出调试信息
Expand Down
14 changes: 14 additions & 0 deletions rockchip/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
#!/bin/bash
# Log file for debugging
LOGFILE="/tmp/uci-defaults-log.txt"
echo "Starting 99-custom.sh at $(date)" >> $LOGFILE
# yml 传入的路由器型号 PROFILE
echo "Building for profile: $PROFILE"
# yml 传入的固件大小 ROOTFS_PARTSIZE
echo "Building for ROOTFS_PARTSIZE: $ROOTFS_PARTSIZE"

echo "Create pppoe-settings"
mkdir -p /home/build/immortalwrt/files/etc/config

# 创建pppoe配置文件 yml传入环境变量ENABLE_PPPOE等 写入配置文件 供99-custom.sh读取
cat << EOF > /home/build/immortalwrt/files/etc/config/pppoe-settings
enable_pppoe=${ENABLE_PPPOE}
pppoe_account=${PPPOE_ACCOUNT}
pppoe_password=${PPPOE_PASSWORD}
EOF

echo "cat pppoe-settings"
cat /home/build/immortalwrt/files/etc/config/pppoe-settings

# 输出调试信息
echo "$(date '+%Y-%m-%d %H:%M:%S') - Starting build process..."
Expand Down

0 comments on commit b755e40

Please sign in to comment.