marcan 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
linkmauve has joined #asahi
raster has joined #asahi
qyousef has quit [Ping timeout: 260 seconds]
maor26 has quit [Ping timeout: 240 seconds]
danilonc has quit [Quit: Connection closed for inactivity]
raster has quit [Quit: Gettin' stinky!]
qyousef has joined #asahi
ys0seri0us has joined #asahi
amw has quit [Ping timeout: 246 seconds]
amw has joined #asahi
ys0seri0us has quit [Ping timeout: 240 seconds]
phiologe has quit [Ping timeout: 260 seconds]
PhilippvK has joined #asahi
Tokamak has quit [Ping timeout: 272 seconds]
Tokamak has joined #asahi
amw has quit [Ping timeout: 246 seconds]
Tokamak has quit [Client Quit]
Tokamak has joined #asahi
amw has joined #asahi
marvin24 has quit [Ping timeout: 260 seconds]
marvin24 has joined #asahi
ky0ko has joined #asahi
VinDuv has joined #asahi
mndza has joined #asahi
<Glanzmann> kettenis: Nice.
<Glanzmann> Is it already possible to to m1n1 > uboot > kernel > initramfs?
maor26 has joined #asahi
Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
VinDuv has quit [Quit: Leaving.]
lovesegfault has quit [Quit: WeeChat 3.0]
robinp has quit [Ping timeout: 260 seconds]
robinp has joined #asahi
_jannau_ has joined #asahi
amw has quit [Ping timeout: 265 seconds]
amw has joined #asahi
Swant has quit [Quit: gone to IKEA]
Swant has joined #asahi
jamadazi has joined #asahi
smist08[m] has quit [Quit: Idle for 30+ days]
bakk[m] has quit [Quit: Idle for 30+ days]
ronyrus[m] has quit [Quit: Idle for 30+ days]
raster has joined #asahi
amw has quit [Ping timeout: 272 seconds]
ephe_meral has joined #asahi
<arnd> kettenis: does it already work with framebuffer and keyboard instead of the uart cable?
<arnd> it would be nice to get efifb earlycon working to hand over console from uboot to the kernel in place of simplefb
Bublik has quit [Ping timeout: 272 seconds]
<agraf> arnd: his screenshot was showing u-boot fb access, and that should automatically populate a GOP object to feed efifb unless explicitly deactivated :)
<agraf> keyboard is a different story though, I haven't seen anything that points towards that working
<j`ey> they said they had keyboard working via usb
<arnd> ah nice, I'm starting to run out of excuses for not trying it on my hardware now
bakk[m] has joined #asahi
<arnd> kettenis: have you managed to boot with "earlycon=efifb console=efifb"?
<arnd> not sure how efifb interacts with simplefb when both are built into the kernel
<Glanzmann> my serial port just arrived, now I have to search for a usb c cable.
<bastilian> Good Luck! :D
<bastilian> The keyword is "SuperSpeed" USB-C cables apparently.
<maz> Glanzmann: is that an off-the-shelf serial port, or something built for you?
<kettenis> arnd: not tried booting a Linux kernel yet; only OpenBSD
<Hakon> wait openbsd on M1?
<bastilian> With m1n1?
<bastilian> or the corellium preloader?
<arnd> kettenis: ok, makes sense
<kettenis> still with the corellium preloader
<kettenis> but EFI GOP is there so it should work with Linux as well
<kettenis> and I have USB support as well so a USB keyboard works
<jix> maz: IIRC Glanzmann mentioned buying another m1 mac as serial port
<maz> jix: ah! a bit over the top for me! :D
<kettenis> OpenBSD doesn't actually run yet since we don't have working interrupts yet
<arnd> maz: there are two options at the moment: using a second mac with macvdmtool to turn the type-c port on both ends into a uart into a uart, or building a custom cable to drive the usb-pd pins, see https://github.com/AsahiLinux/docs/wiki/HW%3AUSB-PD
<arnd> maz: ardb suggested that efifb earlycon should work as well
<maz> arnd: I know about this. Started ordering the various bits to put together a UBS-C dongle as described, but bits are slow to trickle in (and my M1 lands on Monday...).
<arnd> ok
<maz> arnd: framebuffer isn't really an option for me, as the box will live in the rack with the rest of the zoo, where there isn't any display available.
<arnd> maz: in the modern world we live in, a 4K HDMI-to-USB screengrabber is actually cheaper than a 1.2V usb-serial cable, but I get your point ;-)
<arnd> I'm still trying to figure out if there is some way to pretend to be a keyboard remotely
<kettenis> so one issue with my u-boot work is that up until now it uses the device tree bindings invented by corellium
<maz> arnd: I have one of those, but then the next obstacle is keyboard input. Not to mention that logging kernel messages and grepping through them becomes interesting with video capture... ;-)
<kettenis> so I can't really upstream things very well until we have "official" bindings
<kettenis> but I'll adjust things as those come along
jhol has joined #asahi
<jhol> marcan: just watching the Chicken Bits stream (- great stuff by the way!)
<jhol> but you were talking about a PCIe mapping overhaul
<jhol> if you are making this change, does it have any bearing on this errata?: https://linux-sunxi.org/H6#Errata
<jhol> - I guess this is about PCIe access, rather than the method of mapping?
<kettenis> nope
<marcan> I'm not sure what context you're referring to, but that errata seems unrelated
<jhol> ok ok
<marcan> I think that was me talking about the old idea of making the PCI world use something other than ioremap
<jhol> yes
jamadazi has quit [Read error: Connection reset by peer]
<arnd> jhol: johill is working on an abstraction for readl/writel that he wants to use on arch/um to fake a PCI bus, the same should work on Allwinner H6
<Glanzmann> jix: correct.
jamadazi has joined #asahi
<jhol> arnd: oh interesting!
<arnd> we also have something in arch/arm/mach-ixp4xx/ that does it in a less portable way, and I'm hoping to fold that in there as well
mndza has quit [Read error: Connection reset by peer]
<arnd> early ixp4xx have the almost the same exact problem as H6
mndza has joined #asahi
<jhol> Glanzmann: now that is a cool project!
<maz> Glanzmann: darn.
<marcan> ah I remember that
<marcan> good source of info for HDMI capture too :)
<marcan> by the way, on that subject: https://www.aliexpress.com/item/4000626922085.html
<marcan> we have firmware for those to turn off a lot of the hideous video processing
<marcan> they can do 1080p30 almost pixel perfect (you lose a column or two of pixels at the edges), with only color subsampling and a bit of banding due to mediocre processing, but otherwise no compression
<marcan> it's what I use for my streams and for the M1 Mini
<marcan> (maximus64 was working on that)
<marcan> spent some time reverse engineering the registers of the video processor: https://github.com/maximus64/vxis-capture-fw-mod/wiki/VS9989-Registers
<marcan> I hope some day we can write custom firmware for them and experiment a bit more; it would be nice to get them to do true RGB, not subsampled YUV
<jhol> marcan: I bought some from a link you tweeted out, and the quality is dreadful out of the box - didn't know you had a fix
<marcan> ask maximus64 for the firmware hack
<marcan> I use something like brightness=145 contrast=131 saturation=128 plus that firmware, which turns off some kind of black point processing and sharpening and fixes the chroma siting config
<marcan> with that you get pretty close to 1:1, modulo some banding
<marcan> https://marcan.st/transf/Screenshot_20210125_044508.png <- looped screen capture into ffmpeg
<marcan> I think maximus64 improved the green? but either way, at one iteration it's not terrible
<jhol> yeah I have quite a few cheapo HDMI capture devices in my posession from streaming, remote Video for emebedded work, and video capture, and using my camera as a webcam - and so far none of them gives me the kind of quality I'm really happy with
<jhol> i.e. straight HDMI capture
<jhol> and poking settings and having guvcview randomly lock up is no fun at all
amw has joined #asahi
<marcan> yeah, the good thing about these is they are *cheap* for what they can do
<marcan> but if you want bit-perfect capture this isn't it (yet? there might be a way to coax it to do that...)
<jhol> well there's a big gap between bit-perfect and shot-to-hell
<jhol> so far it's been too much of the latter
ephe_meral has quit [Ping timeout: 272 seconds]
<jhol> the thing is you can buy "proffessional" capture devices, but it's not like they're made of fundamentally different stuff, which makes it annoying paying serious money for them
<marcan> the "real" professonal ones are the really expensive ones that might do bit perfect properly
<marcan> but all the gamer stuff is just variations on this theme
<marcan> e.g. I think the avermedia ones are just an HDMI-CSI bridge in front of a USB3 camera chip
<jhol> BlackMagic used to do it with an FPGA
<jhol> but they had disasterous kernel drivers
<marcan> that's the other issue, these days you want UVC...
<marcan> oh, by the way, the cheap PCIe capture boards from china are the same as that USB one I linked, plus an xHCI chip, on a PCIe card :-)
<marcan> I actually used to run the "PCIe" firmware on my USB one
<marcan> worked fine
<jhol> hah! - beautiful
amw has quit [Ping timeout: 265 seconds]
<jhol> yeah - I spend a bunch of time reverse engineering the IT9070 and IT9910 media processors for HDMI capture. got quite far along with it - I think they'd make a great platform for open source video processing projects.. the problem is you can't get these ITE parts in the west - all you can get is a random selection of products which might feature the processor for a year or two, and then they disappear, so it's hard to justify putting time into building
<jhol> a proper open SDK, or open firmware around these devices when they vanish so quickly
amw has joined #asahi
amw has quit [Ping timeout: 240 seconds]
<arnd> marcan: if you have a custom firmware for that device, do you think it also act as a software programmable i2c slave on the DDC? That might be enough to either fake up an HID keyboard over i2c, or something that can work as a text console, given a little code on each end of it.
stemnic has quit [Ping timeout: 264 seconds]
<marcan> goddammit, everyone is annoying me asking me to implement big.LITTLE penguins and the annoying thing is I figured out *how* to do it without making it too ugly
<sven> in <15 minutes :P
<marcan> maz: how much would you hate me for doing that? :) (not as part of that patchset, mind you)
ephe_meral has joined #asahi
<opticron> re HDMI capture devices, maybe look at bunnie's NeTV2? https://www.crowdsupply.com/alphamax/netv2
<marcan> I have one of those actually, haven't really messed with it yet though
<opticron> it would at least give you all the knobs you could possibly want to turn, but probably also more knobs than you would ever want to turn
amw has joined #asahi
<maz> marcan: I don't have much hate left in me, so the little I have I keep it for politicians ;-)
<maz> marcan: plus, I can't see penguins over a serial console (please, don't... ;-)
ephe_meral has quit [Ping timeout: 246 seconds]
amw has quit [Ping timeout: 240 seconds]
ephe_meral has joined #asahi
jamadazi has quit [Read error: Connection reset by peer]
jamadazi has joined #asahi
vimal has joined #asahi
<davidrysk[m]> marcan: you ever messed with the conexant cx2388x pci (not pcie) cards? someone figured out how to do raw adc capture with them (which might be in the pcie ones but no one has figured that out yet)... those are analog cards though, not useful for hdmi-in
<marcan> not those, but I remember people doing SDR with the *audio* ADC on bt878 cards...
<marcan> I had one of those
<marcan> that thing could do almost 900kSPS, for some reason
balrog has quit [Ping timeout: 240 seconds]
balrog has joined #asahi
stemnic has joined #asahi
raster has quit [Quit: Gettin' stinky!]
raster has joined #asahi
ephe_meral has quit [Ping timeout: 272 seconds]
ephe_meral has joined #asahi
mndza has quit [Read error: Connection reset by peer]
mndza has joined #asahi
jamadazi has quit [Ping timeout: 272 seconds]
thestr4ng3r has quit [Read error: Connection reset by peer]
thestr4ng3r has joined #asahi
<Glanzmann> This was one hacker news: https://eclecticlight.co/2021/02/10/external-boot-disks-still-dont-work-properly-with-m1-macs/ Does it mean that you can boot from some external disks or does it use a quirk that boots from internal disks and than dispatches to an external disk?
<Glanzmann> on*
<Necrosporus> External disks do not work with M1 at all
<Glanzmann> I see.
<Necrosporus> Glanzmann, the trick which is used to boot from external disk relies on copying kernel file from the disk to internal medium
<Glanzmann> I see, I thought so.
<Glanzmann> Because marcan said, it will never work without a firmware update from apple.
<davidrysk[m]> Glanzmann: I expect Apple to fix more of this with future versions
<Glanzmann> I see.
<Glanzmann> I think I did something stupid. I installed m1n1.macho but instead of rebooting I ran sithglan@air macvdmtool % sudo ./macvdmtool reboot serial which worked, but now it says custom kernel fialed to boot. And I can't revert from the 1tr so probably I need to reinstall.
<mps> sorry to ask here, but, on M1 pro with updated os to 11.2 in 1TR mode kmutil can't still add corellium linux.macho to boot. anyone have hint or solution
<Glanzmann> mps, if you want I can talk you through it.
<Glanzmann> but we have to switch channels, otherwise marcan will kickban me.
<mps> heh
<Glanzmann> Lets move to asahi-offtopic
<mps> that's what I had fear of
<mps> ok
tarik02[m] has quit [Quit: Idle for 30+ days]
skillfulman23[m] has quit [Quit: Idle for 30+ days]
<marcan> Glanzmann: you did not boot into 1tr
<marcan> you booted into recovery
<marcan> it looks like 1TR but isn't 1TR
<marcan> you need to actually go into 1TR properly with the button
<marcan> you cannot use kmutil from normal recovery
<Glanzmann> Strange, I always did it that way.
<marcan> yeah, but upon failed boot it automaticallly goes into the associated recovery or something
<marcan> I've had that happen before
<Glanzmann> SO i power off the device, I power it on and keep it pressed, than I go tooptions ant than I run utilities > Terminal. Is this the wrong way?
<marcan> shut down normally, then boot again
<Glanzmann> Damn it, thank you, But I already reinstalling.
<Glanzmann> 22 minutes remaining.
<marcan> if kmutil says something about "AP mode" you aren't in 1TR
<Glanzmann> Thank you.
<mps> does the 'Alt' key to be pressed when power on is pressed
<mps> I mean, to enter in 1TR
<Glanzmann> I at least never did it that way.
<Glanzmann> I power it off, turn it on and keep the power button pressed until I see the options.
<Glanzmann> marcan: Funny thing. I just reinstalled macos using 1tr. And guess what, it doesn't boot afterwards: https://ab34.de/u/IMG_20210212_172254291.jpg
<Glanzmann> I try to get the mac mini to boot into m1n1. So the steps are: Build it, boot into 1tr, run the commands and reboot and it should show the asahi linux logo and wait for commands on serial?
<sven> yeah, that's why I did on my Mac mini and it worked
<Glanzmann> Perfect. Now it works. This time I typed in 'reboot' instead of using macvdmutil.
<Glanzmann> Now, I have to try to boot a kernel.
jamadazi has joined #asahi
<mps> Glanzmann: it boots from usb
<marcan> iBoot only understands holding down the power button
<marcan> there is no looking at keyboard keys
<Glanzmann> You mentioned that once, I remember. It doesn't have a keyboard driver.
VinDuv has joined #asahi
<Glanzmann> marcan: Could you please upload me your initrd? browser https://ab34.de/u/
<Glanzmann> sorry : https://ab34.de/u
<mps> marcan: hmm, looks like holding Option key when power on is pressed and hold boot something different when not holding this key. but I don't know much about these things
<marcan> mps: yes, *when you are already holding the power button*
<Glanzmann> marcan: Thank you.
<marcan> that's 1TR doing things in the boot picker
<marcan> if you do not hold down the power button, the keyboard does nothing
<mps> aha
<mps> nice thing is I got alpine linux boot on M1
<jn__> yay, alpine
<mps> and simply copied my current rootfs from acer R13 chromebook
<Glanzmann> marcan: I just loaded my first kernel using m1n1: http://pbot.rmdir.de/07eNPK_buCTOSfP5dxgCQw
<Glanzmann> I used python3 of macports which worked fine.
<Glanzmann> python39 that is and py-pip39 and installed the missing python modules.
<marcan> Glanzmann: cool!
<marcan> wait, 1413867 initramfs bytes?
<marcan> hold on
<marcan> ahahaha sorry
<marcan> that is the wrong initramfs
<marcan> that was.... a PS4 initramfs.
<sven> lol :D
<marcan> Glanzmann: re-download from the same URL
<Glanzmann> done. Booting now.
<Glanzmann> marcan: That explains it.
<marcan> anyway, that aside, it looks like your serial port isn't working. that's probably that stupid bug I fixed the other day.
<marcan> which kernel branch is this? main?
<Glanzmann> Same output as befoer.
<Glanzmann> Yes, this is main.
<Glanzmann> But wait. I build it many days ago. Rebuilding now
<marcan> try upstream-bringup-v2-wip
ephe_meral has quit [Ping timeout: 246 seconds]
<marcan> and use apple-j274.dtb from the kernel build tree, not m1n1
<marcan> there's some mismatch right now for that branch
<Glanzmann> Will do so.
<marcan> also, use -b 'earlycon console=ttySAC0,1500000 console=tty0 debug keep_bootcon'
<marcan> if you get duplicated logs at the end you can get rid of the keep_bootcon; it means the normal console works
<marcan> but until that point it helps debug
<Glanzmann> Okay, will do so.
<Glanzmann> Compiling now.
<Glanzmann> have to check the initramfs.
<marcan> that's still the old initramfs
<Glanzmann> Yes, just noted that. Pull it in again check
<marcan> the file is updated at the URL, I checked
<marcan> you can get rid of keep_bootcon, obviously serial works
<Glanzmann> Yes, it works. Rebooting now. I already saw the ash prompt.
<marcan> :)
<Glanzmann> Btw. is it possible to type using the serial console as of now? https://pbot.rmdir.de/oUED4DcEO9fAZk909Qn8IA
<marcan> yes, but you need to quite linux.py and use some normal terminal emulator
<marcan> like picocom or something
<marcan> the tty_mode() thing in proxy.py needs to be extended to do bidirectional forwarding, feel free to hack at it if you feel like it
<jannau> marcan: did you miss this
<jannau> ?
<marcan> oh I missed that, lol
<marcan> 15 hours ago, cut me some slack :)
<marcan> haven't cleared my inbox today yet!
<Glanzmann> :-)
<jannau> no problem
<marcan> merged
<Glanzmann> pulled, works. thank you.
<Glanzmann> is there a magic to kill linux.py
<Glanzmann> ?
Tokamak has joined #asahi
<marcan> it tells you
<marcan> print('--- TTY mode | Quit: CTRL+] | Menu: CTRL+T ---')
<Glanzmann> Okay, okay.
<Glanzmann> Works.
<Glanzmann> ctrl-c works in the serial console. :-)
<marcan> I'm actually kind of surprised it does, given there's no real getty going on here (`can't access tty; job control turned off`)
<Glanzmann> Okay, maybe it does not and it is just forwarded or grepped, testing now.
<marcan> like if you run `cat` I would expect ^D to work but not ^C
<Glanzmann> Yes, just tried that. And ctrl-c does not work.
<Glanzmann> Ctrl-d does.
<marcan> as expected then
<marcan> you can fix that by messing with spawning a getty or whatever, this is all standard linux on embedded system stuff
<marcan> I never really intended for this initramfs to be used for anything but trivial tests so I didn't bother with that
<Glanzmann> Yep, got it. :-)
<marcan> off to sleep; v2 will be out tomorrow evening :)
<Glanzmann> have good night sleep, till tomorrow.
<marcan> maz: I actually think I can implement the big.LITTLE penguins entirely in the generic fb logo code, since all that is plumbed into scheduler APIs these days, so you're safe from that patch :)
zkrx has quit [Ping timeout: 265 seconds]
zkrx has joined #asahi
macc24 has quit [Ping timeout: 260 seconds]
macc24 has joined #asahi
Tokamak has quit [Ping timeout: 256 seconds]
Tokamak has joined #asahi
<maz> marcan: do the scaling according the the dmips-capacity! :D
zkrx has quit [Ping timeout: 264 seconds]
zkrx has joined #asahi
PendulumSwinger has joined #asahi
<jhol> marcan: it's so weird - I have 2x of those Wiistar devices, and no matter how I connect them, I can't get them to go beyond High Speed. The board is the exact same as in vxis-capture-fw-mod
<jhol> these do come up in SuperSpeed, and they respond to the incantations with ./i2c_vs9989
<jhol> so it's not perfect quality - but still far better than I've ever had from them before
zkrx has quit [Ping timeout: 240 seconds]
<maximus64> jhol: did you try to flip the USB-C cable? it only work in superspeed in one orientation
<jhol> yup - both directions!
<jhol> very peculiar
<maximus64> hmm that is weird. maybe it not USB-C 3.0 cable ?
<jhol> yeah - I tried two cables, and multiple ports
<jhol> could be bad luck - stranger things have been known to happen
<maximus64> I have some Wiistar capture card that look very similar but used the MacroSilicon chip that is only USB2.0 but look like you already open it up and check the board so that can't be it
zkrx has joined #asahi
mats has joined #asahi
<maximus64> this is the one that used the MacroSilicon one: https://www.aliexpress.com/item/4001166117007.html
<jhol> yeah - so I don't know how serious you are about the vxis-capture-fw-mod project, but it's good to know that the device architecture is somewhat common
mndza has quit [Ping timeout: 272 seconds]
<maximus64> heh it still siting on my desk. I started to RE and try to write custom firmware for it. At the moment I only got serial port working :p
<jhol> it would be cool if the config wasn't supid in the default state, certainly
<maximus64> ah I have a patched Firmware that fix that. I can share it if you interested
<jhol> oh yes - that would be great!
<maximus64> check your PM :p
<maximus64> for the Wiistar card that you got, does it respond to i2c_vs9989 tool? it should respond even if it in USB2 mode
zkrx has quit [Quit: zkrx]
zkrx has joined #asahi
raster has quit [Quit: Gettin' stinky!]
jamadazi has quit [Ping timeout: 265 seconds]
VinDuv has quit [Quit: Leaving.]
roxfan has quit [Remote host closed the connection]
roxfan has joined #asahi
acelogic has quit [Ping timeout: 272 seconds]
raster has joined #asahi
n1v has joined #asahi
n1v is now known as niv
qyousef1 has joined #asahi
qyousef has quit [Ping timeout: 240 seconds]
jamadazi has joined #asahi
Bublik__ has joined #asahi
Bublik__ has quit [Client Quit]
Bublik has joined #asahi