Fix Bluetooth for RK3566 and RK3588 to use 64bit rtk_hciattach, deprecate 32bit version. Clean firmware on every build so it is always applied.
This commit is contained in:
parent
14cd0997eb
commit
0643785c4e
8 changed files with 29 additions and 26 deletions
|
@ -44,12 +44,10 @@
|
|||
# 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_BASE="initramfs modules quirks autostart splash jelos"
|
||||
CLEAN_NETWORK="RTL8821CS-firmware"
|
||||
CLEAN_EMU_TOOLS="gamecontrollerdb"
|
||||
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:
|
||||
# for a list of additional drivers see packages/linux-drivers
|
||||
# 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_SITE="www.jelos.org"
|
||||
PKG_LONGDESC="Realtek RTL8821CS Linux firmware"
|
||||
PKG_DEPENDS_TARGET="linux"
|
||||
PKG_DEPENDS_TARGET="linux rtk_hciattach"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
make_target() {
|
||||
|
@ -15,13 +15,10 @@ make_target() {
|
|||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp -v ${PKG_DIR}/firmware/rtk_hciattach ${INSTALL}/usr/bin
|
||||
#mkdir -p ${INSTALL}/usr/bin
|
||||
#cp -v ${PKG_DIR}/firmware/rtk_hciattach ${INSTALL}/usr/bin
|
||||
mkdir -p ${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
|
||||
}
|
||||
|
||||
post_install() {
|
||||
enable_service hciattach-realtek.service
|
||||
}
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)
|
||||
|
||||
PKG_NAME="rtk_hciattach"
|
||||
PKG_VERSION="58820c428d2ecae6aaf5e4f00997652b9479853a"
|
||||
PKG_SHA256="20161cf3011f57dc9912db7270be1a83e543a61ea8757c23eaf983542fb021e0"
|
||||
PKG_VERSION="a03e128aa4b52fc5d904634c9838623a74ade393"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/Caesar-github/rkwifibt"
|
||||
PKG_URL="https://github.com/Caesar-github/rkwifibt/archive/${PKG_VERSION}.tar.gz"
|
||||
|
@ -15,3 +14,7 @@ unpack() {
|
|||
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
|
||||
}
|
||||
|
||||
post_install() {
|
||||
enable_service hciattach-realtek.service
|
||||
}
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
--- a/rtb_fwc.c
|
||||
+++ b/rtb_fwc.c
|
||||
@@ -39,8 +39,8 @@
|
||||
#define BT_CONFIG_DIRECTORY "/lib/firmware/rtlbt/"
|
||||
|
||||
#ifdef USE_CUSTOMER_ADDRESS
|
||||
-#define BT_ADDR_FROM_VENDOR_STORAGE
|
||||
-#define BT_ADDR_FILE "/opt/bdaddr"
|
||||
+//#define BT_ADDR_FROM_VENDOR_STORAGE
|
||||
+#define BT_ADDR_FILE "/storage/.config/btaddr"
|
||||
static uint8_t customer_bdaddr = 0;
|
||||
#endif
|
||||
|
||||
diff -rupN rkwifibt.orig/rtb_fwc.c rkwifibt/realtek/rtk_hciattach/rtb_fwc.c
|
||||
--- rkwifibt.orig/rtb_fwc.c 2023-04-09 00:03:32.060971449 +0000
|
||||
+++ rkwifibt/rtb_fwc.c 2023-04-09 00:25:36.490970660 +0000
|
||||
@@ -36,10 +36,10 @@
|
||||
|
||||
//#define BT_ADDR_FROM_VENDOR_STORAGE
|
||||
|
||||
-#define FIRMWARE_DIRECTORY "/lib/firmware/rtlbt/"
|
||||
-#define BT_CONFIG_DIRECTORY "/lib/firmware/rtlbt/"
|
||||
-#define EXTRA_CONFIG_FILE "/opt/rtk_btconfig.txt"
|
||||
-#define BT_ADDR_FILE "/opt/bdaddr"
|
||||
+#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
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
||||
ADDITIONAL_DRIVERS="RTL8821AU RTL8821CU RTL88x2BU RTL8188EU"
|
||||
ADDITIONAL_DRIVERS="RTL8821AU RTL8821CU RTL88x2BU"
|
||||
|
||||
# build and install driver addons (yes / no)
|
||||
DRIVER_ADDONS_SUPPORT="no"
|
||||
|
|
|
@ -58,7 +58,7 @@ then
|
|||
fi
|
||||
|
||||
# Clean necessary packages.
|
||||
PKG_CLEAN+=" ${CLEAN_OS_BASE}"
|
||||
PKG_CLEAN+=" ${CLEAN_NETWORK} ${CLEAN_OS_BASE}"
|
||||
|
||||
if [ ! -n "${DIRTY}" ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue