ChanServ 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
os has quit [Server closed connection]
os has joined #asahi
<citizen1[m]> hello, i am wondering if Asahi is successful it won't be any use as all linux software was not made to run on M1/ARM . Am wrong or right?
<alyssa> what?
<alyssa> virtually all linux software works fine on arm, M1 included
<Serentty[m]> citizen1: For running x86 software, most of the concern would be about running Windows software.
<Serentty[m]> Oh, and Linux native games.
<Serentty[m]> But other than that, nearly everything can just be recompiled.
maximus65 has quit [Server closed connection]
maximus64 has joined #asahi
<marcan> there's https://github.com/FEX-Emu/FEX which is basically like Rosetta, for software that cannot
radex has quit [Server closed connection]
radex has joined #asahi
<chadmed> that looks like a decent hassle to get set up with a root overlay or chroot, but that would probably make it faster/more compatible than just using qemu-user right?
riker77_ has joined #asahi
riker77 has quit [Ping timeout: 480 seconds]
riker77_ is now known as riker77
<citizen1[m]> <Serentty[m]> "But other than that, nearly ever" <- so you just put the same source code in a compiler choose ARM and it pops out and ARM version that works on m1/arm chip?
<chadmed> code that is optimised for x86 specifically with compiler hints and the like may need some rewriting, but most software packages simply work when being compiled for armv7+ with no changes
<chadmed> big binary distros like debian (and its derivatives) will have enormous repos of arm binaries too so i dont think you have anything to worry about
<chadmed> there was only one piece of software that gcc didnt like for me. i cant remember what it was but it was because it had some inline assembly written with apple conventions rather than standard armv8, so i just built it with clang instead and it worked fine. i had an entire gentoo/kde plasma user space running on a pi 4 8gb and everything worked as expected
<marcan> chadmed: qemu-user also needs a chroot
<marcan> there's no way around needing an x86 environment, modulo thunked stuff, to run x86 apps
<marcan> macos is the same
<marcan> it'sjust they use fat libs instead of a separate root
yuyichao has joined #asahi
<chadmed> ah yeah i knew it needed the libs, just wasnt sure on the chroot
<chadmed> (as a separate environment)
jix has quit [Server closed connection]
jix has joined #asahi
PhilippvK has joined #asahi
phiologe has quit [Ping timeout: 480 seconds]
tsida has quit [Server closed connection]
Erus_Iluvatar has quit [Server closed connection]
<citizen1[m]> ok thanks for the info. I dont understand it all but looks like it wont be problem, because i remember Apple switching to Intel was not this easy
<citizen1[m]> from reading from the website Asahi achievements will be shared with other Linux distro so they too will work on M1. Am I correct?
grange_c has quit [Server closed connection]
grange_c has joined #asahi
bradfier has quit [Server closed connection]
bradfier has joined #asahi
marvin24_ has joined #asahi
marvin24 has quit [Ping timeout: 480 seconds]
<linearcannon> citizen1[m]: most major linux distributions already have very mature 64-bit arm support. the important kernel changes from asahi are being shared upstream, so any linux distribution that wants to will be able to easily add support for M1 macs in the future.
Mary has quit [Server closed connection]
Mary has joined #asahi
VinDuv has quit [Server closed connection]
VinDuv has joined #asahi
arahael has quit [Ping timeout: 480 seconds]
<sven> alyssa: xnu calls it like that in strings
Xesxen has quit [Server closed connection]
Xesxen has joined #asahi
Erus_Iluvatar has joined #asahi
arahael has joined #asahi
VinDuv has left #asahi [#asahi]
chadmed has quit [Quit: Konversation terminated!]
roxfan has quit [Server closed connection]
roxfan has joined #asahi
bps has quit [Ping timeout: 480 seconds]
izica has quit [Server closed connection]
izica has joined #asahi
besmirich[m] has quit [Server closed connection]
besmirich[m] has joined #asahi
bps has joined #asahi
gabuscus has quit [Server closed connection]
gabuscus has joined #asahi
chadmed has joined #asahi
elosant[m] has quit [Server closed connection]
elosant[m] has joined #asahi
akemin_dayo has quit [Server closed connection]
akemin_dayo has joined #asahi
yrlf has quit [Server closed connection]
yrlf has joined #asahi
smvg[m] has joined #asahi
gladiac has quit [Server closed connection]
gladiac has joined #asahi
Raito_Bezarius has quit [Server closed connection]
Raito_Bezarius has joined #asahi
bdju has quit [Read error: Connection reset by peer]
bdju has joined #asahi
eta has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
psydroid[m] is now known as psydroid
yuyichao has joined #asahi
<alyssa> sven: Got it.
yuyichao has quit [Ping timeout: 480 seconds]
<sven> https://github.com/asahilinux/linux/tree/nvme/new still pretty rough and i'm not yet happy with the rtkit stuff, but this at least fixes the "uncleanShutdown" issue
<sven> turns out that i just forgot to hook up the common nvme shutdown code to the platform driver
<alyssa> sven: whoops?
<citizen1[m]> <linearcannon> "citizen1: most major linux..." <- Great! I thought Asahi will be the only working distro on M1. I guess I should donate
<alyssa> sven: let me know if you want eyeballs / testing / both / etc
<alyssa> ...what is compat mbox shim?
<alyssa> sven: +*val = readl(to_apple_nvme_dev(ctrl)->nvme_mmio + off);
<alyssa> +return 0;
<alyssa> uh?
<sven> alyssa: uh, yeah, that main .c file is essentially pci.c with lots of stuff removed like the maintainers suggested. it's not done yet
<alyssa> duly noted 👍
<sven> and that compat shim is because i splitted the rtkit stuff from the mailbox. i used that initially during testing to make sure e.g. smc still works
<alyssa> Ah
<sven> alyssa: that line is actually correct though
<alyssa> splitting to support SEP down the line?
<sven> yeah, and because marcan suggested that rtkit library and i wanted to see how that would work out
<alyssa> ergh why won't m1n1 usb come up today
<alyssa> there we go
<krbtgt> asahi isn't really a distro. i believe short term is the raw parts, medium term provide a termporary distro with all the mac-specific bits ready to try, and long term germinate it across all other distros
<marcan> pretty much
<marcan> we'll probably be a ready to go distro with bleeding edge stuff ~forever since there will always be newer hardware to support though
<tophevich[m]> And it will be called NYRA (Not Yet Ripe Asahi) :P
<tophevich[m]> NYRA Linux (Arch btw.)
* alyssa will just be running stock debian
<alyssa> (with a kernel and mesa I build myself)
<j_ey> sven: why not #define NVME_MAX_KB_SZ PAGE_SIZE?
<sven> <sven> uh, yeah, that main .c file is essentially pci.c with lots of stuff removed like the maintainers suggested. it's not done yet
<j_ey> ok ok
<alyssa> will alyssa get back to work finally? the world may never know
<j_ey> sven: I thought that comment was yours :)
<sven> no :D
<sven> i'm not sure i added even a single comment
<j_ey> sven: mentioned page sizes and sg allocations..
<j_ey> so you can see how I thought it was yours ;)
<sven> hehe, sure :)
<alyssa> oh no it's a regression!
<alyssa> i sure hope it's not what i th-- ah shoot
<alyssa> ummmm
bps has quit [Ping timeout: 480 seconds]
mlq_ has joined #asahi
mpaq has joined #asahi
mlq has quit [Ping timeout: 480 seconds]
mpaq_ has quit [Ping timeout: 480 seconds]
bps has joined #asahi
<kettenis> hmm
<kettenis> src/main.c:27:34: error: initializer element is not constant
<kettenis> const char *const m1n1_version = version_tag + 12;
<j_ey> clang?
<kettenis> aarch64-linux-gnu-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213
<alyssa> old version
<alyssa> ?
<landscape15[m]> marcan: Do you plan to compile asahi-installer into a binary mac app when released?
<marcan> landscape15[m]: it's not a binary mac app, it's a shellscript you curl|sh
<marcan> you can already curl -L https://mrcn.st/alxsh|sh for the test version, though only use it if you know what you're doing
<landscape15[m]> Ok thanks. But you need python installed right?
<j_ey> landscape15[m]: no it comes with python
<landscape15[m]> Oh sorry. So it is bundled. Thanks again
<marcan> everything is bundled, it even runs from recovery mode
<marcan> that was a design constraint from the start
<j_ey> apparently you cant view https://marcan.st/alxsh in a browser
<j_ey> "You really, really shouldn't be here." :o
<marcan> j_ey: mrcn.st, not marcan.st
<marcan> different places :)
<marcan> mrcn.st is a shortener, marcan.st isn't
<j_ey> oh, you wrote mrcn.st :P
<marcan> alx.sh is an even cooler shortener though, one character shorter!
bps has quit [Ping timeout: 480 seconds]
<marcan> (glad I got that one)
<marcan> on alx.sh I'll have some user agent shenanigans so curl gets served a direct (no redirects) bootstrap for the installer
<marcan> so -L isn't necessary
<j_ey> Ohhh I know what happened now, I visited "https://mrcn.st/alxsh|sh", took me to "https://marcan.st/alxsh%7Csh", and then I deleted the '%7Csh'
<landscape15[m]> I think i will try it with caution. So for the end user only a script will be needed.
<marcan> j_ey: ahh yeah :)
<marcan> there's a dumb default for the shortener that just sends you to marcan.st
<marcan> landscape15[m]: yes, and there will be an easier "do the typical install for me" mode too
<marcan> the goal of the current script was to prototype the bootstrap installation process to get rid of the horrible developer guide mess with installing a whole copy of macos, but niceties like guided resizing and installing a rootfs will come later
<landscape15[m]> Sounds good :) Then other Linux distributions will easily implement that.
<marcan> I don't really expect other distros to implement Apple Silicon installers themselves, though of course they can if they want to
<marcan> instead the idea is you use our installer to install m1n1+u-boot, which gives you a UEFI/DT environment which you can then use to boot a distro installer (as long as it has an up to date kernel) off of USB or whatever and do it the normal way
<marcan> but we'll provide images of distros preconfigured directly in our installer to avoid the separate step of booting the installer, where it makes sense
<kettenis> in that case the asihi installer doesn't even have to worry about creating a rootfs partition
<marcan> yeah, but it still has to make space for it by resizing the macOS APFS
<sorear> does apple silicon use GPT?
<marcan> yes
<kettenis> just leave space free and let the distro installer handle creating the linux partitions and filesystems
<marcan> yup
<marcan> that's the only thing missing from the current installer, a mode that does resize + everything else it does now
<kettenis> already works with the openbsd installer ;)
<marcan> (well, that and shipping a m1n1 with u-boot built in)
<sorear> so you'd have an apfs volume with boot firmware, m1n1, and u-boot, and u-boot would then load the final kernel from a Linux filesystem via USB or NVMe?
<marcan> yes
<marcan> that's the plan in all cases
<marcan> since you need that to be able to upgrade your kernel without going through 1TR, which would be ridiculous
<marcan> I expect to have a standard EFI partition we let distros install into
<kettenis> for most distros it would probably load grub from usb/nvme and grub would load linux
<marcan> yes
<marcan> though nothing stops you from doing it another way directly from u-boot as long as it's a filesystem it supports
<kettenis> don't the linux installers create an EFI partition if one doesn't exist?
<j_ey> sorear: and that needs partition is ~2.5GB
<marcan> kettenis: probably, but I wouldn't trust them to do it right in this weirdo case
<marcan> for our arch-based install, I expect to have a layout like [macOS for dualboot] [2.5G m1n1 bootstrap] [512M EFI part] [/ ext4] or so
<j_ey> marcan: how much free space is on that 2.5GB?
<marcan> with the kernel in /boot, and GRUB in the EFI part; alternatively you could make the EFI part /boot, I've seen both setups fairly commonly
<marcan> j_ey: 1G or so
<marcan> but APFS kind of wants that
<j_ey> would be annoying if recovery got bigger
<marcan> 2G is not enough, I tried
<marcan> we're not using APFS compression though
<marcan> apple does
<marcan> if we can figure out how to do that sanely we save a bunch of space
<j_ey> oh yeah, I remember that from the stream
<marcan> so I'll consider that our out if recovery gets bigger
<sorear> conversely, this setup means that you can nuke the asahi partition and reinstall it from scratch through 1TR without touching the distro rootfs or the distro-created files in the ESP?
<marcan> correct
<marcan> which is also a feature
<marcan> and e.g. in the "oh shit recovery got bigger" case, if it comes to that: just shrink macOS a tiny bit more and remake the asahi partition a bit bigger
<marcan> :)
* alyssa likes debian
<marcan> debian is a fine distro, I use it on my other Mac! (the PowerPC one :p)
<sorear> wasn't there discussion earlier of not even needing to change partition sizes for that, because iboot is apfs-subvol-aware?
<marcan> we could reuse the macOS container instead of making a new one, but it doesn't really buy us much at this stage
<marcan> once linux can actually boot and run stably off of APFS, it suddenly makes a lot more sense because you can have a fully shared disk
<marcan> but until then, even though we could avoid the 2.5G stub partition and use volumes in the primary container, I feel a lot safer having our own GPT slice and not touching macOS
<marcan> much easier to nuke and redo
<marcan> so this is probably going to be one of those user safety executive decisions I make (i.e. the advanced menu of the installer will let you do this, but it won't be the default flow for a while) ;)
<kettenis> alyssa: now that I'm back home and behind a real keyboard I'll try to give some feedback to the pci series
<kettenis> the MSI discussion will probably continue in the earlier thread though
FireFox317 has joined #asahi
<FireFox317> marcan: will you be streaming tomorrow? :D
<tophevich[m]> FireFox317: which tomorrow do you mean, his or yours. His is in ~19 1/2 hours as it is 04:33 am in Tokyo
<alyssa> kettenis: Alrighty
<alyssa> kettenis: Warning: I do not know what I'm doing with PCIe.
<alyssa> Like I still don't know what PCI even stands for
<alyssa> "Peripheral Component Interconnect"
<alyssa> thx wikipedia
<FireFox317> tophevich[m]: well today then xd
arekm has quit [Remote host closed the connection]
arekm has joined #asahi
bps has joined #asahi
FireFox317 has quit [Remote host closed the connection]
kettenis has quit [Ping timeout: 480 seconds]
jeffmiw has quit [Ping timeout: 480 seconds]