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
yeoldetoast has joined #asahi
quarkyalice has quit [Remote host closed the connection]
Emantor has quit [Quit: ZNC - http://znc.in]
quarkyalice has joined #asahi
Emantor has joined #asahi
<amw> kfischer: Which python proxy client did you use? run_guest.py (under HV) or linux.py?
<kfischer> amw: I tried both
<amw> First I haven't gotten the linux USB serial working. You might want to try the dart/dev branch of the Asahi Linux which appears to have the most recent dwc3 (USB) controller work
<kfischer> Yeah, I built that and enabled dwc3 support in the .config, which enumerates the USB controller, but doesn’t detect a USB HID keyboard yet
<kfischer> currently trying to see if the gadget console will work
<amw> Did you get the console=ttySAC0,1500000 output on the 2nd serial interface on other PC?
<kfischer> no, both serials disappear as soon as Linux takes over
<amw> I don't think it does under run_guest.py (from memory) - I'll have to try again and update the Wiki
<kfischer> let me try again and make sure
<kfischer> Yeah, they’re both gone, even with run_guest.py
<amw> That's strange I think as long as the HV is running it should be keeping the USB gadget's going?
<kfischer> :shrug: that’s that I expected, but they’re definitely gone
<kfischer> To close the loop on the Linux gadget, it complains “couldn't find an available UDC”, no idea what that is, but it didn’t work
<kfischer> Hmm, managed to get the g_serial driver to load by forcing the dwc3 into gadget mode, but it doesn’t actually show up on the host
<amw> kfischer: I've loaded linux under the HV and the other ttyACM1 is still there and printing kernel messages for me....
<kfischer> amw: Hmm, ok, which version of m1n1 are you using?
<amw> I've got a compile date of 22 June
<amw> I'll upload a dump of the console text output - https://paste.debian.net/?show=1203205;lines=0
<amw> It looks horrible because the console output has lots of spaces at the start - don't know why
<amw> If I strip the leading blanks with this sed script: sed '/^ */s///' ttyACM1-serial-output.txt - I get the much more readable: https://paste.debian.net/1203206/
<amw> The latest marcan rev I am using is commit e00e8f1 hv/trace_dcp.py: Fix stuff - of course I have to chainload that m1n1 first because my booting m1n1 is much older
<kfischer> Alright, that’s the rev I’m using (no chainload, that’s the booting one), so something is off :/
<kfischer> amw: I get the same output on the other serial, but that’s all m1n1, not Linux, as soon as Linux actually boots, both serials die (as in your output)
<kfischer> Anyway, I think I’m done for the day
<amw> kfischer: From the "Starting Shell: Still running ..." is most definitely from my initrd shell that I put in there.
<kfischer> amw: Oh, I see. I was expecting linux console syslog spew :)
<kfischer> amw: Anyway, for me that doesn’t happen, it just dies
<amw> The stuff above that is m1n1 HV output - but below that is from the initrd - sorry I see how confusing that would be.
<kfischer> maybe I should go back to the kernel without dwc3 driver
<kfischer> perhaps it’s tearing that down when the kernel starts up
<kfischer> not sure if I ever tried that configuration
<kfischer> alright, let’s call that the last experiment of the night :)
<amw> Sure: I'm going back to studying the page tables - I think I just understand the 3 layers under the HV...
<kfischer> thanks for your help
<amw> For what it's worth here's the init script in the initramfs - https://paste.debian.net/1203207/
<amw> For some reason it locks up when it's printing a 3 digit count, i.e. after 99 goes :"Still running 10"
<kfischer> Ok, that’s doing something. How do I pass boot cmdline to the kernel?
<amw> I'm thinking it just loads the initrd (combined in the m1n1-payload.macho as per https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart#direct-payload-booting) and normal kernels just run the /init program/script by default
<amw> There is also a built in command line kernel CONFIG_CMDLINE="...." you can build into the kernel...
<kfischer> Alright, I might try that at some point
<marcan> kfischer: you need to hack the devicetree to disable the usb if running under the hypervisor
<marcan> otherwise it collides and fails
<marcan> the HV only does it for the ADT, and m1n1 does not currently forward that into the DT
<kfischer> marcan: yeah, I reached that conclusion. Do you have a recommended config for getting a working linux shell while using the usb gadget serial?
<marcan> actually input isn't supported yet in the hypervisor vserial... :)
<marcan> it's on my todo list
<kfischer> ah
<marcan> I currently mostly expect people to use the HV for very low level debug
<kfischer> fair enough. I was hoping to run some fairly standalone userspace code to see if some oddities I’m seeing are a chip artifact or an os artifact :)
<marcan> but yes we have a bit of a gap right now, the people bringing up I/O in the kernel have physical serial cables
<marcan> though you should be able to get USB to work with sven's branch
<marcan> via the type C ports at least
<amw> It sounded like some people were getting something via m1n1 -> uboot -> linux
<marcan> do note that hotplug doesn't work though
<marcan> yeah, that's the expected path
PhilippvK has joined #asahi
<amw> I don't think there are any posted / official binaries only dev trees in various states...
<marcan> yeah... it's a bit chaotic right now
<marcan> sven can probably give you pointers as to what works exactly
<kfischer> On sven’s branch I managed to get it to recognize the USB controller, but no luck on getting any input or enabling the USB g_serial gadget
<marcan> I've been meaning to collate this all into a branch with known good instructions
<marcan> kfischer: have you tried usb host mode?
<marcan> just plug in a keyboard and use the screen
<marcan> AIUI that works
<marcan> hotplug should work on a hub (just not on the root port)
<kfischer> yes, tried that
<marcan> on the type C ports?
<kfischer> well, type C to dock to USB keyboard
<marcan> hm, what kind of dock?
<kfischer> I don’t have a USB-C keyboard
<marcan> I could see a dock not working
<kfischer> Caldigit dock
<marcan> if it requires USB-PD negotiation or thunderbolt or whatever weird thing
<marcan> I recommend a plain type C to type A adapter cable
<kfischer> might require thunderbolt
<marcan> yeah we definitely don't do that yet
<kfischer> I don’t think I have an appropriate cable that goes that way around
<kfischer> but I can probably find one
phiologe has quit [Ping timeout: 480 seconds]
<marcan> you want this kind of thing: https://www.amazon.co.jp/-/en/dp/B07TJ38SDW/
<kfischer> yeah
ihaveamac has quit [Quit: fail]
ihaveamac has joined #asahi
<kfischer> Alright, may pick one of those up tomorrow - will let you know how it goes
kfischer has quit [Quit: kfischer]
<marcan> cool! :)
<marcan> hope we can write up some better docs soon, sorry that it's so haphazard
bgb has joined #asahi
marvin24_ has joined #asahi
marvin24 has quit [Ping timeout: 480 seconds]
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
robinp_ has joined #asahi
robinp has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
tertu has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
tsida has quit [Remote host closed the connection]
thunfisch has quit [Read error: Connection reset by peer]
tsida has joined #asahi
thunfisch has joined #asahi
<sven> yeah, docks won't work. they'll need thunderbolt
<sven> the dart/dev branch should give you usb-c. i've only been using it in host mode though because i have a serial cable
<sven> there's also https://github.com/svenpeter42/linux/tree/pcie/hack (need to push that to asahi as well) which will give you pcie if you go through u-boot
<sven> this will all become a little bit easier once the DART driver has been merged upsream (https://lore.kernel.org/linux-iommu/20210627143405.77298-1-sven@svenpeter.dev/T/#m2d7976f4a0f4b0a80a94e85824495ec5289e90b8)
<sven> *upstream
<sven> once that's done both pcie and usb-c should be a rather simple patchset that (hopefully) will make it upstream rather quickly as well
<sven> (usb-c is just adding a node to the dt and maz' pcie patch is a single new file then)
<amw> sven: Do you have a device tree for the dart/dev branch?
<amw> Also marcan suggested you need to disable a USB entry if you run the kernel under the HV (run_guest.py) to avoid a clash. Does it matter which one? I guess I can nut it out by trial and error
<sven> uh, the dart/dev branch includes a device tree with usb
<sven> but i never run linux under the hv
<sven> should be the first one though that needs to be disabled i think
<amw> ok - thanks
<sven> the darts as well
<sven> and ofc there's the annoying quirk that only the first device you plug into the ports works
<amw> I am guessing linux/arch/arm64/boot/dts/apple/t8103.dtsi
<sven> that's the commit that adds the nodes, just remove the first three and it might work
<amw> ok - was just going to add status = "disabled";
<sven> sure, that should also work
aleasto has joined #asahi
rustylerp has joined #asahi
<amw> sven: Not sure if you can help on this - but I'm getting a panic 'Attempted to kill init!' line 796 kernel/exit.c and this on the console - https://paste.debian.net/?show=1203231;lines=0
<sven> sounds like a userland issue
<sven> either your init processed failed to start or it terminated for some reason
<amw> ok
<amw> sven: ok - got initrd working - was building using screwy cpio -o -c instructions - only this works : cpio -o -H newc
<amw> Now it hangs - looks like when the output hits 16 characters output - possibly bug in vuart?
minecrell has quit [Quit: :( ]
rustylerp has quit [Ping timeout: 480 seconds]
minecrell has joined #asahi
<marcan> amw: vuart is only barely implemented, should work for earlycon but that's about it
<marcan> it needs to be a lot more complete for the real driver to work
<marcan> no IRQs etc, so you're probably seeing the first FIFO fill and then it hangs
<amw> Hmm ok will look at it tomorrow - plenty of things to play with...
<sven> nice
<sven> let me know if there are any issues with the dart or usb
nsklaus has quit [Quit: WeeChat 3.2]
bgb has joined #asahi
trollface has joined #asahi
<trollface> doin lads
trollface has quit [Remote host closed the connection]
rustylerp has joined #asahi
trollface has joined #asahi
trollface has quit []
choozy has joined #asahi
ae86 has joined #asahi
<ae86> What's up
ae86 has quit [Remote host closed the connection]
ae86 has joined #asahi
ae86 has quit [Remote host closed the connection]
bgb has quit [Ping timeout: 480 seconds]
rustylerp has quit [Quit: ...]
ae86 has joined #asahi
ae86 has quit [Remote host closed the connection]
ae86 has joined #asahi
ae86 has quit [Ping timeout: 480 seconds]
bps has quit [Ping timeout: 480 seconds]
ae86 has joined #asahi
ae86 has quit [Ping timeout: 480 seconds]
x56 has quit [Remote host closed the connection]
x56 has joined #asahi
yeoldetoast has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
yuyichao has quit [Remote host closed the connection]
thunfisch has quit [Read error: Connection reset by peer]
thunfisch has joined #asahi
happy-dude[m] has joined #asahi
bps has joined #asahi
quarkyalice has quit [Remote host closed the connection]
quarkyalice has joined #asahi
pugguu has joined #asahi
<pugguu> Where's marcan
<pugguu> He hasent been doing any streams lately
<j_ey> pugguu: been busy, he'll be back when he's ready!
<pugguu> Ok just wondering
<pugguu> Was just Abit worried
pugguu has quit [Read error: Connection reset by peer]
pugguu has joined #asahi
pugguu has quit [Read error: Connection reset by peer]
pugguu has joined #asahi
Tom__ has joined #asahi
choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
StupidYui has quit [Ping timeout: 480 seconds]
pugguu has quit [Read error: Connection reset by peer]
pugguu has joined #asahi
pugguu has quit [Ping timeout: 480 seconds]
pugguu has joined #asahi
pugguu has quit [Ping timeout: 480 seconds]
aleasto has quit [Quit: Konversation terminated!]
kfischer has joined #asahi
quarkyalice_ has joined #asahi
quarkyalice has quit [Ping timeout: 480 seconds]
Stary_ has quit []