Merge pull request #1274 from fewtarius/dev
Fix Bluetooth for RK3566 and RK3588 to use 64bit rtk_hciattach (from source), deprecate 32bit version. Clean firmware on every build so it is always applied.
This commit is contained in:
commit
315af2235a
8 changed files with 29 additions and 26 deletions
|
@ -44,12 +44,10 @@
|
||||||
# This should be updated to be more dynamic in the future.
|
# This should be updated to be more dynamic in the future.
|
||||||
CLEAN_OS_DEEP="system-utils busybox linux grub u-boot SDL2 retroarch mesa"
|
CLEAN_OS_DEEP="system-utils busybox linux grub u-boot SDL2 retroarch mesa"
|
||||||
CLEAN_OS_BASE="initramfs modules quirks autostart splash jelos"
|
CLEAN_OS_BASE="initramfs modules quirks autostart splash jelos"
|
||||||
|
CLEAN_NETWORK="RTL8821CS-firmware"
|
||||||
CLEAN_EMU_TOOLS="gamecontrollerdb"
|
CLEAN_EMU_TOOLS="gamecontrollerdb"
|
||||||
CLEAN_EMU_32BIT="lib32 box86 flycast-lr pcsx_rearmed-lr"
|
CLEAN_EMU_32BIT="lib32 box86 flycast-lr pcsx_rearmed-lr"
|
||||||
|
|
||||||
# Clean necessary packages.
|
|
||||||
PKG_CLEAN="${CLEAN_OS} ${CLEAN_EMUS} ${CLEAN_UI} ${CLEAN_TOOLS} ${PKG_CLEAN} lib32 initramfs modules autostart splash jelos"
|
|
||||||
|
|
||||||
# additional drivers to install:
|
# additional drivers to install:
|
||||||
# for a list of additional drivers see packages/linux-drivers
|
# for a list of additional drivers see packages/linux-drivers
|
||||||
# Space separated list is supported,
|
# Space separated list is supported,
|
||||||
|
|
Binary file not shown.
|
@ -7,7 +7,7 @@ PKG_VERSION="$(date +%Y%m%d)"
|
||||||
PKG_LICENSE="Apache-2.0"
|
PKG_LICENSE="Apache-2.0"
|
||||||
PKG_SITE="www.jelos.org"
|
PKG_SITE="www.jelos.org"
|
||||||
PKG_LONGDESC="Realtek RTL8821CS Linux firmware"
|
PKG_LONGDESC="Realtek RTL8821CS Linux firmware"
|
||||||
PKG_DEPENDS_TARGET="linux"
|
PKG_DEPENDS_TARGET="linux rtk_hciattach"
|
||||||
PKG_TOOLCHAIN="manual"
|
PKG_TOOLCHAIN="manual"
|
||||||
|
|
||||||
make_target() {
|
make_target() {
|
||||||
|
@ -15,13 +15,10 @@ make_target() {
|
||||||
}
|
}
|
||||||
|
|
||||||
makeinstall_target() {
|
makeinstall_target() {
|
||||||
mkdir -p ${INSTALL}/usr/bin
|
#mkdir -p ${INSTALL}/usr/bin
|
||||||
cp -v ${PKG_DIR}/firmware/rtk_hciattach ${INSTALL}/usr/bin
|
#cp -v ${PKG_DIR}/firmware/rtk_hciattach ${INSTALL}/usr/bin
|
||||||
mkdir -p ${INSTALL}/$(get_full_firmware_dir) ||:
|
mkdir -p ${INSTALL}/$(get_full_firmware_dir) ||:
|
||||||
cp -v ${PKG_DIR}/firmware/rtl8821c_fw ${INSTALL}/$(get_full_firmware_dir)
|
cp -v ${PKG_DIR}/firmware/rtl8821c_fw ${INSTALL}/$(get_full_firmware_dir)
|
||||||
cp -v ${PKG_DIR}/firmware/rtl8821cs_config ${INSTALL}/$(get_full_firmware_dir)/rtl8821c_config
|
cp -v ${PKG_DIR}/firmware/rtl8821cs_config ${INSTALL}/$(get_full_firmware_dir)/rtl8821c_config
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
|
||||||
enable_service hciattach-realtek.service
|
|
||||||
}
|
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)
|
# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)
|
||||||
|
|
||||||
PKG_NAME="rtk_hciattach"
|
PKG_NAME="rtk_hciattach"
|
||||||
PKG_VERSION="58820c428d2ecae6aaf5e4f00997652b9479853a"
|
PKG_VERSION="a03e128aa4b52fc5d904634c9838623a74ade393"
|
||||||
PKG_SHA256="20161cf3011f57dc9912db7270be1a83e543a61ea8757c23eaf983542fb021e0"
|
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="https://github.com/Caesar-github/rkwifibt"
|
PKG_SITE="https://github.com/Caesar-github/rkwifibt"
|
||||||
PKG_URL="https://github.com/Caesar-github/rkwifibt/archive/${PKG_VERSION}.tar.gz"
|
PKG_URL="https://github.com/Caesar-github/rkwifibt/archive/${PKG_VERSION}.tar.gz"
|
||||||
|
@ -15,3 +14,7 @@ unpack() {
|
||||||
mkdir -p ${PKG_BUILD}
|
mkdir -p ${PKG_BUILD}
|
||||||
tar --strip-components=3 -xf $SOURCES/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz -C ${PKG_BUILD} rkwifibt-${PKG_VERSION}/realtek/rtk_hciattach
|
tar --strip-components=3 -xf $SOURCES/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz -C ${PKG_BUILD} rkwifibt-${PKG_VERSION}/realtek/rtk_hciattach
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
enable_service hciattach-realtek.service
|
||||||
|
}
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
--- a/rtb_fwc.c
|
diff -rupN rkwifibt.orig/rtb_fwc.c rkwifibt/realtek/rtk_hciattach/rtb_fwc.c
|
||||||
+++ b/rtb_fwc.c
|
--- rkwifibt.orig/rtb_fwc.c 2023-04-09 00:03:32.060971449 +0000
|
||||||
@@ -39,8 +39,8 @@
|
+++ rkwifibt/rtb_fwc.c 2023-04-09 00:25:36.490970660 +0000
|
||||||
#define BT_CONFIG_DIRECTORY "/lib/firmware/rtlbt/"
|
@@ -36,10 +36,10 @@
|
||||||
|
|
||||||
#ifdef USE_CUSTOMER_ADDRESS
|
//#define BT_ADDR_FROM_VENDOR_STORAGE
|
||||||
-#define BT_ADDR_FROM_VENDOR_STORAGE
|
|
||||||
-#define BT_ADDR_FILE "/opt/bdaddr"
|
-#define FIRMWARE_DIRECTORY "/lib/firmware/rtlbt/"
|
||||||
+//#define BT_ADDR_FROM_VENDOR_STORAGE
|
-#define BT_CONFIG_DIRECTORY "/lib/firmware/rtlbt/"
|
||||||
+#define BT_ADDR_FILE "/storage/.config/btaddr"
|
-#define EXTRA_CONFIG_FILE "/opt/rtk_btconfig.txt"
|
||||||
static uint8_t customer_bdaddr = 0;
|
-#define BT_ADDR_FILE "/opt/bdaddr"
|
||||||
#endif
|
+#define FIRMWARE_DIRECTORY "/usr/lib/kernel-overlays/base/lib/firmware/"
|
||||||
|
+#define BT_CONFIG_DIRECTORY "/usr/lib/kernel-overlays/base/lib/firmware/"
|
||||||
|
+#define EXTRA_CONFIG_FILE "/storage/.config/rtk_btconfig.txt"
|
||||||
|
+#define BT_ADDR_FILE "/storage/.config/btaddr"
|
||||||
|
#define BDADDR_STRING_LEN 17
|
||||||
|
|
||||||
|
struct list_head {
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
# for a list of additional drivers see packages/linux-drivers
|
# for a list of additional drivers see packages/linux-drivers
|
||||||
# Space separated list is supported,
|
# Space separated list is supported,
|
||||||
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
||||||
ADDITIONAL_DRIVERS="RTL8821AU RTL8821CU RTL88x2BU RTL8188EU"
|
ADDITIONAL_DRIVERS="RTL8821AU RTL8821CU RTL88x2BU"
|
||||||
|
|
||||||
# build and install driver addons (yes / no)
|
# build and install driver addons (yes / no)
|
||||||
DRIVER_ADDONS_SUPPORT="no"
|
DRIVER_ADDONS_SUPPORT="no"
|
||||||
|
|
|
@ -58,7 +58,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean necessary packages.
|
# Clean necessary packages.
|
||||||
PKG_CLEAN+=" ${CLEAN_OS_BASE}"
|
PKG_CLEAN+=" ${CLEAN_NETWORK} ${CLEAN_OS_BASE}"
|
||||||
|
|
||||||
if [ ! -n "${DIRTY}" ]
|
if [ ! -n "${DIRTY}" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue