Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
acnixuil committed Jul 26, 2024
2 parents 8a82514 + 898fc53 commit 3c9c90c
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 13 deletions.
2 changes: 1 addition & 1 deletion files/bootfiles/rockchip/rk3588/h88k-v3/armbianEnv.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
verbosity=7
bootlogo=true
fdtfile=rockchip/rk3588-hlink-h88k-v3.dtb
fdtfile=rockchip/rk3588-hlink-h88k-v31.dtb
rootdev=/dev/mmcblk0p2
rootfstype=btrfs
rootflags=compress=zstd:6
Expand Down
7 changes: 6 additions & 1 deletion files/cpustat
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,17 @@ sub get_dc_voltage() {
my $iio_channel;
my $ret = 0;
my $fh;
if($board =~ m/Hlink H88K/) {
if($board =~ m/Hlink H88K-V3/) {
# 如果显示值与测量值偏差较大,可适当调整 $up_res 及 $down_res 的值
$up_res = 510;
$down_res = 27;
$iio_channel = 6;
$ret = "(Probably) 12";
} elsif($board =~ m/Hlink H88K V3\.1/) {
$up_res = 100;
$down_res = 8.2;
$iio_channel = 6;
$ret = "(Probably) 12";
} elsif($board =~ m/Hlink H6[689]K/) {
$up_res = 300;
$down_res = 27;
Expand Down
8 changes: 8 additions & 0 deletions files/openwrt-update-rockchip
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ case $MYDEVICE_NAME in
fi
SOC="h88k-v3"
;;
"Hlink H88K V3.1")
if [ -n "${CURRENT_FDTFILE}" ] && [ "${CURRENT_FDTFILE}" != "rk3568-hinlink-h88k-v31.dtb" ]; then
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
else
MYDTB_FDTFILE="rk3588-hlink-h88k-v31.dtb"
fi
SOC="h88k-v3"
;;
"HINLINK OWL H88K Board" | "Hlink H88K")
if [ -n "${CURRENT_FDTFILE}" ] && [ "${CURRENT_FDTFILE}" != "rk3568-hinlink-h88k.dtb" ]; then
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
Expand Down
17 changes: 16 additions & 1 deletion files/rk3588/h88k-v3/board.d/01_led
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,22 @@

board_config_update

ucidef_set_led_netdev "wan" "WAN" "blue:net" "eth1"
machine_model=$(cat /proc/device-tree/model|tr -d "\000")

case $machine_model in
"Hlink H88K V3.1")
ucidef_set_led_default "work" "WORK" "red:ai" "1"
ucidef_set_led_netdev "lan1" "LAN1" "green:work" "eth1"
ucidef_set_led_netdev "lan2" "LAN2" "amber:net" "eth2"
ucidef_set_led_netdev "wan" "WAN" "blue:sata" "eth0"
;;
"Hlink H88K-V3")
ucidef_set_led_default "work" "WORK" "red:work" "1"
ucidef_set_led_netdev "lan1" "LAN1" "green:user" "eth0"
ucidef_set_led_netdev "lan2" "LAN2" "amber:sata" "eth1"
ucidef_set_led_netdev "wan" "WAN" "blue:net" "eth2"
;;
esac

board_config_flush

Expand Down
12 changes: 11 additions & 1 deletion files/rk3588/h88k-v3/board.d/99-default_network
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,22 @@ swap_interface()
ip link set dev $eth_b up
}


json_is_a network object && exit 0

# Init LAN and WAN
LAN_MAC=$(generate_mac)
WAN_MAC=$(macaddr_add $LAN_MAC +1)
ucidef_set_interfaces_lan_wan 'eth0 eth1' 'eth2'

machine_model=$(cat /proc/device-tree/model|tr -d "\000")
case $machine_model in
"Hlink H88K V3.1") ucidef_set_interfaces_lan_wan 'eth1 eth2' 'eth0'
;;
"Hlink H88K-V3") ucidef_set_interfaces_lan_wan 'eth0 eth1' 'eth2'
;;
*) ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
;;
esac
ucidef_set_interface_macaddr "lan" $LAN_MAC
ucidef_set_interface_macaddr "wan" $WAN_MAC

Expand Down
Binary file added files/rk3588/h88k-v3/idbloader.img
Binary file not shown.
Binary file not shown.
Binary file added files/rk3588/h88k-v3/u-boot.itb
Binary file not shown.
1 change: 1 addition & 0 deletions files/rk3588/modules.d/usb-serial-option
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
option
8 changes: 4 additions & 4 deletions make.env
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ fi
# KERNEL_VERSION=xxx
# 如果whoami里未定义 KERNEL_VERSION,那么就采用下面的值
if [ "$KERNEL_VERSION" == "" ];then
#KERNEL_VERSION="6.1.99-flippy-91+o"
KERNEL_VERSION="6.6.40-flippy-91+"
#KERNEL_VERSION="6.1.101-flippy-91+o"
KERNEL_VERSION="6.6.42-flippy-91+"
fi

