added playbook
This commit is contained in:
parent
92fefce0a7
commit
f6ba25935c
13 changed files with 433 additions and 1 deletions
5
ansible/files/bluetooth-mac.bash
Normal file
5
ansible/files/bluetooth-mac.bash
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
rfkill unblock bluetooth
|
||||
echo $"stdin for btmgmt" | btmgmt -i hci0 public-addr $(hciconfig hci0 | grep -o $"[[:xdigit:]:]\\{11,17\\}")'
|
||||
# btmgmt requires stdin, so we feed it some garbage...
|
1
ansible/files/bluetooth-udev.rules
Normal file
1
ansible/files/bluetooth-udev.rules
Normal file
|
@ -0,0 +1 @@
|
|||
ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci0", RUN+="/opt/bluetooth-mac.bash"
|
15
ansible/files/droid-juicer-sdm670.service
Normal file
15
ansible/files/droid-juicer-sdm670.service
Normal file
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Android vendor firmware extraction
|
||||
Wants=sysinit.target make-dynpart-mappings@system_a.service
|
||||
After=-.mount tmp.mount boot.mount make-dynpart-mappings@system_a.service
|
||||
Before=plymouth-quit.service display-manager.service
|
||||
ConditionPathExists=!/var/lib/droid-juicer/status.json
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=-/usr/bin/plymouth display-message --text="Extracting binary firmware..."
|
||||
ExecStart=/usr/bin/droid-juicer
|
||||
ExecStartPost=/usr/sbin/reboot
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
12
ansible/files/q6voiced-temp.service
Normal file
12
ansible/files/q6voiced-temp.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=q6voiced routes call audio between modem and audio device
|
||||
After=dbus.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/q6voiced.conf
|
||||
ExecStart=/opt/q6voiced/q6voiced hw:${q6voice_card},${q6voice_device}
|
||||
User=nobody
|
||||
Group=audio
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
2
ansible/files/q6voiced.conf
Normal file
2
ansible/files/q6voiced.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
q6voice_card=0
|
||||
q6voice_device=4
|
64
ansible/files/qcom-firmware
Normal file
64
ansible/files/qcom-firmware
Normal file
|
@ -0,0 +1,64 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
PREREQS=""
|
||||
case $1 in
|
||||
prereqs) echo "${PREREQS}"; exit 0;;
|
||||
esac
|
||||
|
||||
. /usr/share/initramfs-tools/hook-functions
|
||||
|
||||
# Fetch the device parameters
|
||||
for x in $(cat /proc/cmdline); do
|
||||
case $x in
|
||||
mobile.qcomsoc=*) QCOMSOC="${x#mobile.qcomsoc=}" ;;
|
||||
mobile.model=*) MODEL="${x#mobile.model=}" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${QCOMSOC}" ] && [ "${MODEL}" ]; then
|
||||
# Special case for the OnePlus 6 & 6T: both models use the same
|
||||
# firmware folder: sdm845/oneplus6
|
||||
if [ "${MODEL}" = "enchilada" ] || [ "${MODEL}" = "fajita" ]; then
|
||||
MODEL="oneplus6"
|
||||
fi
|
||||
# Special case for the "fp4" (Fairphone 4): this model uses the
|
||||
# "fairphone4" firmware folder
|
||||
if [ "${MODEL}" = "fp4" ]; then
|
||||
MODEL="fairphone4"
|
||||
fi
|
||||
# Special case for "bonito" (Pixel 3a XL): this model uses the "sargo" (Pixel 3a) firmware folders
|
||||
if [ "${MODEL}" = "bonito" ]; then
|
||||
MODEL="sargo"
|
||||
fi
|
||||
|
||||
FW_LIST="${QCOMSOC}/${MODEL}/adsp.mbn \
|
||||
${QCOMSOC}/${MODEL}/cdsp.mbn \
|
||||
${QCOMSOC}/${MODEL}/ipa_fws.mbn"
|
||||
|
||||
FW_RADIO="ath10k/WCN3990/hw1.0/board-2.bin \
|
||||
qca/${MODEL}/crnv21.bin \
|
||||
qca/crbtfw21.tlv \
|
||||
qca/crnv21.bin"
|
||||
|
||||
if [ "${QCOMSOC}" = "qcom/sdm845" ]; then
|
||||
FW_LIST="${FW_LIST} \
|
||||
${QCOMSOC}/${MODEL}/a630_zap.mbn"
|
||||
elif [ "${QCOMSOC}" = "qcom/sm7225" ] || [ "${QCOMSOC}" = "qcom/sdm670" ]; then
|
||||
FW_LIST="${FW_LIST} \
|
||||
${QCOMSOC}/${MODEL}/a615_zap.mbn"
|
||||
fi
|
||||
|
||||
FW_LIST="${FW_LIST} ${FW_RADIO}"
|
||||
|
||||
for fwfile in ${FW_LIST}; do
|
||||
if [ -f "/lib/firmware/updates/${version?}/${fwfile}" ] ||
|
||||
[ -f "/lib/firmware/updates/${fwfile}" ] ||
|
||||
[ -f "/lib/firmware/${version}/${fwfile}" ] ||
|
||||
[ -f "/lib/firmware/${fwfile}" ]; then
|
||||
add_firmware "${fwfile}"
|
||||
else
|
||||
echo "I: Ignoring missing firmware ${fwfile}"
|
||||
fi
|
||||
done
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue