[ rockchip64] second round config migration (#4982)

* [ rockchip64] second round config migration

Recommend all @armbian/boards-rockchip  maintainers double check the resulting configurations, as stated in the PR the level of confusion in the family config logic likely means some boards have unnecessary extra stuff.
This commit is contained in:
Tony 2023-03-21 10:40:22 -04:00 committed by GitHub
parent 7be216f4b5
commit 915bd66187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 574 additions and 42 deletions

View File

@ -9,3 +9,20 @@ BOOT_FDT_FILE="rockchip/rk3399-firefly.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS2,1500000 console=tty0"
#ASOUND_STATE="asound.state.station-p1"
function post_family_tweaks_bsp__firefly-rk3399_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
# need to swap chips in the service
sed -i s%BCM4345C5%BCM4356A2%g $destination/lib/systemd/system/rk3399-bluetooth.service
fi
return 0
}

View File

@ -9,3 +9,20 @@ BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3399-nanopc-t4.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS2,1500000 console=tty0"
function post_family_tweaks_bsp__nanopc-t4_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
# need to swap chips in the service
sed -i s%BCM4345C5%BCM4356A2%g $destination/lib/systemd/system/rk3399-bluetooth.service
fi
return 0
}

View File

@ -8,3 +8,20 @@ MODULES_BLACKLIST="rockchipdrm analogix_dp dw_mipi_dsi dw_hdmi gpu_sched lima ha
HAS_VIDEO_OUTPUT="no"
BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
function post_family_tweaks_bsp__nanopi-r4s_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
# need to swap chips in the service
sed -i s%BCM4345C5%BCM4356A2%g $destination/lib/systemd/system/rk3399-bluetooth.service
fi
return 0
}

View File

