#
✕ nick:mort_
#asahi · 2023-03-07 14:58
mort_using software development tools on Windows is easier than using hardware design tools on Linux sadly, so I get you
#asahi · 2023-03-07 14:57
mort_ah
#asahi · 2023-03-07 14:57
mort_it will start a qemu virtual machine and handle that part for you
#asahi · 2023-03-07 14:57
mort_that might be the easiest approach
#asahi · 2023-03-07 14:56
mort_Are you familiar with Docker or Podman? I *think * you should be able to basically just say: podman run --platform linux/arm64 -it ubuntu:22.04
#asahi · 2023-03-07 14:53
mort_mali: what you could do is to set up some arm linux virtual machine with qemu or something, and see if you're able to set up a dev environment which does what you need
#asahi · 2023-03-07 14:47
mort_at the company I work use Yocto to build the system images we put on our embedded Linux products
#asahi · 2023-03-07 14:46
mort_yocto is a system to build your own Linux distro, you can use it to make a distro which works on the raspberry pi but you can also use it for all kinds of other embedded Linux use cases
#asahi · 2023-03-07 14:39
mort_the only issues you're gonna encounter from a development standpoint is that not everything might work with ARM Linux, for example Yocto has some issues with using ARM Linux as a build machine (but toolchains generally support ARM Linux build machines no problem)
#asahi · 2023-03-07 13:02
mort_no mention of DRM_ASAHI in /proc/config.gz on my own build; not even a '# CONFIG_DRM_ASAHI is not set' comment
#asahi · 2023-03-07 13:01
mort_if I install linux-asahi-edge from the repos, /lib/modules/6.1.0-asahi-2-2-edge-ARCH does indeed contain an asahi.ko.zst; if I install my own linux-asahi-edge-6.1.asahi2-2-aarch64.pkg.tar.gz, there is no asahi.ko.zst in /lib/modules/6.1.0-asahi-2-2-edge-ARCH, so you're definitely on to something
#asahi · 2023-03-07 12:56
mort_chadmed: what's the drm driver? appledrm is listed in lsmod
#asahi · 2023-03-07 12:52
mort_the kernel tag I'm building is the same as the one from the repos as far as I can tell
#asahi · 2023-03-07 12:50
mort_hmm the config.edge has CONFIG_DRM_ASAHI=m
#asahi · 2023-03-07 12:49
mort_I think the log ended up with a bunch of boots, not just the current, I suppose I should've said journalctl -b 0 rather than just journalctl or something. Not that it matters
#asahi · 2023-03-07 12:48
mort_I'll try that
#asahi · 2023-03-07 12:48
mort_https://p.mort.coffee/Mli.txt here's the asahi-diagnose output
#asahi · 2023-03-07 12:45
mort_https://p.mort.coffee/Iqs here's the journalctl log, look near the end for all the qt errors when trying to log in to the plasma wayland session from sddm
#asahi · 2023-03-07 12:43
mort_ok this is really weird, I compiled the kernel from the linux-asahi pkgbuild, from that "linux-asahi: bump to 6.1.asahi2-2" commit, with bindgen 0.56 and rustc 1.62, and qt is still sad
#asahi · 2023-03-07 12:41
mort_haha
#asahi · 2023-03-07 12:40
mort_I sadly only have experience from the userspace side of video4linux (and some printk debugging on the kernel side) so I don't know the details
#asahi · 2023-03-07 12:39
mort_I assume video4linux drivers don't poll in order to do cleanup when a process which has called VIDIOC_STREAMON exits
#asahi · 2023-03-07 12:39
mort_I think Linux has mechanisms for letting you do arbitrary cleanup stuff when a device fd closes?
#asahi · 2023-03-07 12:38
mort_that would mimick the VIDIOC_STREAMON + VIDIOC_STREAMOFF/exit-the-process-to-streamoff behavior of video4linux, and would catch the case where the daemon crashes (but not the case where the daemon freezes)
#asahi · 2023-03-07 12:38
mort_MACAUDIO_SAFETYON and MACAUDIO_SAFETYOFF would be ioctls :p
#asahi · 2023-03-07 12:37
mort_something), the macaudio driver sets the speakers in the safe mode
#asahi · 2023-03-07 12:37
mort_what I'm thinking would be possible is: represent the speakers as a device (/dev/macspkr?), speakersafetyd opens that device and gets an fd, calls MACAUDIO_SAFETYOFF on it, that makes macaudio set the speakers in the not-safe mote, and then if either the daemon calls MACAUDIO_SAFETYON *or* the fd is closed (because the process crashed or
#asahi · 2023-03-07 12:34
mort_it has to be either told from the userspace that userspace isn't doing its job, or have some other mechanism to detect that userspace isn't doing its job; the proposed "ping" approach would let the driver automatically detect when the userspace daemon has crashed or frozen somehow, right? Since the driver would no longer be getting pings
#asahi · 2023-03-07 12:30
mort_is it to protect against the daemon crashing, or is it also supposed to protect against the daemon freezing somehow?
#asahi · 2023-03-07 12:28
mort_interesting that 0.64 didn't straight up error then, huh
#asahi · 2023-03-07 12:27
mort_haha :p
#asahi · 2023-03-07 12:23
mort_err and I accidentally swapped SAFEMODE_ON and SAFEMODE_OFF a few times, hopefully the meaning came through
#asahi · 2023-03-07 12:22
mort_(sorry, I was just reading about the fail safe thing in speakersafetyd's readme)
#asahi · 2023-03-07 12:22
mort_SAFEMODE_OFF pair of ioctls, presumably the macaudio driver could automatically run SAFEMODE_OFF when the process which called SAFEMODE_ON exits?
#asahi · 2023-03-07 12:22
mort_regarding speaker safety: we already have mechanisms in the kernel for making things happen when the process using a hardware device exits. For example, if a process opens a v4l2 device, calls IOCTL_STREAMON on it, and then crashes, the driver automatically cleans up and stops streaming frames from the device. If there was some SAFEMODE_ON and
#asahi · 2023-03-07 12:07
mort_I suppose I'm grabbing the source for 0.56 from github and installing from there
#asahi · 2023-03-07 12:05
mort_chadmed: hmm I need to install bindgen-cli 0.56.0 I'm guessing (since that's what the warning says is expected), but on the only versions on crates.io are 0.61-0.64?
#asahi · 2023-03-07 11:52
mort_I hope the language eventually matures, to the point that there are few breaking changes, no reason to use nightly features, and no more essential tooling and libraries on a 0.x version
#asahi · 2023-03-07 11:50
mort_and yeah, I've done some rust development and the tooling is always kind of a pain.. especially since everyone seems to be using nightly features so you need a nightly rustc but not one that's too new so that the nightly feature has changed
#asahi · 2023-03-07 11:49
mort_so far I've used bindgen from the repos
#asahi · 2023-03-07 11:48
mort_the only explanation I can think of is that the kernel isn't actually identical because of bindgen version differences or other toolchain differences
#asahi · 2023-03-07 11:46
mort_I mean, I have a mess and a kernel which work together from the repos, I would expect that if I compile my own identical kernel from the exact same kernel source code it would work with the mesa from the repos
#asahi · 2023-03-07 11:39
mort_maybe it breaks because my cbindgen is too new? There was a warning about that but I assumed cbindgen would at least be backwards compatible
#asahi · 2023-03-07 11:38
mort_hmm that's the exact one I've been using
#asahi · 2023-03-07 11:31
mort_turns out plasma fails to start when installing an edge kernel from an h modified Asahi pkgbuild as well, that's odd. Does anyone know what exact PKGBUILDs commit the current edge kernel was built from?
#asahi · 2023-03-07 10:55
mort_does macOS also just use WFI?
#asahi · 2023-03-07 10:53
mort_maybe Apple's power management stuff is PSCI-like enough that tapering over the differences makes sense
#asahi · 2023-03-07 10:52
mort_I won't argue against the second approach since I don't know enough about it, but it feels a bit weird
#asahi · 2023-03-07 10:51
mort_so non-PSCI devices don't even get WFI idle until they have made a hack to make their hardware look like it supports PSCI to the rest of the kernel
#asahi · 2023-03-07 10:51
mort_Hmm. Thinking about it from an upstream perspective: one approach would lead to a generic arm cpuidle driver which at least makes WFI idle work on non-PSCI devices, and then non-PSCI devices could add their own hardware specific cpuidle driver as they get to that point. The other approach leads to the one psci driver being the only option on arm,

plus ›