marcan changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
DanB91 has quit [Ping timeout: 246 seconds]
acelogic has joined #asahi-dev
acelogic has quit [Ping timeout: 260 seconds]
acelogic has joined #asahi-dev
ohnx has joined #asahi-dev
ohnx has quit [Read error: Connection reset by peer]
artemist has quit [Ping timeout: 260 seconds]
artemist has joined #asahi-dev
acelogic has quit [Remote host closed the connection]
luca020400 has quit [Quit: WeeChat 3.0]
DanB91 has joined #asahi-dev
DanB91 has quit [Ping timeout: 264 seconds]
DanB91 has joined #asahi-dev
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
DanB91 has quit [Ping timeout: 264 seconds]
DanB91 has joined #asahi-dev
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
DanB91 has quit [Ping timeout: 246 seconds]
VinDuv has joined #asahi-dev
maor26 has joined #asahi-dev
DarthCloud has quit [Remote host closed the connection]
DarthCloud has joined #asahi-dev
ldhacker[m] has joined #asahi-dev
<ldhacker[m]> What is the current status of this project? Is the wiki on the “cutting edge”?
<Glanzmann> Some progress has not been mentioned.
<j`ey> ldhacker[m]: status is linux has been booted, basic interrupt and UART works, so a shell has been reached
<Glanzmann> ldhacker[m]: Someone correct me if, I'm wrong. But what works so far is a simplyfied boot loader m1n1, which can be used to load a kernel and initrd over UART using some python code https://github.com/AsahiLinux/vdmtool. The kernel boots up with a single thread and a busybox bash is running.
<ldhacker[m]> Nice!
<Glanzmann> Some other guys seems to have some sort of hacky (tech demo), SMP, PCIe, USB, WIFI running.
<Glanzmann> Oh and framebuffer works also.
<Glanzmann> Oh and network card seems to work as well.
<Glanzmann> However the code needs to be improved on and pushed upstream.
<Glanzmann> And someone is working on reversing the GPU. The first triangle was produced using userland code on macos.
<Glanzmann> X is also working with the framerbuffer apparently.
<ldhacker[m]> Wow, so quite a bit more progress. I wish there was some way I could help. I have experience with C but have never worked on a GitHub project like this one. Not sure where to start lol
<Glanzmann> I think, just send some money to let marcan do its job.
<Glanzmann> You can use github (less taxes at least in germany) or using patreon.
<jix> ldhacker[m]: I'm sure contributing will get easier with time when more of the essentials are done
<Glanzmann> I do the same, however I'm eager to try it out.
<jix> ldhacker[m]: there'll be a very long tail of stuff to work on to improve the overall experience, and if you have experience with C I'm sure you'll find something
<ldhacker[m]> Next time I get paid I will definitely send some money that way. I just want to be running Linux again lol. I was using Manjaro on a laptop before I got the Mac mini.
<jix> (I also expect there to be more of a contributing guide at that point to get people started)
<ldhacker[m]> Thank you all for the updates. I will continue to check back and see when I feel comfortable contributing!
<ldhacker[m]> Just became a patron!
leah2 has quit [Ping timeout: 260 seconds]
PhilippvK has joined #asahi-dev
leah2 has joined #asahi-dev
PhilippvK has quit [Ping timeout: 256 seconds]
PhilippvK has joined #asahi-dev
crabbedhaloablut has quit [Ping timeout: 264 seconds]
crabbedhaloablut has joined #asahi-dev
arekm has joined #asahi-dev
PhilippvK has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
XeR has quit [Quit: *.net *.split]
PhilippvK has joined #asahi-dev
XeR has joined #asahi-dev
XeR has quit [Quit: *.net *.split]
XeR has joined #asahi-dev
PedroArajo[m] is now known as PedroAraujo[m]
DanB91 has joined #asahi-dev
Esmil has quit [Ping timeout: 256 seconds]
Esmil has joined #asahi-dev
stemnic has joined #asahi-dev
snalty has quit [Ping timeout: 240 seconds]
snalty has joined #asahi-dev
leah2 has quit [Ping timeout: 244 seconds]
leah2 has joined #asahi-dev
<modwizcode> I got m1n1 (partially) running on qemu (not on apple silicon) by doing some very hacky stuff. I'm planning to hack support for generating the bootargs struct that m1n1 expects and then start working on an actual machine definition.
<j`ey> sven also got it running on qemu
<modwizcode> Yeah I heard
<modwizcode> I wonder what sven had to do, I couldn't see a way to avoid modifying the code of qemu but I was specific trying to avoid patching m1n1 whatsoever
<sven> i patched m1n1 :D
<sven> in pretty horrible ways
<modwizcode> Yeah I couldn't imagine another way and the way I got it working without patching is insane
<modwizcode> (likewise for the qemu patches)
<sven> :>
<modwizcode> I can do it right I'm just not super familiar with the qemu codebase and so I was trying to avoid writing a new board/machine definition out of the gate.
<sven> so i just drop the .maco file into flash at 0x0, manually set the initial PC to 0x4800, then after _start in m1n1 i have a copy loop that moves it to 0x8_0000_0000
<sven> and then i replaced uart_write with something qemu emulates
<sven> it's... not great.
<sven> oh, and i commented out most of the bootargs stuff so that it doesn't crash
<modwizcode> So I patched the exynos board that's already in there by forcing it to create cortex-a57 cores (it seems like that code ignores the CPU option), then patching the cortex-a9 mp private peripheral to not get mad if you use it with a non cortex-a9 core (all the other ones A11/A15 don't get mad)
<modwizcode> I moved the serial peripheral (which is why I patched this specific board since it's the same UART) to the right address
<sven> ah, nice. i just took some random board which had a different serial
<modwizcode> And I made a 2 line change to the linker script because I'm using qemus -kernel option to save time (loading the elf not the macho) and I needed to set the base address of the image to a ram address because otherwise qemu gets weird (I've noticed this before with my own kernels, qemu's boot handling for non-linux is complete crap at least on arm) so I had to manually set base to 0x0 so that the
<modwizcode> offsets wouldn't be doubled when relocating.
<modwizcode> All of the changes I made need to be done right
<modwizcode> most of the time I spent was on the MP stuff, since the board launches two cpus (I could have just changed this but for some reason this board also ignores command line options for cpu count I think) so I patched the code to keep the other cpu in a busy loop until I fixed it proper
<modwizcode> I would like to know how real SMP bringup is done on the M1 so I can replicate
<modwizcode> I hear correlium has that working. It would be super helpful if I had a real M1 mac someone donate one pls kthx
<never_released> modwizcode: you can look at the code :)
<never_released> it's not hard to do core bringup
<modwizcode> Yeah but then I can't poke at it in glorius detail
<modwizcode> I have learned it's not while messing with learning aarch64 in prep for this experiment with the M1 emulation, I'm surprised actually how easy it is
<j`ey> how was the CPU bringup reverse engineered?
<modwizcode> the only bringup I was familiar with before is the godawful mess that x86 MP is
<modwizcode> It's generally super simple on arm from what I understand from all the other qemu smp stubs
<modwizcode> They probably dumped rom somewhere
<modwizcode> where the busy loop is
<modwizcode> It's pretty recognizable loop I think
<modwizcode> I'm not sure what qemu upstreaming is like, does anyone know? Is it worth trying to do this right to get a potential M1 board upstreamed?
<sven> ^-- agraf
<modwizcode> And if it is worth trying to do, should I base my code on an existing board? I wouldn't know what else to do but I can tell you for sure nothing should be based on that exynos board it's a mess and awful. At the very least I'd probably like to submit a patch to fix SMP bringup on non-linux ARM kernels because that issue is painful and doesn't seem challenging to solve at all.
PhilippvK_ has joined #asahi-dev
DarthCloud has quit [Remote host closed the connection]
DarthCloud has joined #asahi-dev
<never_released> modwizcode: you might want to combine the existing efforts
<never_released> to boot macOS
<modwizcode> Yeah probably
<davidrysk[m]> upstreaming to qemu: https://wiki.qemu.org/Contribute/SubmitAPatch
<davidrysk[m]> very similar to the rules for kernel upstreaming
<modwizcode> never_released: do you know of specific efforts to boot macos?
PhilippvK_ has quit [Ping timeout: 240 seconds]
<j`ey> there's some people booting iOS on qemu.. hm
<modwizcode> I've looked at those but that didn't seem particularly relevant, what I saw mostly involved hacks to both qemu and the iOS kernel.
<modwizcode> Yeah that's the one I read
<modwizcode> I wish that had gone further though :/
<j`ey> would be neat to write a test suite in m1n1, to verify a qemu port against real hardware
<modwizcode> yeah it would
<j`ey> but nothing about the AIC for example
<modwizcode> Yeah
<never_released> j`ey: hm? that one simulates AIC too
<j`ey> oh it does?
<j`ey> I only took a brief look
<j`ey> I cant find any aic files
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
<modwizcode> there was some weirdness with the commits I think
<modwizcode> you have to like find the link to the specific commit or something the one I found was orphened from all branches
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
amw2 has joined #asahi-dev
DanB91 has quit [Ping timeout: 265 seconds]
jix has quit [Quit: WeeChat 3.0]
jix has joined #asahi-dev
amw2 has quit [Ping timeout: 256 seconds]
DanB91 has joined #asahi-dev
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
DanB91 has quit [Ping timeout: 240 seconds]
DanB91 has joined #asahi-dev
VinDuv has quit [Quit: Leaving.]
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
amw2 has joined #asahi-dev
DanB91 has quit [Ping timeout: 246 seconds]
DanB91 has joined #asahi-dev
amw2 has quit [Ping timeout: 240 seconds]
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
yrlf has joined #asahi-dev
maor26 has quit [Ping timeout: 246 seconds]
DanB91 has quit [Remote host closed the connection]
DanB91 has joined #asahi-dev
DanB91 has quit [Ping timeout: 264 seconds]