Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Silicon Mac support packages (v2) #39796

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
87f0951
New package: linux-asahi
Mar 27, 2022
bf61837
New package: asahi-uboot
Mar 27, 2022
5d76b65
New package: m1n1
Mar 27, 2022
727a7f1
New package: lzfse
Apr 11, 2023
d375061
New package: asahi-firmware
Apr 11, 2023
f431a00
New package: asahi-scripts
May 7, 2024
4f373a3
New package: asahi-base
Mar 27, 2022
b641ec1
New package: mesa-asahi
May 20, 2024
f03a37d
New package: speakersafetyd
May 20, 2024
ccc4910
New package: bankstown
May 20, 2024
10b708a
New package: alsa-ucm-conf-asahi
May 20, 2024
05ede31
New package: asahi-audio
May 21, 2024
fdcdc97
linux-asahi: update to 6.12
Sep 7, 2024
cb4b195
mesa-asahi: update to 20241211
Nov 9, 2024
15a5da8
speakersafetyd: lint
Dec 22, 2024
e7bab37
bankstown: drop deps
Dec 22, 2024
bc899cb
asahi-uboot: lint
Dec 22, 2024
0ee33dd
m1n1: lint
Dec 22, 2024
175b2cf
asahi-scripts: lint
Dec 22, 2024
155768e
lzfse: split devel
Dec 22, 2024
1d452a2
linux-asahi: simplify version, drop other archs
Dec 22, 2024
1347626
asahi-base: reword
Dec 22, 2024
bbe56fb
mesa-asahi: drop conditionals
Dec 22, 2024
e9f5147
mesa-asahi: change version scheme
Dec 23, 2024
efc6732
linux-asahi: make config closer to void
Dec 23, 2024
d3be776
asahi-audio: drop stricter >=
Dec 23, 2024
b2223a0
asahi-base: drop readme (moved to void docs)
Dec 23, 2024
7edbc26
m1n1: clarify hook
Dec 23, 2024
e2dacd7
bankstown: remove redundant
Dec 23, 2024
b97e26a
lixux-asahi: drop subarch unused
Dec 23, 2024
3832e5e
lzfse: reorder template
Dec 23, 2024
5fd9e15
mesa-asahi: drop subpackages
Dec 23, 2024
38f701f
speakersafetyd: unorphan
Dec 23, 2024
68b6480
mesa-asahi: unorphan
Dec 23, 2024
4bbeb28
alsa-ucm-conf-asahi: unorphan
Dec 23, 2024
2e57c35
asahi-audio: unorphan
Dec 23, 2024
0f648aa
bankstown: unorphan
Dec 23, 2024
d76753d
m1n1: default to /boot/efi for target
Dec 23, 2024
cfd02bf
lzfse: fix variable
Dec 23, 2024
76bdfdf
m1n1: switch from 1,2 to kernel,uboot
Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions srcpkgs/MesaLib-asahi-devel
17 changes: 17 additions & 0 deletions srcpkgs/alsa-ucm-conf-asahi/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Template file for 'alsa-ucm-conf-asahi'
pkgname=alsa-ucm-conf-asahi
version=5
revision=1
depends="alsa-ucm-conf"
short_desc="ALSA Use Case Manager topology configurations for Apple silicon devices"
maintainer="dkwo <[email protected]>"
license="BSD-3-Clause"
homepage="https://github.com/AsahiLinux/alsa-ucm-conf-asahi"
distfiles="https://github.com/AsahiLinux/alsa-ucm-conf-asahi/archive/refs/tags/v${version}.tar.gz"
checksum=a697ef6923b94bb4d07abe0039c7fdc3c853625c7fe207b2d50a5c5bbe84c9cf

do_install() {
vmkdir usr/share/alsa/ucm2/conf.d/
vcopy ucm2/conf.d/macaudio usr/share/alsa/ucm2/conf.d/
vlicense LICENSE.asahi
}
17 changes: 17 additions & 0 deletions srcpkgs/asahi-audio/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Template file for 'asahi-audio'
pkgname=asahi-audio
version=2.5
revision=1
build_style=gnu-makefile
depends="alsa-ucm-conf-asahi speakersafetyd linux-asahi
pipewire wireplumber bankstown lsp-plugins-lv2>=1.2.14"
short_desc="Linux userspace audio configuration for Apple Silicon Macs"
maintainer="dkwo <[email protected]>"
license="MIT"
homepage="https://github.com/AsahiLinux/asahi-audio"
distfiles="https://github.com/AsahiLinux/asahi-audio/archive/refs/tags/v${version}.tar.gz"
checksum=61b014019e0f0172bbe5a9be4a3d8210e77e689bdef411af01bc3a8654d977bc

