#
…

2021-11-19

00:01RealityVoidBut, why does it need the headers for the .ssl libs though, it obviously can't link against MY openssl (different arch) and it doesn't compile openssl itself since it looks for the headers only.
00:06j_eythats a host tool that its building
00:11RealityVoidWell, build it, loaded is with m1n1 buuut... something is off. I think.
00:11RealityVoidI get a logo screen
00:11RealityVoidand it's stuc.
00:13RealityVoidI am connected with a CRC-ACM.
00:14riker77 has quit [Quit: Quitting IRC - gone for good...]
00:19bgb has joined #asahi
00:23riker77 has joined #asahi
00:26bgb_ has quit [Ping timeout: 480 seconds]
00:38RealityVoidAlso, in the "Under Hypervisor" section, it mentions initramfs.cpio.gz - where canI get that?
00:38yuyichao has quit [Ping timeout: 480 seconds]
00:56matthewayers[m] has joined #asahi
01:33jevinskie[m]So if I wanted to perma-boot macOS but with m1n1 as an intermediate stage (w/ appended KC), I’ll need to write enough macho and DT parser to replicate the python chainloader. Anything else that am I missing? The python bits seem quite simple.
02:51Joe_R_Jacobs has joined #asahi
02:54alyssa has joined #asahi
02:54alyssabuilding a linux kernel on the m1 bare metal linux
02:54alyssathis seems recursive
02:54alyssaalso, I did not realize kernels were supposed to build this fast???
02:55bgb has quit [Ping timeout: 480 seconds]
02:59Joe_R_Jacobs has quit [Remote host closed the connection]
02:59Joe_R_Jacobs has joined #asahi
03:15Joe_R_Jacobs has quit [Ping timeout: 480 seconds]
03:18PhilippvK has joined #asahi
03:22phiologe has quit [Ping timeout: 480 seconds]
03:31steevthey aren't :( apple just showing off
03:35kov has quit [Quit: Coyote finally caught me]
03:37bgb has joined #asahi
03:37darkapex2 has joined #asahi
03:41darkapex1 has quit [Ping timeout: 480 seconds]
03:43yuyichao has joined #asahi
04:08squags has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
04:10squags has joined #asahi
04:16bgb has quit [Quit: WeeChat 3.3]
04:29Dcow has joined #asahi
04:29Dcow has quit []
04:29Dcow has joined #asahi
04:41X-Scale has joined #asahi
04:45[X-Scale] has quit [Ping timeout: 480 seconds]
04:47marvin24_ has joined #asahi
04:50marcanjevinskie[m]: we don't really support that use case; using macOS under m1n1 is intended for tethered experiments
04:51marvin24 has quit [Ping timeout: 480 seconds]
05:43darkapex3 has joined #asahi
05:48darkapex2 has quit [Ping timeout: 480 seconds]
06:09kov has joined #asahi
06:17sailorek1234 has joined #asahi
06:20jevinskie[m]marcan: I understand that but was curious about it as a hobby hacking project. So far to me it seems like hacking kc loading into m1n1 is the easiest/cleanest way forward
06:22jevinskie[m]The victim m1 is going to be used for research anyways. I just want untethered use and quick recovery from panics :)
06:25marcanjevinskie[m]: why not just have two macOS installs? that's what I do
06:25marcanone for linux/hypervisor experiments, one for regular use
06:27slicey has joined #asahi
06:32marcanyou can even do it that way without creating a whole separate partition if you want; that way they share a single APFS container and you don't need to reserve a whole ~70GB or so for the second install
06:50kode54I barely have room on mine for the one macOS install
06:50kode54probably should have waited a couple of months and gotten the 1TB model instead
07:10bgb has joined #asahi
07:20bgb_ has joined #asahi
07:22bgb has quit [Ping timeout: 480 seconds]
07:33bgb has joined #asahi
07:40bgb_ has quit [Ping timeout: 480 seconds]
07:45bgb_ has joined #asahi
07:46bgb has quit [Ping timeout: 480 seconds]
07:57bgb_ has quit [Ping timeout: 480 seconds]
07:59Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
08:07leah has joined #asahi
08:08chamomile has quit [Ping timeout: 480 seconds]
08:21Dcow has joined #asahi
08:29slicey has quit [Quit: zzz]
08:45mps has quit [Ping timeout: 480 seconds]
08:48Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
08:53bgb has joined #asahi
08:56bgbmarcan: does the USB A ports on mini work now?
08:57aleasto has joined #asahi
08:57sventhose have been working since pcie support has been merged
08:58_jannau_yes, they work with linux 5.16-rc1
09:07mps has joined #asahi
09:12nskl has quit [Ping timeout: 480 seconds]
09:17phire has quit [Remote host closed the connection]
09:17bgb has quit [Ping timeout: 480 seconds]
09:18bgb has joined #asahi
09:19phire has joined #asahi
09:20bgbjannau: do i need some extra config?
09:22bgbI just followed the SW:Linux, trying to boot from USB, but ended up with "sda1 unknown-block..."
09:23chadmedfilesystem driver compiled in?
09:24bgbI just compiled with defconfig, let me check
09:25_jannau_it requires CONFIG_PCIE_APPLE
09:27svenugh, SW:Linux is severely outdated
09:28bgbjust failed with OCNFIG_PCIE_APPLE again
09:28mazyou'll need far more than just defconfig (which builds for 4k pages, so not much will work by default).
09:29mazyou need 16k pages, ARCH_APPLE, DART support, pinctrl, and pcie at the very least.
09:30j_eybgb: do you have EXT4 or whatever FS built in?
09:30bgbj_ey: yes
09:30bgbext4 built in
09:32_jannau_j_ey: doesn't unknown-block means the kernel hasn't enumerated the block device
09:33j_eynot sure, but that was worth asking too
09:35bgbmaz: you mean build kernel with 16K page size ?
09:35mazbgb: yes.
09:36mazotherwise, no DART support. no DART support, no PCIe. No PCIe, nothing at all.
09:36maz(give or take)
09:36bgbmaz: I see, trying
09:36mazhere's a working (and stupidly large) config: https://paste.debian.net/1220037/
09:37firefox317_ has joined #asahi
09:38bgbmaz: thanks
09:43kettenisbtw, I've enabled DART sub-page protection in OpenBSD
09:44bgbsven: I heard you have add 4k support for dart, right?
09:44firefox317_is there a difference in functionality/performance between simplefb and simpledrm, why would I use simpledrm over simplefb?
09:44svenkettenis: nice :D
09:44svenbgb: yes, the latest version is somewhere on the mailing list
09:45kettenisand learned the the Broadcom Ethernet controller access memory with a 64-bit granularity
09:45kettenisso it triggerred faults when I passed it a network packet aligned on an odd 32-bit boundary
09:47_jannau_firefox317_: I would expect more things to work out of the box with simpledrm, see problems on stream with X11
09:53firefox317__jannau_: yeah okay, but its not that with simpledrm it is suddenly flicker free or something like that. We need the dcp driver for that right?
10:03bgbmaz: what kernel vision are you using?
10:05lanodan_ has quit []
10:05lanodan has joined #asahi
10:08mazbgb: 5.16-rc1.
10:08marcankettenis: I had the same problem with a JMicron (yeah...) FireWire controller on intel
10:09marcanit would real double size command entries always, unconditionally, and then only parse what it needed
10:09marcanso it fell off the ends of pages even for normal IOMMUs
10:09marcanI ended up sending a workaround to linux that always leaves one short entry of free space at the end of ring buffers
10:09marcan(unconditional because it doesn't really matter for non-broken controllers)
10:12kettenisI chose to always round/up the sub-page protection to 64-bits instead of 32-bits
10:12kettenisnot much of a loss I figured
10:19marcanfirefox317_: correct
10:22bgb has quit [Ping timeout: 480 seconds]
10:43kettenismarcan: ouch, that is nasty
10:44ketteniseven on systems without an IOMMU it can't actually assume the physical pages exist!
10:48marcanmeanwhile broadcom tg3 ethernet is still broken on Intel IOMMUs on linux (at least some chips)
10:48marcanI have my IOMMU off for that reason on my iMac...
10:48marcanit just wedges itself and even corrupts data after a while with it
10:49chadmedive had nothing but bad luck with broadcom chips. three macs with broadcom wifi and ethernet and my pi 4, all garbage on linux
10:49firefox317_ has quit [Remote host closed the connection]
10:49marcanbug has been open since *2009*
10:49marcanrecently some broadcom person started being active on the thread again
10:49marcanwho knows, they might even fix it?
10:50slicey has joined #asahi
10:50chadmedthey day broadcom *fix* something i will find the nearest monastery and devote my life to god, because that would be proof that divine miracles do exist
11:00kettenisadding an IOMMU to the architecture after the fact is asking for problems
11:00kettenisApple did us a service by having IOMMUs that can't be disabled ;)
11:03bgb has joined #asahi
11:32bgb has quit [Ping timeout: 480 seconds]
11:58zopieux has quit [Ping timeout: 480 seconds]
12:01zopieux has joined #asahi
12:12Dcow has joined #asahi
12:38mpsmanaged to get m1n1 boot, last line on screen is: Running proxy...
12:38mpsI think now I have to chainload kernel
12:39mpsis the 5.16-rc1 good enough to boot machine and continue to making initramfs?
12:40mpsj_ey: thanks
12:40minitg3 breaking on intel iommu is interesting, because those are used by hp and dell in an alarming number of servers. it can't be the whole range surely
12:41JTLmini: I was wondering the same
12:42miniI'm pretty sure my old hp microserver has the iommu enabled and hasn't exploded (and that has tg3 NICs. two of them even)
12:42gladiac is now known as Guest6293
12:42gladiac has joined #asahi
12:44_jannau_mps: for which device? 5.16-rc1 is only on the mac mini in a somewhat useable state. framebuffer, USB-A ports and gigabit ethernet works
12:45j_eyit should work on mbp with some tweaks to the DT (not keyboard though)
12:45kit_ty_kateis the fake 80GB macOS partition still necessary with asahi-installer?
12:47FireFox317the usb c ports also work on mbp/mba
12:47FireFox317well usb 2.0 over usb c
12:48Guest6293 has quit [Ping timeout: 480 seconds]
12:48psydroid[m]1does that data corruption happen on Skylake and Kaby Lake? and Bay Trail?
12:48FireFox317kit_ty_kate, nope its not :)
12:48jix_kit_ty_kate: nope, there still needs to be a partition, but no full mac os, IIRC I ended up with a 2.5GB partition after following the installers instruction
12:48psydroid[m]1I haven't noticed anything, but my data is most important of all
12:48_jannau_not with the dtb from 5.16-rc1 or m1n1. hotplug doesn't work
12:49FireFox317_jannau_, yeah sorry when you add the correct nodes to the dtb it works (indeed without hotplug)
12:51kit_ty_katejix_: cool! Thanks!
12:57mps_jannau_: I'm testing on macbook pro
12:59svenfor usb-c hotplug you'll also need additional patches that haven't been reviewed yet
12:59mps_jannau_: I want to get it booting, later I will search/hunt/ask for patches to add
13:00slicey has quit [Quit: zzz]
13:04FireFox317mps, i managed to do that yesterday on my m1 macbook air
13:04_jannau_mps: it will boot but you can only interact with it over the uart. for usb-c you need a dts with nodes for it. All the "dwc3*" nodes from this commit for example: https://github.com/mu-one/linux/commit/30e20cad12734ebccc9ce7804167b07aff8621c2 (starting at line 499 of t8103.dtsi)
13:09mps_jannau_: does keyboard work on this kernel?
13:10_jannau_I have no idea
13:11mpsnp, I'm just playing with machine and learning about all these things
13:12j_ey_jannau_: no
13:12j_eyerr mps
13:12FireFox317oh there is j_ey xd
13:12mpsfirefox317: thanks
13:26kit_ty_katem1n1 installed and booted! That was quite painless ^_^
13:27kit_ty_katenow let’s try to figure out how to install ALARM
13:32alyssa has left #asahi [#asahi]
13:38yuyichao has quit [Ping timeout: 480 seconds]
13:51slicey has joined #asahi
13:59yuyichao has joined #asahi
14:04mps' Found a kernel at ..., Found a devicetree at ..., Found a cpio initramfs at ..., No more payloads at ...' and at the end 'No valid payload found'
14:05mpsdoes that mean I forgot to add something
14:05j_eymps: what command are you running?
14:06mpsj_ey: in 1TR?
14:06j_eyno to start the kernel
14:07j_eyare you getting "Cannot find target type!" on the log?
14:07mpsI created macho payload by 'cat' all these
14:08mpsj_ey: no, last line on screen and serial console is 'Running proxy...'
14:08j_eycan you paste the cat and the linux.py or run_guest.py command lines?
14:08mps'cat build/m1n1.macho ~/Image.gz build/dtb/t8103-j274.dtb /boot/initramfs-edge > m1n1-payload.macho'
14:09mpsI don't have linux.py and run_guest.py
14:10j_eyoh, so youre just then chainloading that m1n1-payload.macho?
14:10mpsah, I have them in m1n1 tree
14:10mpsbut don't use them
14:11mpsj_ey: yes, I tried chainload all these and boot
14:11mpsm1n1 found them and uncomress but stops after that
14:13mpsstrange message to me is 'No valid payload found'
14:13j_eytry proxyclient/tools/run_guest.py m1n1-payload.macho
14:14mpsModuleNotFoundError: No module named 'construct'
14:14mpslooks like I have to install something
14:18mpsj_ey: running this I got new logo and it stays, nothing else happens
14:21j_eyok i tried and chainloading that payload should work
14:22j_eyI think you should try figure out where payload_run() inside src/payload.c is returning.. all the error paths print something out
14:25Dcowisn't initramfs should be gzipped?
14:25j_eyit should be yes, but than an error would be printed
14:26j_eymps: is /boot/initramfs-edge a .cpio.gzip?
14:26mpsDcow: it is gzipped, but without .gz at the end
14:26mpsj_ey: yes
14:27mpscould be that I need better kernel
14:27mpsI look at .config and try again later
14:27j_eyit hasnt even tried to start the kernel
14:27mpsj_ey: thank you for help
14:28j_eywait..
14:28j_eyj274, that's the wrong dtb
14:29j_eymps: change j274 to j293 in `dts/t8103-j274.dts`
14:30mpshmm, this is what I noticed but thought it is changed in latest git tree
14:31mpsj_ey: you mean rename it? file?
14:31j_eyno, open the file and change the contents
14:32mps'apple,j274' to 'apple,j273'?
14:32mpsyes, ok
14:34sailorek1234 has quit []
14:37mpsno luck, only new logo and nothing else
14:38mpsI'll look in kernel config to try find if something is missing to be enabled
14:38j_eywell it sounds like it changed, since it didnt say 'no valid paylod'?
14:38j_eyyou need CONFIG_FB_SIMPLE
14:39mpsit is enabled , CONFIG_FB_SIMPLE=y
14:40mpsbut, # CONFIG_SYSFB_SIMPLEFB is not set
14:40j_eythats ok
14:41mps# CONFIG_DRM_SIMPLEDRM is not set
14:41j_eyalso fine
14:42mpsj_ey: thanks again, I have now to go
14:54darkapex3 is now known as darkapex
14:56bgb has joined #asahi
15:04bgb has quit [Ping timeout: 480 seconds]
15:14leo60228 has quit [Ping timeout: 480 seconds]
15:18leo60228 has joined #asahi
15:18andorinhariver[m]By the way, I'd just like to know
15:18andorinhariver[m]Will an installer for Asahi be out by the end of the year? I don't think there's a specific timeline, but I'd like to have a rough idea of when everything should be ready if that's possible
15:19austriancoder_ has quit []
15:19austriancoder has joined #asahi
15:40RealityVoid@mps, did you build the kernel yourself?
15:40RealityVoidI built it but not a whole lot happens when I load it.
15:41RealityVoidThere was some mention earlier that SW:Linux is horribly out of date.
15:42mpsRealityVoid: yes, I built it from 5.16-rc1 tree
15:42mpsaccording to some people here it should boot at least. later I will try to add patches
15:43j_eyyou dont need any patches for it to boot
15:43j_eyprobably just a config issue (so paste that later!)
15:43mpsgood to hear
15:43mpsj_ey: ok, I will post my config when I come back to home
15:44mpsor someone who have it tested could post config
15:49RealityVoidOk, I'l retrace my steps here and paste links to all I have, both config and the result.
15:50tomtastic_ has quit [Quit: ZNC - https://znc.in]
15:52tomtastic has joined #asahi
16:04RealityVoidbasically, the one from the guid,e but I had to fill in the new options I believe.
16:05RealityVoidAnd the linux loading result looks like this:
16:05j_eyRealityVoid: 5.12?
16:06RealityVoidAnd the Air M1 is just a screen with the asahi logo now.
16:06RealityVoidHonestly, I don't know, I just took the linux repo pasted in the link.
16:06j_eywhat link?
16:06RealityVoidIt does seem to be _old_ last commit is in Feb?
16:06RealityVoidAt least on the master branch.
16:07marcanthe master branch doesn't have any particular significance in that repo
16:07marcan(yet, I guess I should do something with it?)
16:07RealityVoidI mean.. at least point in the guide to build something else? :)
16:07marcanwe did say that guide was horribly out of date
16:07RealityVoidI can make a PR with th echanges.
16:07marcanit's a wiki, you can just edit it
16:08RealityVoidBut first to get it running. :))
16:08RealityVoidOh, cool. No PR cecessary? :)) Did not know this about git wikis.
16:08marcanif the docs are horribly out of date it's because nobody who stumbled through the pain of lack of docs bothered to update/write some ;)
16:08marcanit has public write access enabled
16:09RealityVoidYes, don't get me wrong, I don't want to sound ungrateful .\
16:09RealityVoidI will try updating it.
16:09chamomile has joined #asahi
16:09RealityVoidThe config is it still the one from the guide that we should be using? Or some other config?
16:10marcan(I honestly would do it myself, but I have a million things on my plate and this seems like a task that quite a subset of the people here could take on, so it probably makes more sense for someone to take on that task :))
16:10j_eypretty sure you can get a framebuffer with just defconfig + ARCH_APPLE + FB_SIMPLE
16:10marcanthe arm64 defconfig should work
16:10marcanARCH_APPLE should be in defconfig already
16:10RealityVoidYes, I agree. Again, really did not want to sound like complaining.
16:10marcanand I'd kinda hope FB_SIMPLE is too? :)
16:11marcanah, then that one should be added then
16:12marcanRealityVoid: I'm not saying you are, just thought I'd *hint hint* a bit :)
16:12marcanspeaking of, I guess I should update the installer with the post-usb-fix m1n1
16:13marcannow that we finally solved that annoying problem
16:13marcanlet me do that now...
16:13marcan(maybe, this is USB, it's probably still cursed)
16:13RealityVoidHah, you mean that I2C DDOS?
16:13RealityVoidDOS* technically.
16:13marcanwell if SMC was trying to access it at the same time for some reason it's be a DDoS :)
16:15marcaninstaller updated
16:17Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
16:23bps has quit [Ping timeout: 480 seconds]
16:25Dcow has joined #asahi
16:35mlq has joined #asahi
16:41mlq_ has quit [Ping timeout: 480 seconds]
16:45RealityVoidwhat is the best way to enable non-interactively a config option in the kernel? I used ./scripts/config --set-val CONFIG_FB_SIMPLE y but maybe that's not proper?
16:47j_eyI think that script doesnt check dependencies?
16:48RealityVoidIt does not. Any way that you can check them?
16:49povik has joined #asahi
16:49j_eyI looked, but it doesnt seem like any are missing
16:50RealityVoidDoesn't seem to be any extra dependencies for this option, right.
16:50hell__run `make oldconfig` afterwards?
16:51RealityVoidWhelp, same result with the mainline.
16:51hell__if there's a problem with the option you've added, `make oldconfig` will complain
16:52RealityVoidAnd what I got in the M11 serial loading console:
16:53RealityVoidSame screen with lonely asahi logo.
16:53RealityVoidARCH_APPLE is indeed enabled with defconfig.
16:54desairc has quit [Quit: desairc]
16:54desairc has joined #asahi
16:55RealityVoidIt _is_ the linux master that I'm using.
16:55RealityVoidMaybe I should jumpt to a realease.
16:56j_eymaster should be fine
16:59j_eyRealityVoid: you could try these dt changes https://gitlab.arm.com/linux-arm/jg-open/-/commit/a8f2d51f0737820045f1c7fc337cbffdd9bdbf0c and use the dt from linux, not m1n1
17:07bps has joined #asahi
17:08marcanRealityVoid: # CONFIG_SYSFB_SIMPLEFB is not set
17:08marcanah but I'm not sure if that one is required
17:09marcanit might not be
17:10j_eyit isnt
17:11marcanRealityVoid: this is where using the hypervisor with virtual-uart is useful
17:12marcanpicocom --omap crlf --imap lfcrlf /dev/ttyACM1 on one terminal
17:12marcanthen on another, cat ../build/m1n1.macho <(echo 'boot-args=earlycon console=ttySAC0,1500000 console=tty0 debug') ../../linux/arch/arm64/boot/dts/apple/*.dtb ../../linux/arch/arm64/boot/Image.gz >| /tmp/m1n1-linux.macho && python tools/run_guest.py /tmp/m1n1-linux.macho
17:15RealityVoidj_ey: the .dtb is the one that came out from linux. Shoul I have tried with the one from m1n1?
17:15marcanno, the one from linux is newer
17:16j_eybut you'll need to disable those few things I shoed in my patch
17:16marcanI need to get rid of the ones from m1n1 and move it to another repo or something that we keep properly up to date
17:16j_ey*showed
17:16RealityVoidCONFIG_SYSFB_SIMPLEFB - I can add this as well to the options, juuust in case.
17:17marcanj_ey: does having the extra pcie ports actually break it?
17:17j_eyRealityVoid: i dont have it, so it's not the issue
17:17j_eymarcan: yep, some kinda crash in the dart
17:17marcanbut also yeah, if this is a j313 you need a DT that we don't have yet
17:17marcanso do what j_ey said
17:17marcanlinux.py won't care, but the hypervisor method above will
17:17marcan(it'll reject the DT if it mismatches)
17:17RealityVoidWill update that as well.
17:18marcan(hence why I cat all DTs in there, but we just don't have the others yet, I need to merge jannau's series for that)
17:18j_eymarcan: it rejects it.. but not loudly
17:18marcanyeah, it just goes into proxy mode
17:18marcanI should add something about that
17:19j_eymps had this issue earlier, it sound 'found device tree' and then fell through to the proxy
17:20j_eys/sound/said/
17:20povikis it possible i ahve an Image.gz on my hands which 'gzip -d
17:20povik* 'gzip -d' decompressed but m1n1 cannot?
17:20poviks/decompressed/decompresses/
17:20povikam i bad at typing today...
17:20X-Scale` has joined #asahi
17:21FireFox317I think we should also have a page on the wiki that lists which config options should be enabled to enable a specific feature. For example to enable the usb-c ports on the m1 air, i had to change one options from a module to being build into the kernel.
17:23_chamomile has joined #asahi
17:23FireFox317i guess we can put that list on the SW:Linux page maybe
17:25povikseems there is one singular gzip format, so the issue will be somewhere else
17:25X-Scale has quit [Ping timeout: 480 seconds]
17:26marcanj_ey: fixed
17:27marcanpovik: it is possible in the sense that m1n1 is very particular about gzips not having trailing garbage and `gzip` isn't, but it would at least warn as far as I know
17:27marcanand it shouldn't happen
17:27j_eymarcan: awesome, will help with helping others :)
17:27marcanplease do point out pain points like this
17:27marcan(repeatedly, if I don't do anything about them)
17:28marcan(I'm absent-minded about these things sometimes :p)
17:29chamomile has quit [Ping timeout: 480 seconds]
17:30kit_ty_kateis there a way to install the linux kernel from macOS? (on the same machine) All the documentation i find so far seem to require some sort of usb setup with another laptop
17:33kit_ty_kate+ ALarm base, but i guess it’s kind of the same deal
17:34marcanwe only really support tethered boot right now since we expect developers to be testing kernels frequently at this point
17:34j_eyif you use kettenis s branch with uboot, probably
17:34bps has quit [Ping timeout: 480 seconds]
17:34marcanyou *can* burn in a kernel into m1n1 but I would not recommend anyone do that since it's terrible for updating kernels
17:35marcanthe real story will be u-boot as j_ey says, but I still need to look into coming up with some canonical config for that to recommend
17:35kit_ty_katej_ey: that sounds like what I’m looking for indeed
17:36j_eykit_ty_kate: you dont have another computer? doesnt need to be a mac laptop
17:36poviki can also plug my petitboot port which may be of some help here: https://github.com/povik/petitboot-for-m1-macs
17:36povikbut it's untested by other people AFAIK
17:37j_eyand no nvme support
17:37povikyeah, also that
17:37povikso don't use it :-p
17:37jbowen has joined #asahi
17:38kit_ty_katej_ey: i have, but it sounds a bit annoying to plug it every time i want to test something
17:38j_eykit_ty_kate: if youre testing kernel stuff, it's pretty nice!
17:39povik(you can get away with kernel on an usb stick but rootfs on nvme)
17:39povik^ re: petitboot
17:39marcankit_ty_kate: test something like... a new kernel? :)
17:39marcanthere isn't much to test other than kernels at this point
17:39kit_ty_katetouché, fair enough
17:40FireFox317yeah it would be pretty cool if we can test a new kernel from the m1 itself, which i guess might be possible somehow if we use u-boot?
17:40marcanit would also be pretty slow
17:40marcanI guarantee no kernel developer likes doing self-hosted dev and rebooting their machine and dev environment every time, especially not when the alternaive is a 10 second test cycle
17:40marcan*alternative
17:41kettenisyes, with u-boot you can load the kernel from nvme or usb
17:41FireFox317no i wouldnt guess so either, but its pretty nice if i can just sit on the couch with my m1 air and hack on the kernel xd
17:42bps has joined #asahi
17:42j_eyfirefox317: buy a mini as well then :P
17:43FireFox317j_ey, fair enough, unfortunately i'm a poor student :P
17:44kettenismarcan: I'm doing self-hosted kernel devlopment all the time ;)
17:44svenI guess self-hosted development might work for modules but that would still be annoying. It’s hard to be ./runlinux.sh and wait maybe 10seconds until the new kernel is booted
17:44marcankettenis: you poor you :p
17:44marcanand yeah
17:46kit_ty_katemarcan: thing is I’m not so much of a kernel dev (so I’d be pretty unhelpful there), but i’d be pretty excited to contribute some kind of a start of ALarm self-contained install on top of the asahi-install script
17:46marcanthat will be part of the asahi installer once it's intended for end users
17:47kettenismarcan: I can live with a 40s test cycle (and that includes going through u-boot and the OpenBSD bootloader)
17:47marcanwe're going to be shipping disk images with ALARM + custom repo with bleeding edge kernels and integration packages + some scaffolding to resize the filesystem on first boot, along with simpler modes for the installer so people can just say "please resize macos and make this much space for linux" and it does the rest
17:48marcanbut none of that makes any sense until the kernel settles down :) (we're getting there)
17:49j_eykettenis: what DE/WM are you using?
17:49* svenat least looked at the nvme code again today :D
17:50kettenisopenbox as a WM
17:50j_eykettenis: you only use open* tools? :P
17:51kettenisI just run a bunch of xterms and chrome ;)
17:52bps has quit [Ping timeout: 480 seconds]
17:55yuyichao_ has joined #asahi
17:55marcanI just had a little idea. 1TR lets you set at least -v serial=<int> in boot-args, and they get passed to m1n1 is boot-args restriction is disabled in bputil (which we can do)
17:55marcanwe could use that as a proxy flag
17:55marvin24 has joined #asahi
17:55marcanfor the "regular" installs, it would boot u-boot (probably in silent mode at that point, no fb console for m1n1)
17:56marcanbut if you set -v it boots verbose and skips the payload and goes straight into proxy
17:56marcanthat's easy to toggle from 1TR, just nvram boot-args=-v or boot-args=
17:57marcanas a bonus, for people who want to run macOS verbose but don't want to break u-boot, if boot-args restriction is *not* disabled in bputil for the m1n1 BP, that all gets ignored anyway
17:57marcanI wouldn't disable boot-args restriction by default since this is not password-gated and thus a backdoor
17:58marcanso people who want proxy mode would have to toggle it with bputil first (which requires auth), then set boot-args
17:58yuyichao has quit [Ping timeout: 480 seconds]
17:59marvin24_ has quit [Ping timeout: 480 seconds]
18:02kettenismarcan: that sounds reasonable
18:02j_eycould always just have a tiny partition with m1n1 without uboot?
18:02marcanyes, but that's another 2.5G and a separate install, plus it makes it harder to test certain things because at that point it's a separate OS identity
18:03marcane.g. once we get SEP involved this might matter
18:03marcanit's up to people how they do this, of course
18:03marcanbut it seems convenient to be able to flip an existing install to proxy mode without throwing in a whole new m1n1
18:04marcan(plus in theory we should eventually have support for setting boot-args from linux too)
18:07kettenishaven't looked into u-boot silent mode, but it does look like this can be done by flipping a config option
18:07marcanyeah, I figured there's something for that
18:08marcansince m1n1 can pass a kernel command line to u-boot (configured at installation time), we could use that to let users preconfigure u-boot a certain way at install time at least (or even via passing something through from boot-args if needed)
18:15aleasto has quit [Quit: Konversation terminated!]
18:16ketteniscurrently this can be done by having a /config node in the device tree
18:17kettenissee doc/device-tree-bindings/config.txt in the u-boot tree
18:18kettenisthere has been some discussion recently to turn this into a proper device tree binding and in that process the mechanism might change a bit
18:18kettenisanyway, we're talking about icing on a cake that isn't finished yet
18:19marcanyeah, it's easy enough to implement anyway
18:27bradfier has quit [Quit: Leaving...]
18:29bradfier has joined #asahi
18:39mpsI got u-boot on screen. ask me for run 'usb start' but keyboard doesn't work
18:39mpsdo I need to use usv keyboard
18:39j_eymps: you have to use an external keyboard
18:43mpshuh, it doesn't detect my usb keyboard or adapter, no luck
18:47j_eymps: did you get the kernel working?
18:47mpsj_ey: no, not yet
18:48j_eymight be a good idea to do that, so that you can uboot something that works1
18:49mpssure, but I feel like I'm in new jungle and trying to understand a lot of new things
18:49j_eyexactly, so leave u-boot to the side!
18:50mpsjust wanted to see will it boot
18:53mpsj_ey: kernel boots \o/
18:54j_eymps: woot
18:54mpsmounting root media failed, but that I expected for now
18:55mpsnow I know that I have to increase console fonts
18:55j_eyhaha same
19:00bps has joined #asahi
19:03eleven has joined #asahi
19:03elevenhey everyone - I went over a wiki at github and have a question
19:04elevenis asahi installed (as of now) in apfs volume ?
19:09povikwell there must be an apfs volume involved to run linux, just to appease the apple software that is running at boot before the control is handed over to linux, as far as i know
19:09povikbut then, no, linux doesnt use an apfs volume for its filesystem
19:10elevenSo one can use anything for rootfs - ext4, btrfs etc ?
19:12elevengreat. I was also wondering - are there any plans to remove macos whatsoever and leave only linux ? Asking because I'm fed up with macos on this machine.
19:15j_eyeleven: macOS will stay around for the firmware updates
19:17elevenj_ey: ok - fair enough.
19:18elevenThanks for all the info. I guess these things could be added to wiki.
19:19povikfeel free to add them if you want
19:19elevenI mean general plans on where the project is going. It would be great. For all those old pricks like me used to Linux.
19:21elevenpovik: I can do this. But are you guys here sure that you will be answering all my questions ? One of these days you will probably shoot me.
19:21RealityVoidOk, so I eventually added the dtb from j_ey and I ran the image in the ypervisor and... I got this: https://gist.github.com/RealityVoid/cf1bd5f22755af36b072dca685ba167c
19:22j_eyRealityVoid: type lower()
19:22j_eyRealityVoid: it should continue booting
19:22j_eyeleven: plenty of people asking questions :P
19:23RealityVoidWell, did, aaaand, it's dead. :)) Let me reset and retry loading the thing.
19:23j_eyRealityVoid: did you see anything on the screnn?
19:24RealityVoidI did some stuff before running that.
19:24j_eyI mean did you see any console messages on the m1?
19:24povikeleven: well i cant guarantee you will get answer to every question, but if you are missing something in the wiki, chances are you are not alone, so if you want to ask and then add it to the wiki, go ahead
19:25RealityVoidWell, nope seems to not do anything, the console on my machine is stuck and the display on the M1 has only the asahi logo.
19:27j_eyok well if you reboot and can do: lower() in the hypervisor shell that would be good
19:27RealityVoidYes, just did that and the result is the same.
19:27RealityVoidNo shell response, asahi logo on framebuffer.
19:28RealityVoidI thought I broke it, but seems not to have been the case.
19:28j_eyctrl-c in the shell?
19:28RealityVoidYes, that worked.
19:28RealityVoidI can now lower() several times.
19:29RealityVoidlower() untill something interesting happens?
19:30j_eymaybe? worth a try
19:31RealityVoidNah, seems same faulting on CPU5.
19:31RealityVoidWorth a try booting with 1 CPU, do you think?
19:32j_eyset proxyclient/m1n1/hv.py self.smp = False
19:32RealityVoidhttps://gist.github.com/RealityVoid/0028e075b76369e2d2a129261ef66761 this is what I got this run, just in case it's intersting.
19:34RealityVoidShould I run that while hypervisor shell is up or how?
19:34j_eyreboot and edit that file
19:36slicey has quit [Quit: zzz]
19:36nskl has joined #asahi
19:36j_eywhy is that getting stuck on a HVC..
19:37elevenWhat I'm personally missing on wiki is two sections - FAQ and Project Goals - what do you think guys ?
19:38RealityVoidThe wiki is freely editable, soI think anyone here can add stuff if they think it's usefull.
19:39elevenRealityVoid: sure, I'm asking what do you people think ?
19:40elevenI mean - do we want to attract more people or not ?
19:41elevenFor me the project absolutely deserves it
19:41povikeleven: no harm in starting those pages on wiki, sounds useful to me
19:41RealityVoidWell, it seems that now I don't get the secondary core exceptions, which is nice.
19:42RealityVoidBut lower is always stuck, even after ctrl+c
19:42RealityVoidMaybe I either borked something when building the kernel or when running the hypervisor?
19:43j_eyRealityVoid: do you have picocom?
19:44povikeleven: you can reiterate on both the FAQ and Project Goals that asahi linux is not supposed to be a linux distribution, as people are often confused about that
19:44RealityVoidI do not, let me try to get that running.
19:44povikit is an effort to upstream changes to make linux usable on these machines, with any distribution
19:44elevenpovik: how I understand it - there are pages to be created, but there should be someone to report what are the advancements of the project to the world.
19:44j_eyeleven: that's done on the blog
19:45povikanother item on the FAQ seems to me :-p
19:45elevenj_ey: look at last update - september ? really ?
19:45povikyeah, and soon there will be october
19:46elevenIt's November already
19:46poviki know, it has some delay, but not horrible
19:46elevenI'm not pushing to anything - just reporting to you my observations
19:46povikunderstood
19:49j_eyjust takes time to get written
19:49RealityVoidheres is my question about picocom. If I connect to that, how can I do the connection to load the kernel?
19:49RealityVoidI seem to either be able to connect to picocom or do the m1n1 loading, but not both?
19:50j_eyRealityVoid: run the hv, then connect picocom
19:51j_eyRealityVoid: picoom will be on /dev/ttyACM1, m1n1 on /dev/ttyACM0
19:52RealityVoidOk, cool. So I can run both at the smae time, the pico needs to be on 2nd. Usefull.
19:52elevenI'll prepare something for the wiki. Thanks for you cooperation. It was really nice talking to you guys
19:52j_eyok cool, so linux is booting
19:53RealityVoidWell, it's running _something_
19:53j_eyRealityVoid: that's where it hung/crashed I guess?
19:53RealityVoidwhat does lower() actually do?
19:54j_eythat basically sends the current exception to the kernel (rather than the hypervisor handling it)
19:54j_eyit's only useful for BRK exceptions
19:54RealityVoidSo. I get kernel panic if I lower now.
19:54j_eyRealityVoid: so if you do lower() at that brk exception, hopefully more get..
19:54j_eycool, paste it!
19:55eleven has left #asahi [#asahi]
19:56j_eyRealityVoid: run './scripts/faddr2line vmlinux aic_init_cpu+0xc/0x108' in your linux directory
19:56RealityVoidOk, so when it tries starting the IRQ's it gets some undefined instruction?
19:57RealityVoidUhhh, this is wierd.
19:57RealityVoidskipping aic_init_cpu address at 0xffff8000104e776c due to size mismatch (0x108 != 0x1b8)
19:57RealityVoidno match for aic_init_cpu+0xc/0x108
19:58j_eyRealityVoid: so this is torvalds/linux master branch?
19:59j_eyRealityVoid: drivers/irqchip/irq-apple-aic.c line 775 there's a WARN_ON, can you just comment that out and rebuild?
20:01RealityVoid has quit [Remote host closed the connection]
20:01radnic has joined #asahi
20:02radnic is now known as RealityVoid
20:04RealityVoidDid that, pretty much same result.
20:04svenLooks like something with SMP goes wrong
20:04mpsj_ey: to get keyboard on macbooks which patches needs to be picked from https://gitlab.arm.com/linux-arm/jg-open/-/commits/m1-keyboard-5.16/? last 8?
20:04svenm1n1 seems to disable all secondary CPUs
20:04RealityVoidYes, we did that intentionally.
20:04j_eymps: yep
20:05RealityVoidShould I remove the single core run?
20:05j_eyRealityVoid: pretty much the same result? or exactly the same?
20:05svenoh, I didn’t read the backlog
20:05mpsj_ey: thanks, going to prepare them
20:06RealityVoidTo me, that is exactly the same. But maybe I am missing something.
20:06j_eyRealityVoid: that brk #0x800 comes from an explicit thing in the code
20:07j_eyRealityVoid: definitely rebuilt and using the right imae.gz right? (just checking)
20:07svenhuh, that’s an under instruction error isn’t it?
20:07sven*undef
20:07RealityVoidI _think_ I did.
20:08RealityVoidBut let me double check.
20:08RealityVoidSo I gzipped it in the linux root dir. gzip < ../linux/arch/arm64/boot/Image > Image.gz
20:09RealityVoidand then ran the command from marcan with some path adjustments for my machine relative locations.
20:09j_eyoh, I guess a panic ends in a BRK
20:09j_eyundef instruction is really weird
20:10RealityVoidcat ../build/m1n1.macho <(echo 'boot-args=earlycon console=ttySAC0,1500000 console=tty0 debug cpus=1') ../../linux_mainline/arch/arm64/boot/dts/apple/*.dtb ../../linux_mainline/Image.gz >| /tmp/m1n1-linux.macho && python3 tools/run_guest.py /tmp/m1n1-linux.macho
20:10RealityVoidlooks fine to me.
20:10j_eyyeah looks fine
20:10RealityVoidLet me print something in the kernel bootup just to make sure it's my binary.
20:11RealityVoidCan you... uhh, give me a hint where I can print something in the kernel?
20:12j_eydo_undefinstr in arch/arm64/kernel/traps.c
20:12j_eysince we know we're hitting that :P
20:15RealityVoidCan I just print stuff anywhere? Is that point not too late torelie on the system?
20:15j_eypr_err("HELLO WORLD\n");
20:25Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
20:26Dcow has joined #asahi
20:27RealityVoidI don't see my print in there. Strange. I don't know where the image can appear from elsewhere.
20:27Dcow has quit []
20:27RealityVoidLet me try something more?
20:28j_eyuhh you have linux and linux_mainline folders?
20:28j_eyis that correct?
20:30RealityVoidbut I just deleted right now the linux now so I don't do any confusions.
20:30j_ey" < RealityVoid> So I gzipped it in the linux root dir. gzip < ../linux/arch/arm64/boot/Image > Image.gz"
20:31j_eythat looked like the wrong linux dir
20:32RealityVoidYes, now it boots.
20:32RealityVoidSooo stupid.
20:32RealityVoidSorry about this j_ey.
20:33j_eyRealityVoid: boots to a shell?
20:33RealityVoidboots to a kernel panic, but at least I get stuff on the framebuffer and a cute little tux in the upper screen.
20:33j_eyoh right, no initramfs
20:35jbowen has quit [Ping timeout: 480 seconds]
20:36RealityVoidHah, the number of tuxes represents the number of cores.
20:37mpsRealityVoid: I goot 8 tuxes
20:37RealityVoidYes, I was booting with SMP disabled.
20:37RealityVoidNow I get them as well. :)
20:39mpsI'm building kernel with keyboard patches, if succeed will be enough for today for me
20:39RealityVoidthanks again j_ey, and sorry for the mixup. The dangers of carelessly copying commands.
20:40j_eyRealityVoid: np, glad it's basically working
20:40j_eyim confused why that other linux hit an undefined inst though..
20:41RealityVoidIt was the older version, from the asahi repo.
20:41RealityVoidProbablty some issue that was fixed in the meantime.
20:41RealityVoidIt _was_ 9 months old.
20:41j_eyyeah, not worth thnking about
20:55jannauI wouldn't mind to maintain a linux branch with up to date hardware support
20:55RealityVoidThat would be nice. But also a pain for you, I think. :)
20:56j_eythat's been on the cards for a while..
20:56j_eyIm keeping the keyboard stuff up to date, but that's it
20:57jannauhttps://github.com/jannau/linux/tree/apple-m1-exp_v5.16-rc1 has dts files for all known M1, M1 Pro, M1 Max devices and support for PCIe, USB-C, NVME and watchdog (based on t6000/bringup)
20:58svennice :)
20:59RealityVoidAdded some changes to https://github.com/AsahiLinux/docs/wiki/SW:Linux pointing people to use the mainline linux kernel and add just the CONFIG_FB_SIMPLE option.
20:59jannauj_ey: I think I should send the '#interrupt-cells' fix. I forgot again that I need it and was wondering why the cd321x probe failed
21:00RealityVoidHope I didn't bork anything.
21:00jannautested on a mac mini and 14-inch macbook pro
21:01gladiac is now known as Guest6314
21:01gladiac has joined #asahi
21:01j_eyjannau: oh, I thought that was in your patchset that you sent
21:02RealityVoidWhere do you currently gather the patchsets?
21:02j_eyI meant the one jannau sent to the linux mailing list
21:03j_eysven and marcan use the asahi linux repo for their stuff, and everything else is on peoples personal repos
21:04j_eyRealityVoid: btw you can run make [..] Image.gz
21:04bps has quit [Ping timeout: 480 seconds]
21:07RealityVoidAh, cool, that works.
21:07Guest6314 has quit [Ping timeout: 480 seconds]
21:08RealityVoidWould update the guide,but this way at least it's clear for people what is the files they care about and it puts it in the root, so you don;t have to dig too far in the tree.
21:11bps has joined #asahi
21:14RealityVoidOkkk, cool, now I have the debian installer on screen which is nice.. .but the USB ports went down when I entered the isntaller
21:15RealityVoidThe keyboard is not working, as expected. But htere has to be an input method somehow, right?
21:15mpswould be nice and useful if someone who knows for needed and useful patches can collect them or make some url/guide with list
21:16RealityVoid@jannau said he would like to do that. :)
21:16mpsRealityVoid: does keyboard work on your booted kernel
21:17j_eyRealityVoid didnt take those patches
21:17j_eyRealityVoid: you could run the installer over picocom?
21:17RealityVoidPicocom, strangely, disconnects.
21:17RealityVoidBoth USB's are down.
21:18j_eyuh, edit the dtb!
21:18mpsRealityVoid: search for bootterm pkg, it can wait till device appears on machine
21:19RealityVoidI did, it's the dtb from you. :)
21:20j_eyRealityVoid: rerun picocom, the usb should work then
21:21j_eyRealityVoid: also reboot and swap the two console= things that you have in boot-args
21:28RealityVoidHmm, I thought that I did the same stupid thing with the dir..
21:28RealityVoidbut it does not seem to be the case.
21:29jbowen has joined #asahi
21:38jannauhttps://github.com/jannau/AsahiLinux-PKGBUILD if someone wants to build kernel packages for arch linux arm. I thin at this point the most interesting thing in the working config: https://github.com/jannau/AsahiLinux-PKGBUILD/blob/main/linux-apple/config
21:39RealityVoidHere's an... uhhh.. interesting observation. If I inverrt the consoles in the aruguments, the background of the debian installer turns black. Huh.
21:43j_eyRealityVoid: you should be able to do use picocom as input now
21:43RealityVoidYes, but it's not working. there has to be something stupid I did. When I had it under the hypervisor it worked at that point, no sweat.
21:43RealityVoidSo then how did I bork it this time, I wonder.
21:44j_eythst only works under the hypervisor
21:44mpsjannau: nice
21:44RealityVoidOk. I was trying to load the image directly.
21:46sven... and it's just 40 patches we still have to upstream
21:47RealityVoidWell, seems to work now. :)
21:47RealityVoidUnder hypervisor.
21:48svenjannau: "Does not verify since the apple,dwc3 binding doesn't allow ports." huh... that's weird
21:48jannausven: I guess 1/2f of them are already sent but the t6000 support misses patches
21:49j_eysven: + a few for spi/keyb
21:49kettenislisting (some) of the compatibles that are "in-flight"
21:49jannausven: binding refs snps,dwc3.yaml and usb-drd.yaml and neither allows ports
21:50RealityVoidI am a bit confused by this shell over picom since I do see the menu in the shell on my pc but it is nor reflected in the display screen
21:50svenjannau: uh, that's not true
21:50svensnps,dwc3 should allow it
21:50svenlet me check again
21:50sveni know that at least some rockchip devicetree has a port under dwc3
21:51j_eyRealityVoid: yes it's not mirrored like that
21:55jannausven: arch/arm64/boot/dts/rockchip/rk3399.dtsi has a port in related display port node, that's the only match I see with 'git grep -A15 snps,dwc3'
21:56svenhrm... maybe it was somewhere else. but i'm pretty sure ports are allowed there because that's how the role-switch infrastructure works
21:58d0p1 has joined #asahi
21:59svenhrm, can't find it anymore now ofc :D
22:00svenjannau: try to get rid of the address/size-cells stuff and the @0 in the usb node
22:01sveniirc i didn't have that in my dt that passed validation
22:03jannauyes, that fixes the complaints
22:10jbowen has quit [Ping timeout: 480 seconds]
22:12jbowen has joined #asahi
22:13jannaufixups pushed
22:14sveni think you could at least send the #interrupt-cells patch already
22:14svenand maybe even one to add the i2c nodes
22:16jbowen has quit []
22:18jannauyeah, I guess we could send a patch which adds all 4 i2c nodes without devices
22:18sveni think you could even add the cd321x nodes without the connection to the usb nodes
22:22leah has quit [Quit: WeeChat 3.3]
22:28bps has quit [Ping timeout: 480 seconds]
22:29RealityVoidkettenis: maybe add that to the index else it will be undiscoverable
…