marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | Not ready for end users / self contained install yet. Soon. | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-stream #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
user982492 has joined #asahi
user982492 has quit []
user982492 has joined #asahi
hays has quit []
<marcan> lol, I didn't expect 1920x2160 to be a thing
hays has joined #asahi
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user982492 has joined #asahi
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dcow has joined #asahi
Dcow has quit [Quit: Dcow]
user982492 has joined #asahi
PhilippvK has joined #asahi
phiologe has quit [Ping timeout: 480 seconds]
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi
<kit_ty_kate1> Glanzmann: a video guide would be really awesome to have for sure imo
darkapex2 has joined #asahi
darkapex1 has quit [Ping timeout: 480 seconds]
anparra[m] has joined #asahi
marvin24_ has joined #asahi
<marcan> jannau: thanks for the testing :)
<marcan> I think iBoot has a ~5 second timeout, judging by how long it used to take extra to boot the Mini without a display
<marcan> but we probably don't want to delay that long, it always felt like overkill
marvin24 has quit [Ping timeout: 480 seconds]
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user982492 has joined #asahi
torstenvl has joined #asahi
jeffmiw has quit [Ping timeout: 480 seconds]
<Glanzmann> kit_ty_kate1: I'll make one.
<Glanzmann> kit_ty_kate1: But I'm also thinking of modifying the debian installer that it just works.
<Glanzmann> Because then this would be close to the final state marcan wants anyway.
<VinDuv> I did a test of jannau's branch on my 1080p monitor. It now lights up, but says “no signal” and goes back to sleep. I’ll get the serial output in a few hours.
nzzz is now known as z
z has quit [Remote host closed the connection]
<jannau> VinDuv: did that monitor work with macos 11 iboot? does it work after a chainload?
nzzz has joined #asahi
<VinDuv> jannau: I never had a chance to try the old iBoot, unfortunately. (When I got the mini, 12.0.1 was already out and I installed it right away). Will try the chainload later.
<VinDuv> (I always had some odd issues with that monitor so I wouldn’t be surprised if it didn’t work…)
MajorBiscuit has joined #asahi
aleasto has joined #asahi
<landscape15[m]> VinDuv: I think you can do a full DFU to downgrade to Big Sur, since the ipsw is still signed.
<landscape15[m]> * full DFU restore to downgrade
darkapex has joined #asahi
darkapex2 has quit [Remote host closed the connection]
<_jannau_> downloading the big sur installer from the app store and create installer medium also works
darkapex1 has joined #asahi
darkapex has quit [Ping timeout: 480 seconds]
<landscape15[m]> I don’t think it works. With Intel macs you can’t install a previous macOS version than the one the Mac is shipped with, even from an external USB, because it doesn’t downgrade the EFI firmware.
<landscape15[m]> But I don’t know how it works on Apple Silicon. I’m sure with a DFU restore, also the original firmware is restored.
<VinDuv> I actually installed 11 on the mini after the fact (via USB), but I don’t thing that downgraded iBoot
<_jannau_> landscape15[m]: it works, I've done it
<VinDuv> (I mean with the 11 installer on a USB stick, not the DFU restore)
ChristianvonElm[m] has joined #asahi
<_jannau_> VinDuv: there is a installtion specific iboot stage that initializes the display even with the system iboot is already based on macos 12
<_jannau_> but I don't think it's worth to spend any effort on macos 11. The minimal supported version will be macos 12.1 now that mini hdmi blocker has been mostly resolved
<mps> I made kernel patch on top of asahi which add nice 12x24 bold terminus fonts on console, looks fine on MBP
<landscape15[m]> jannau: good to know, thanks.
<ChristianvonElm[m]> sorry if that is a total noob mistake, but im trying to boot the Linux Kernel according to the SW:Linux guide in the Wiki but I'm getting a "VFS cannot open root device "(null)" or unknown block (0,0): error -6" error, can anyone help me?
<mps> ChristianvonElm[m]: you have to pass kernel cmdline params with root=whatever, I guess
<ChristianvonElm[m]> okay I'll try
<mps> 'whatever' is actual root filesystem
<landscape15[m]> Christian von Elm: you can directly add the parameter inside the kernel config if you want
<rkjnsn[m]> marcan: Re iBoot waiting ~5 seconds, did it support displays attached via Thunderbolt, or just HDMI? I've had a Tunderbolt→dock→HDMI→monitor setup before that always took a few extra seconds for the display to come up versus a direct HDMI connection.
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user982492 has joined #asahi
torstenvl has quit [Remote host closed the connection]
torstenvl has joined #asahi
<VinDuv> Got the logs for my 1080p monitor: https://paste.debian.net/hidden/b4bb9fcd/ (both cold boot and chainload; when chainloading, the screens powers up briefly as well)
torstenvl has quit [Ping timeout: 480 seconds]
<marcan> rkjnsn[m]: just HDMI, it has never supported dispext
<marcan> if you were using a TB monitor, that was never working until macos loads the DCP driver
<marcan> which is now the state of affairs for everyone
<marcan> landscape15[m]: booting 11.x macos from 12.x firmware works, because the 11.x DCP/iBoot2 will initialize the display (just a bit later)
<marcan> you don't get the apple logo though, which is hilarious - just a progress bar until DCP loads
<marcan> you can install m1n1 on that, except for the kmutil issue if you have 12.1 firmware
<marcan> which is another reason why I wanted to get this mess over with asap
<marcan> I don't want people to waste time making workarounds for older versions
<marcan> it all ends up wasted work in the long term, and it's not helping anyone in the short term because we're not at the point where we desperately need wider testing
<landscape15[m]> marcan: thanks. Does this mean that the latest firmware is backward compatible with old macOS versions? If yes, then this could change in the future and Linux can be installed only if you have the latest macOS version installed.
<kov> marcan, I've noticed you use a tool called areset if I'm not mistaken to power cycle on the streams, is that something custom?
<j`ey> *areboot
<kov> areboot that's it
<kov> wondering if that is something I can use or if it would require some kind of special hardware
<j`ey> kov: pretty sure its using https://github.com/AsahiLinux/vdmtool which only works if you have the hardware uart thing
<kov> ah I see
<j`ey> or https://github.com/AsahiLinux/macvdmtool if you have 2 m1s
<kov> j`ey, nice, that may help me actually =) thank you!
<kov> jannau, aha, thank you!
<j`ey> kov: I used the m1n1 hv usually, works well to reboot
ChristianvonElm[m] has left #asahi [#asahi]
<VinDuv> Rebuilt m1n1 with RTKIT_SYSLOG enabled: https://paste.debian.net/hidden/2c8254dc/ It looks like DCP doesn’t like something about my monitor?
<kov> j`ey, heh, macvdmtool worked after I *ahem* used the DFU port on the controlling m1
<j`ey> kov: yay :)
<kov> \o/
<marcan> landscape15[m]: the system is designed to be backwards compatible
<marcan> we only care that you have at least the minimum required version or newer for the installer to work
torstenvl has joined #asahi
torstenvl has quit [Ping timeout: 480 seconds]
yuyichao has quit [Ping timeout: 480 seconds]
<_jannau_> I suppose we can close https://github.com/AsahiLinux/m1n1/issues/137
yuyichao has joined #asahi
<kov> Glanzmann, I followed your u-boot guide (thank you for the guides!), except I installed the system with d-i and I'm booting the m1n1-uboot bundle with m1n1's chainload, are any of those expected to be a problem?
<kov> u-boot runs, finds the bootaa64.efi file, but then it errors out with a bunch of Invalid Parameter errors
<Glanzmann> kov: I've seen that exact error before, but I have no glue where it comes from.
<Glanzmann> clue*
<Glanzmann> kov: What worked for me is, that I dd'ed a 'efi' parition from my macbook air over.
<Glanzmann> However grub-install should make it bootable, and it did before, but it does not seem to.
<Glanzmann> kov: How were you able to boot the debian installer with an updated kernel?
<kov> Glanzmann, I used the initrd trick, got the initrd and bundled it with the m1n1 and the kernel
<Glanzmann> kov: Okay, what I don't get when I did this the first time, I ran grub-install --removable /path/to/device and it worked.
<Glanzmann> Now that does not seem to work anymore and I don't know why.
<kov> d-i works well, you only need to tell it you're ok with not loading modules and it won't install grub of course =)
<kov> Glanzmann, weird
<Glanzmann> kov: I see. But you should be able to install grub manually from the installer seperate window.
<kov> yeah
<kov> I wonder if I can just mount and copy the files from the main EFI partition over... hmm
<Glanzmann> kov: I'll try it again later tonight and see if I can figure it out. If you find the reason, please ping me in irc.
<kov> Glanzmann, will do, thanks!
<Glanzmann> kov: Just to be clear you run the installer by using the netboot linux kernel and initrd and said not to load modules?
<Glanzmann> So a self compiled linux kernel and the initrd from the installer?
<kov> Glanzmann, I use a custom built kernel and the d-i initrd yeah
<Glanzmann> And that's it and than you we're able to install?
<Glanzmann> kov: Did you run that using m1n1 or did you build an ISO that you dded on a usb stick?
<kov> I think the only 2 non-usual dialogs I see are it asking if I want to continue without loading modules and then that it did not install grub
<kov> Glanzmann, oh, I ran the asahi installer first yeah
<kov> so m1n1, custom kernel, d-i initrd
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_jannau_> kov: the debian installer seems now to refuse to run if the kernel doesn't match its modules, even when the kernel has everything built-in
<Glanzmann> jannau: I found a website which says it installs fine if you say no to the kernel, install the custom kernel yourself after the installation finished and install grub.
<Glanzmann> I was about to paste the debian wiki page where this is documented, but I have not written it down apparantly.
<kov> Glanzmann, how did you get the EFI image out of the macbook?
<_jannau_> Glanzmann: I tried it with the network installer and the installer itself will will not advance
<Glanzmann> Here it is: https://wiki.debian.org/DebianInstaller/Arm/OtherPlatforms 'Inside Debian-Installer'.
<kov> _jannau_, weird, was that with the latest stable?
<Glanzmann> kov: So I have an air which has a working grub efi partition.
<kov> Glanzmann, oh I see
<Glanzmann> I dded that of the macbook air and dded that onto the mac mini and it booted.
<kov> Glanzmann, would you mind sharing the image?
<kov> I'll see if I can figure out what's different
<Glanzmann> Once booted, I tried to do a proper installation using grub-install as I have done on the air before, and I get the exact same error you see. No idea why.
<kov> I wonder if it's different grub version
<Glanzmann> Probably.
<Glanzmann> The dd is here: It requires a 1 GB partition to dd it on. YOu can do it from macos or Linux.
<kov> I was thinking of trying to downgrade it
<kov> will do it later today
<Glanzmann> Here it is: https://tg.st/efi.tgz
<kov> Glanzmann, thank you!
<Glanzmann> If you find anything out, let me know, I'll do the same.
<kov> Glanzmann, 404 here
<Glanzmann> We're once inch away from making the debian installer work.
<Glanzmann> sorry. https://tg.st/u/efi.tgz
<kov> looking forward to that!
<Glanzmann> /u/ was missing, as I always forget to add it.
<_jannau_> kov: debian stable aarch64 network installer from last autumn
<kov> hah
<kov> Glanzmann, worked, thanks!
torstenvl has joined #asahi
<kov> hmm first differences that catch my eye are debian vs BOOT and ubootefi.var, but I wonder if that is put there by u-boot after itself?
<Glanzmann> you need boot.
<kov> hah
<Glanzmann> If you don't have boot, u-boot does not pick it up.
<kov> well copying your EFI files over makes it work
<Glanzmann> that is what grub-install --removable or the dpkg-reconfigure grub-efi-arm64 does.
<kov> Glanzmann, what, sorry?
h_ has joined #asahi
<Glanzmann> efivars is new. Some grub utility creates it, but to my knowledge you don't need it.
<kov> ah ok
<Glanzmann> You just need this one binary: EFI/BOOT/BOOTAA64.EFI
hays has quit [Ping timeout: 480 seconds]
torstenvl has quit [Ping timeout: 480 seconds]
<kov> yeah so I removed everything and kept only the BOOTAA64.EFI and grubaa64.efi files from your image and grub is started
<kov> so I think it's indeed very likely a problem caused by a newer grub version, I'll try with an older one and let you know Glanzmann
<kettenis> kov: regarding that u-boot fix you mentioned, that may indeed not be present in the version of u-boot you're using
<mps> I have no idea how any distro could make installer because of firmware licensing problem
<kov> kettenis, it isn't, you think that may be the problem?
<kettenis> as it is based on u-boot master from roughly a year ago
<Glanzmann> kov: Thanks. Yes, I saw that grub was recently updated in testing.
<kov> I'll look into that possibility as well
<kettenis> kov: I don't know; but I'm upstreaming things and I'll probably create a branch based on current u-boot master soon
<mps> kettenis: are you patches merged
<mps> s/you/your/
<kov> let's see, it's a one-liner patch I can test it quickly
<kettenis> some of them are merged, some of them are not
<mps> kettenis: I saw some are but didn't saw latest one in git repo yet
yuyichao has quit [Quit: Konversation terminated!]
<mps> s/one/ones/ (huh)
yuyichao has joined #asahi
<kov> hmm it reboots with the patch
<mps> (making too much typing errors today)
<kov> it goes through the probing of the NVME and reboots
h_ has quit [Ping timeout: 480 seconds]
<kov> Glanzmann, so, fun discovery, removing this file makes it work it seems fbaa64.efi
<kov> that's the 'fallback' program I guess?
hays has joined #asahi
<kettenis> so the debian EFI setup is unecessarily complicated because it uses shim
<maz> yeah, and they deprecated it just before the stable release.
<maz> (not that I care about secure boot, but hey...)
<kettenis> it should all work with u-boot when set up correctly
<kettenis> but apparently it si easy to break
<kettenis> kov: looking at the screenshot you posted, those messages directly above "## Application failed, r = 2" don't come from U-Boot but from your bootaa64.efi
eta has quit [Quit: wolp]
<kov> yeah, makes sense... it'll be a problem for fedora and others as well
eta has joined #asahi
Gues__________________________ has joined #asahi
Gues__________________________ is now known as thevar1able
thevar1able has quit []
Gues__________________________ has joined #asahi
Gues__________________________ has quit []
thevar1able has joined #asahi
<Glanzmann> kov: I see. I'll try it later tonight. Thank you for figuring that out.
torstenvl has joined #asahi
gladiac is now known as Guest784
gladiac has joined #asahi
JamesB192 has left #asahi [http://quassel-irc.org - Chat comfortably. Anywhere.]
Guest784 has quit [Ping timeout: 480 seconds]
thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
MajorBiscuit has quit [Ping timeout: 480 seconds]
ArjunKarangiya[m] has joined #asahi
qeeg has joined #asahi
qeeg_ has quit [Ping timeout: 480 seconds]
darkapex2 has joined #asahi
darkapex1 has quit [Ping timeout: 480 seconds]
<Glanzmann> kov: I tried to reinstall grub on the macbook air and it rebooted afterwards even with the fbaa64.efi.
<Glanzmann> I have to try more things and reinstall my macbook air with Linux to figure out where it goes wrong.
<Glanzmann> jannau: When you tried the Debian installer, were you trying the graphical or the text based installer?
<jannau> Glanzmann: the net-installer is iirc text-only
<Glanzmann> jannau: I was looking at https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-11.2.0-arm64-netinst.iso In the grub menu there is Install, graphic install and multiple other options see: https://pbot.rmdir.de/iGajJ6UyMb3y5_WnVyjn9Q
<Glanzmann> jannau: I see. Thank you for the link I was looking for this.
<jannau> it's linked under "Network boot" on https://www.debian.org/distrib/netinst
aleasto has quit [Remote host closed the connection]
<Glanzmann> jannau: Thank you. Previously I was always browsing the /debian dir until I found it. But somehow I was never finding it for arm64 ...
thevar1able has joined #asahi
thevar1able has quit []
<Glanzmann> kov: I now also broke my macbook air grub installation with the very same error and I try to recover it.
thevar1able has joined #asahi
<Glanzmann> mps: I think the idea with the installers is that you either install using an ethernet card/dongle or you put the the firmware somewhere where the installer can pick it up.
thevar1able has quit []
thevar1able has joined #asahi
<mps> Glanzmann: this is what I also think, using usb ethernet or wifi dongle, but not all (end) users have these devices
<mps> but looks like only option left to us
<jannau> the installer will create the efi system partition and save a tarball with the extracted firmware there
<mps> jannau: so distro installer can unpack firmware and then run iwd/wpa_supplicant? sound good idea
<jannau> the installer needs cutom handling to make them available before it loads brcmfmac
<mps> yes, makes sense
<jannau> a little annoying but manageable
<Glanzmann> So, now I'm back at I don't know how to install grub anylonger ... perfect. Lets try kov's workaround.
<mps> installer is in python, but I don't have experience with python to adapt it distro
<Glanzmann> kov: You workaround works. Thank you.
<Glanzmann> Now lets see if I can fix the usb boot.
thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<jannau> mps: there are two possible integration paths for custom distro installers
thevar1able has joined #asahi
<jannau> 1. installer iso/usb stick which can be bootet via u-boot/efi
<mps> jannau: I'm preparing (slowly) 1.
<jannau> 2. integration in asahi-installer. too early for this but I don't think it will require much integration work into asahi-installer
<Glanzmann> kov: Were you able to boot the installer, if so did you take the one from the iso or from the netboot directory?
<mps> jannau: yes, these two options are in my minds, but we have time (I think) to chose one which would be better
<jannau> in the simplest case ith will be just a shell script / binary asahi-installer executes after it has setup the efi system partition (maybe only after step2.sh)
<Glanzmann> jannau: For debian that would be pretty easy. We could just dd a rootfs and do a resize2fs and done. Asahi once talked about this.
<Glanzmann> s/asahi/marcan/g
<jannau> 1. has the advantage that asahi-installer and the distro installer are completly separate
<mps> good thing for alpine users is that we expect of our users they know how to do basic things and follow guides and not just clicking or pressing enter key
<jannau> 2. has the advantage that it doesn't require writing an installer image onto an usb stick
<mps> hmm, we want/prefer to distribute signed installer images
<kettenis> then 1. is for you
<mps> kettenis: I think so, with asahi installer to first prepare ESP with firmware tarball and possibly(?) install u-boot
<kettenis> the idea is that the asahi installer will indeed set up the machine with m1n1+u-boot payload
<jannau> it should be possible to bundle asahi-installer on the image (readable by macos recovery) for offline installations
<mps> I really don't know much about macos (actually very little), so firmware could be extracted in 1TR booted iiuc
<Glanzmann> kov: The thing is, when I first did that, I just copied the one file to the mentioned directory.
<Glanzmann> I try to boot the debian installer with a custom kernel but it does not pick up the usb stick (/dev/sda1) I made sure that the usb_storage and xhci-hcd is compiled into kernel (not as a module). Has someone an Idea how I can tell the kernel to scan for the usb devices? I also notice that when I boot in a working installation, the usbstick shows up but is only detected after systemd is runing.
<Glanzmann> This is the output from the same kernel booting into debian (not debian installer) and the output of lsusb -t
<j`ey> unrelated, but good to see you got "ieee80211 phy0: brcmf_p2p_send_action_frame: Unknown Frame: category 0x5, action 0x4" too
<Glanzmann> jannau: yes, I have that, too. I'm on a wpa3 network. :-)
kyeh[m] has joined #asahi
<kov> Glanzmann, I used the initrd from netboot yeah
<kov> the external usb worked for me, I don't remember doing anything special
<kov> last install I did was on the nvme though
<kov> in other news, is there a way to tell m1n1 to ignore the payload? or the only way to go back to "proxy" mode is kmutil?
<j`ey> for now I think thats it
<j`ey> marcan did suggest, in the past, maybe nvram can be used to set a 'proxy or payload' mode
thevar1able has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<kov> I'd put m1n1 as an option on the grub prompt but the problem is the usb keyboard is not working at that point heh
<j`ey> I would have though usb keyboard worked with grub through u-boot
<kettenis> it works
<kov> hrm what did I do wrong then
<kov> this is on a mini
<kov> with latest m1n1 including the dcp fix
<Glanzmann> kov: Did you take the initrd from 'stable' or 'testing'? Did you take it from the iso or the path on the debian http site?
<kov> Glanzmann, hmm I think I actually took it from buster, from the url mentioned here https://github.com/AsahiLinux/docs/wiki/SW:Linux#running-linux-via-usb-cable
<Glanzmann> kov: I see.
thevar1able has joined #asahi
<Glanzmann> kov: Which kernel config did you use?
<kov> Glanzmann, let me upload the one I'm using it should be the same I used for the usb install
<Glanzmann> I see.
<Glanzmann> kov: You're using a mini?
<kov> Glanzmann, yeah
<kov> so, funny thing kettenis, apparently my wireless usb keyboard doesn't work at all, I plugged in a cabled usb keyboard and if I hit keys to stop uboot from auto booting then the keyboard also works on grub
<kov> but not otherwise
<Glanzmann> kov: Thank you. So with the mini you have the advantage that the network card is working out oft the box.
<Glanzmann> With the air you need to get USB working which I'm unable at the moment with the initrd of the debian installer.
<kov> Glanzmann, yeah... when I was playing with the air I was using a usb dongle
<kov> I included the drivers for the ethernet in it on the kernel
<Glanzmann> kov: I see, I thought I have drivers in, but somehow I don't see the usb device show up, not for the usb stick and also not for my ethernet dongle.
dominic_ has joined #asahi
dominic_ has quit []
<Glanzmann> kov: For the usb I was missing some drivers, try to compile them in right now.
<Glanzmann> kov: At the moment I have the problem that when I boot the debian installer it does not show the device for the usb stick or network card, but to the drivers are compiled in.
<Glanzmann> But I have to hit bed now. Search for it another day.
<Glanzmann> kov: Thank you for find the issue with the fbaa64.efi. I updated the instructions.
<kov> Glanzmann, o/ thank you!
thevar1able has quit [Quit: Textual IRC Client: www.textualapp.com]