# Rockchip BSP kernel for RK3588 boards
if [ "$RK3588_KERNEL_VERSION" == "" ];then
RK3588_KERNEL_VERSION="5.10.160-rk3588-flippy-2407a"
RK3588_KERNEL_VERSION="5.10.160-rk3588-flippy-2407b"
echo
fi

if [ "$RK35XX_KERNEL_VERSION" == "" ];then
RK35XX_KERNEL_VERSION="5.10.160-rk35xx-flippy-2407a"
RK35XX_KERNEL_VERSION="5.10.160-rk35xx-flippy-2407b"
fi

# 在whoami里可以自定义KERNEL_PKG_HOME
Expand Down
18 changes: 15 additions & 3 deletions mk_rk3588_h88k-v3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ PLATFORM=rockchip
SOC=rk3588
BOARD=h88k-v3

SUBVER=$1
# 默认打包 v3.1 固件,如果需要打包 v3 的,加上 30 参数
case "$1" in
30) SUBVER=".0";;
31) SUBVER=".1";;
*) SUBVER=".1";;
esac

if [ -n "$RK3588_KERNEL_VERSION" ];then
# lock the kernel version
Expand All @@ -34,7 +39,7 @@ OPWRT_ROOTFS_GZ=$(get_openwrt_rootfs_archive ${PWD})
check_file ${OPWRT_ROOTFS_GZ}
echo "Use $OPWRT_ROOTFS_GZ as openwrt rootfs!"

TGT_IMG="${WORK_DIR}/openwrt_${SOC}_${BOARD}_${OPENWRT_VER}_k${KERNEL_VERSION}.img"
TGT_IMG="${WORK_DIR}/openwrt_${SOC}_${BOARD}${SUBVER}_${OPENWRT_VER}_k${KERNEL_VERSION}.img"

# patches、scripts
####################################################################
Expand Down Expand Up @@ -84,7 +89,7 @@ DOCKERD_PATCH="${PWD}/files/dockerd.patch"
FIRMWARE_TXZ="${PWD}/files/firmware_armbian.tar.xz"
BOOTFILES_HOME="${PWD}/files/bootfiles/rockchip/rk3588/h88k-v3"
GET_RANDOM_MAC="${PWD}/files/get_random_mac.sh"
BOOTLOADER_IMG="${PWD}/files/rk3588/h88k/rk3588-h88k-bootloader.bin"
BOOTLOADER_IMG="${PWD}/files/rk3588/h88k-v3/bootloader.bin"

# 20210618 add
DOCKER_README="${PWD}/files/DockerReadme.pdf"
Expand Down Expand Up @@ -142,6 +147,13 @@ cd $TGT_BOOT
sed -e '/rootdev=/d' -i armbianEnv.txt
sed -e '/rootfstype=/d' -i armbianEnv.txt
sed -e '/rootflags=/d' -i armbianEnv.txt
sed -e '/fdtfile=/d' -i armbianEnv.txt
case $SUBVER in
".0") echo "fdtfile=rockchip/rk3588-hlink-h88k-v3.dtb" >> armbianEnv.txt
;;
".1") echo "fdtfile=rockchip/rk3588-hlink-h88k-v31.dtb" >> armbianEnv.txt
;;
esac
cat >> armbianEnv.txt <<EOF
rootdev=UUID=${ROOTFS_UUID}
rootfstype=btrfs
Expand Down
2 changes: 0 additions & 2 deletions public_funcs
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,6 @@ function adjust_kernel_env() {
if [ $ENABLE_WIFI_K510 -eq 0 ];then
echo "禁用了 brcmfmac 内置无线网卡驱动, 如需开启, 请设置 ENABLE_WIFI_K510=1 并重新打包"
mv -f ./etc/modules.d/brcm* ./etc/modules.d.remove/ 2>/dev/null
rm -f ./etc/config/wireless
else
echo "brcmfmac" > ./etc/modules.d/brcmfmac
echo "brcmutil" > ./etc/modules.d/brcmutil
Expand All @@ -1785,7 +1784,6 @@ rm -f ./etc/config/wireless
if [ $ENABLE_WIFI_K504 -eq 0 ];then
echo "禁用了 brcmfmac 内置无线网卡驱动, 如需开启, 请设置 ENABLE_WIFI_K504=1 并重新打包"
mv -f ./etc/modules.d/brcm* ./etc/modules.d.remove/ 2>/dev/null
rm -f ./etc/config/wireless
else
echo "brcmfmac" > ./etc/modules.d/brcmfmac
echo "brcmutil" > ./etc/modules.d/brcmutil
Expand Down

0 comments on commit 3c9c90c

Please sign in to comment.