@ -21,6 +21,13 @@ function post_family_tweaks__m4() {
function post_family_tweaks_bsp__M4() {
display_alert "Installing BSP firmware and fixups"
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
# Swap out the chip for some boards
sed -i s%BCM4345C5%BCM4356A2%g $destination/lib/systemd/system/rk3399-bluetooth.service
# Fan support
cp $SRC/packages/bsp/nanopim4/nanopim4-pwm-fan.service $destination/lib/systemd/system/
install -m 755 $SRC/packages/bsp/nanopim4/nanopim4-pwm-fan.sh $destination/usr/bin/nanopim4-pwm-fan.sh

View File

@ -18,9 +18,17 @@ function post_family_tweaks__m4v2() {
function post_family_tweaks_bsp__M4V2() {
display_alert "Installing BSP firmware and fixups"
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
# Swap out the chip for some boards
sed -i s%BCM4345C5%BCM4356A2%g $destination/lib/systemd/system/rk3399-bluetooth.service
# Fan support
cp $SRC/packages/bsp/nanopim4/nanopim4-pwm-fan.service $destination/lib/systemd/system/
install -m 755 $SRC/packages/bsp/nanopim4/nanopim4-pwm-fan.sh $destination/usr/bin/nanopim4-pwm-fan.sh
return 0
}

View File

@ -5,3 +5,20 @@ BOOTCONFIG="nanopi-neo4-rk3399_defconfig"
KERNEL_TARGET="legacy,current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
function post_family_tweaks_bsp__nanopineo4_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
# need to swap chips in the service
sed -i s%BCM4345C5%BCM4356A2%g $destination/lib/systemd/system/rk3399-bluetooth.service
fi
return 0
}

View File

@ -9,3 +9,17 @@ HAS_VIDEO_OUTPUT="no"
DEFAULT_CONSOLE="serial"
SERIALCON="ttyS0,ttyGS0"
KERNEL_TARGET="current,edge"
function post_family_tweaks_bsp__orangepi-r1_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -48,6 +48,14 @@ cat <<- EOF > "${destination}"/etc/armbian-leds.conf
invert=0
EOF
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
# add a network rule to work-around Debian issues with two NICs on one network.
mkdir -p "${destination}"/etc/udev/rules.d/
cat <<- EOF > "${destination}"/etc/udev/rules.d/70-rename-lan.rules
@ -60,3 +68,4 @@ cat <<- EOF > "${destination}"/etc/udev/rules.d/70-rename-lan.rules
RUN+="/usr/sbin/ip link set lan0 up"
EOF
}

View File

@ -17,5 +17,19 @@ function post_family_tweaks__opi-r1plus_rename_USB_LAN() {
mkdir -p $SDCARD/etc/udev/rules.d/
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8152", KERNEL=="eth1", NAME="lan0"' > $SDCARD/etc/udev/rules.d/70-rename-lan.rules
return 0
}
function post_family_tweaks_bsp__orangepi-r1plus_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -5,3 +5,20 @@ BOOTCONFIG="orangepi-rk3399_defconfig"
KERNEL_TARGET="legacy,current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
function post_family_tweaks_bsp__orangepi-rk3399_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
# need to swap chips in the service
sed -i s%BCM4345C5%BCM4356A2%g $destination/lib/systemd/system/rk3399-bluetooth.service
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi"
BOARDFAMILY="sun7i"
BOOTCONFIG="Orangepi_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepi_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi 2"
BOARDFAMILY="sun8i"
BOOTCONFIG="orangepi_2_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepi2_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -6,3 +6,17 @@ KERNEL_TARGET="current,edge"
MODULES="sprdbt_tty sprdwl_ng"
MODULES_BLACKLIST_LEGACY="bcmdhd"
ATFBRANCH="tag:v2.2"
function post_family_tweaks_bsp__orangepi3-lts_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -5,3 +5,17 @@ BOOTCONFIG="orangepi_3_defconfig"
KERNEL_TARGET="legacy,current,edge"
FULL_DESKTOP="yes"
ATFBRANCH="tag:v2.2"
function post_family_tweaks_bsp__orangepi3_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -17,6 +17,14 @@ BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
function post_family_tweaks_bsp__OPi4lts() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
# Bluetooth on orangepi 4 LTS board is handled by a Spreadtrum (sprd) chip and requires
# a custom hciattach_opi binary, plus a systemd service to run it at boot time
install -m 755 $SRC/packages/bsp/rk3399/hciattach_opi $destination/usr/bin
@ -24,3 +32,4 @@ function post_family_tweaks_bsp__OPi4lts() {
return 0
}

View File

@ -8,3 +8,17 @@ ASOUND_STATE="asound.state.rt5651"
BOOT_LOGO="desktop"
BOOTBRANCH_BOARD="tag:v2022.04"
BOOTPATCHDIR="u-boot-rockchip64-v2022.04"
function post_family_tweaks_bsp__orangepi4_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -23,9 +23,23 @@ function post_family_tweaks__orangepi5_enable_usb2_service() {
return 0
}
function post_family_tweaks_bsp__orangepi5_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}
# Override family config for this board; let's avoid conditionals in family config.
function post_family_config__orangepi5_use_vendor_uboot() {
BOOTSOURCE='https://github.com/orangepi-xunlong/u-boot-orangepi.git'
BOOTBRANCH='branch:v2017.09-rk3588'
BOOTPATCHDIR="legacy"
}

View File

