#
✕ nick:nicolas17
#asahi-dev · 2024-02-13 02:12
nicolas17ah I see, run_guest_kernel figures things out from the build tree and calls run_guest
#asahi-dev · 2024-02-13 02:09
nicolas17"Note that the script expects the path to the Linux build tree (i.e. the directory where .config and Makefile are). It will pick out the kernel and corresponding device trees from within."
#asahi-dev · 2024-02-13 02:09
nicolas17"Use this utility script to properly boot a Linux kernel under the m1n1 hypervisor: tools/run_guest_kernel.sh"
#asahi-dev · 2024-02-13 02:07
nicolas17oh well run guest wants a Linux build directory so I have to build a kernel from source *anyway*
#asahi-dev · 2024-02-13 01:36
nicolas17mmmmaybe the problem is this kernel is an EFI binary and I need a "raw" kernel image? :<
#asahi-dev · 2024-02-13 00:58
nicolas17(the reboot is so quick that the serial interface dies before it can send all that, I had to record a video of the screen)
#asahi-dev · 2024-02-13 00:57
nicolas17is the last stuff I see on screen before it reboots
#asahi-dev · 2024-02-13 00:57
nicolas17USB1: shutdown
#asahi-dev · 2024-02-13 00:56
nicolas17usb-dwc3@382280000: timeout while waiting for DWC3_DSTS_DEVCTRLHLT during shutdown
#asahi-dev · 2024-02-13 00:56
nicolas17USB0: shutdown
#asahi-dev · 2024-02-13 00:50
nicolas17now I'm on fedora with btrfs, I need to give it the btrfs subvolume name
#asahi-dev · 2024-02-13 00:50
nicolas17ohh, this guide was written for arch
#asahi-dev · 2024-02-13 00:47
nicolas17I wonder if I have the wrong root dev
#asahi-dev · 2024-02-13 00:47
nicolas17after "TTY> Preparing to boot kernel at" the serial connection dies and the machine reboots
#asahi-dev · 2024-02-13 00:47
nicolas17I'm trying linux.py, with the kernel, dtb and initramfs copied from the Fedora installation
#asahi-dev · 2024-02-13 00:20
nicolas17okay so, what if I want to run *Linux* under the m1n1 hypervisor and trace its hardware access?
#asahi-dev · 2024-02-12 04:53
nicolas17the log has all these MMIO writes to COMMAND (0x690100004), the driver defines BRCMF_PCIE_CFGREG_STATUS_CMD but doesn't actually *use* it, wth
#asahi-dev · 2024-02-12 04:40
nicolas17I'm cross-referencing logs and Linux driver and damn this is overwhelming as heck
#asahi-dev · 2024-02-12 02:51
nicolas17hm looks like m1n1 HV doesn't survive macOS going to sleep
#asahi-dev · 2024-02-12 02:48
nicolas17https://github.com/AsahiLinux/docs/wiki/SW:Getting-started this makes me sad
#asahi-dev · 2024-02-12 02:30
nicolas17only for this at the beginning: [cpu0] PT[690100000:690101000] -> WSYNC.RW WLANTracer@/arm-io/apcie/01:00.0
#asahi-dev · 2024-02-12 02:30
nicolas17so it *seems* to work now but I'm not actually getting any log messages
#asahi-dev · 2024-02-12 02:22
nicolas17- but I never tested devno=1 with running system
#asahi-dev · 2024-02-12 02:21
nicolas17- then I tested changing devno to 1 instead of 2, and loading it at startup, and it didn't work
#asahi-dev · 2024-02-12 02:21
nicolas17- then I tested loading it at startup and it didn't work
#asahi-dev · 2024-02-12 02:21
nicolas17- I think I tested loading the script after macOS had booted and it didn't work
#asahi-dev · 2024-02-12 02:13
nicolas17maybe I'm not supposed to be loading trace_wlan at startup because I need to wait for the hardware to be initialized?
#asahi-dev · 2024-02-12 02:12
nicolas17the ADT says apcie.reg[0] has address 690000000 so that seems correct
#asahi-dev · 2024-02-12 02:12
nicolas17or rather, from 0x690200000; I changed devno to 1 as a test which didn't work either
#asahi-dev · 2024-02-12 02:08
nicolas17it's failing to read from 0x690100000
#asahi-dev · 2024-02-12 01:26
nicolas17my troubleshooting is severely limited by my lack of understanding of what I am doing
#asahi-dev · 2024-02-11 23:54
nicolas17is there any m1n1 shell command to pretty-print the device tree?
#asahi-dev · 2024-02-11 23:35
nicolas17maybe someone else can try it, perhaps on M1?
#asahi-dev · 2024-02-11 23:12
nicolas17I haven't seen DannnyB on IRC since december ._.
#asahi-dev · 2024-02-11 23:06
nicolas17j`ey: any idea on what this exception is?
#asahi-dev · 2024-02-11 22:13
nicolas17no, this file was last modified on october 2023, surely it supports M2...
#asahi-dev · 2024-02-11 22:11
nicolas17perhaps there's some hardcoded address for M1 and I'm on M2?
#asahi-dev · 2024-02-11 22:10
nicolas17https://paste.rs/qpwBV.txt
#asahi-dev · 2024-02-11 22:10
nicolas17this throws an exception
#asahi-dev · 2024-02-11 22:09
nicolas17M1N1DEVICE=/dev/ttyACM0 python3 proxyclient/tools/run_guest.py -m proxyclient/hv/trace_wlan.py /tmp/kernel.macho -- "debug=0x14e serial=3 apcie=0xfffffffe -enable-kprintf-spam wdt=-1 clpc=0"
#asahi-dev · 2024-02-11 21:59
nicolas17I'm curious what's up with that kernelcache thing, did Apple change the format? is the file in Preboot/.../com.apple.kernelcaches/kernelcache different from the one in the ipsw?
#asahi-dev · 2024-02-11 21:59
nicolas17okay, boot was noticeably slower but it WORKS :D
#asahi-dev · 2024-02-11 21:57
nicolas17why the heck is the boot logo rainbow, lol
#asahi-dev · 2024-02-11 21:57
nicolas17it seems to be booting
#asahi-dev · 2024-02-11 21:54
nicolas17looks like `img4tool -e -o kernel.macho kernelcache` works directly?
#asahi-dev · 2024-02-11 21:52
nicolas17janneg: I extracted kernelcache.release.mac14g from the OTA zip, then ran 'img4tool -e -p out.im4p kernelcache', and it fails with "Not an IMG4 file"
#asahi-dev · 2024-02-11 21:17
nicolas17https://social.treehouse.systems/@sam@trapped.genoq.org/111914395974293819 -> https://github.com/tihmstar/libgeneral
#asahi-dev · 2024-02-11 21:07
nicolas17got it
#asahi-dev · 2024-02-11 21:06
nicolas17I guess I could grab the kernelcache from the ipsw but I don't remember what build I'm running
#asahi-dev · 2024-02-11 21:04
nicolas17"Running the stock macOS kernel from a macOS install: step 1. boot into macOS" welp I broke that by configuring m1n1 as boot object so I guess I have to kinda start over

plus ›