station-m3: move to rockchip-rk3588 family (#6232)

This commit is contained in:
青菜萝 卜冬瓜 2024-02-03 11:07:19 +08:00 committed by GitHub
parent 218f54dc28
commit ccf4206700
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 67 deletions

View File

@ -1,27 +1,30 @@
# Rockchip RK3588s 2GB-16GB GBE eMMC NVMe SATA USB3 WiFi
BOARD_NAME="Station M3"
BOARDFAMILY="media"
BOARD_MAINTAINER="150balbes"
BOOTCONFIG="rk3588_defconfig"
BOARDFAMILY="rockchip-rk3588"
BOARD_MAINTAINER=""
KERNEL_TARGET="legacy"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3588s-roc-pc.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
BOOT_SOC="rk3588"
IMAGE_PARTITION_TABLE="gpt"
declare -g UEFI_EDK2_BOARD_ID="station-m3" # This _only_ used for uefi-edk2-rk3588 extension
function post_family_tweaks__station_m3() {
display_alert "$BOARD" "Installing board tweaks" "info"
cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/
cp -R $SRC/packages/blobs/station/firmware/* $SDCARD/lib/firmware/
if [[ $BRANCH == legacy ]]; then
install -m 755 $SRC/packages/blobs/station/firefly_fan_control $SDCARD/usr/bin/firefly_fan_control
install -m 755 $SRC/packages/blobs/station/firefly-fan-init $SDCARD/usr/bin/firefly-fan-init
install -m 755 $SRC/packages/blobs/station/firefly-fan.service $SDCARD/usr/lib/systemd/system/firefly-fan.service
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable firefly-fan.service >/dev/null 2>&1"
fi
return 0
}
# Override family config for this board; let's avoid conditionals in family config.
function post_family_config__stationm3_use_vendor_uboot() {
BOOTCONFIG="rk3588_defconfig"
BOOTSOURCE='https://github.com/150balbes/u-boot-rk'
BOOTBRANCH='branch:rk3588'
BOOTDIR="u-boot-${BOARD}"
BOOTPATCHDIR="u-boot-station-p2"
}

View File

@ -16,7 +16,7 @@ elif [[ $BOARD == quartz64a || $BOARD == quartz64b ]]; then
BOOTSOURCE='https://github.com/150balbes/u-boot-rk'
BOOTBRANCH='branch:rk35xx'
BOOTPATCHDIR="u-boot-station-p2"
elif [[ $BOARD == station-m3 || $BOARD == khadas-edge2 ]]; then
elif [[ $BOARD == khadas-edge2 ]]; then
BOOTSOURCE='https://github.com/150balbes/u-boot-rk'
BOOTBRANCH='branch:rk3588'
BOOTPATCHDIR="u-boot-station-p2"

View File

@ -1,47 +0,0 @@
#!/usr/bin/env bash
BOARD_VERSION=`cat /sys/firmware/devicetree/base/model | awk -F ' ' {'print $1'}`
RK3588_BOARD_VERSION=`cat /sys/firmware/devicetree/base/model | awk -F ' ' {'print $2'}`
sleep 3
if [ "$BOARD_VERSION" == "CS-R2-3399JD4-MAIN" ]; then
#usb_net power on
echo 1 > /sys/class/leds/HUB30_PWR_EN/brightness
/usr/bin/firefly_fan_control CS-R2-3399JD4-MAIN > /dev/null 2>&1 &
elif [ "$BOARD_VERSION" == "CS-R1-3399JD4-MAIN" ]; then
echo 0 > /sys/class/pwm/pwmchip0/export
/usr/bin/firefly_fan_control CS-R1-3399JD4-MAIN > /dev/null 2>&1 &
while true
do
if [ `cat /sys/class/pwm/pwmchip0/pwm0/enable` == "0" ]; then
sleep 2
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
elif [ `cat /sys/class/pwm/pwmchip0/pwm0/enable` == "1" ]; then
break
fi
done
elif [ "$RK3588_BOARD_VERSION" == "ROC-RK3588S-PC" ]; then
/usr/bin/firefly_fan_control ROC-RK3588S-PC > /dev/null 2>&1 &
elif [ "$RK3588_BOARD_VERSION" == "ITX-3588J" ]; then
/usr/bin/firefly_fan_control ITX-3588J > /dev/null 2>&1 &
elif [ "$RK3588_BOARD_VERSION" == "ROC-RK3588-PC" ]; then
/usr/bin/firefly_fan_control ROC-RK3588-PC > /dev/null 2>&1 &
else
exit 0
fi
while true
do
sleep 0.5
done
exit 0

View File

@ -1,9 +0,0 @@
[Unit]
Description=start firefly-fan service
[Service]
Type=simple
ExecStart=/usr/bin/firefly-fan-init
[Install]
WantedBy=local-fs.target