tinker: Initial support (#140)

* tinker: initial support

* Fix info

* Fix uboot defconfig

* Split kernel config

* Fix name

* Add post-image

* Init different boot

* Add SPL images

* Dynamic rauc config

* Support SPL for OTA

* Fix expand script style

* Fix SPL

* Bump build u-boot

* Cleanup

* Add cmd for scritps

* Use kernel from armbian

* Fix u-boot

* Add bluetooth support

* Fix bt

* Fix env

* Change uart debug like rpi

* move config
This commit is contained in:
Pascal Vizeli
2018-08-03 13:21:55 +02:00
committed by GitHub
parent 48500a6c6e
commit fbb45e1544
111 changed files with 1402795 additions and 93 deletions

View File

@@ -0,0 +1,5 @@
config BR2_PACKAGE_BLUETOOTH_RTL8723
bool "bluetooth rtl8723"
depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
help
Install bluetooth for rtl8723.

View File

@@ -0,0 +1,21 @@
#!/bin/sh
echo "Setup the Bluetooth chip"
echo 146 > /sys/class/gpio/export
echo 149 > /sys/class/gpio/export
echo 151 > /sys/class/gpio/export
echo high > /sys/class/gpio/gpio146/direction
echo high > /sys/class/gpio/gpio149/direction
echo high > /sys/class/gpio/gpio151/direction
echo "Resetting the Bluetooth chip"
echo 0 > /sys/class/gpio/gpio149/value
echo -e "\tBluetooth chip power down..."
sleep 1
echo 1 > /sys/class/gpio/gpio149/value
echo -e "\tBluetooth chip power up..."
sleep 1
echo -e "\tResetting done"
/usr/sbin/rtk_hciattach -n -s 115200 /dev/ttyS0 rtk_h5

View File

@@ -0,0 +1,31 @@
################################################################################
#
# Bluetooth RTL8723
#
################################################################################
BLUETOOTH_RTL8723_VERSION = 1.0.0
BLUETOOTH_RTL8723_LICENSE = Apache License 2.0
BLUETOOTH_RTL8723_LICENSE_FILES = $(BR2_EXTERNAL_HASSOS_PATH)/../LICENSE
BLUETOOTH_RTL8723_SITE = $(BR2_EXTERNAL_HASSOS_PATH)/package/bluetooth-rtl8723
BLUETOOTH_RTL8723_SITE_METHOD = local
define BLUETOOTH_RTL8723_BUILD_CMDS
curl -o $(@D)/rtk_hciattach https://github.com/armbian/build/raw/dee62df8bb2fe8611fd41ddf02063fa15533298c/packages/bsp/rockchip/rtk_hciattach
curl -o $(@D)/rtl8723b_config.bin https://github.com/armbian/firmware/raw/4723bbb3d1ef70b5fbe7d2599c47d078ab125c47/rtl_bt/rtl8723b_config.bin
curl -o $(@D)/rtl8723b_fw.bin https://github.com/armbian/firmware/raw/4723bbb3d1ef70b5fbe7d2599c47d078ab125c47/rtl_bt/rtl8723b_fw.bin
endef
define BLUETOOTH_RTL8723_INSTALL_TARGET_CMDS
$(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants
$(INSTALL) -m 0755 $(@D)/bluetooth-rtl8723 $(TARGET_DIR)/usr/sbin/
$(INSTALL) -m 0644 $(@D)/bluetooth-rtl8723.service $(TARGET_DIR)/usr/lib/systemd/system/
ln -fs /usr/lib/systemd/system/bluetooth-rtl8723.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants/
$(INSTALL) -d $(TARGET_DIR)/lib/firmware/rtl_bt
$(INSTALL) -m 0644 $(@D)/*.bin $(TARGET_DIR)/lib/firmware/rtl_bt/
$(INSTALL) -m 0755 $(@D)/rtk_hciattach $(TARGET_DIR)/usr/sbin/
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Bluetooth for RTL8723
Before=bluetooth.service
After=dev-ttyS0.device
[Service]
Type=forking
ExecStart=/usr/sbin/bluetooth-rtl8723
[Install]
WantedBy=hassos-hardware.target