Skip to content

Commit

Permalink
Add h28k(rk3528) support
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Sep 23, 2023
1 parent 7756fce commit 598dd84
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/packaging-openwrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ on:
- h69k-max
- h88k
- h88k-v3
- h28k
- l1pro
- photonicat
- qemu
Expand Down
7 changes: 4 additions & 3 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

查看英文说明 | [View English description](README.md)

[unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit)`Flippy` 开发的 OpenWrt 打包脚本仓库。支持全志(微加云)、瑞芯微(贝壳云,我家云,电犀牛R66S/R68S,恒领H88K/H66K/H68K/H69K,瑞莎5B/E25),以及晶晨 S9xxx 系列型号如 S905x3、S905x2、S922x、S905x、S905d,S905,S912 等设备。
[unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit)`Flippy` 开发的 OpenWrt 打包脚本仓库。支持全志(微加云)、瑞芯微(贝壳云,我家云,电犀牛R66S/R68S,恒领H88K/H66K/H68K/H69K/H28K,瑞莎5B/E25),以及晶晨 S9xxx 系列型号如 S905x3、S905x2、S922x、S905x、S905d,S905,S912 等设备。

此 Actions 使用他的打包脚本,未做任何修改,仅进行了智能化 Action 应用开发,让使用 github Actions 打包时变得更加简单化和个性化。