@ -6,3 +6,16 @@ MODULES_LEGACY="g_serial"
MODULES_CURRENT="g_serial"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepilite_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi Lite 2"
BOARDFAMILY="sun50iw6"
BOOTCONFIG="orangepi_lite2_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepilite2_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi Mini"
BOARDFAMILY="sun7i"
BOOTCONFIG="Orangepi_mini_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepimini_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi One"
BOARDFAMILY="sun8i"
BOOTCONFIG="orangepi_one_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepione_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -4,3 +4,17 @@ BOARDFAMILY="sun50iw6"
BOOTCONFIG="orangepi_one_plus_defconfig"
KERNEL_TARGET="legacy,current,edge"
ATFBRANCH="tag:v2.2"
function post_family_tweaks_bsp__orangepioneplus_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi PC"
BOARDFAMILY="sun8i"
BOOTCONFIG="orangepi_pc_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepipc_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -4,3 +4,17 @@ BOARDFAMILY="sun50iw2"
BOOTCONFIG="orangepi_pc2_defconfig"
KERNEL_TARGET="legacy,current,edge"
FULL_DESKTOP="yes"
function post_family_tweaks_bsp__orangepipc2_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi PC +"
BOARDFAMILY="sun8i"
BOOTCONFIG="orangepi_pc_plus_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepipcplus_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi+"
BOARDFAMILY="sun8i"
BOOTCONFIG="orangepi_plus_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepiplus_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -4,3 +4,17 @@ BOARDFAMILY="sun8i"
BOOTCONFIG="orangepi_plus2e_defconfig"
KERNEL_TARGET="legacy,current,edge"
FULL_DESKTOP="yes"
function post_family_tweaks_bsp__orangepiplus2e_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -5,3 +5,17 @@ BOOTCONFIG="orangepi_prime_defconfig"
DEFAULT_OVERLAYS="analog-codec"
KERNEL_TARGET="legacy,current,edge"
FULL_DESKTOP="yes"
function post_family_tweaks_bsp__orangepiprime_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -3,3 +3,17 @@ BOARD_NAME="Orange Pi Win"
BOARDFAMILY="sun50iw1"
BOOTCONFIG="orangepi_win_defconfig"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepiwin_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -9,3 +9,17 @@ DEFAULT_CONSOLE="serial"
HAS_VIDEO_OUTPUT="no"
SERIALCON="ttyS0,ttyGS0"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepizero_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -10,3 +10,17 @@ SERIALCON="ttyS0"
KERNEL_TARGET="legacy,current,edge"
PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools"
FORCE_BOOTSCRIPT_UPDATE="yes"
function post_family_tweaks_bsp__orangepizero2_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -9,3 +9,17 @@ SERIALCON="ttyS0,ttyGS0"
DEFAULT_OVERLAYS="usbhost2 usbhost3"
HAS_VIDEO_OUTPUT="no"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepizeroplus_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -7,3 +7,17 @@ MODULES_CURRENT="g_serial"
DEFAULT_OVERLAYS="usbhost2 usbhost3"
SERIALCON="ttyS0,ttyGS0"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepizeroplus2_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -8,3 +8,17 @@ DEFAULT_OVERLAYS="gpio-regulator-1.3v usbhost2 usbhost3"
HAS_VIDEO_OUTPUT="no"
SERIALCON="ttyS0,ttyGS0"
KERNEL_TARGET="legacy,current,edge"
function post_family_tweaks_bsp__orangepizeroplus2-h5_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -8,3 +8,17 @@ BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3399-rock-pi-4b.dtb"
BOOT_SUPPORT_SPI=yes
DDR_BLOB="rk33/rk3399_ddr_933MHz_v1.20.bin"
function post_family_tweaks_bsp__rockpi-4b_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -7,3 +7,17 @@ FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3399-rock-pi-4c.dtb"
BOOT_SUPPORT_SPI=yes
function post_family_tweaks_bsp__rockpi-4c_BSP() {
display_alert "Installing BSP firmware and fixups"
if [[ $BRANCH == legacy ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
fi
return 0
}

View File

@ -10,3 +10,18 @@ SRC_EXTLINUX="yes"
SERIALCON="ttyS0,tty0"
SRC_CMDLINE="console=ttyS2,1500000 console=tty0"
ASOUND_STATE="asound.state.station-m1"
function post_family_tweaks__station_m1() {
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/bsp/rk3328/m1/rtk_hciattach $SDCARD/usr/bin/rtk_hciattach
sed -e 's/exit 0//g' -i $SDCARD/etc/rc.local
echo "su -c '/usr/bin/rtk_hciattach -n -s 115200 /dev/ttyS2 rtk_h5 &'" >> $SDCARD/etc/rc.local
echo "exit 0" >> $SDCARD/etc/rc.local
fi
return 0
}

View File

@ -10,3 +10,12 @@ SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
ASOUND_STATE="asound.state.station-m2"
IMAGE_PARTITION_TABLE="gpt"
function post_family_tweaks__station_m2() {
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/
return 0
}

View File

@ -9,3 +9,18 @@ BOOT_FDT_FILE="rockchip/rk3588s-roc-pc.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
IMAGE_PARTITION_TABLE="gpt"
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
}

View File

@ -10,3 +10,12 @@ BOOT_SUPPORT_SPI=yes
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS2,1500000 console=tty0"
ASOUND_STATE="asound.state.station-p1"
function post_family_tweaks__station_p1() {
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/
return 0
}

View File

@ -10,3 +10,12 @@ SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
ASOUND_STATE="asound.state.station-p2"
IMAGE_PARTITION_TABLE="gpt"
function post_family_tweaks__station_p2() {
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/
return 0
}

View File

@ -6,3 +6,24 @@ BOOT_FDT_FILE="rockchip/rk3328-z28pro.dtb"
KERNEL_TARGET="legacy,current"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
function post_family_tweaks__z28pro() {
display_alert "$BOARD" "Installing board tweaks" "info"
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable z28pro-bluetooth.service >/dev/null 2>&1"
return 0
}
function post_family_tweaks_bsp__z28pro_BSP() {
display_alert "Installing BSP firmware and fixups"
mkdir -p $destination/usr/local/bin
# Bluetooth for Z28 PRO
install -m 755 $SRC/packages/bsp/rk3328/z28pro/8822b_hciattach $destination/usr/bin
install -m 755 $SRC/packages/bsp/rk3328/z28pro/start_bt.sh $destination/usr/local/bin
cp $SRC/packages/bsp/rk3328/z28pro/z28pro-bluetooth.service $destination/lib/systemd/system/
return 0
}

View File

@ -292,11 +292,7 @@ setup_write_uboot_platform() {
family_tweaks() {
if [[ $BOARD == z28pro ]]; then
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable z28pro-bluetooth.service >/dev/null 2>&1"
elif [[ -f $SDCARD/lib/systemd/system/rk3399-bluetooth.service ]]; then
if [[ -f $SDCARD/lib/systemd/system/rk3399-bluetooth.service ]]; then
# install and enable Bluetooth
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools"
@ -310,23 +306,6 @@ family_tweaks() {
fi
if [[ $BOARD == station* ]]; then
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 && ($BOARD == station-m1) ]]; then
install -m 755 $SRC/packages/bsp/rk3328/m1/rtk_hciattach $SDCARD/usr/bin/rtk_hciattach
sed -e 's/exit 0//g' -i $SDCARD/etc/rc.local
echo "su -c '/usr/bin/rtk_hciattach -n -s 115200 /dev/ttyS2 rtk_h5 &'" >> $SDCARD/etc/rc.local
echo "exit 0" >> $SDCARD/etc/rc.local
fi
if [[ $BRANCH == legacy && ($BOARD == station-m3) ]]; 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
fi
}
family_tweaks_bsp() {
@ -342,26 +321,6 @@ family_tweaks_bsp() {
EOF
fi
if [[ $BOARD == z28pro ]]; then
mkdir -p $destination/usr/local/bin
# Bluetooth for Z28 PRO
install -m 755 $SRC/packages/bsp/rk3328/z28pro/8822b_hciattach $destination/usr/bin
install -m 755 $SRC/packages/bsp/rk3328/z28pro/start_bt.sh $destination/usr/local/bin
cp $SRC/packages/bsp/rk3328/z28pro/z28pro-bluetooth.service $destination/lib/systemd/system/
elif [[ $BRANCH == legacy && ($BOARD == rockpi-4[bc] || $BOARD == nanop*4* || $BOARD == orangepi* || $BOARD == firefly*) ]]; then
# Bluetooth for most of others (custom patchram is needed only in legacy)
install -m 755 $SRC/packages/bsp/rk3399/brcm_patchram_plus_rk3399 $destination/usr/bin
cp $SRC/packages/bsp/rk3399/rk3399-bluetooth.service $destination/lib/systemd/system/
if [[ $BOARD == nanop*4* || $BOARD == firefly* || $BOARD == orangepi-rk3399 ]]; then
sed -i s%BCM4345C5%BCM4356A2%g $destination/lib/systemd/system/rk3399-bluetooth.service
fi
fi
# Graphics and media
mkdir -p $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rk3399/50-mali.rules $destination/etc/udev/rules.d/