2021-10-15
00:04rohin has joined #asahi
00:13jmr has joined #asahi
00:13jmr has left #asahi [#asahi]
00:14jmr2 has joined #asahi
00:18zopieux has quit [Quit: zopieux]
00:19zopieux has joined #asahi
00:31jmr2alyssa: I might be able to assist with testing on a MB Air as well - although I only have installed m1n1 so far.
00:32jmr2By the way, is it possible to use a USB 2.0 stick connected through a USB-C hub for rootfs? Or adapters only for now ?
00:37zopieux has quit [Ping timeout: 480 seconds]
00:39zopieux has joined #asahi
00:43jmr2 has quit [Remote host closed the connection]
00:53Graypup_ has quit [Quit: meow]
00:56Graypup_ has joined #asahi
01:21jmr2 has joined #asahi
01:25thunfisch has quit [Remote host closed the connection]
01:25thunfisch has joined #asahi
01:27jmr2 has quit [Quit: Page closed]
01:32chadmeddamn i wish i could upload images so you could see my reaction to the insinuation that C is better than Python for GUI programming :P
02:22phiologe has joined #asahi
02:24marcan_alice: the installer will do the distro install for you, the rootfs image way (which is popular these days anyway, see e.g. ALARM itself)
02:24marcanI just need to work out some firstboot script to copy the wifi firmware and resize the ext2fs, though we might be able to just bundle resize2fs built for mac with the installer to take care of that
02:25PhilippvK has quit [Ping timeout: 480 seconds]
02:36BlitzWorks has quit [Ping timeout: 480 seconds]
02:36jmr2 has joined #asahi
02:39kode54spamming offtopic with my wonderful troubles with not-Asahi and gaming while also in video calls
02:41BlitzWorks has joined #asahi
02:41jmr2alyssa: FWIW, I'm getting compilation errors on your 20211013 branch. Possibly on my end. Details: http://paste.debian.net/plainh/8f1717d1
02:41chadmedim still trying to think of the most easily maintainable way to have a luser-proof gentoo install for these macs. im leaning towards a shell script that just grabs the latest stage3 and sets up a m1n1->uboot->grub boot chain but idk... seems a little convoluted
02:42nobodynada has quit [Quit: Lost terminal]
02:45chadmedi just like that way because it just abstracts away the mac-specific boot stuff and lets people follow the handbook pretty much word-for-word. assuming youd never want/need to update m1n1 or u-boot, you could treat the system in almost exactly the same way as any amd64 machine now
02:48chadmedplus we could just have a shell script that updates m1n1/u-boot from 1TR should it become necessary
02:49nobodynada has joined #asahi
03:00marcanstage3 is an image after all, the script just automates the partitioning, then you can follow the handbook from first boot
03:01chadmedwell yeah i just meant use the stage3 as the image, rather than something like the genpi image where you get a ready-to-go system
03:02marcanwell yeah, it's gentoo, I'm assuming users will know what they're doing and know how to install the rest
03:05marcanit would also be neat to have a "firstboot" style wizard like the macos one, so people can set up their own login/password instead of having to change a default
03:07chadmedyou could implement that as an init service that destroys itself after the first boot, theres a few SBC images that do similar things
03:08marcanI guess this is a thing, heh: https://github.com/raspberrypi-ui/piwiz/blob/master/src/piwiz.c
03:09marcanah, for the barebones arch image there's https://wiki.archlinux.org/title/Systemd-firstboot
03:09marcanfor a desktop thing I might end up writing something (in Qt or PyQt maybe?) if I find some time
03:10marcanall this is going to need buildboxes, I'm looking forward to making a little cluster of M1X Mac Minis ;)
03:11marvin24 has joined #asahi
03:15marvin24_ has quit [Ping timeout: 480 seconds]
03:29kov has quit [Quit: Coyote finally caught me]
03:29kov has joined #asahi
03:34jmr2Ouch... I'm rusty... Downloading a kernel tree through github's "Download zip archive" is NOT faster than git clone... because that destroys symliinks. The 2nd error is fixed (I manually recreated some links). Still waiting for git clone to see if it fixed the 1st one too.
03:35yuyichao has joined #asahi
03:39chadmedadd --depth=1 to the clone command if youre only interested in building the kernel and wont need to walk down the repo at any point. speeds up the download significantly and doesnt break any symlinks
03:39chadmeddo not do this if for any reason you will need to revise commits older than the most recent for each file
03:54jmr2marcan: not sure if this one exists in your tree or not (I'm still on Alyssa's): drivers/soc/apple/apple-pmgr-pwrstate.c:101:6: warning: unused variable ‘ret’
04:05jmr2alyssa: Confirmed - I still have the 1st set of errors. Fixing the symlinks only fixed the second.
04:05jmr2 has quit [Quit: Page closed]
04:35rohin has quit [Quit: Konversation terminated!]
05:34Glanzmann has joined #asahi
05:43chadmednoooooooo aahahah i was trying to write a generalised openrc firstboot to do roughly the same thing that systemd-firstboot does
05:44chadmednot only did i plan to use python, im basically 80% of the way done writing the thing using python :P
05:46chadmedyeah so marcan's idea was to have a barebones/desktop rootfs image for each distro people want to maintain such that the asahi installer script can just extract that to the root partition which is a popular way of "installing" distros on other ARM SBCs
05:47chadmedso i guess if someone wants to maintain an alpine image for that, they can just have python included with it which isnt any trouble
05:47psykoseif it's not a normal rootfs image, and needs user customisation, then if there is a maintainer that wants to maintain one with python in it for alpine-rootfs-m1 it should be fine
05:47nobodynada has quit [Quit: Lost terminal]
05:49chadmedwhat im doing isnt really even entirely necessary, its just a nice-to-have for new users who might not be comfortable being dumped to a shell with the expectation that they just know a priori that they have to change the default root pw and/or delete the default local user that is usually set up on these ARM images
05:51chadmedeventually i think marcan wants to write one in Qt to mimic the macos firstboot for desktop images which is a nice idea. uni is a few weeks from finishing here so i will have a few months free to brush up on my C++ and maybe help out with that too
06:14confusom1 has quit [Remote host closed the connection]
06:15confusomu has joined #asahi
06:26GlanzmannThere were some variables after code and some inline functions moved to a different include.
06:32aleasto has joined #asahi
06:56chadmedhttps://github.com/chadmed/openrc-firstboot alright if you want to laugh at some ugly ugly ugly code
06:58chadmedwhen i get some free time im gonna port it to C so that it works on all openrc distros without depending on python. its not like it does anything that depends on python anyway
07:22sorearthe installer is in python so it needs python available in the macOS/1TR environment where it runs, if I've understood correctly. I don't think it matters whether there is also a copy of python in the installed distro, since the installer doesn't run there?
07:23chadmedthis will be run on the first boot of the linux environment though, not from 1TR with the installer
07:35chadmed has quit [Quit: Konversation terminated!]
07:37chadmed has joined #asahi
07:40chadmed has quit []
07:43chadmed has joined #asahi
07:44chadmed has quit []
07:47chadmed has joined #asahi
08:01bps has joined #asahi
09:43mazit requires PSCI support, which requires a more privileged exception level. No EL3, no PSCI, no kexec.
09:47mazdo make that work, you'd need the kind of SMP ops that we had on 32bit so that platform can bring their own SMP bring-up crap.
10:19chadmed has quit [Quit: Konversation terminated!]
10:21chadmed has joined #asahi
10:33kettenisI believe so; they support powernv and that means petitboot must be in the loop somehow
10:39kettenisI implemented support for OpenBSD/powerpc64; basically ended up booting a special "bootloader" kernel that loads the final kernel through its own "kexec" implementation
10:41kettenisthe ELF parser in the kexec tools shipped with the stabdard firmware images is seriously broken though
10:45povikseems it may just work if the spin table set by m1n1 makes it all the way to the final kernel undepleted
11:27Retr0id3 has joined #asahi
11:27Retr0id has quit [Remote host closed the connection]
11:42gabuscus_ has quit [Ping timeout: 480 seconds]
12:00chadmed has quit [Quit: Konversation terminated!]
12:01chadmed has joined #asahi
12:10gabuscus has joined #asahi
12:27chadmed has quit [Remote host closed the connection]
12:27chadmed has joined #asahi
12:35X-Scale has quit [Ping timeout: 480 seconds]
12:46X-Scale has joined #asahi
12:54kovI installed m1n1 using the installer on my macbook air; I built m1n1 and linux on my Fedora VM, copied things over to my mac mini and tried to chainload m1n1, it went wrong, any ideas? http://paste.debian.net/1215497/
13:02kovj_ey, clang, I think m1n1's makefile wasn't happy I was running under aarch64 and tried to use a cross-gcc
13:02kovI guess I can try building m1n1 on my x86 laptop with gcc, that is probably the most tested setup
13:04j_eyfix them would be better, i guess its probably an issue in the code, rather than a clang issue
13:06svenbut another issue was that the code didn't save some register before calling a function it should have saved iirc
13:24krbtgtoh god, another channel i'm on proposed doing an RYF M1 system. it almost sounds possible except for the fact iBoot loads only signed firmware for the coprocessors (tho you can choose wrt the Broadcom and SEP)
13:25krbtgtif someone figured out how to exploit the ROM stage iBoot, you could probably give a lot of free software enthuiasts aneurysms from libre macs
13:27alyssakrbtgt: no no no you can't touch the firmwares, you can just pretend they don't exist, that's ryf right?
13:28nuh^ has joined #asahi
13:28krbtgtseal the proprietary software in a mask rom so you can't replace it with libre alternatives
13:42yuyichao has quit [Ping timeout: 480 seconds]
13:48chadmed has quit [Ping timeout: 480 seconds]
13:49chadmed has joined #asahi
13:54marcankrbtgt: it's not even a mask rom, in the end it was the same (updatable!) SPI flash that has the Type-C controller firmware (which is *another* blob)
13:54marcanit's just they use a secondary CPU to *load* it, so as long as you don't give cooties to the main CPU by touching it from there, it's fine!
13:56krbtgtmaybe you could rules lawyer the existing M1 setup as RYFable, considering the mockery of the rules, and the fact apple's system is arguablly pretty close to being there
14:25marcanthe thing is gzdec doesn't even *use* the heap... so I have no idea how this could even happen
14:34marcantry replacing compressed_writemem with writemem in chainload.py and see if that fixes things
14:34marcanI get the feeling your build broke gzip decoding somehow, maybe there's something dodgy there or a compiler issue?
14:35kovmarcan, let me try that, I am coming to the conclusion that my issue is basically me trying to use my Fedora VM on the M1 for my builds heh, I'll do everything from my x86 laptop
14:36kovlet me try the change to chainload.py and I'll get the binaries all packaged up and put them somewhere after that
14:38marcanincidentally, with the uncommitted m1n1 changes I have here that SError would at least turn into a precise data abort :)
14:40kovmarcan, with iface.writemem I get an error because m1n1 wants to call aarch64-linux-gnu-gcc which I don't have on my macos, weird
14:42kovmarcan, you want add2line 0x27fc0 on the m1n1 I'm trying to chainload or the one from the installer? I think the one from the installer is downloaded pre-built?
14:44yuyichao has joined #asahi
14:46sveni think i downloaded it from somewhere: /Users/speter/Downloads/aarch64-unknown-linux-gnu/bin/ :D
14:46_aliceWhen I was trying to use the proxyclient chainload.py, `aarch64-apple-darwin20-gcc-11` from homebrew didn't seem to work
14:53marcanactually, you know what... this might actually be fixed by the same m1n1 change that I just pushed?
14:54_jannau_musl-cross-make builds a working gcc with https://github.com/richfelker/musl-cross-make/pull/129
14:55marcanyou could chainload it without the tinf stuff, but you still need to figure out the compiler issue there
14:56marcanI wonder if I can somehow figure out the proper top of mem boundary where things are unmapped, not just what the boot args says is the top of normal RAM...
14:56kov(and maybe I just switch to using my x86 laptop for my testing for a bit as I really want to see the DCP and keyboard on this Air this weekend ;D)
14:58_alice has quit [Quit: irc_error]
14:58_alice has joined #asahi
15:01_alice has quit []
15:02_alice has joined #asahi
15:08nuh^ has quit [Remote host closed the connection]
15:08nuh^ has joined #asahi
15:10aleasto has quit [Quit: Konversation terminated!]
15:12aleasto has joined #asahi
15:18aleasto has quit [Quit: Konversation terminated!]
15:20aleasto has joined #asahi
15:28yuyichao_ has joined #asahi
15:32yuyichao has quit [Ping timeout: 480 seconds]
15:34aleasto has quit [Ping timeout: 480 seconds]
15:34svenhrm, so if the TZ0 registers are at the same location as on A13 it's at 0x9dcb1f000...0x9dad90000 on my machine i think
15:35aleasto has joined #asahi
15:37marcanso far the best idea I have is "region-id-2, region-id-4, region-id-5" in the carveout map (that's ANS and the two SEP ones)... but I'm not sure if that's stable...
15:41svenregion-id-4 = [0x00000009DAD90000, 0x0000000001D90000] so that matches up with what i found above
16:02marcansven: I bet it's locked because on some *other* platform, iPhone or whatever, this matters and the DCP firmware is locked
16:02alyssasven: maybe the point was one of the other registers that gets locked, less opportunities for things to change under DCP's feet? shrug
16:03svenalyssa: that doesn't make much sense tbh if we can overwrite the firmware as marcan figured out
16:03marcankov: so if you want to update the m1n1 submodule in your installer and rebuild that (you can just copy it over and kmutil it, see what step2.sh does; no need to rerun the whole installer), that might fix the gzip decompression thing without breaking anything else
16:05alyssaor a "i set it to locked while debugging iBoot and forgot to unset it and nobody noticed because it makes 0 difference to XNU"
16:06alyssa16:02 <@marcan> sven: I bet it's locked because on some *other* platform, iPhone or whatever, this matters and the DCP firmware is locked
16:06svenyeah, that i can agree with. all i'm saying is that "robustness" doesn't make any sense to me
16:06alyssawe know apple shares code between watchOS and macOS and everything in between, that special code could have made sense in the past and not now
16:18yuyichao has joined #asahi
16:23marcanyeah, that works, though you might need to diskutil umount / mount it since it'll probably be mounted readonly by the system
16:23yuyichao_ has quit [Ping timeout: 480 seconds]
16:55yuyichao_ has joined #asahi
16:59yuyichao has quit [Ping timeout: 480 seconds]
17:25Nspace has joined #asahi
17:26handlerug has quit [Remote host closed the connection]
17:32handlerug has joined #asahi
17:34handlerug has quit [Remote host closed the connection]
17:34handlerug has joined #asahi
17:38handlerug has quit [Remote host closed the connection]
17:38handlerug has joined #asahi
17:39handlerug has quit [Remote host closed the connection]
17:39handlerug has joined #asahi
17:39handlerug has quit [Remote host closed the connection]
17:39handlerug has joined #asahi
17:41bps has quit [Ping timeout: 480 seconds]
17:44Raqbit4 has joined #asahi
17:47Raqbit has quit [Ping timeout: 480 seconds]
17:47Raqbit4 is now known as Raqbit
17:47kovmarcan, j_ey, sven so I installed the newly built (with clang on aarch64 linux) m1n1, and managed to chainload the macos cross-built with gcc m1n1
17:50kovinterestingly the clang built m1n1 does not chainload, the air goes to the apple logo and the proxy client times out waiting
17:52marcankov: interesting, mind sending me the binary? wonder if we're running into some other silliness
17:53Nspace has quit [Quit: Nspace]
18:17thunfisch is now known as Guest3025
18:51Nspace has joined #asahi
18:52roxfan has quit [Remote host closed the connection]
18:59roxfan has joined #asahi
19:04rohin has joined #asahi
19:43Nspace has quit [Quit: Nspace]
19:50Nspace has joined #asahi
19:50yuyichao has joined #asahi
19:53gladiac is now known as Guest3035
19:53gladiac has joined #asahi
19:54yuyichao_ has quit [Ping timeout: 480 seconds]
19:59Guest3035 has quit [Ping timeout: 480 seconds]
20:01DavideCavalca[m] has joined #asahi
20:03DavideCavalca[m] is now known as dcavalca
20:04dcavalca has quit []
20:04dcavalca has joined #asahi
21:36marvin24_ has joined #asahi
21:40marvin24 has quit [Ping timeout: 480 seconds]
21:46rross101 has joined #asahi
21:49rross101Glanzmann: Your most recent instructions worked for me after a few days of slow progress. The mu-one kernel with patches got me usb keyboard or network access which I haven't had till now. I'm in the debian installer vs you copying a rootfs across - any cons to that? And not sure if I now can install onto a partition without overwriting m1n1? But mainly thanks for the help.
21:50kenjigashu has joined #asahi
21:53kenjigashu has quit []
21:53kenjigashu has joined #asahi
22:03kenjigashu has quit []
22:05kenjigashu has joined #asahi
22:08kenjigashu has quit []
22:09marvin24 has joined #asahi
22:09kenjigashu has joined #asahi
22:12marvin24_ has quit [Ping timeout: 480 seconds]
22:13yuyichao has quit [Ping timeout: 480 seconds]
22:17kenjigashu has quit [Remote host closed the connection]
22:18kenjigashu has joined #asahi
22:22marvin24_ has joined #asahi
22:25marvin24 has quit [Ping timeout: 480 seconds]
22:49jmr2 has joined #asahi
22:52jmr2Glanzmann: success for me as well, on an MB Air. Thanks! I'm logged on the bookworm rootfs. My next step will be to get the wifi working.
22:54jmr2Anything specific you want me to check? At this time, I'm still on the text console (which is tiny at that resolution...)
22:55alyssaalso, # apt install weston, $ weston, open a terminal and move it around, there should be 0 tearing
22:56alyssa(Read: Expect it to keep working since I'm testing it, but also don't expect me to help when it breaks 😉)
22:57Nspace has quit [Quit: Nspace]
22:59Nspace has joined #asahi
22:59jmr2Yeah. This channel could easily turn into a tech support one... Let me get your dmesg output.
22:59jmr2 has quit [Quit: Page closed]
23:03kenjigashu has quit []
23:08aleasto has quit [Quit: Konversation terminated!]
23:21jmr2 has joined #asahi
23:33kenjigashu has joined #asahi
23:55jmr2One thing at a time... Here's the dmesg with your NOP patch: http://paste.debian.net/plainh/033be2dd
23:56alyssajmr2: [ 2.879308] apple-dcp 231c00000.dcp: RTKit: syslog message: UPTSQManager.cpp:105: IOMFB: switch to normal mode succeeded