Expand Down Expand Up @@ -33,7 +33,7 @@
| KERNEL_REPO_URL | breakings/OpenWrt | 设置内核下载仓库的 `<owner>/<repo>`,默认从 breakings 维护的[内核 Releases](https://github.com/breakings/OpenWrt/releases/tag/kernel_stable)里下载。 |
| KERNEL_VERSION_NAME | 6.1.1_5.15.1 | 设置[内核版本](https://github.com/breakings/OpenWrt/releases/tag/kernel_stable),可以查看并选择指定。可指定单个内核如 `6.1.1` ,可选择多个内核用`_`连接如 `6.1.1_5.15.1` |
| KERNEL_AUTO_LATEST | true | 设置是否自动采用同系列最新版本内核。当为 `true` 时,将自动在内核库中查找在 `KERNEL_VERSION_NAME` 中指定的内核如 `6.1.1` 的同系列是否有更新的版本,如有更新版本时,将自动更换为最新版。设置为 `false` 时将编译指定版本内核。 |
| PACKAGE_SOC | all | 设置打包盒子的 `SOC` ,默认 `all` 打包全部盒子,可指定单个盒子如 `s905x3` ,可选择多个盒子用`_`连接如 `s905x3_s905d` 。各盒子的SoC代码为:`vplus`, `cm3`, `beikeyun`, `l1pro`, `rock5b`, `h88k`, `h88k-v3`, `ak88`, `r66s`, `r68s`, `h66k`, `h68k`, `h69k`, `h69k-max`, `e25`, `photonicat`, `s905`, `s905d`, `s905x2`, `s905x3`, `s912`, `s922x`, `s922x-n2`, `qemu`, `diy`。说明:`s922x-n2` 是 `s922x-odroid-n2`, `diy` 是自定义盒子。 |
| PACKAGE_SOC | all | 设置打包盒子的 `SOC` ,默认 `all` 打包全部盒子,可指定单个盒子如 `s905x3` ,可选择多个盒子用`_`连接如 `s905x3_s905d` 。各盒子的SoC代码为:`vplus`, `cm3`, `beikeyun`, `l1pro`, `rock5b`, `h88k`, `h88k-v3`, `ak88`, `h28k`, `r66s`, `r68s`, `h66k`, `h68k`, `h69k`, `h69k-max`, `e25`, `photonicat`, `s905`, `s905d`, `s905x2`, `s905x3`, `s912`, `s922x`, `s922x-n2`, `qemu`, `diy`。说明:`s922x-n2` 是 `s922x-odroid-n2`, `diy` 是自定义盒子。 |
| GZIP_IMGS | auto | 设置打包完毕后文件压缩的格式,可选值 `.gz`(默认) / `.xz` / `.zip` / `.zst` / `.7z` |
| SELECT_PACKITPATH | openwrt_packit | 设置 `/opt` 下的打包目录名称 |
| SELECT_OUTPUTPATH | output | 设置 `${SELECT_PACKITPATH}` 目录中固件输出的目录名称 |
Expand All @@ -43,7 +43,8 @@
| SCRIPT_L1PRO | mk_rk3328_l1pro.sh | 设置打包 `rk3328 l1pro` 的脚本文件名 |
| SCRIPT_ROCK5B | mk_rk3588_rock5b.sh | 设置打包 `rk3588 rock5b` 的脚本文件名 |
| SCRIPT_H88K | mk_rk3588_h88k.sh | 设置打包 `rk3588 h88k/ak88` 的脚本文件名 |
| SCRIPT_H88KV3 | mk_rk3588_h88k-v3.sh | 设置打包 `rk3588 h88k-v3` 的脚本文件名 |
| SCRIPT_H88KV3 | mk_rk3588_h88k-v3.sh | 设置打包 `rk3588 h88k-v3` 的脚本文件名 |
| SCRIPT_H28K | mk_rk3528_h28k.sh | 设置打包 `rk3588 h28k` 的脚本文件名 |
| SCRIPT_R66S | mk_rk3568_r66s.sh | 设置打包 `rk3568 r66s` 的脚本文件名 |
| SCRIPT_R68S | mk_rk3568_r68s.sh | 设置打包 `rk3568 r68s` 的脚本文件名 |
| SCRIPT_H66K | mk_rk3568_h66k.sh | 设置打包 `rk3568 h66k` 的脚本文件名 |
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

View Chinese description | [查看中文说明](README.cn.md)

[unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) is an OpenWrt packaging script repository developed by `Flippy`. It supports Allwinner (VPlus), Rockchip (BeikeYun, Chainedbox-L1-Pro, FastRhino-R66S/R68S, Hinlink-H88K/H66K/H68K/H69K, Radxa-5B/E25), and Amlogic S9xxx series models such as S905x3, S905x2, S922x, S905x, S905d, S905, S912, etc.
[unifreq/openwrt_packit](https://github.com/unifreq/openwrt_packit) is an OpenWrt packaging script repository developed by `Flippy`. It supports Allwinner (VPlus), Rockchip (BeikeYun, Chainedbox-L1-Pro, FastRhino-R66S/R68S, HLink-H88K/H66K/H68K/H69K/H28K, Radxa-5B/E25), and Amlogic S9xxx series models such as S905x3, S905x2, S922x, S905x, S905d, S905, S912, etc.

This Actions uses his packaging scripts without any modification, only developed into a smart Action application, making the use of github Actions for packaging simpler and more personalized.

Expand Down Expand Up @@ -33,7 +33,7 @@ Based on the latest kernel packaging scripts released by `Flippy`, optional para
| KERNEL_REPO_URL | breakings/OpenWrt | Set `<owner>/<repo>` of the kernel download repository, it downloads from the [kernel Releases](https://github.com/breakings/OpenWrt/releases/tag/kernel_stable) maintained by breakings by default. |
| KERNEL_VERSION_NAME | 6.1.1_5.15.1 | Set the [Kernel version](https://github.com/breakings/OpenWrt/releases/tag/kernel_stable), you can check and select a specific one. You can specify a single kernel such as `6.1.1`, or select multiple kernels connected with `_` like `6.1.1_5.15.1` |
| KERNEL_AUTO_LATEST | true | Set whether to automatically adopt the latest version kernel of the same series. When set to `true`, it will automatically look for whether there is an updated version of the kernel specified in `KERNEL_VERSION_NAME`, such as `6.1.1`, in the kernel library, and if there is an updated version, it will automatically replace it with the latest version. When set to `false`, it will compile the specified version kernel. |
| PACKAGE_SOC | all | Set the `SOC` of the package box, the default is `all` to package all boxes, you can specify a single box like `s905x3`, or select multiple boxes connected with `_` like `s905x3_s905d`. The SoC codes for each box are: `vplus`, `cm3`, `beikeyun`, `l1pro`, `rock5b`, `h88k`, `h88k-v3`, `ak88`, `r66s`, `r68s`, `h66k`, `h68k`, `h69k`, `h69k-max`, `e25`, `photonicat`, `s905`, `s905d`, `s905x2`, `s905x3`, `s912`, `s922x`, `s922x-n2`, `qemu`, `diy`. Note: `s922x-n2` is `s922x-odroid-n2`, `diy` is a custom box. |
| PACKAGE_SOC | all | Set the `SOC` of the package box, the default is `all` to package all boxes, you can specify a single box like `s905x3`, or select multiple boxes connected with `_` like `s905x3_s905d`. The SoC codes for each box are: `vplus`, `cm3`, `beikeyun`, `l1pro`, `rock5b`, `h88k`, `h88k-v3`, `ak88`, `h28k`, `r66s`, `r68s`, `h66k`, `h68k`, `h69k`, `h69k-max`, `e25`, `photonicat`, `s905`, `s905d`, `s905x2`, `s905x3`, `s912`, `s922x`, `s922x-n2`, `qemu`, `diy`. Note: `s922x-n2` is `s922x-odroid-n2`, `diy` is a custom box. |
| GZIP_IMGS | auto | Set the format of the file compression after packaging, optional values are `.gz` (default) / `.xz` / `.zip` / `.zst` / `.7z` |
| SELECT_PACKITPATH | openwrt_packit | Set the name of the packaging directory under `/opt` |
| SELECT_OUTPUTPATH | output | Set the name of the firmware output directory in the `${SELECT_PACKITPATH}` directory |
Expand All @@ -44,6 +44,7 @@ Based on the latest kernel packaging scripts released by `Flippy`, optional para
| SCRIPT_ROCK5B | mk_rk3588_rock5b.sh | Set the script filename for packaging `rk3588 rock5b` |
| SCRIPT_H88K | mk_rk3588_h88k.sh | Set the script filename for packaging `rk3588 h88k/ak88` |
| SCRIPT_H88KV3 | mk_rk3588_h88k-v3.sh | Set the script filename for packaging `rk3588 h88k-v3` |
| SCRIPT_H28K | mk_rk3528_h28k.sh | Set the script filename for packaging `rk3528 h28k` |
| SCRIPT_R66S | mk_rk3568_r66s.sh | Set the script filename for packaging `rk3568 r66s` |
| SCRIPT_R68S | mk_rk3568_r68s.sh | Set the script filename for packaging `rk3568 r68s` |
| SCRIPT_H66K | mk_rk3568_h66k.sh | Set the script filename for packaging `rk3568 h66k` |
Expand Down
31 changes: 25 additions & 6 deletions openwrt_flippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ PACKAGE_FILE="openwrt-armvirt-64-generic-rootfs.tar.gz"
# Set the list of supported device
PACKAGE_OPENWRT=(
"rock5b" "h88k" "h88k-v3" "ak88"
"h28k"
"r66s" "r68s" "h66k" "h68k" "h69k" "h69k-max" "e25" "photonicat" "cm3"
"beikeyun" "l1pro"
"vplus"
Expand All @@ -38,17 +39,20 @@ PACKAGE_OPENWRT=(
)
# Set the list of devices using the [ rk3588 ] kernel
PACKAGE_OPENWRT_RK3588=("rock5b" "h88k" "h88k-v3" "ak88")
# Set the list of devices using the [ rk35xx ] kernel
PACKAGE_OPENWRT_RK35XX=("h28k")
# Set the list of devices using the [ 6.x.y ] kernel
PACKAGE_OPENWRT_KERNEL6=("r66s" "r68s" "h66k" "h68k" "h69k" "h69k-max" "e25" "photonicat" "cm3")
# All are packaged by default, and independent settings are supported, such as: [ s905x3_s905d_rock5b ]
PACKAGE_SOC_VALUE="all"

# Set the default packaged kernel download repository
KERNEL_REPO_URL_VALUE="breakings/OpenWrt"
# Set kernel tag: kernel_stable, kernel_rk3588
KERNEL_TAGS=("stable" "rk3588")
# Set kernel tag: kernel_stable, kernel_rk3588, kernel_rk35xx
KERNEL_TAGS=("stable" "rk3588" "rk35xx")
STABLE_KERNEL=("6.1.1" "5.15.1")
RK3588_KERNEL=("5.10.110")
RK3588_KERNEL=("5.10.160")
RK35XX_KERNEL=("5.10.160")
KERNEL_AUTO_LATEST_VALUE="true"

# Set the working directory under /opt
Expand All @@ -72,6 +76,7 @@ SCRIPT_PHOTONICAT_FILE="mk_rk3568_photonicat.sh"
SCRIPT_ROCK5B_FILE="mk_rk3588_rock5b.sh"
SCRIPT_H88K_FILE="mk_rk3588_h88k.sh"
SCRIPT_H88KV3_FILE="mk_rk3588_h88k-v3.sh"
SCRIPT_H28K_FILE="mk_rk3528_h28k.sh"
SCRIPT_S905_FILE="mk_s905_mxqpro+.sh"
SCRIPT_S905D_FILE="mk_s905d_n1.sh"
SCRIPT_S905X2_FILE="mk_s905x2_x96max.sh"
Expand Down Expand Up @@ -143,6 +148,7 @@ init_var() {
[[ -n "${SCRIPT_ROCK5B}" ]] || SCRIPT_ROCK5B="${SCRIPT_ROCK5B_FILE}"
[[ -n "${SCRIPT_H88K}" ]] || SCRIPT_H88K="${SCRIPT_H88K_FILE}"
[[ -n "${SCRIPT_H88KV3}" ]] || SCRIPT_H88KV3="${SCRIPT_H88KV3_FILE}"
[[ -n "${SCRIPT_H28K}" ]] || SCRIPT_H28K="${SCRIPT_H28K_FILE}"
[[ -n "${SCRIPT_S905}" ]] || SCRIPT_S905="${SCRIPT_S905_FILE}"
[[ -n "${SCRIPT_S905D}" ]] || SCRIPT_S905D="${SCRIPT_S905D_FILE}"
[[ -n "${SCRIPT_S905X2}" ]] || SCRIPT_S905X2="${SCRIPT_S905X2_FILE}"
Expand Down Expand Up @@ -177,6 +183,8 @@ init_var() {
for kt in "${PACKAGE_OPENWRT[@]}"; do
if [[ " ${PACKAGE_OPENWRT_RK3588[@]} " =~ " ${kt} " ]]; then
KERNEL_TAGS_TMP+=("rk3588")
elif [[ " ${PACKAGE_OPENWRT_RK35XX[@]} " =~ " ${kt} " ]]; then
KERNEL_TAGS_TMP+=("rk35xx")
else
KERNEL_TAGS_TMP+=("stable")
fi
Expand Down Expand Up @@ -263,6 +271,8 @@ query_kernel() {
# Select the corresponding kernel directory and list
if [[ "${vb}" == "rk3588" ]]; then
down_kernel_list=(${RK3588_KERNEL[@]})
elif [[ "${vb}" == "rk35xx" ]]; then
down_kernel_list=(${RK35XX_KERNEL[@]})
else
down_kernel_list=(${STABLE_KERNEL[@]})
fi
Expand Down Expand Up @@ -303,11 +313,12 @@ query_kernel() {

# Reset the kernel array to the latest kernel version
if [[ "${vb}" == "rk3588" ]]; then
unset RK3588_KERNEL
RK3588_KERNEL=(${TMP_ARR_KERNELS[@]})
echo -e "${INFO} The latest version of the rk3588 kernel: [ ${RK3588_KERNEL[@]} ]"
elif [[ "${vb}" == "rk35xx" ]]; then
RK35XX_KERNEL=(${TMP_ARR_KERNELS[@]})
echo -e "${INFO} The latest version of the rk35xx kernel: [ ${RK35XX_KERNEL[@]} ]"
else
unset STABLE_KERNEL
STABLE_KERNEL=(${TMP_ARR_KERNELS[@]})
echo -e "${INFO} The latest version of the stable kernel: [ ${STABLE_KERNEL[@]} ]"
fi
Expand Down Expand Up @@ -346,6 +357,8 @@ download_kernel() {
# Set the kernel download list
if [[ "${vb}" == "rk3588" ]]; then
down_kernel_list=(${RK3588_KERNEL[@]})
elif [[ "${vb}" == "rk35xx" ]]; then
down_kernel_list=(${RK35XX_KERNEL[@]})
else
down_kernel_list=(${STABLE_KERNEL[@]})
fi
Expand Down Expand Up @@ -395,9 +408,12 @@ make_openwrt() {
if [[ -n "$(echo "${PACKAGE_OPENWRT_RK3588[@]}" | grep -w "${PACKAGE_VAR}")" ]]; then
build_kernel=(${RK3588_KERNEL[@]})
vb="rk3588"
elif [[ -n "$(echo "${PACKAGE_OPENWRT_RK35XX[@]}" | grep -w "${PACKAGE_VAR}")" ]]; then
build_kernel=(${RK35XX_KERNEL[@]})
vb="rk35xx"
else
build_kernel=(${STABLE_KERNEL[@]})
vb="$(echo "${KERNEL_TAGS[@]}" | sed -e "s|rk3588||" | xargs)"
vb="stable"
fi

k="1"
Expand Down Expand Up @@ -426,6 +442,7 @@ make_openwrt() {
boot_kernel_file="$(ls boot-${kernel_var}* 2>/dev/null | head -n 1)"
KERNEL_VERSION="${boot_kernel_file:5:-7}"
[[ "${vb}" == "rk3588" ]] && RK3588_KERNEL_VERSION="${KERNEL_VERSION}" || RK3588_KERNEL_VERSION=""
[[ "${vb}" == "rk35xx" ]] && RK35XX_KERNEL_VERSION="${KERNEL_VERSION}" || RK35XX_KERNEL_VERSION=""
echo -e "${STEPS} (${i}.${k}) Start packaging OpenWrt: [ ${PACKAGE_VAR} ], Kernel directory: [ ${vb} ], Kernel version: [ ${KERNEL_VERSION} ]"
echo -e "${INFO} Remaining space is ${now_remaining_space}G. \n"

Expand All @@ -445,6 +462,7 @@ make_openwrt() {
WHOAMI="${WHOAMI}"
OPENWRT_VER="${OPENWRT_VER}"
RK3588_KERNEL_VERSION="${RK3588_KERNEL_VERSION}"
RK35XX_KERNEL_VERSION="${RK35XX_KERNEL_VERSION}"
KERNEL_VERSION="${KERNEL_VERSION}"
KERNEL_PKG_HOME="/opt/kernel"
SW_FLOWOFFLOAD="${SW_FLOWOFFLOAD}"
Expand Down Expand Up @@ -475,6 +493,7 @@ EOF
ak88) [[ -f "${SCRIPT_H88K}" ]] && sudo ./${SCRIPT_H88K} ;;
h88k) [[ -f "${SCRIPT_H88K}" ]] && sudo ./${SCRIPT_H88K} "25" ;;
h88k-v3) [[ -f "${SCRIPT_H88KV3}" ]] && sudo ./${SCRIPT_H88KV3} ;;
h28k) [[ -f "${SCRIPT_H28K}" ]] && sudo ./${SCRIPT_H28K} ;;
e25) [[ -f "${SCRIPT_E25}" ]] && sudo ./${SCRIPT_E25} ;;
photonicat) [[ -f "${SCRIPT_PHOTONICAT}" ]] && sudo ./${SCRIPT_PHOTONICAT} ;;
s905) [[ -f "${SCRIPT_S905}" ]] && sudo ./${SCRIPT_S905} ;;
Expand Down

0 comments on commit 598dd84

Please sign in to comment.