Apple Silicon Mac support packages (v2)
This PR can boot from a USB stick using https://github.com/void-linux/void-mklive/pull/281 I thank @slimjimsoftware @Skirmisher and @Calandracas606 for contributing and/or testing. See https://github.com/AsahiLinux/docs/wiki/Kernel-config-notes-for-distros for kconfig.
[ci skip] Remarks:
- The
replaces+providesdance inmesa-asahicould be improved, but it works. lsp-pluginsnocross is being fixed at #52640- see https://github.com/void-linux/void-packages/issues/48260 for broken packages
- if using
seatdandwlroots, see https://github.com/AsahiLinux/linux/issues/333 wpa_supplicantto support wpa3 https://github.com/void-linux/void-packages/pull/51362tlpsupport for battery threshold https://github.com/void-linux/void-packages/pull/52374- upstream
eudevpatch https://github.com/eudev-project/eudev/commit/917ae648f61681257000c3a1f0aca3fbd646563a
After installing in the usual way (chroot), it seems to run smoothly on my m1 macbook air.
I natively rebuilt all the packages for aarch64.
The script update-vendor-firmware runs smoothly.
Next on the list is updating kernel.
Note that the way Asahi reference distro handles things like firmware is still in flux; they recently changed it so that "update-vendor-firmware" is run in the initrd, for example. They also have some dracut stuff for Fedora that you can source if it makes sense for Void. Worth checking on pages from the Asahi wiki such as this if you haven't already, as well as asking in their IRC channels if you have questions. marcan has expressed that Asahi would like to help downstream distros make sense of the Asahi work so they can function properly, instead of trying to do it on their own and shipping broken packages (as happened recently with Manjaro).
Thanks for the suggestions, and for doing the initial hard work. They have a hook for mkinitcpio, but not for dracut yet. Since the dracut config can be distro-specific, I thought we'd ship our own, but I'm open to suggestions.
Upon some minor config changes, I was able to boot the latest 6.0 series kernel.
It's imperative to run update-m1n1 upon a kernel update, otherwise it won't boot.
It'd be nice if someone could take a second look at the config, to verify that it's inline with Void's standards.
At this point, I think only kernel and m1n1 are really needed, the rest can be dropped, as m1n1 can boot the initramfs directly. Some work is ongoing as how to load firmware. Perhaps I'll just keep a script to update m1n1 after every kernel update.
@Skirmisher Now shipping a kernel hook for m1n1, which allows to either have the kernel or uboot as payload. In my tests it works fine, using
cat /etc/m1n1.conf
chosen.bootargs=earlycon debug root=/dev/nvme0n1p6 rootwait rw loglevel=4
More eyes are welcome :)
This is awesome!
Just a quick question:
@dkwo you said
I natively rebuilt all the packages for
aarch64.
Is this phrased correctly? Do we really need to rebuild all aarch64 packages? If yes, should we create another aarch?
Do you have interest in also porting the gpu drivers to Void Linux?
I natively rebuilt all the packages for
aarch64.Is this phrased correctly? Do we really need to rebuild all
aarch64packages? If yes, should we create anotheraarch?
"The packages" in this context is just referring to the ones in this PR. dkwo had to cross-compile the Asahi packages from another machine before making a system image to install on the M1. But after that, Void on the M1 can natively compile the packages; dkwo is confirming that native compilation is also working. The Apple Silicon machines can use Void's existing aarch64 packages just fine.
Do you have interest in also porting the gpu drivers to Void Linux?
There is nothing to "port", the code is already in the same tree that the normal Asahi kernel is built from. It's still a work in progress though, so Asahi Linux (the reference distro) turns it off for their default kernel package, and offers a separate linux-asahi-edge package for testing the GPU driver and other less-stable changes (but the kernel version is otherwise identical).
We could add a similar package, but it wouldn't be a good idea; the Asahi developers are frequently updating both the kernel and their mesa driver (which we would also need to build for the GPU to work), and we shouldn't be adding dev builds to Void. All the Asahi work is supposed to be upstreamed as soon as possible, and while the GPU driver is much bigger than other components and will not be upstreamable for a long time, it is better for us to wait for major features to be properly released. (The kernel is the usual exception here, since at this stage there are a lot of individual additions that make the user experience on M1/M2 machines more complete, but each feature need to be negotiated with mainline Linux developers before making it into an upstream release, even if it only needs minor tweaks to be "done". So, the platform kernel package is likely to stick around for a while, and it keeps to itself in the package tree. We are very lucky that Asahi Linux is diligent about tagging kernel releases and only updating their "stable" package with known-good changes.)
Now, it might be nice to have templates for Asahi dev packages anyway, the hardware is plenty capable of building those updates itself :p But they shouldn't live in void-packages and take up Void maintainers' time and effort.
Exactly as @Skirmisher said. I agree that GPU/mesa might be a bit premature.
added asahi-firmware package, which allows to extract a .cpio archive. this should be processed by the initramfs, which i'm currently trying (and failling) to do using tinyramfs.
i can boot from tinyramfs initram, and i'm close to loading the firmware from there, but as soon as i add
cp -r /vendorfw/* /mnt/root/lib/firmware/vendor to the hook.init.late, then it hangs.
now tinyramfs can forward the firmware to /lib/firmware/vendor, but it seems our kernel does not load from there
it's working :)
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
What's the state of this? Are there any to-do's here, or is this working as is and could be merged?
it's been working fine for me, but not as main daily driver, yet. potentially, it could be merged as is. you're welcome to test it as well, if you have the hardware. i plan to update/revbump the kernel config, possibly with gpu support (which also needs mesa; this would be a nice addition if you want to help). i was waiting for them to have hdmi support on newer mac mini's and for zig to unbreak.
I natively rebuilt all the packages for
aarch64.Is this phrased correctly? Do we really need to rebuild all
aarch64packages? If yes, should we create anotheraarch?"The packages" in this context is just referring to the ones in this PR. dkwo had to cross-compile the Asahi packages from another machine before making a system image to install on the M1. But after that, Void on the M1 can natively compile the packages; dkwo is confirming that native compilation is also working. The Apple Silicon machines can use Void's existing aarch64 packages just fine.
Do you have interest in also porting the gpu drivers to Void Linux?
There is nothing to "port", the code is already in the same tree that the normal Asahi kernel is built from. It's still a work in progress though, so Asahi Linux (the reference distro) turns it off for their default kernel package, and offers a separate
linux-asahi-edgepackage for testing the GPU driver and other less-stable changes (but the kernel version is otherwise identical).We could add a similar package, but it wouldn't be a good idea; the Asahi developers are frequently updating both the kernel and their mesa driver (which we would also need to build for the GPU to work), and we shouldn't be adding dev builds to Void. All the Asahi work is supposed to be upstreamed as soon as possible, and while the GPU driver is much bigger than other components and will not be upstreamable for a long time, it is better for us to wait for major features to be properly released. (The kernel is the usual exception here, since at this stage there are a lot of individual additions that make the user experience on M1/M2 machines more complete, but each feature need to be negotiated with mainline Linux developers before making it into an upstream release, even if it only needs minor tweaks to be "done". So, the platform kernel package is likely to stick around for a while, and it keeps to itself in the package tree. We are very lucky that Asahi Linux is diligent about tagging kernel releases and only updating their "stable" package with known-good changes.)
Now, it might be nice to have templates for Asahi dev packages anyway, the hardware is plenty capable of building those updates itself :p But they shouldn't live in void-packages and take up Void maintainers' time and effort.
@dkwo @Skirmisher Hey btw I am also interested in helping out with this effort, I have been independently (I didn't realize this project existed lol) trying to figure out kernel patching and compilation of the Asahi kernel, and in particular have been working on a workflow to get the GPU kernel driver compiled, as I personally feel, even if it's in its early days, see the GPU driver as is today as very important to include. The GPU driver uses rust to compile it, so I figured out a way to make bootstrap-only packages of the exact versions of rust that the Linux kernel 6.6.x uses. Currently though package won't install but I'm close to figuring it out as of this time. https://github.com/RoundDuckKira/void-packages/tree/asahi
BTW, if you guys are on the Void IRC it'd be nice to also meet up there to discuss in how to do this right! ^_^
Oh also, I realized that you guys got 6.6.8 working, holy shit I have been failing to do this myself so yeah it's nice to see others getting that working, but hey I notice yeah you guys don't have the rust stuff working so hopefully my current work is still of some use, at least prototypically as trying to compile an old rust version as a bootstrap package is a disgusting hack.
I know rust-for-linux says 'single version' for now, but they also say 'generally speaking, newer versions should work, as long as one patches any potential compilation errors coming from changes in unstable features.' Maybe we are lucky and asahi have done that? What if we just add void's current rust to hostmakedepends? @RoundDuckKira Can you post a kconfig diff for enabling gpu stuff here? (The rest was working fine last time I checked, see first post.)
I know rust-for-linux says 'single version' for now, but they also say 'generally speaking, newer versions should work, as long as one patches any potential compilation errors coming from changes in unstable features.' Maybe we are lucky and asahi have done that? What if we just add void's current rust to hostmakedepends? @RoundDuckKira Can you post a kconfig diff for enabling gpu stuff here? (The rest was working fine last time I checked, see first post.)
gonna have to figure out how to do the kconfig right, the one I used in my original project was directly copied from the Fedora config and well it didn't work too well by itself or even with oldconfig done to it, so gonna have to compile a kernel independently and see if it compiles right with a properly set kconfig, I'll use your peeps' kconfig.
that said I think the bootstrap idea is at least the most reliable idea, even if things should work normally, and it'll still let there be an asahi-lts option if needed.
I know rust-for-linux says 'single version' for now, but they also say 'generally speaking, newer versions should work, as long as one patches any potential compilation errors coming from changes in unstable features.' Maybe we are lucky and asahi have done that? What if we just add void's current rust to hostmakedepends? @RoundDuckKira Can you post a kconfig diff for enabling gpu stuff here? (The rest was working fine last time I checked, see first post.)
Compile fails when using default rust.
=> xbps-src: updating repositories for host (aarch64)...
[*] Updating repository `https://mirrors.servercentral.com/voidlinux/current/aarch64/bootstrap/aarch64-repodata' ...
[*] Updating repository `https://mirrors.servercentral.com/voidlinux/current/aarch64/aarch64-repodata' ...
[*] Updating repository `https://mirrors.servercentral.com/voidlinux/current/aarch64/nonfree/aarch64-repodata' ...
[*] Updating repository `https://mirrors.servercentral.com/voidlinux/current/aarch64/debug/aarch64-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> linux-asahi-6.6.15_1: removing autodeps, please wait...
=> linux-asahi-6.6.15_1: building for aarch64...
[host] tar-1.35_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] xz-5.4.5_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] bc-1.07.1_5: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] elfutils-devel-0.190_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] flex-2.6.4_3: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] gmp-devel-6.3.0_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] kmod-31_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] libmpc-devel-1.3.1_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] openssl-devel-3.1.4_2: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] perl-5.38.2_3: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] uboot-mkimage-2023.10_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] cpio-2.14_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] pahole-1.25_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] python3-3.12.1_4: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] zstd-1.5.5_2: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] rust-1.75.0_2: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] cargo-1.75.0_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] rust-bindgen-0.66.1_1: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] rust-src-1.75.0_2: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
[host] libclang-15.0.7_3: found (https://mirrors.servercentral.com/voidlinux/current/aarch64)
=> linux-asahi-6.6.15_1: installing host dependencies: tar-1.35_1 xz-5.4.5_1 bc-1.07.1_5 elfutils-devel-0.190_1 flex-2.6.4_3 gmp-devel-6.3.0_1 kmod-31_1 libmpc-devel-1.3.1_1 openssl-devel-3.1.4_2 perl-5.38.2_3 uboot-mkimage-2023.10_1 cpio-2.14_1 pahole-1.25_1 python3-3.12.1_4 zstd-1.5.5_2 rust-1.75.0_2 cargo-1.75.0_1 rust-bindgen-0.66.1_1 rust-src-1.75.0_2 libclang-15.0.7_3 ...
=> linux-asahi-6.6.15_1: running do-fetch hook: 00-distfiles ...
=> linux-asahi-6.6.15_1: fetching distfile 'asahi-6.6-15.tar.gz' from 'https://github.com/AsahiLinux/linux/archive/asahi-6.6-15.tar.gz'...
asahi-6.6-15.tar.gz: [0B 0%] 2075KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7820KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7849KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7871KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7995KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7889KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7823KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7773KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7436KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7138KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6889KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6719KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6581KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6564KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6654KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6698KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6765KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6834KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6889KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6933KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 6978KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7007KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7030KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7064KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7093KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7108KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7108KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7148KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7156KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7170KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7188KB/s ETA: unknown
asahi-6.6-15.tar.gz: [0B 0%] 7194KB/s ETA: unknown
asahi-6.6-15.tar.gz: 219MB [avg rate: 7277KB/s]
=> linux-asahi-6.6.15_1: verifying checksum for distfile 'asahi-6.6-15.tar.gz'... OK.
=> linux-asahi-6.6.15_1: running do-extract hook: 00-distfiles ...
=> linux-asahi-6.6.15_1: extracting distfile(s), please wait...
=> linux-asahi-6.6.15_1: running pre_patch ...
xzcat: /host/sources/linux-asahi-6.6.15/patch-6.6.15.xz: No such file or directory
=> linux-asahi-6.6.15_1: running do-patch hook: 00-patches ...
=> linux-asahi-6.6.15_1: running pre-configure hook: 00-gnu-configure-asneeded ...
=> linux-asahi-6.6.15_1: running pre-configure hook: 01-override-config ...
=> linux-asahi-6.6.15_1: running pre-configure hook: 02-script-wrapper ...
=> linux-asahi-6.6.15_1: running do_configure ...
=> Detected a .config file for your arch, using it.
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/expr.o
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/preprocess.o
LEX scripts/kconfig/lexer.lex.c
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTLD scripts/kconfig/conf
*
* Restart config...
*
*
* GCC plugins
*
GCC plugins (GCC_PLUGINS) [Y/n/?] (NEW) Y
Y
Generate some entropy during boot and runtime (GCC_PLUGIN_LATENT_ENTROPY) [N/y/?] (NEW)
*
* Memory initialization
*
Initialize kernel stack variables at function entry
> 1. no automatic stack variable initialization (weakest) (INIT_STACK_NONE)
2. pattern-init everything (strongest) (INIT_STACK_ALL_PATTERN)
3. zero-init everything (strongest and safest) (INIT_STACK_ALL_ZERO)
choice[1-3?]: 1
Poison kernel stack before returning from syscalls (GCC_PLUGIN_STACKLEAK) [N/y/?] (NEW)
Enable heap memory zeroing on allocation by default (INIT_ON_ALLOC_DEFAULT_ON) [Y/n/?] y
Enable heap memory zeroing on free by default (INIT_ON_FREE_DEFAULT_ON) [N/y/?] n
Enable register zeroing on function exit (ZERO_CALL_USED_REGS) [Y/n/?] y
*
* Kernel hardening options
*
Randomize layout of sensitive kernel structures
> 1. Disable structure layout randomization (RANDSTRUCT_NONE)
2. Fully randomize structure layout (RANDSTRUCT_FULL) (NEW)
3. Limit randomization of structure layout to cache-lines (RANDSTRUCT_PERFORMANCE) (NEW)
choice[1-3?]:
#
# configuration written to .config
#
=> linux-asahi-6.6.15_1: running pre-build hook: 02-script-wrapper ...
=> linux-asahi-6.6.15_1: running do_build ...
SYNC include/config/auto.conf
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/uapi/asm/errno.h
WRAP arch/arm64/include/generated/uapi/asm/ioctls.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
WRAP arch/arm64/include/generated/uapi/asm/msgbuf.h
WRAP arch/arm64/include/generated/uapi/asm/ioctl.h
WRAP arch/arm64/include/generated/uapi/asm/ipcbuf.h
WRAP arch/arm64/include/generated/uapi/asm/resource.h
WRAP arch/arm64/include/generated/uapi/asm/poll.h
WRAP arch/arm64/include/generated/uapi/asm/sembuf.h
WRAP arch/arm64/include/generated/uapi/asm/shmbuf.h
WRAP arch/arm64/include/generated/uapi/asm/socket.h
WRAP arch/arm64/include/generated/uapi/asm/siginfo.h
WRAP arch/arm64/include/generated/uapi/asm/sockios.h
WRAP arch/arm64/include/generated/uapi/asm/stat.h
WRAP arch/arm64/include/generated/uapi/asm/swab.h
WRAP arch/arm64/include/generated/uapi/asm/termios.h
WRAP arch/arm64/include/generated/uapi/asm/termbits.h
WRAP arch/arm64/include/generated/uapi/asm/types.h
UPD include/generated/uapi/linux/version.h
UPD include/generated/utsrelease.h
UPD include/generated/compile.h
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/data.o
WRAP arch/arm64/include/generated/asm/early_ioremap.h
HOSTCC scripts/dtc/srcpos.o
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
HOSTCC scripts/dtc/checks.o
WRAP arch/arm64/include/generated/asm/qrwlock.h
WRAP arch/arm64/include/generated/asm/qspinlock.h
HOSTCC scripts/dtc/util.o
WRAP arch/arm64/include/generated/asm/parport.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
LEX scripts/dtc/dtc-lexer.lex.c
WRAP arch/arm64/include/generated/asm/dma-mapping.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
YACC scripts/dtc/dtc-parser.tab.[ch]
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/kmap_size.h
WRAP arch/arm64/include/generated/asm/mmiowb.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/softirq_stack.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/msi.h
HOSTCC scripts/dtc/libfdt/fdt_ro.o
HOSTCC scripts/dtc/libfdt/fdt.o
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/unaligned.h
HOSTCC scripts/dtc/libfdt/fdt_wip.o
WRAP arch/arm64/include/generated/asm/vga.h
HOSTCC scripts/dtc/libfdt/fdt_sw.o
HOSTCC scripts/dtc/libfdt/fdt_rw.o
HOSTCC scripts/dtc/libfdt/fdt_strerror.o
HOSTCC scripts/dtc/libfdt/fdt_empty_tree.o
HOSTCC scripts/dtc/libfdt/fdt_addresses.o
HOSTCC scripts/dtc/libfdt/fdt_overlay.o
HOSTCC scripts/dtc/fdtoverlay.o
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/fdtoverlay
HOSTLD scripts/dtc/dtc
HOSTCC scripts/kallsyms
HOSTCC scripts/asn1_compiler
HOSTRUSTC scripts/generate_rust_target
HOSTCC scripts/sorttable
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
UPD scripts/target.json
GEN arch/arm64/include/generated/asm/cpucaps.h
GEN arch/arm64/include/generated/asm/sysreg-defs.h
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
CC scripts/mod/devicetable-offsets.s
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
UPD scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CC kernel/bounds.s
CHKSHA1 include/linux/atomic/atomic-arch-fallback.h
UPD include/generated/timeconst.h
CHKSHA1 include/linux/atomic/atomic-long.h
CHKSHA1 include/linux/atomic/atomic-instrumented.h
UPD include/generated/bounds.h
CC arch/arm64/kernel/asm-offsets.s
UPD include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
LDS arch/arm64/kernel/vdso/vdso.lds
AS arch/arm64/kernel/vdso/note.o
AS arch/arm64/kernel/vdso/sigreturn.o
CC arch/arm64/kernel/vdso/vgettimeofday.o
LD arch/arm64/kernel/vdso/vdso.so.dbg
VDSOSYM include/generated/vdso-offsets.h
OBJCOPY arch/arm64/kernel/vdso/vdso.so
***
*** Rust compiler 'rustc' is too new. This may or may not work.
*** Your version: 1.75.0
*** Expected version: 1.71.1
***
***
*** Rust bindings generator 'bindgen' is too new. This may or may not work.
*** Your version: 0.66.1
*** Expected version: 0.65.1
***
***
*** Please see Documentation/rust/quick-start.rst for details
*** on how to set up the Rust support.
***
RUSTC L rust/core.o
BINDGEN rust/bindings/bindings_generated.rs
BINDGEN rust/bindings/bindings_helpers_generated.rs
BINDGEN rust/uapi/uapi_generated.rs
warning: unknown and unstable feature specified for `-Ctarget-feature`: `fp-armv8`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
warning: 1 warning emitted
EXPORTS rust/exports_core_generated.h
RUSTC L rust/compiler_builtins.o
RUSTC P rust/libmacros.so
warning: the feature `compiler_builtins` is internal to the compiler or standard library
--> /builddir/linux-asahi-6.6.15/rust/compiler_builtins.rs:22:12
|
22 | #![feature(compiler_builtins)]
| ^^^^^^^^^^^^^^^^^
|
= note: using it is strongly discouraged
= note: `#[warn(internal_features)]` on by default
warning: unknown and unstable feature specified for `-Ctarget-feature`: `fp-armv8`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
warning: 2 warnings emitted
RUSTC L rust/alloc.o
RUSTC L rust/bindings.o
RUSTC L rust/build_error.o
RUSTC L rust/uapi.o
warning: unknown and unstable feature specified for `-Ctarget-feature`: `fp-armv8`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
error[E0432]: unresolved imports `core::ops::Generator`, `core::ops::GeneratorState`
--> /builddir/linux-asahi-6.6.15/rust/alloc/boxed.rs:164:54
|
164 | CoerceUnsized, Deref, DerefMut, DispatchFromDyn, Generator, GeneratorState, Receiver,
| ^^^^^^^^^ ^^^^^^^^^^^^^^ no `GeneratorState` in `ops`
| |
| no `Generator` in `ops`
warning: 1 warning emitted
warning: the feature `allocator_internals` is internal to the compiler or standard library
--> /builddir/linux-asahi-6.6.15/rust/alloc/lib.rs:175:12
|
175 | #![feature(allocator_internals)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: using it is strongly discouraged
= note: `#[warn(internal_features)]` on by default
warning: the feature `allow_internal_unstable` is internal to the compiler or standard library
--> /builddir/linux-asahi-6.6.15/rust/alloc/lib.rs:176:12
|
176 | #![feature(allow_internal_unstable)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: the feature `lang_items` is internal to the compiler or standard library
--> /builddir/linux-asahi-6.6.15/rust/alloc/lib.rs:189:12
|
189 | #![feature(lang_items)]
| ^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: the feature `rustc_allow_const_fn_unstable` is internal to the compiler or standard library
--> /builddir/linux-asahi-6.6.15/rust/alloc/lib.rs:195:12
|
195 | #![feature(rustc_allow_const_fn_unstable)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: the feature `rustc_attrs` is internal to the compiler or standard library
--> /builddir/linux-asahi-6.6.15/rust/alloc/lib.rs:196:12
|
196 | #![feature(rustc_attrs)]
| ^^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: the feature `staged_api` is internal to the compiler or standard library
--> /builddir/linux-asahi-6.6.15/rust/alloc/lib.rs:198:12
|
198 | #![feature(staged_api)]
| ^^^^^^^^^^
|
= note: using it is strongly discouraged
warning: unused imports: `min_align_of_val`, `size_of_val`
--> /builddir/linux-asahi-6.6.15/rust/alloc/alloc.rs:9:24
|
9 | use core::intrinsics::{min_align_of_val, size_of_val};
| ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `core::ptr::Unique`
--> /builddir/linux-asahi-6.6.15/rust/alloc/alloc.rs:11:5
|
11 | use core::ptr::Unique;
| ^^^^^^^^^^^^^^^^^
error: aborting due to previous error; 8 warnings emitted
For more information about this error, try `rustc --explain E0432`.
make[2]: *** [rust/Makefile:443: rust/alloc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
warning: unknown and unstable feature specified for `-Ctarget-feature`: `fp-armv8`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
warning: 1 warning emitted
warning: unknown and unstable feature specified for `-Ctarget-feature`: `fp-armv8`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
warning: 1 warning emitted
make[1]: *** [/builddir/linux-asahi-6.6.15/Makefile:1208: prepare] Error 2
make: *** [Makefile:234: __sub-make] Error 2
=> ERROR: linux-asahi-6.6.15_1: do_build: 'make ARCH=$arch ${_cross} ${makejobs} prepare' exited with 2
=> ERROR: in do_build() at srcpkgs/linux-asahi/template:98
done
i know, i also tried yesterday. it seems current rust was merged into linux-next a couple days ago. things will get better, but for now i consider it too much effort to track the specific rust version.
i know, i also tried yesterday. it seems current rust was merged into linux-next a couple days ago. things will get better, but for now i consider it too much effort to track the specific rust version.
Well I have a pull request for your asahi2 branch of your repo, and well, I did get it working there. It compiled fine and then Linux got compiled fine, and I even booted on it successfully! Wifi is borked tho.
thanks. wifi works here, with wpa supplicant (but no wpa3, see https://github.com/AsahiLinux/linux/issues/48
@RoundDuckKira Also, make sure you extract the firmware once using firmware pkg, and that your initram passes it over to kernel (tinyramfs hooks does it). e.g asahi-fwextract /boot/asahi /boot/vendorfw if efi is at boot.
@RoundDuckKira Also, make sure you extract the firmware once using firmware pkg, and that your initram passes it over to kernel (tinyramfs hooks does it). e.g
asahi-fwextract /boot/asahi /boot/vendorfwif efi is at boot.
I didn't know I needed to do this, tho is there a way to make this work nicely with the default dracut?
it's certainly possible, you'd have to adapt the asahi scripts pkg https://github.com/AsahiLinux/asahi-scripts (i initially packaged it, it's easy, but later I wrote a hook for tinyramfs and dropped that)
You may want to build the wpa_supplicant from the master branch, until a new release, for working wpa3.
it seems that for 6.8 series the gpu driver builds with rust 1.77. I'll try that soon, and fix dracut so that on first install wifi works.