#
…

2021-08-07

00:03alyssaHmm still not seeing anything
00:04alyssapipcet[m]: "(* means broken)" that's reassuring
00:06pipcet[m]I'm running that code and I'm definitely seeing a USB device and a network interface from the Linux/Intel side
00:07pipcet[m]I think what's broken is the missing dropbear package in that image so you can't actually log in :-)
00:08alyssaNothing enabled under vv right?
00:08alyssa > Device Drivers > USB support > USB Gadget Support > USB Peripheral Controller ───────────────────────────────────────────────────────────
00:08pipcet[m]anything in dmesg after you do the echo ...dwc... > .../UDC thing?
00:09alyssaalso CONFIG_TYPEC_UCSI: seems important
00:10alyssarelevant dmesg "udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers"
00:10alyssaright...
00:11pipcet[m]anything in /sys/class/udc?
00:12alyssano, empty. you?
00:12pipcet[m]502280000.dwc3
00:14pipcet[m]tried unloading/reloading the driver?
00:14alyssai'm assuming i'm missing a config
00:19pipcet[m]anything from the dwc3 driver in dmesg? it should probably complain about a DT/configuration mismatch...
00:29alyssaprobably a device tree issue
00:29pipcet[m]quite possible :/
00:29alyssadr_mode = "host"
00:29alyssasven: thanks
00:32alyssaOk, now I have a gadget device but my host mode is broken. 🙃
00:33alyssa"dr_mode forced to gadget" ...right
00:34pipcet[m]you need that for the keyboard, right?
00:34alyssarootfs but yeah
00:34alyssadont need the keyboard if I have ssh
00:34alyssa(and would rather do that replacement since I will be losing the display soon ;-))
00:34pipcet[m]don't need rootfs if you have nfsroot-over-usb! uh...
00:35alyssalolololol
00:35alyssadwc3 says Configuration mismatch
00:35alyssaup debug central uhmmmm
00:35alyssait.. should be possible to have host mode on one port and gadget on the other right?
00:36pipcet[m]I don't know, to be honest, I don't think I've done both at the same time.
00:37pipcet[m]you can always just move to a large initrd, though you need to change a few lines in the m1n1 proxyclient code to allow it...
00:40amwalyssa: Might be a lots easier to by a USB hub - mine works fine for keyboard + USB drive, might be limited to USB2 support though...
00:41amw*connect via a USB hub I mean
00:42alyssaI do have a hub
00:47amwAah you don't have an Ethernet or WiFi USB dongle
00:55ihaveamac has quit [Quit: fail]
00:56ihaveamac has joined #asahi
01:15alyssaOh oops was missing a device tree thing
01:15alyssalet's try this
01:18alyssa[10767.980519] usb 7-1: can't set config #1, error -110
01:18alyssaincidentally broken on host side, wee
01:19pipcet[m]I think that's a timeout?
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi
01:24alyssa"fixed" the m1 dmesg error so the port is in OTG mode but still no UDC, what
01:24alyssaer no maybe that's just racey
01:24alyssastill no host mode
01:28alyssaright... it's failing to do the role switch
01:45pipcet[m]force the roles?
01:51pipcet[m]alyssa: uhm, I got a bit carried away, I was just going to write some pseudocode for the mailbox/ASC/DCP+SMC/brightness+gpio stack, but then I hacked on it a bit more and things actually work here now
02:01quarkyalice has joined #asahi
02:21phiologe has joined #asahi
02:24PhilippvK has quit [Ping timeout: 480 seconds]
02:35yuyichao has joined #asahi
02:40quarkyalice_ has joined #asahi
02:40quarkyalice has quit [Remote host closed the connection]
02:46alyssapipcet[m]: Nya
02:46alyssaSo I can stop writing a DCP driver, work is done? 😋
03:13alyssa has quit [Remote host closed the connection]
03:17marvin24_ has joined #asahi
03:20marvin24 has quit [Ping timeout: 480 seconds]
05:31quarkyalice_ has quit [Quit: Leaving]
07:15chadmed has quit [Quit: Konversation terminated!]
07:16chadmed has joined #asahi
07:26chadmed has quit [Quit: Konversation terminated!]
08:12pipcet[m]s/stop/start/, I think :-)
09:06chadmed has joined #asahi
09:23chadmed has quit [Quit: Konversation terminated!]
09:45bisko has joined #asahi
09:53bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:20bisko has joined #asahi
10:22bisko has quit []
10:22bisko has joined #asahi
10:23chadmed has joined #asahi
10:26bisko has quit []
11:30dung[m] has joined #asahi
12:23j_eyare the LB and LR partitions needed currently?
12:29tophevich[m]j_ey: (disclaimer: I've no clue what I'm talking about.) But as far as I gathered from marcan's last stream regarding installer script, you need an LB, LR and Data/System flagged partions for the group to be seen selectable as a boot option.
12:29j_eyoh, I didn't remember hearing that, but ok!
13:10alyssa has joined #asahi
13:48pipcet[m]alyssa: figured out how to get ssh to work?
13:50pipcet[m]alyssa: there's code at https://github.com/pipcet/linux/commit/dd4c7abffd71318cb2a2c31514ae0ad29eeed3c3 if you want to have a look, but of course it's perfectly okay if you don't and do your own thing instead :-)
13:57svenugh.. and now we've done duplicated work :(
13:57tophevich[m]sven: but doing it yourself means you understand the problemspace better right? :D ... so not for nothing :P
13:59tophevich[m](just wanted to give it a postive spin)
14:00pipcet[m]sven: no, I looked at yours first!
14:01pipcet[m]sven: (and I figured the way I decided to do it wouldn't fly anyway, so let's wait and see whether anything was really duplicated :P)
14:01svenno, i mean, i have some WIP code to split asc to mailbox and clients. if i had known that you worked on this i could've focused on gpio/pinctrl/or any of the other stuff that's left to do
14:02pipcet[m]sven: sorry, I'll try to be clearer next time
14:02j_eypipcet[m]: are you planning on working to upstream yoru code?
14:03pipcet[m]j_ey: ideally, yes, but I certainly don't want to inconvenience anyone by getting incompatible changes included
14:04pipcet[m](and it's been a really long time since I last got stuff included in the kernel)
14:05tophevich[m](you could use the github/asahilinux issue tracker to tracker open tasks and who does what + WIP:PRs linked to that for better visibility)
14:06alyssapipcet[m]: I'd encourage you to try to upstream the WDT driver
14:06alyssaIt's useful functionality, and a lot simpler than the whole web of ASC+DART+DCP+etc so a lot less bikeshedding on the LKML :)
14:06pipcet[m]alyssa: will do once I can test it on the mainline kernel and see that it still works. Thanks! :-)
14:10alyssapipcet[m]: Cc me when you send out the email :)
14:10alyssa(Obviously the code needs some clean up before a v1 -- #if 0 is going to be a no-no, etc -- but that's the easy part)
14:12pipcet[m]definitely.
14:16pipcet[m]I think the wdt driver should work without the clk stuff, too, but we need those for the fpwm (keyboard backlight) driver.
14:37alyssa has left #asahi [#asahi]
14:44j_eydoes kmutil copy m1n1.macho somewhere?
14:45j_eyit seems like m1n1.macho doesnt have to be at a particular location when you use kmutil configure-boot?
14:47sveni'm pretty sure it does
14:52tophevich[m]don't know if that helps you, but in the last stream this is the section where he does configure-boot on m1n1.macho: https://youtu.be/uqPLyBS20PA?t=7568
14:52tophevich[m](searched through auto-transcript)
14:52j_eycool, seems like it can be anywhere then!
14:53j_eyalthough I can't seem to get curl to work :/
14:54j_eyit just never recievs any data
14:54j_eywould help if you typed the address correctly...
14:55tophevich[m]yeah the last 2 times he did it on stream it seems to take forever
14:56j_eyi just typed 192.68 instead of 192.168 :)
15:01j_eywoot, booted into m1n1!
15:15j_eywhat folder do you have to be in, to execute shell.py for example?
15:15j_eyI get "ImportError: attempted relative import with no known parent package"
15:17j_eyif I execute it from the top level m1n1 directory, now I get: ModuleNotFoundError: No module named 'serial.tools', even though I ran: python3.9 -m pip install serial construct serial.tool
15:22pipcet[m]there's probably a better way, but what I do is cd to m1n1/proxyclient, then python3 -m m1n1.shell
15:31j_eyturns out I needed pyserial, not serial, fixed the wiki
15:39j_eytrying to boot gives me https://paste.gg/p/anonymous/22c5bc397c4349cfafd0da1d4b6656ce it looks like it's using some serial lib from the distro, not the one from pip?
15:46svenpeter[m]Did you boot over usb? Because that USB port will disappear
15:53svenpeter[m]It shouldn’t fail with an exception but if your OS does something weird that might happen
15:56j_eyIm confused then, I can't use a single USB cable to load linux, and then have access to the Linux serial output?
15:57j_eyI dont think the kernel actually runs, at least it never writes to the framebuffer
16:04zopieux has quit [Ping timeout: 480 seconds]
16:06zopieux has joined #asahi
16:07svenpeter[m]I’m just guessing here fwiw :)
16:08svenpeter[m]But I run uart and usb over a single cable. I believe you have to pass the uart node with -t
16:08j_eypass it to what?
16:09svenpeter[m]It’ll switch to uart after sending the boot request over usb then
16:10j_eygot an example?
16:10svenpeter[m]Not at home right now
16:10j_eyanyway i confirmed that Linux is actually running by putting a `hvc` somewhere
16:10j_eyok no worries, maybe when amw is around again theycan help
16:10svenpeter[m]Do you have a hardware uart?
16:11svenpeter[m]I don’t think the hv emulates the uart interface enough for Linux to use it fwiw
16:12j_ey'Under the hypervisor you can get the console output from linux via the 2nd ttyACM1 device generated by the m1n1 HV' from https://github.com/AsahiLinux/docs/wiki/SW%3ALinux
16:13svenpeter[m]Ah, I’ve never done that. No idea what’s wrong then
16:14j_eysvenpeter[m]: what your -t uart node thing only relevant for hardware uart?
16:14svenpeter[m]But I still think that the uart emulated in the HV is not enough for Linux
16:15svenpeter[m]It didn’t emulate interrupts last time I checked
16:33j_eyderp, compiled out the simple-framebuffer console
16:40Andalu30 has joined #asahi
18:06roxfan2 is now known as roxfan
18:28j_eyI have a kernel and initramfs that I can use with qemu and get to a busybox shell, but when trying with m1n1, it cant seem to find files in the initramfs :/
18:50j_eysigh, my initramfs.cpio.gz.. wasn't actually gziped, was just a cpio
19:11Andalu30 has quit [Quit: Konversation terminated!]
20:29kallsyms has quit [Ping timeout: 480 seconds]
20:33kenzie has quit [Quit: The Lounge - https://thelounge.chat]
20:34kenzie has joined #asahi
21:11marcanj_ey: LB/LR are just placeholders for linux partitions
21:11marcanLB is intended to be a FAT32 EFI partition for u-boot/grub/kernel, LR would be reformatted as ext4 for / or whatever, but that's just one possible set-up
21:14j_eyok cool, I made them anyways
21:14j_eymarcan: was https://paste.gg/p/anonymous/22c5bc397c4349cfafd0da1d4b6656ce one of the errors related to some python version issues?
21:16marcanthat looks normal
21:16marcanonce m1n1 hands off control USB is dead
21:19j_eyOk, I'll try again, see if it boots to the same point as when I used run_guest. when I previously tried it just seemed to be stuck at the apple logo
21:20marcanif you don't get a framebuffer that sounds like a kernel config problem
21:20marcangotta get some sleep :)
21:20marcanI think I've mostly recovered from the second shot
21:21j_eymarcan: i get the fb with rum_guest now at least!
21:22marcanthat's interesting that you don't without it then :D
21:22j_eymarcan: sounds like you had pretty much the exact same symptoms/reactions as my gf, she had thw 2nd shot y/day too!
21:23j_eywell i gave up with linux.py a few hours ago, can retry soon!
21:23opticron has quit [Ping timeout: 480 seconds]
21:24marcanyeah, 12h after the shot (at night) I got a fever, 38.5 ish, hitting 39 at times. then it went down to 37.5 and fluctuated; the first half of the next day I was tired / sore. It fluctuated a bit, shot up to 38 again briefly in the afternoon, then seems to have just gone away. <37 now.
21:24marcanso I guess overall 36h total effect after the shot
21:24marcanstarting 12h and continuing for 24h after that
21:25marcanand see, this is why I really should spend some time building an installer and a kernel merge/something pipeline and simple docs that work for everyone
21:26marcanpeople actually want to run this stuff now and it's silly that everyone has to fight with one thing or another :-)
21:26opticron has joined #asahi
21:27j_eythe fighting was kinda fun, apart from 2h on just not realising my .cpio.gz wasn't actually compressed. I haven't understand the src/payload.c code yet, but it seems to not handle uncompressed initramfs', but I didnt see an error :/
21:28marcanyeah, it needs to know the size and currently makes no attempt at walking a cpio to find the end
21:28marcanso it requires compression
21:28marcansince you can concatenate multiple things and it needs to be able to find the next one
21:29marcan printf("Uncompressed cpio archives not supported\n");
21:29marcanyou *should* have gotten that
21:30j_eydoes that go both to the framebuffer and the python shell?
21:31j_eyhmmm yeah so, it returns NULL, but then it just carries on loading
21:31marcanif you're using the hypervisor it will go to the secondary iface as vuart; if you're just chainloading it won't go anywhere because after the chainload is done your connection drops and presumably you aren't reconnecting quickly enough after that to get the spew before linux boots
21:32marcanyes, it's not a fatal error. maybe it should be :)
21:32j_eyok then I probably wasnt paying enough attention to the vuart, but I think it would be better to error out, than just return NULL and carry on
21:32marcanthe thing is, e.g. having the *kernel* uncompressed as the last payload *is* legal
21:32marcanand that does return NULL because it means it can't find the next payload if there were one, but it *does* boot it
21:32marcanthis is because the kernel header has a size that isn't the real file size, it's padded, so it's no good for finding the next thing, but it's good enough for loading the kernel
21:33marcanso I'd need a separate error return for stop with error vs last payload, continue booting
21:33j_eythat's jsut a simple matter of programming
21:34marcananyway, sleep ;)
…