New package: asahi-base-20250103

This commit is contained in:
claris 2022-03-27 14:11:23 -07:00 committed by classabbyamp
parent 91e3f1fa98
commit 04d575278c
5 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,3 @@
if [ "${ACTION}" = "post" ] && [ "${UPDATE}" = "no" ]; then
ln -s /etc/sv/speakersafetyd /var/service
fi

View File

@ -0,0 +1,22 @@
for _mod in \
apple-mailbox \
vfat \
nvme_apple \
pinctrl-apple-gpio \
macsmc macsmc-rtkit \
i2c-apple i2c-pasemi-platform tps6598x apple-dart dwc3 dwc3-of-simple xhci-pci pcie-apple \
xhci-plat-hcd \
nvme-apple-efuses phy-apple-atc gpio_macsmc \
rtc-macsmc simple-mfd-spmi spmi-apple-controller nvmem_spmi_mfd \
spi-apple spi-hid-apple spi-hid-apple-of \
apple-dockchannel dockchannel-hid apple-rtkit-helper \
apple-sio \
mux-apple-display-crossbar phy-apple-dptx
do
copy_kmod "$_mod"
done
for _bin in umount cpio cp grep cat sed seq
do
copy_exec "$_bin"
done

View File

@ -0,0 +1,20 @@
modprobe apple-mailbox
modprobe nvme-apple
for i in $(seq 0 50); do
[ -e /sys/bus/platform/drivers/nvme-apple/*.nvme/nvme/nvme*/nvme*n1/ ] && break
sleep 0.1
done
print 'asahi: mounting ESP'
mountpoint=/run/.system-efi
mkdir -p "$mountpoint"
while grep -q "$mountpoint" /proc/mounts; do
umount "$mountpoint"
done
esp_uuid="$(cat /proc/device-tree/chosen/asahi,efi-system-partition 2> /dev/null | sed 's/\x00//')"
mount "PARTUUID=$esp_uuid" "$mountpoint"
print 'asahi: unpacking vendor firmware into initramfs'
cpio -i < "$mountpoint/vendorfw/firmware.cpio"
umount "$mountpoint"

View File

@ -0,0 +1,9 @@
[ -e /vendorfw ] || return 0
print 'asahi: copying vendor firmware to root filesystem'
loaderdir=/mnt/root/lib/firmware/vendor
mkdir -p "$loaderdir"
mount -t tmpfs -o mode=0755 vendorfw "$loaderdir"
set +f
cp -pr /vendorfw/* /vendorfw/.vendorfw.manifest "$loaderdir"
set -f

View File

@ -0,0 +1,17 @@
# Template file for 'asahi-base'
pkgname=asahi-base
version=20250103
revision=1
archs="aarch64*"
build_style=meta
depends="linux-asahi m1n1 asahi-uboot speakersafetyd"
short_desc="Void Linux Apple Silicon support package"
maintainer="Will Springer <skirmisher@protonmail.com>, dkwo <npiazza@disroot.org>"
license="Public Domain"
homepage="https://asahilinux.org"
do_install() {
vinstall "${FILESDIR}/tinyramfs-hook-asahi" 644 usr/lib/tinyramfs/hook.d/asahi asahi
vinstall "${FILESDIR}/tinyramfs-hook-asahi.init" 644 usr/lib/tinyramfs/hook.d/asahi asahi.init
vinstall "${FILESDIR}/tinyramfs-hook-asahi.init.late" 644 usr/lib/tinyramfs/hook.d/asahi asahi.init.late
}