diff options
author | Jack Chen | 2020-11-24 17:18:33 +0800 |
---|---|---|
committer | Jack Chen | 2020-11-24 17:43:34 +0800 |
commit | d01635fc630bd7d67916bfeead88ff03263834eb (patch) | |
tree | cf81d8f2dcd1e7da9bdbe50a9882a73f330ce011 | |
download | aur-d01635fc630bd7d67916bfeead88ff03263834eb.tar.gz |
init commit
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 62 | ||||
-rw-r--r-- | bsp-tinkerboard.install | 15 | ||||
-rw-r--r-- | pulseaudio-sink.txt | 3 | ||||
-rw-r--r-- | pulseaudio-source.txt | 2 |
6 files changed, 118 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..da3c05952fd3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = bsp-tinkerboard + pkgdesc = BSP for Tinker Board / S (Bluetooth, HDMI, Audio, Udev rules...) + pkgver = 20.11.0 + pkgrel = 1 + url = https://github.com/redchenjs/armbian-ci + install = bsp-tinkerboard.install + arch = armv7h + license = GPL2 + makedepends = curl + depends = bash + depends = bluez + depends = bluez-tools + depends = systemd + depends = util-linux + depends = wireless_tools + depends = xorg-xrandr + noextract = bsp-tinkerboard.install + noextract = pulseaudio-sink.txt + noextract = pulseaudio-source.txt + noextract = armbian-firmware_20.11.0-trunk_all.deb + noextract = linux-focal-root-current-tinkerboard_20.11.0-trunk_armhf.deb + source = bsp-tinkerboard.install + source = pulseaudio-sink.txt + source = pulseaudio-source.txt + source = https://github.com/redchenjs/armbian-ci/releases/download/v5.8.18-rockchip/armbian-firmware_20.11.0-trunk_all.deb + source = https://github.com/redchenjs/armbian-ci/releases/download/v5.8.18-rockchip/linux-focal-root-current-tinkerboard_20.11.0-trunk_armhf.deb + sha512sums = 2bc75567f50efbde4c96f5bf9aed742dccc4083f1a019cfbe196832a6c416b3f12fea8768797e58979bbe2b9ed72f122cab6eb82007039564612fb77e430ab7f + sha512sums = 27f4af01d2e34398c05e98ec20eceaaf98cf2d4917d2b809080bef09bf385322b23226890d4bc8585f4aa7f17cd5867e15317c7e477b7bb868e65db3924b43a3 + sha512sums = 6516f28d8e0e086422d447dcac983f69c3e9d590f82d983a4b3deb8ca21d8cca2e45d9c7591ed4245dac6300ede2200b35ed9eb9387005f1483c5e6e131b2c61 + sha512sums = 5f5dcb8a3aca49474239572bf811d5e39a9ab575512ac7292d51fdcee46f8f6aa4e10209fe1c16e78fc86daa1f7e3ade1c995e3a546c7f3ccf3dda2c5da5a244 + sha512sums = 1bd8bcf85334a9b410f8769e38fbc013d12887604d3be50b85860ef8d4e9e6e643f2306f1086b159789c01cf0dac607094c37370dd45dfea3af05cc8b3283f98 + +pkgname = bsp-tinkerboard + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..62514e8a2fb9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +* +.* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..374799f41a39 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Jack Chen <redchenjs@live.com> + +pkgname=bsp-tinkerboard +pkgver=20.11.0 +pkgrel=1 +pkgdesc="BSP for Tinker Board / S (Bluetooth, HDMI, Audio, Udev rules...)" +arch=('armv7h') +url="https://github.com/redchenjs/armbian-ci" +license=('GPL2') +makedepends=('curl') +depends=('bash' 'bluez' 'bluez-tools' 'systemd' 'util-linux' 'wireless_tools' 'xorg-xrandr') +install=$pkgname.install +_ubuntu=focal +_kernel=5.8.18 +source=( + "$pkgname.install" + "pulseaudio-sink.txt" + "pulseaudio-source.txt" + "https://github.com/redchenjs/armbian-ci/releases/download/v$_kernel-rockchip/armbian-firmware_$pkgver-trunk_all.deb" + "https://github.com/redchenjs/armbian-ci/releases/download/v$_kernel-rockchip/linux-$_ubuntu-root-current-tinkerboard_$pkgver-trunk_armhf.deb" +) +sha512sums=( + '2bc75567f50efbde4c96f5bf9aed742dccc4083f1a019cfbe196832a6c416b3f12fea8768797e58979bbe2b9ed72f122cab6eb82007039564612fb77e430ab7f' + '27f4af01d2e34398c05e98ec20eceaaf98cf2d4917d2b809080bef09bf385322b23226890d4bc8585f4aa7f17cd5867e15317c7e477b7bb868e65db3924b43a3' + '6516f28d8e0e086422d447dcac983f69c3e9d590f82d983a4b3deb8ca21d8cca2e45d9c7591ed4245dac6300ede2200b35ed9eb9387005f1483c5e6e131b2c61' + "$(curl -s -L https://github.com/redchenjs/armbian-ci/releases/download/v$_kernel-rockchip/armbian-firmware_$pkgver-trunk_all.deb.sha512sum)" + "$(curl -s -L https://github.com/redchenjs/armbian-ci/releases/download/v$_kernel-rockchip/linux-$_ubuntu-root-current-tinkerboard_$pkgver-trunk_armhf.deb.sha512sum)" +) +noextract=("${source[@]##*/}") + +prepare() { + cd "$srcdir" + + rm -rf $(find -mindepth 1 -maxdepth 1 -type d) +} + +package() { + cd "$srcdir" + + ar x "armbian-firmware_$pkgver-trunk_all.deb" + tar -xf data.tar.xz + ar x "linux-$_ubuntu-root-current-tinkerboard_$pkgver-trunk_armhf.deb" + tar -xf data.tar.xz + + install -Dm644 "lib/systemd/system/tinker-bluetooth.service" "$pkgdir/usr/lib/systemd/system/tinker-bluetooth.service" + sed -r -i "s#usr/local/bin#usr/bin#g" "$pkgdir/usr/lib/systemd/system/tinker-bluetooth.service" + + install -Dm755 "usr/local/bin/start_bt.sh" "$pkgdir/usr/bin/start_bt.sh" + sed -r -i "s#usr/local/bin#usr/bin#g" "$pkgdir/usr/bin/start_bt.sh" + + install -Dm644 "lib/firmware/rtlbt/rtl8723b_config" "$pkgdir/usr/lib/firmware/rtlbt/rtl8723b_config" + install -Dm644 "lib/firmware/rtlbt/rtl8723b_fw" "$pkgdir/usr/lib/firmware/rtlbt/rtl8723b_fw" + install -Dm755 "usr/bin/rtk_hciattach" "$pkgdir/usr/bin/rtk_hciattach" + + mkdir -p "$pkgdir/etc" + mv etc/modprobe.d etc/skel etc/udev "$pkgdir/etc" + + install -Dm755 "usr/local/bin/hdmi-hotplug" "$pkgdir/usr/bin/hdmi-hotplug" + sed -r -i "s#usr/local/bin#usr/bin#g" "$pkgdir/etc/udev/rules.d/hdmi.rules" + + install -Dm644 "etc/asound.conf" "$pkgdir/etc/asound.conf" +} diff --git a/bsp-tinkerboard.install b/bsp-tinkerboard.install new file mode 100644 index 000000000000..79f38e4ddf89 --- /dev/null +++ b/bsp-tinkerboard.install @@ -0,0 +1,15 @@ +post_install() { + groupadd -r -f i2c + groupadd -r -f gpio + + systemctl enable tinker-bluetooth.service + systemctl start tinker-bluetooth.service + + sed -i -e "/#load-module module-alsa-sink/r pulseaudio-sink.txt" /etc/pulse/default.pa >/dev/null 2>&1 + sed -i -e "/#load-module module-alsa-source device=hw:1,0/r pulseaudio-source.txt" /etc/pulse/default.pa >/dev/null 2>&1 +} + +pre_remove() { + systemctl stop tinker-bluetooth.service + systemctl disable tinker-bluetooth.service +} diff --git a/pulseaudio-sink.txt b/pulseaudio-sink.txt new file mode 100644 index 000000000000..b7b5c2853297 --- /dev/null +++ b/pulseaudio-sink.txt @@ -0,0 +1,3 @@ +load-module module-alsa-sink device=OnBoard_D0 sink_properties=device.description="BT_VOIP-Output" +load-module module-alsa-sink device=OnBoard_D1 sink_properties=device.description="SPDIF-Output" +load-module module-alsa-sink device=OnBoard_D2 sink_properties=device.description="Headset-Output"
\ No newline at end of file diff --git a/pulseaudio-source.txt b/pulseaudio-source.txt new file mode 100644 index 000000000000..17d0711c3884 --- /dev/null +++ b/pulseaudio-source.txt @@ -0,0 +1,2 @@ +load-module module-alsa-source device=OnBoard_D0 source_properties=device.description="BT_VOIP-Input" +load-module module-alsa-source device=OnBoard_D1 source_properties=device.description="Headset-Input"
\ No newline at end of file |