New package: x13s-base-1
This commit is contained in:
parent
a34ae70fa1
commit
9307928c6c
|
@ -0,0 +1,9 @@
|
|||
case "$ACTION" in
|
||||
post)
|
||||
# assign a random wlan and bluetooth MAC addresses with the correct OUI
|
||||
# as the firmware doesn't support saving this
|
||||
sed -i -e "s/:UU:VV:WW/$(od -An -N3 -t x1 /dev/urandom | tr ' ' ':')/g" \
|
||||
-e "s/:XX:YY:ZZ/$(od -An -N3 -t x1 /dev/urandom | tr ' ' ':')/g" \
|
||||
etc/default/x13s
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1 @@
|
|||
ACTION=="add" , RUN+="/bin/sh -c 'echo 4-0010 > /sys/bus/i2c/drivers/i2c_hid_of/bind'"
|
|
@ -0,0 +1,2 @@
|
|||
msg "Setting bluetooth MAC address..."
|
||||
/usr/libexec/x13s-setup bluetooth
|
|
@ -0,0 +1 @@
|
|||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0006:01:00.0", RUN+="/usr/libexec/x13s-setup wlan $name"
|
|
@ -0,0 +1,6 @@
|
|||
force_drivers+=" nvme phy_qcom_qmp_pcie "
|
||||
# keyboard
|
||||
force_drivers+=" i2c_hid_of i2c_qcom_geni "
|
||||
# display
|
||||
force_drivers+=" leds_qcom_lpg pwm_bl qrtr pmic_glink_altmode gpio_sbu_mux panel_edp msm "
|
||||
force_drivers+=" phy_qcom_qmp_combo pinctrl_sc8280xp gpucc_sc8280xp dispcc_sc8280xp phy_qcom_edp "
|
|
@ -0,0 +1,6 @@
|
|||
MODULES+=(nvme phy_qcom_qmp_pcie)
|
||||
# keyboard
|
||||
MODULES+=(i2c_hid_of i2c_qcom_geni)
|
||||
# display
|
||||
MODULES+=(leds_qcom_lpg pwm_bl qrtr pmic_glink_altmode gpio_sbu_mux panel_edp msm
|
||||
phy_qcom_qmp_combo pinctrl_sc8280xp gpucc_sc8280xp dispcc_sc8280xp phy_qcom_edp)
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
# x13s-setup wlan <interface>
|
||||
# x13s-setup bluetooth
|
||||
|
||||
[ -r /etc/default/x13s ] && . /etc/default/x13s
|
||||
|
||||
case "$1" in
|
||||
wlan)
|
||||
if [ -n "$WLAN_MAC" ] && command -v ip >/dev/null 2>&1; then
|
||||
exec ip link set dev "$2" address "$WLAN_MAC"
|
||||
fi
|
||||
;;
|
||||
bluetooth)
|
||||
if [ -n "$BLUETOOTH_MAC" ] && command -v btmgmt >/dev/null 2>&1; then
|
||||
exec btmgmt --index 0 public-addr "$BLUETOOTH_MAC"
|
||||
fi
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,7 @@
|
|||
# the X13s' wlan and bluetooth firmware/hardware do not support
|
||||
# storing their default MAC address, so it must be set on boot
|
||||
# by default, these are set to a random MAC address with the
|
||||
# correct vendor prefix (OUI) of F4:A0:0D. These MAC addresses
|
||||
# can also be assigned manually by editing this file.
|
||||
WLAN_MAC="F4:A0:0D:UU:VV:WW"
|
||||
BLUETOOTH_MAC="F4:A0:0D:XX:YY:ZZ"
|
|
@ -0,0 +1,22 @@
|
|||
# Template file for 'x13s-base'
|
||||
pkgname=x13s-base
|
||||
version=1
|
||||
revision=1
|
||||
archs="aarch64*"
|
||||
depends="linux-mainline>=6.8 linux-firmware-qualcomm alsa-ucm-conf"
|
||||
short_desc="Void Linux Thinkpad X13s platform package"
|
||||
maintainer="classabbyamp <void@placeviolette.net>"
|
||||
license="Public Domain"
|
||||
homepage="https://www.voidlinux.org"
|
||||
conf_files="/etc/default/x13s"
|
||||
|
||||
do_install() {
|
||||
vinstall "${FILESDIR}"/72-touchscreen.rules 644 usr/lib/udev/rules.d 72-x13s-touchscreen.rules
|
||||
vinstall "${FILESDIR}"/90-net-address.rules 644 usr/lib/udev/rules.d 90-x13s-net-address.rules
|
||||
vinstall "${FILESDIR}"/90-bt-address.sh 644 etc/runit/core-services 90-x13s-bt-address.sh
|
||||
vinstall "${FILESDIR}"/dracut.conf 644 usr/lib/dracut/dracut.conf.d x13s.conf
|
||||
vinstall "${FILESDIR}"/x13s-setup 755 usr/libexec
|
||||
vinstall "${FILESDIR}"/x13s.default 644 etc/default x13s
|
||||
# not currently working
|
||||
# vinstall "${FILESDIR}"/mkinitcpio.conf 644 etc/mkinitcpio.conf.d x13s.conf
|
||||
}
|
Loading…
Reference in New Issue