post_install() {
vlicense LICENSE
}
3 changes: 3 additions & 0 deletions srcpkgs/asahi-base/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if [ "${ACTION}" = "post" ] && [ "${UPDATE}" = "no" ]; then
ln -s /etc/sv/speakersafetyd /var/service
fi
22 changes: 22 additions & 0 deletions srcpkgs/asahi-base/files/tinyramfs-hook-asahi
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions srcpkgs/asahi-base/files/tinyramfs-hook-asahi.init
Original file line number Diff line number Diff line change
@@ -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"
9 changes: 9 additions & 0 deletions srcpkgs/asahi-base/files/tinyramfs-hook-asahi.init.late
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions srcpkgs/asahi-base/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Template file for 'asahi-base'
pkgname=asahi-base
version=20241001
revision=1
archs="aarch64*"
build_style=meta
depends="linux-asahi m1n1 speakersafetyd"
short_desc="Void Linux Apple Silicon support package"
maintainer="Will Springer <[email protected]>, dkwo <[email protected]>"
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
vdoc "${FILESDIR}/README.voidlinux"
}
17 changes: 17 additions & 0 deletions srcpkgs/asahi-firmware/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Template file for 'asahi-firmware'
pkgname=asahi-firmware
version=0.7.9
revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3 lzfse"
short_desc="Asahi Linux firmware tools"
maintainer="dkwo <[email protected]>"
license="MIT"
homepage="https://github.com/AsahiLinux/asahi-installer"
distfiles="https://github.com/AsahiLinux/asahi-installer/archive/refs/tags/v${version}.tar.gz"
checksum=b41f39360ce6cd6de299c4f25cd69718530a5619b16fb7a1eed666083bd909e1

classabbyamp marked this conversation as resolved.
Show resolved Hide resolved
post_install() {
vlicense LICENSE
}
21 changes: 21 additions & 0 deletions srcpkgs/asahi-scripts/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Template file for 'asahi-scripts'
pkgname=asahi-scripts
version=20240822
revision=1
archs="aarch64*"
build_style=gnu-makefile
make_install_args="install-dracut install-mkinitcpio"
depends="asahi-firmware"
short_desc="Miscellaneous admin scripts for Apple silicon devices"
maintainer="dkwo <[email protected]>"
license="MIT"
homepage="https://github.com/AsahiLinux/asahi-scripts"
distfiles="https://github.com/AsahiLinux/asahi-scripts/archive/refs/tags/${version}.tar.gz"
checksum=24023903c1341d6867d9a2baa494bbae90ca27b6cf64fa19218ef87d471304fc
make_dirs="/usr/lib/firmware/vendor 0755 root root"

post_install() {
# config for m1n1, provided by that package
rm ${DESTDIR}/etc/m1n1.conf
vlicense LICENSE
}
48 changes: 48 additions & 0 deletions srcpkgs/asahi-uboot/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Template file for 'asahi-uboot'
pkgname=asahi-uboot
version=2024.10
revision=1
_subversion=1
archs="aarch64*"
hostmakedepends="flex bc dtc openssl-devel" # until uboot supports skipping tools build...
makedepends="openssl-devel libuuid-devel gnutls-devel ncurses-libtinfo-devel"
short_desc="U-Boot for Apple Silicon Macs"
maintainer="Will Springer <[email protected]>, dkwo <[email protected]>"
license="GPL-2.0-or-later, MIT"
homepage="https://asahilinux.org"
distfiles="https://github.com/AsahiLinux/u-boot/archive/refs/tags/asahi-v${version}-${_subversion}.tar.gz"
checksum=c226191d52d3f853dd7d4e2c241e4259b90bd0aecb4c56e324936cc61b1bb53e

do_configure() {
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
make ${makejobs} apple_m1_defconfig
}

do_build() {
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
if [ "$CROSS_BUILD" ]; then
export CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
fi
make ${makejobs} EXTRAVERSION=-${revision}
}

do_install() {
vinstall u-boot-nodtb.bin 0644 usr/lib/asahi-boot
for dtb in arch/arm/dts/t[86]*.dtb ; do
vinstall ${dtb} 0644 usr/lib/asahi-boot/dtb
done

vlicense Licenses/Exceptions
vlicense Licenses/OFL.txt
vlicense Licenses/README
vlicense Licenses/bsd-2-clause.txt
vlicense Licenses/bsd-3-clause.txt
vlicense Licenses/eCos-2.0.txt
vlicense Licenses/gpl-2.0.txt
vlicense Licenses/ibm-pibs.txt
vlicense Licenses/isc.txt
vlicense Licenses/lgpl-2.0.txt
vlicense Licenses/lgpl-2.1.txt
vlicense Licenses/r8a779x_usb3.txt
vlicense Licenses/x11.txt
}
18 changes: 18 additions & 0 deletions srcpkgs/bankstown/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Template file for 'bankstown'
pkgname=bankstown
version=1.1.0
revision=1
build_style=cargo
short_desc="Barebones bass enhancer"
maintainer="dkwo <[email protected]>"
license="MIT"
homepage="https://github.com/chadmed/bankstown"
distfiles="https://github.com/chadmed/bankstown/archive/refs/tags/${version}.tar.gz"
checksum=e877508b73fe90774d74526d838f75e8ea278bdbcee0a1f92e3eca67ed734675

do_install() {
vinstall target/$XBPS_RUST_TARGET/release/libbankstown.so 755 usr/lib/lv2/bankstown.lv2/ bankstown.so
vinstall bankstown.ttl 644 usr/lib/lv2/bankstown.lv2/
vinstall manifest.ttl 644 usr/lib/lv2/bankstown.lv2/
vlicense LICENSE
}
1 change: 1 addition & 0 deletions srcpkgs/libOSMesa-asahi
1 change: 1 addition & 0 deletions srcpkgs/libgbm-asahi
1 change: 1 addition & 0 deletions srcpkgs/libgbm-asahi-devel
1 change: 1 addition & 0 deletions srcpkgs/linux-asahi-dbg
1 change: 1 addition & 0 deletions srcpkgs/linux-asahi-headers
Loading
Loading