diff --git a/config/boards/firefly-rk3399.conf b/config/boards/firefly-rk3399.conf index 1bd6da0862..10048f6916 100644 --- a/config/boards/firefly-rk3399.conf +++ b/config/boards/firefly-rk3399.conf @@ -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 +} diff --git a/config/boards/nanopct4.conf b/config/boards/nanopct4.conf index 39c2c0ce06..4931010b61 100644 --- a/config/boards/nanopct4.conf +++ b/config/boards/nanopct4.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/nanopi-r4s.conf b/config/boards/nanopi-r4s.conf index 01ae3b73f0..59b7e14220 100644 --- a/config/boards/nanopi-r4s.conf +++ b/config/boards/nanopi-r4s.conf @@ -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 +} diff --git a/config/boards/nanopim4.conf b/config/boards/nanopim4.conf index 0f4daf0965..3841365ed7 100644 --- a/config/boards/nanopim4.conf +++ b/config/boards/nanopim4.conf @@ -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 diff --git a/config/boards/nanopim4v2.conf b/config/boards/nanopim4v2.conf index 3ff2e6331e..e8f1945a13 100644 --- a/config/boards/nanopim4v2.conf +++ b/config/boards/nanopim4v2.conf @@ -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 } + diff --git a/config/boards/nanopineo4.csc b/config/boards/nanopineo4.csc index 21c103e16f..c61cc52808 100644 --- a/config/boards/nanopineo4.csc +++ b/config/boards/nanopineo4.csc @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepi-r1.conf b/config/boards/orangepi-r1.conf index 21ec711d5e..6627118722 100644 --- a/config/boards/orangepi-r1.conf +++ b/config/boards/orangepi-r1.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepi-r1plus-lts.conf b/config/boards/orangepi-r1plus-lts.conf index 38e305d7d4..2a096ba224 100644 --- a/config/boards/orangepi-r1plus-lts.conf +++ b/config/boards/orangepi-r1plus-lts.conf @@ -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 } + diff --git a/config/boards/orangepi-r1plus.conf b/config/boards/orangepi-r1plus.conf index 608b03eee6..85ac6a065f 100644 --- a/config/boards/orangepi-r1plus.conf +++ b/config/boards/orangepi-r1plus.conf @@ -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 } \ No newline at end of file diff --git a/config/boards/orangepi-rk3399.csc b/config/boards/orangepi-rk3399.csc index e51f2fddf0..38e95fb19b 100644 --- a/config/boards/orangepi-rk3399.csc +++ b/config/boards/orangepi-rk3399.csc @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepi.eos b/config/boards/orangepi.eos index f522291e66..7c6df0cc9f 100644 --- a/config/boards/orangepi.eos +++ b/config/boards/orangepi.eos @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepi2.csc b/config/boards/orangepi2.csc index d5cd86103d..cc4bab4e23 100644 --- a/config/boards/orangepi2.csc +++ b/config/boards/orangepi2.csc @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepi3-lts.conf b/config/boards/orangepi3-lts.conf index 7fc65aa307..52a62468fb 100644 --- a/config/boards/orangepi3-lts.conf +++ b/config/boards/orangepi3-lts.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepi3.conf b/config/boards/orangepi3.conf index 803d241345..b3a37ebca3 100644 --- a/config/boards/orangepi3.conf +++ b/config/boards/orangepi3.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepi4-lts.conf b/config/boards/orangepi4-lts.conf index 2b9978c745..8d2f79eb2b 100644 --- a/config/boards/orangepi4-lts.conf +++ b/config/boards/orangepi4-lts.conf @@ -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 } + diff --git a/config/boards/orangepi4.conf b/config/boards/orangepi4.conf index 87ed5e87cc..fe794da273 100644 --- a/config/boards/orangepi4.conf +++ b/config/boards/orangepi4.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepi5.conf b/config/boards/orangepi5.conf index f40fdb6e27..27b5bddef4 100644 --- a/config/boards/orangepi5.conf +++ b/config/boards/orangepi5.conf @@ -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" } + diff --git a/config/boards/orangepilite.conf b/config/boards/orangepilite.conf index 08513594b2..15340df9f8 100644 --- a/config/boards/orangepilite.conf +++ b/config/boards/orangepilite.conf @@ -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 +} diff --git a/config/boards/orangepilite2.conf b/config/boards/orangepilite2.conf index 854e84b820..b7cb1d139e 100644 --- a/config/boards/orangepilite2.conf +++ b/config/boards/orangepilite2.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepimini.eos b/config/boards/orangepimini.eos index eb84736d3e..7ea065f452 100644 --- a/config/boards/orangepimini.eos +++ b/config/boards/orangepimini.eos @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepione.conf b/config/boards/orangepione.conf index 852a9c3831..73efc29719 100644 --- a/config/boards/orangepione.conf +++ b/config/boards/orangepione.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepioneplus.conf b/config/boards/orangepioneplus.conf index 92a0770023..e01494e7c5 100644 --- a/config/boards/orangepioneplus.conf +++ b/config/boards/orangepioneplus.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepipc.conf b/config/boards/orangepipc.conf index bccf9e4914..9490b16b94 100644 --- a/config/boards/orangepipc.conf +++ b/config/boards/orangepipc.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepipc2.conf b/config/boards/orangepipc2.conf index b8df578122..5eb78d4204 100644 --- a/config/boards/orangepipc2.conf +++ b/config/boards/orangepipc2.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepipcplus.conf b/config/boards/orangepipcplus.conf index 166a9f522c..59b7763efe 100644 --- a/config/boards/orangepipcplus.conf +++ b/config/boards/orangepipcplus.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepiplus.csc b/config/boards/orangepiplus.csc index 1d5238a2e0..5e3c17e1ad 100644 --- a/config/boards/orangepiplus.csc +++ b/config/boards/orangepiplus.csc @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepiplus2e.conf b/config/boards/orangepiplus2e.conf index 26e17ad068..a61509fa7f 100644 --- a/config/boards/orangepiplus2e.conf +++ b/config/boards/orangepiplus2e.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepiprime.conf b/config/boards/orangepiprime.conf index a6440b049e..57b40acfbd 100644 --- a/config/boards/orangepiprime.conf +++ b/config/boards/orangepiprime.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepiwin.csc b/config/boards/orangepiwin.csc index 2b83da5a2a..1beaa80d61 100644 --- a/config/boards/orangepiwin.csc +++ b/config/boards/orangepiwin.csc @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepizero.conf b/config/boards/orangepizero.conf index 127fa9bbd1..8ba20e3cac 100644 --- a/config/boards/orangepizero.conf +++ b/config/boards/orangepizero.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepizero2.conf b/config/boards/orangepizero2.conf index 5edd81f1a9..92c1235326 100644 --- a/config/boards/orangepizero2.conf +++ b/config/boards/orangepizero2.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepizeroplus.conf b/config/boards/orangepizeroplus.conf index 896db6ccf0..8b764a9dd5 100644 --- a/config/boards/orangepizeroplus.conf +++ b/config/boards/orangepizeroplus.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepizeroplus2-h3.conf b/config/boards/orangepizeroplus2-h3.conf index 6c0f23b6a4..b6736ee7b3 100644 --- a/config/boards/orangepizeroplus2-h3.conf +++ b/config/boards/orangepizeroplus2-h3.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/orangepizeroplus2-h5.csc b/config/boards/orangepizeroplus2-h5.csc index 51d83d8036..9afcdd4798 100644 --- a/config/boards/orangepizeroplus2-h5.csc +++ b/config/boards/orangepizeroplus2-h5.csc @@ -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 +} \ No newline at end of file diff --git a/config/boards/rockpi-4b.conf b/config/boards/rockpi-4b.conf index 6eef59fab5..c35cce9b86 100644 --- a/config/boards/rockpi-4b.conf +++ b/config/boards/rockpi-4b.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/rockpi-4c.conf b/config/boards/rockpi-4c.conf index dafb8e7765..0180df3457 100644 --- a/config/boards/rockpi-4c.conf +++ b/config/boards/rockpi-4c.conf @@ -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 +} \ No newline at end of file diff --git a/config/boards/station-m1.conf b/config/boards/station-m1.conf index 96b490a897..278e099878 100644 --- a/config/boards/station-m1.conf +++ b/config/boards/station-m1.conf @@ -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 +} diff --git a/config/boards/station-m2.conf b/config/boards/station-m2.conf index c510958830..d721de4306 100644 --- a/config/boards/station-m2.conf +++ b/config/boards/station-m2.conf @@ -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 +} diff --git a/config/boards/station-m3.conf b/config/boards/station-m3.conf index 736c583391..e55299a79d 100644 --- a/config/boards/station-m3.conf +++ b/config/boards/station-m3.conf @@ -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 +} diff --git a/config/boards/station-p1.conf b/config/boards/station-p1.conf index 3c666ba25c..c1485dee98 100644 --- a/config/boards/station-p1.conf +++ b/config/boards/station-p1.conf @@ -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 +} diff --git a/config/boards/station-p2.conf b/config/boards/station-p2.conf index 3b675226db..ff75a26d7d 100644 --- a/config/boards/station-p2.conf +++ b/config/boards/station-p2.conf @@ -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 +} diff --git a/config/boards/z28pro.tvb b/config/boards/z28pro.tvb index 504ff3e9f5..4c3514f887 100644 --- a/config/boards/z28pro.tvb +++ b/config/boards/z28pro.tvb @@ -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 +} \ No newline at end of file diff --git a/config/sources/families/include/rockchip64_common.inc b/config/sources/families/include/rockchip64_common.inc index 5f6aedc133..02ca03e146 100644 --- a/config/sources/families/include/rockchip64_common.inc +++ b/config/sources/families/include/rockchip64_common.inc @@ -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/