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
ndut2 has quit [Read error: Connection reset by peer]
Telvana has quit [Read error: Connection reset by peer]
Telvana has joined #asahi
Techcable has joined #asahi
<kode54>
depends
<kode54>
if you have a more recent Apple display, such as a laptop or the iMac, then you have a P3 gamut display
<kode54>
and any gamma incorrect app is going to be stretching its sRGB to P3
<kode54>
that just depends on whether the app is being rendered correctly
<opticron>
welp, bit the bullet and ordered a 14" 10C/24C with 32gb ram
<opticron>
that hurt
<tpw_rules>
what is the delivery estimate?
<opticron>
I didn't order from apple, so mid next week
<tpw_rules>
where did you order from then
<opticron>
ebay :D sealed in box
<opticron>
200USD off retail
<tpw_rules>
huh , that's mildly suspicious
<opticron>
yeah, but I can always rake the money back out worst case
<opticron>
it's how I got my current laptop
<opticron>
that was a much better deal, 1000USD off retail for this lenovo T480s
<kode54>
"Retina" display is not really a patented concept
<kode54>
everybody supports 2x or higher DPI rendering now
<kode54>
oh hey, AkihikoOdaki[m] is here too
<chadmed>
welp uni is cancelled for the next week because half the state is flooded, whod be interested in a gentoo overlay and install shell script
sheepgoose has joined #asahi
sirn- has joined #asahi
sirn has quit [Read error: Connection reset by peer]
sirn- is now known as sirn
phiologe has joined #asahi
PhilippvK has quit [Ping timeout: 480 seconds]
Rabbitz has joined #asahi
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi
BlitzWorks has joined #asahi
* Rabbitz
hi anyone wanna code something together ? may be we can meet at channnel #rabbithacker
Rabbitz has quit [autokilled: This host violated network policy and has been banned. Mail support@oftc.net if you think this is in error. (2022-02-27 04:38:09)]
marvin24_ has joined #asahi
marvin24 has quit [Ping timeout: 480 seconds]
darkapex1 has quit [Ping timeout: 480 seconds]
bisko has quit [Read error: Connection reset by peer]
bisko has joined #asahi
darkapex has joined #asahi
<VinDuv>
So I’ve been looking at how macOS installation from USB works on M1 Macs and I think it might be interesting for the Asashi installer. The way it works is that there’s a hidden plist file on the USB drive that references a macOS application on the drive; if this file is present, the USB drive will show up in the power-button-held boot menu, and when selected, it will run the application. It doesn’t seem to care about file signature
<VinDuv>
(it works even if the app is just a shell script) and it looks like it’s in 1TR mode.
<VinDuv>
So the installation workflow from 1TR could be “plug in a USB stick, hold the power button, select Install Asahi” instead of having to manually open the terminal and run curl | sh. The installer doesn’t even need to be graphical since it’s possible for the launched shell script to start the recovery environment’s Terminal and giving it an arbitrary command to run.
<VinDuv>
This is also not limited to external USB drives; it also works if the files are in an APFS volume in internal storage, which I guess might be useful to have a Asahi Recovery boot option in the boot menu or something.
TheFirst has quit [Server closed connection]
TheFirst has joined #asahi
<Glanzmann>
VinDuv: Do you have an example?
<chadmed>
hmmm that might be nice to have a graphical installer written for Cocoa at some point down the road ;)
kallsyms has quit [Server closed connection]
kallsyms has joined #asahi
rossy has quit [Server closed connection]
rossy has joined #asahi
<marcan>
hm, yeah, interesting
<marcan>
still needs network for the IPSW download though, so it's somewhat academic, but it might be better than "pull up the terminal and run some commands"
<marcan>
I like the Asahi Recovery idea though, in fact couldn't we outright use that for step2.sh?
<marcan>
heck, we can probably do a fun hack where we let the boot picker provision the new boot volume, then *break* it so the next reboot is into 1TR in the right partition (pretty sure iBoot doesn't care about the version plists etc), but the (still incomplete) volume doesn't even show up yet
<marcan>
instead you get the "Finish Installation" prompt
<marcan>
and then *that* unbreaks it as it does the bputil stuff
<marcan>
VinDuv: nice find!
darkapex has quit [Ping timeout: 480 seconds]
<Glanzmann>
marcan: Will you shipe a 4k or 16k pagesize kernel in the alarm/asahi installer?
<marcan>
16k
<Glanzmann>
Will you fix the userland so that chrome etc works?
<marcan>
no, I want people to complain about that :-)
<Glanzmann>
I see, got it.
<marcan>
that's an upstream bug
<Glanzmann>
marcan: Have you already thought about how the update process looks like if there are device tree changes?
<Glanzmann>
So that users don't end up with incompatible m1n1/dtbs/u-boot and kernel?
<marcan>
DTBs are supposed to be forward-compatible if we don't screw up
<marcan>
and backwards-compatible too
<marcan>
eventually there will be chainloading, for now people just get to re-run the installer
<Glanzmann>
I see, perfect.
mustache_ride___ has quit [Server closed connection]
<VinDuv>
You can replace "Some App" "SomeApp" and "myscript" with whatever you want. I think ProductBuildVersion and ProductVersion are customizable but need to follow a certain format for the disk to be recognized by the boot menu
<jannau>
I fear backward compatibility (new dtb with old kernel) is not possible. We will break the simple framebuffer as soon as we add dcp/disp dart to the dts
<jannau>
I haeven't looked yet in detail but the cpufreq hcnages might break backward compatibility as well
<VinDuv>
I will try to wrap all this into a nice shell script
<jannau>
I need to verify that booting plain 5.16 or 5.17-rc* with current asahi dtb breaks as well
esden has quit [Server closed connection]
esden has joined #asahi
ZLSA has quit [Server closed connection]
ZLSA has joined #asahi
<j`ey>
jannau: because youre changing the framebuffer0: framebuffer@0 { node when using dcp?
<jannau>
adding the dart nodes will break it. the dart driver reset the dart and unmaps the framebuffer
<j`ey>
oh
<j`ey>
sad
<jannau>
that seems to crashes dcp but in any case it loses access to framebuffer
<jannau>
not sure if we already have a check to prevent probing of the locked dcp-dart and what happens if we probe it anyway
peac has quit [Server closed connection]
peac has joined #asahi
stblassitude has quit [Server closed connection]
stblassitude has joined #asahi
maennich has quit [Server closed connection]
maennich has joined #asahi
<sven>
It will error out early
philpax_ has quit [Server closed connection]
philpax_ has joined #asahi
<jannau>
I guess we could still try to fix the reset issue in 5.17. 5.16 compability is already broken by pmgr
<kettenis>
jannau: the solution to that is to use a different compatible for the DARTs that need their mappings retained
NekomimiScience has quit [Server closed connection]
NekomimiScience has joined #asahi
jochum has joined #asahi
saintdev_ has quit [Server closed connection]
saintdev_ has joined #asahi
jochum_ has quit [Ping timeout: 480 seconds]
darkapex has joined #asahi
___nick___ has joined #asahi
___nick___ has quit []
___nick___ has joined #asahi
martinstewart has joined #asahi
<martinstewart>
hello im currently watching a mac os update log its kind of intresting
<martinstewart>
it refrances alot of interesting sounding files
<martinstewart>
it mentions a file called updatebrain.pkg
<martinstewart>
or is it .zip but seems like it has something to do with how thease m1 macs update which might help with reversing firmware updates from linux
<martinstewart>
i just found it intersting and thought id share
<martinstewart>
im about to restart the mac however i have saved the log file if anyone is intrested
martinstewart has quit [Remote host closed the connection]
Techcable has quit [Ping timeout: 480 seconds]
tpw_rules has quit [Server closed connection]
tpw_rules has joined #asahi
<pitust[m]>
how do i build the device tree?
<pitust[m]>
for the life of me i can't figure it out
martinstewart has joined #asahi
martinstewart has quit [Remote host closed the connection]
<pitust[m]>
`make arch/arm64/boot/dts/apple/t8103-j293.dtb` doesn't work, and neither does `make t8103-j293.dtb`
<j`ey>
pitust[m]: 'make .. dtbs' should work
<pitust[m]>
oh wait it does build it nv,
<pitust[m]>
*nvm
Tramtrist has quit [Server closed connection]
<pitust[m]>
but for some reason i couldn't find it and got really confused
Tramtrist has joined #asahi
le0n has joined #asahi
<mps>
pitust[m]: make help in kernel tree
<pitust[m]>
is there anything special needed for wifi?
<Glanzmann>
pitust[m]: Or this one stop solution curl -sL tg.st/u/fwx.sh | sh
<pitust[m]>
that's handy
<Glanzmann>
This generates a /tmp/linux-firmware.tar using the asahi installer that jey mentioned. That tar file needs to be extracted in /lib/firmware
<marcan>
< jannau> I fear backward compatibility (new dtb with old kernel) is not possible. We will break the simple framebuffer as soon as we add dcp/disp dart to the dts
<marcan>
no we won't
<marcan>
simple-framebuffer will always be there, it has to be for u-boot and older kernels and kernels without support for newer DCP versions
<marcan>
dcp needs to hand off cleanly from it
<marcan>
so adding DCP needs to be purely adding to the DCP, not breaking anything
<marcan>
if that's not how it works today, that needs to be fixed :-)
<marcan>
*adding to the DT
<marcan>
DART could be an issue, we need to fix that if so
ihaveamac has quit [Server closed connection]
ihaveamac has joined #asahi
<marcan>
ideally now-ish in the asahi branch
<marcan>
so it doesn't reset the disp0 DART gratuitously
bisko has quit [Read error: Connection reset by peer]
bisko has joined #asahi
<jannau>
marcan: handoff is no problem, the only issue is the reset of disp0-dart
<pitust[m]>
do i need to update to macos monterey to run asahi?
<pitust[m]>
since kmutil does not recognize `--raw` in 1TR (big sur)
<pitust[m]>
can i do the `cat` thing with the macho as well?
<jannau>
please do, it's not strictly needed but the installer requires it at this point and it is the only supported version
<pitust[m]>
okay fair enough
<pitust[m]>
also is the order in which i cat things together important?
<Glanzmann>
Yes, it is.
<Glanzmann>
m1n1 <dtbs> u-boot
<Glanzmann>
Is the correct order. See the boostrap.sh script I pasted you earlier.
<jannau>
I think the order of the attached payload does not matter, m1n1 has to be first though
ciggi_ has quit [Quit: No Ping reply in 180 seconds.]
ciggi has joined #asahi
<kettenis>
and any uncompressed binary payload has to be last
<kettenis>
u-boot-nodtb.bin isn't compressed, so it has to be last
<pitust[m]>
perfect, thank you
<pitust[m]>
(i'm trying not to use uboot btw, so i don
<marcan>
you should use u-boot unless you're just doing tethered testing or you fancy rebooting into 1TR and doing the kmutil dance every time you change your kernel
<pitust[m]>
yeah the kmutil dance is fine for me
<marcan>
in the future we will require u-boot for some features, like CPU deep sleep and suspend/hibernate
<marcan>
the kmutil dance is not really intended for end users
<pitust[m]>
okay i have slightly bigger issues than the method i'm using being awkward
<pitust[m]>
it enters m1n1, the asahi logo shows up, it's dumping some logs to the screen for a bit, then the logs disappear and the asahi logo is the only thing that can be seen
<pitust[m]>
and there it hangs
<marcan>
that means it booted your kernel, and your kernel died
<marcan>
without putting anything on the screen
<pitust[m]>
okay
<pitust[m]>
that doesn't sound very optimistic
<marcan>
usually that means you got something horribly wrong in the .config
<marcan>
like missing drivers
<pitust[m]>
i built my m1n1 blob with `cat build/m1n1.bin ~/code/Image.gz ~/code/initramfs-linux-fallback.img ~/code/t8103-j293.dtb > untethered.bin`
<marcan>
or an outright unsupported page size (64K)
<marcan>
what Image.gz is that?
<Glanzmann>
marcan: Or it is just the simpledrm compiled as module as in my case ... you remember.
<marcan>
Glanzmann: I mean, you're the resident expert in getting .config wrong around here ;)
<pitust[m]>
is CONFIG_ARM64_PAGE_SHIFT the thing that configures the page size? that sounds like it would set it
<marcan>
yes
<pitust[m]>
and it's set to 12 which would indicate 4k
<pitust[m]>
okay so i guess i need to set it to 14?
<marcan>
it doesn't sound like you have fbcon enabled at all
<marcan>
CONFIG_FRAMEBUFFER_CONSOLE=y
<marcan>
no wonder you get no console without a console :)
<marcan>
you probably also need CONFIG_DRM_FBDEV_EMULATION=y and CONFIG_FB=y
<marcan>
and also CONFIG_SERIAL_SAMSUNG=y and CONFIG_SERIAL_SAMSUNG_CONSOLE=y if you want to be able to debug this with the hypervisor if it still doesn't work
<pitust[m]>
thanks a lot, i'll recompile and see if it works!
<pitust[m]>
i wonder if i applied the patches correctly
<mixi>
pitust[m]: is your ~/code/initramfs-linux-fallback.img compressed with gzip or xz?
<pitust[m]>
gzip
<pitust[m]>
should i set ARM64_VA_BITS_47 or ARM64_VA_BITS_48, `make` asks me for it now
<tpw_rules>
i have 48 in my config
<pitust[m]>
okay nice
sheepgoose has quit [Remote host closed the connection]
sheepgoose has joined #asahi
<marcan>
pitust[m]: you didn't set CONFIG_SERIAL_SAMSUNG, which isn't going to fix your problem but without that it's undebuggable
<pitust[m]>
yeah i guess but i don't have a way to look at m1n1 logs either
<marcan>
m1n1 logs won't tell you anything because m1n1 isn't failing
<marcan>
if the console disappears that means it's booting the kernel
bisko has quit [Read error: Connection reset by peer]
<pitust[m]>
well the linux logs
<marcan>
that's what the serial console is for
<pitust[m]>
i don't have anything to capture the serial logs with though
<marcan>
you don't have another machine with a free USB port? :-)
<pitust[m]>
i do, but no C to A cable
<marcan>
ah
bisko has joined #asahi
<pitust[m]>
well i might have a C to A cable somewhere, but i'm too lazy to dig it out
<marcan>
try the CONFIG_ARM64_16K_PAGES thing for one
<pitust[m]>
yea i got all the patches described in DesktopKernel now
<pitust[m]>
i think i was doing something really wrong tbh
<marcan>
also apparently you don't have CONFIG_PCI enabled, so that's going to break wifi/etc too
<pitust[m]>
yeah i now changed my config to be the desktopkernel one
<pitust[m]>
i have no idea what i did to it
<pitust[m]>
oh i think i know
<pitust[m]>
welp, i hope it works this time around
sheepgoose has quit [Ping timeout: 480 seconds]
<Tramtrist>
good luck pitust[m]
<Tramtrist>
🍀
<Tramtrist>
Anyone running swaywm on their linux m1?
<mixi>
yes, it works fine on my machine
<Tramtrist>
Great. Figured it would
<Tramtrist>
💝
<mixi>
s/fine/well enough for me/
<mixi>
there is an issue where rarely some clients crash with the pixman renderer I was too lazy to figure out
<mixi>
but it's rare enough to not be a problem
<Tramtrist>
hm
<Tramtrist>
attributing that to arm build ?
<pitust[m]>
okay, some progress:
<mixi>
I'd attribute it to using the software rendering path that's probably not well tested on other platforms
<mixi>
but that's just guessing
<pitust[m]>
gets to linux, i need to patch the initrd to give me a shell
<pitust[m]>
is linux capable of USB on m1?
<Glanzmann>
pitust[m]: Yes, it is.
<Glanzmann>
pitust[m]: Maybe, just install u-boot and use the debian live system?
<Glanzmann>
If you don't have a serial cable m1n1 will be real hassle. I once also thought that it is bearable. But than you end up a few different kernels and a day and than it becomes a hassle.
<pitust[m]>
hmm, maybe i should install uboot tbh
<pitust[m]>
but first i want to try these memes :^)
<pitust[m]>
another issue, i cannot resize my disk down enough to fit my rootfs
<pitust[m]>
it only lets me shrink it by 5gb or so
<pitust[m]>
my website's git repo is 4 gigs what the fuck
<Glanzmann>
pitust[m]: Can you send me the output of 'diskutil list show'?
<Glanzmann>
pitust[m]: How much space do you want for Linux, the absolut minimum would be 4 GB (2.5 for stub, 0.5 for esp and 1 G for Linux); If you want only the live system than it would be 2.5GB.
<pitust[m]>
i am aiming for 32gb
<pitust[m]>
okay i released some disk space now
<Glanzmann>
Okay, so in order to free up 32GB for Linux, you need to issue the following command: diskutil apfs resizeContainer disk0s2 462.4GB
<pitust[m]>
hmm, i can make at most 27gb free
<Glanzmann>
pitust[m]: Strange. Maybe you have a lot of data on macos.
<pitust[m]>
i do
<pitust[m]>
a LOT
<pitust[m]>
i have 57 gigs free
<Glanzmann>
pitust[m]: I see, than you could resize to whatever allows you to do so.
<Glanzmann>
Than you could use the linux live system to boot.
<Glanzmann>
If you want wifi you also need to copy over the firmware.
<pitust[m]>
thanks!
bisko has quit [Read error: Connection reset by peer]
bisko has joined #asahi
gladiac is now known as Guest718
gladiac has joined #asahi
<pitust[m]>
so i made this after a lot of effort: https://pbot.rmdir.de/UThadeUP1yBOFQxXdwWV5A, now i am wondering how do i remove the partition and convince the installer to use "AL" partition to store it's things
<pitust[m]>
how do i even remove it?
<j`ey>
you should erase that, so it's 'free space'
<j`ey>
then the installer can use it
<pitust[m]>
how?
<pitust[m]>
eraseVolume?
<j`ey>
I think so, but you should read the help and stuff
<j`ey>
I dont want to be responsible for the data1
<Glanzmann>
pitust[m]: Why did you do that. Watch the video.
<pitust[m]>
thank you
<Glanzmann>
Make the free space, run the asahi installer
<Glanzmann>
Install u-boot and use the debian live system.
<Glanzmann>
Or keep macos for the time being and wwait until marcan releases the installer.
<pitust[m]>
yeah ik
<pitust[m]>
that would work
<pitust[m]>
but i really want to screw around with this, not necessarily make a usable system
<Glanzmann>
pitust[m]: The problem it appears you have a lot of data on macos, if you screw around with it, than probably you will break it. If you break it you will loose all your data.
<pitust[m]>
oh yeah i should make a backup
<pitust[m]>
most of my important data is on gh
<Glanzmann>
So my recommendation is to either do a backup and plan a free day to restore your system after you screwed it or get a second system to screw around with.
<Glanzmann>
pitust[m]: Than just grow your parition again and watch the videos. :-)
<pitust[m]>
i'm too poor for a second system so
<Glanzmann>
I never managed to get all my data lost by accident, but I don't have anything on my macos. I read about a few others in here who did not loose everything once, but twice.
<pitust[m]>
i am going to just commit all my shit to git and have ms keep my backup around
<Glanzmann>
pitust[m]: That is what I do on, workstations, too. For the servers I use restic these days.
<Glanzmann>
pitust[m]: So once you have the free space. The next step would be to run the asahi installer: curl -L https://mrcn.st/alxsh | sh
<Glanzmann>
pitust[m]: One more thing, before I got to bed. You can access the boot picker by completly turn of the machine and press and hold the power button for 15 seconds.
<Glanzmann>
So what the asahi installer does, it installs a fake macos container (2.5 GB in size). You can use that fake container install m1n1 to use via serial cable or m1n1+dtb+u-boot.
<Glanzmann>
So when you boot from the fake apfs container than you end up in m1n1 or u-boot. With u-boot you can boot from a usb stick or from the internal disk.
Techcable has joined #asahi
over530_ has joined #asahi
over530_ has quit [Quit: over530_]
daniels has quit [Server closed connection]
daniels has joined #asahi
arnd has quit [Server closed connection]
arnd has joined #asahi
___nick___ has quit [Ping timeout: 480 seconds]
steev has quit [Server closed connection]
steev has joined #asahi
over530 has joined #asahi
mmarchini has quit [Server closed connection]
mmarchini has joined #asahi
kendfinger has quit [Server closed connection]
kendfinger has joined #asahi
over530 has quit [Quit: over530]
<bluetail[m]>
sounds great. so, essentially, soon enough I will be able to run my mac mini without the macOS. Lovely.
skoobasteeve has quit [Server closed connection]
skoobasteeve has joined #asahi
<bluetail[m]>
GPU acceleration would have to wait, though. I think that one is tricky.