marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
bps has quit [Read error: Connection reset by peer]
<bloom>
congratulations!!!
jackhill has joined #asahi
<bloom>
kettenis: Ah, you're OpenBSD Mark, ok :p
<kettenis>
yup, this means I can boot OpenBSD from the internal disk now
<kettenis>
should be possible to do the same with linux once there is a distro with support
<bloom>
<bloom>
kettenis: how is OpenBSD on M1 nowadays? I'm a long time Linux user but I might flirt with other religions if they beat us to M1 :-p
<kettenis>
I still need to iron out a few issues in the installer to deal with the apple partitions
<kettenis>
and there is an annoying bug with the SMP kernel
<j_ey>
kettenis: does openbsd require reviews for all changes?
<svenpeter[m]>
maz: the whole thing is quite an ugly mess with two different pcie nodes for uboot and Linux right now because I was too lazy to fix some incompatibilities, but I can push it tomorrow
<kettenis>
j_ey: yes, but the process is a lot quicker
<j_ey>
kettenis: I saw the 'ok @foo' on some commits, but not all, thats why I was unsure
<kettenis>
basically ethernet, usb type-A, usb type-C, NVMe, serial console and framebuffer console (at iBoot resolution) work now
<kettenis>
some churn to be expected as we align DT bindings though
<Misthios>
nice, was kinda expecting netbsd to get support before openbsd (or it is just me that thinks that netbsd is supposed to run on lots of stuff?)
<j_ey>
Misthios: kettenis has been working hella hard :)
<Misthios>
i see
<Misthios>
but hey we all know that windows arm will be last anyway :)
<svenpeter[m]>
Oh yes, and thanks to him Linux will also get pcie support quicker :-)
<j_ey>
and uboot..
<kettenis>
upstreaming the u-boot code is going to take some time
<bloom>
kettenis: damn, nice
<bloom>
("Seriously, why don't we have a linux downstream with all of this working?" "..Isn't it called /corellium/linux-m1?")
<jn>
alessandrorzz[m]: no, it got its name for a different thing called mini, but that's obscure history
<kettenis>
m1n1 as in "to be used as a payload for m1n1"
<kettenis>
it works on the M1 macbook as well, although it'll probably throw some errors about missing PCIe devices
<sven>
bloom: shush.. now where's my downstream drm driver though? :-P
VinDuv has quit [Quit: Leaving.]
<alessandrorzz[m]>
But this is for dual boot or for what?
<sven>
dual boot is already supported by apple's firmware (iBoot)
<sven>
m1n1 does very low-level hardware initialization (and also provides a nice experimentation / reverse engineering playground)
<sven>
u-boot then takes care of some more hw initialization and also comes with drivers to boot linux from various peripherals
<j_ey>
alessandrorzz[m]: the github link is for loading the kernel from the disk, rather than dowloading the kernel via serial/USB from another computer
<sven>
it's also for bringing up pcie before loading the linux kernel over serial :D
<bloom>
sven: I imagine long term moving the early hw into from m1n1 into u-boot is probably a good idea
<bloom>
iBoot -> U-Boot -> Linux
<jn>
that's certainly shorter than iboot -> m1n1 -> uboot -> grub -> linux :)
<j_ey>
but then you need to duplicate all of the mac specific stuff into other bootloaders
<j_ey>
if people dont want to use uboot
<pipcet[m]>
iboot -> linux -> linux :-)
<sven>
bloom: sure, whatever works
<sven>
bloom: technically m1n1 and u-boot will become one anyway
<j_ey>
technically as in.. cat m1n1 uboot > img ?
<sven>
yeah :D
<jn>
sven: one binary but not one source tree
<jn>
(?)
<alessandrorzz[m]>
<j_ey "alessandrorzz: the github link i"> And i can put it into a vm?
<sven>
yes. but i guess one source tree is also fine if that's more maintainable long term
<bloom>
jn: I'm coming from Arm world
<bloom>
and embeddedish at that
<bloom>
mainline U-Boot is the gold standard what more do you want
<bloom>
anything else you can chainload from u-boot anyway?
<j_ey>
alessandrorzz[m]: its for bare metal
<alessandrorzz[m]>
?
* bloom
doesn't understand why you want GRUB int he chain
<jn>
bloom: i agree, i'm in favor of putting hw init in uboot too, long term. (but then again, i'm only armchair-designing from the sidelines)
<j_ey>
alessandrorzz[m]: its not for a vm
<sven>
because we need more bootloaders!
<alessandrorzz[m]>
j_ey: ok
<kettenis>
on many platforms u-boot has multiple stages anyway: TPL, SPL and U-Boot proper
<kettenis>
m1n1 kinda takes the place of SPL
<jn>
grub was mentioned in a blog post (might have been on asahilinux.org) - i guess the point was in having a nice interactive boot menu
<bloom>
kettenis: nod, I was imagining porting m1n1 code to an SPL stage but.. I guess it doesn't /really/ matter
<alessandrorzz[m]>
In other vm likes utm vm , they put the ram disk, the kernel and another things to boot arch Linux, where I can find this stuff to put into another emulator like parallels?
EER has quit [Remote host closed the connection]
<kettenis>
the whole idea is that if you're interested in just using an OS on the M1 you install m1n1 with a U-Boot payload from 1TR
<kettenis>
and after that you can just boot a standard OS install image and install as if you're on PC or an ARM server machine
<kettenis>
the whole arm embedded approach of having separate images for each individual board makes no sense for the mainsream dostros
<kettenis>
distros i mean
<kettenis>
it just happens that many distros use grub
<kettenis>
OpenBSD has its own EFI bootloader that has some neat tricks up its sleeve to start the kernel with its entropy pool already initialized
<kettenis>
It also means that you can install a kernel by just copying it to /
<kettenis>
as the OpenBSD bootloader understands the FFS filesystem that we use
<bloom>
fair enough
<bloom>
I think I have err armbedded stockholm syndrome
<jn>
i can't concinvingly say that i don't have that too
<jn>
the last two vendor bootloaders that i messed with weren't even uboot but some weird inhouse stuff
yuyichao_ has joined #asahi
SunWuKung has quit [Remote host closed the connection]
<pipcet[m]>
kettenis: is your config file for u-boot available by any chance? I'd like to give your code a spin