2021-01-08
00:08zarvox has joined #asahi
00:10zarvox has quit [Client Quit]
00:10zarvox has joined #asahi
00:13irl25519 has joined #asahi
00:18irl25519 has quit [Quit: irl25519]
00:19amw has quit [Quit: WeeChat 2.3]
00:29Gaelan has joined #asahi
00:46aratuk has joined #asahi
00:50aratuk_ has quit [Ping timeout: 260 seconds]
01:14jn__i think it means running regular python on a workstation and sending memory/mmio peek/poke commands over a serial connection to mini running on the mac
01:16jn__marcan mentioned porting mini (which was previusly used for Wii work) to the M1 in the project introduction youtube stream, i think
01:17tiagom has quit [Quit: tiagom]
01:22marcanit seems xHCI (usb host) is under PCIe, so that has a dependency I did not expect, which means linux won't be usable for anything until PCIe is done, so PCIe is now top priority once mini is up
01:23marcanthough I think a lot of that is to initialize PHY stuff which is probably not used for xHCI since it's internal?
01:23browzing has quit [Ping timeout: 246 seconds]
01:28davidrysk[m]marcan: you gave me an idea, lemme grab the IORegistryExplorer :)
01:29davidrysk[m]there's a bunch of not so well known tools part of the "Additional Tools for Xcode" that are on the Apple More Downloads site.
01:29davidrysk[m]They are super-handy for things like this
01:29jamadazi has quit [Ping timeout: 260 seconds]
01:30davidrysk[m]so there's an I2C connection to the USB, probably for control purposes
01:31davidrysk[m]but the USB itself is connected to arm-io
01:35davidrysk[m]I think the device tree but it tends to be super-confusing
01:35davidrysk[m]I see that this gives away which firmware binaries the BRCM card requires
01:38marcan("internal" means some internal fabric bus, but we don't care about those for our intents and purposes assuming they're transparent, which most are)
01:39davidrysk[m]I have a USB drive plugged in and it appears at
01:39davidrysk[m]IOService:/AppleARMPE/arm-io@10F00000/AppleT810xIO/usb-drd0@82280000/AppleT8103USBXHCI@00000000/usb-drd0-port-hs@00100000/USB 3.0 FD@00100000/IOUSBHostInterface@0/IOUSBMassStorageInterfaceNub/IOUSBMassStorageDriverNub/IOUSBMassStorageDriver/IOSCSILogicalUnitNub@0/IOSCSIPeripheralDeviceType00/IOBlockStorageServices/IOBlockStorageDriver/PNY USB 3.0 FD Media
01:40davidrysk[m]I'm wondering if "usb-drd0" is a mapping to something else
01:41marcanwhere the drd controller (host/device) switch is in front of xhci in the path, but that obscures xhci's real IO
01:42marcan/System/Volumes/Preboot/*/boot/*/usr/standalone/firmware/devicetree.img4 https://github.com/h3adshotzz/img4helper https://github.com/bazad/devicetree-parse
01:43davidrysk[m]should I keep poking at ssh into recovery?
01:49browzing has joined #asahi
01:58browzing has quit [Ping timeout: 260 seconds]
02:07stormclad has quit [Ping timeout: 256 seconds]
02:13konstater has quit [Ping timeout: 245 seconds]
02:14pakl has joined #asahi
02:25bloom has joined #asahi
02:25bloom has left #asahi [#asahi]
02:38browzing has joined #asahi
02:42browzing has quit [Ping timeout: 256 seconds]
02:43bent_ has joined #asahi
02:47bent__ has quit [Ping timeout: 256 seconds]
02:49davidrysk[m]marcan: I extracted the device tree (needed to use tihmstar's img4 extractor first) and it's not exactly easy to read :)
03:05aratuk has quit [Remote host closed the connection]
03:08ceph3us has quit [Ping timeout: 245 seconds]
03:22davidrysk[m]hm I should attach a thunderbolt device and see where it appears in the ioregistry
03:37marcanmacos devicetrees and linux devicetrees are both based on the same original design, so it's worth using the former as a reference
03:38marcanwe will need to write linux devicetrees to make this work (and probably have the bootloader transplant some details from one to the other)
03:43davidrysk[m]this probably is a n00b question, but how does the devicetree show that the USB is connected via PCIe?
03:46bear24rw has quit [Remote host closed the connection]
03:47bear24rw has joined #asahi
03:50bear24rw has quit [Remote host closed the connection]
03:50bear24rw has joined #asahi
03:54marcancompatible (22): "pci-xhci-FL1100,t8103" suggests Apple licensed the Fresco Logic FL1100 which explains why it's PCIe
03:56marcan(it's also possible it's not Fresco Logic at all and that's just the original target of a driver and they're just reusing that compatible ID though; xHCI devices are intended to be compatible with each other)
04:06davidrysk[m]marcan: is that perchance the mac mini?
04:06davidrysk[m]well that's why
04:06davidrysk[m]the 2x USB 3.0 ports are attached via PCIe
04:06davidrysk[m]the 2x TBT3/USBC ports are not
04:06davidrysk[m]I'm testing on a MBP
04:06davidrysk[m]which matches the teardown iirc
04:07davidrysk[m]I mean, I wouldn't cry if they weren't supported initially
04:08davidrysk[m]what matters more, USB on the mini only, or USB on all the M1 machines? :)
04:09davidrysk[m]well yeah
04:09davidrysk[m]I'm still poking at sshd. how much effort should I put into that?
04:10davidrysk[m]there's something with the sshd sandboxing mechanism that doesn't play nice with recovery
04:10marcannot much. I'm going to lift screen from macos (assuminig it's there) and do a netcat thing
04:10davidrysk[m]it forks and then sandboxes and then chroots
04:10davidrysk[m]macos does come with screen
04:10davidrysk[m]okay :)
04:11davidrysk[m]yeah, script is there too
04:12davidrysk[m]https://egpu.io/forums/desktop-computing/teardown-late-2020-mac-mini-apple-silicon-m1-thunderbolt-4-usb4-pcie-4/
04:12davidrysk[m]that's the more interesting of the teardowns
04:14davidrysk[m]it's likely that the FL1100 chips are covered with shields
04:19davidrysk[m]ifixit took off the shields
04:24maximus64yea the Fresco USB controller is on the bottom side of the board https://i.imgur.com/AABvj8w.png
04:26davidrysk[m]ah it's tiny.
04:29maximus64USB-C port probably just dwc usb core so there are driver for that already. Tricky part is initializing the USB PHY
04:30davidrysk[m]maximus64: do you have any evidence that indicates they might by dwc? While I think that's possible I think it's equally likely that apple did them in house
04:32davidrysk[m]nvm (see -re)
04:35marcanthat will be a gray copyright situation, but it's often necessary (in the spirit of GlasgowEmbedded/archive)
04:36davidrysk[m]"documentation archive" in what sense?
04:37Alex[m]17do these macs have widevine? aka can they watch netflix, hulu, etc? because i know that is still lacking on aarch64 linux
04:37davidrysk[m]note, TI has been dmca-happy lately
04:37davidrysk[m](or rather, their brand protection subcontractor)
04:37davidrysk[m]seriously
04:38davidrysk[m]let me double check my references
04:38davidrysk[m]I was pretty sure it was TI...
04:39davidrysk[m]but something tells me I'm mistaken
04:39davidrysk[m]it WAS TI but those datasheets seem to have been put back
04:40marcanstill, DMCAing a datasheet is an instant DQ from any future design from me, as far as I'm concerned
04:40marcanI don't care what the lawyers think should happen on paper, if engineers can't share datasheets I can't work with you
04:41davidrysk[m]marcan: I sent more details via PM.
04:42davidrysk[m]I did
04:42davidrysk[m]from IRC-side
04:42davidrysk[m]a little research turned up dozens of DMCAs from a brand protection firm working on behalf of them to google et al, apparently not really looking at the contents, just DMCAing anyone who posted stuff copyright TI
04:43davidrysk[m]I feel like if I dig further I'd find that's not limited to TI
04:46davidrysk[m](of course now the TI calculator signing key mess comes to mind, even though that's a different division. lol)
04:51Shizthey just don't give you any datasheets on a bunch of stuff to begin with unless you NDA with them :p
04:56tiagom has joined #asahi
04:57tiagom has quit [Client Quit]
04:57tiagom has joined #asahi
04:58marcanI mean I won't work with those vendors either, but at least you know upfront what you get
04:58davidrysk[m]I hate that practice
04:58davidrysk[m]but — yeah
05:04Alex[m]17<mjg59 "Alex: There's widevine support o"> thanks.. still confused. im talking about linux, not android
05:04KarboniteKream has joined #asahi
05:06jkao[m] has joined #asahi
05:07marcanu-boot makes sense when low level init an ATF and such are involved, but with the M1 being so custom (AIC...) and iBoot doing all the low level stuff for us, I don't feel like it'll buy us much a priori
05:08davidrysk[m]does the kernel have to live on the preboot/
05:08davidrysk[m](which is APFS and already exists)
05:09mjg59Alex[m]17: Android is Linux for these purposes. There's really nothing magical about the CPU architecture here.
05:09davidrysk[m]that's all Widevine L3 though, right? (L2 and L1 require hardware DRM support)
05:11mjg59davidrysk[m]: Yeah, but then you're more into graphics driver design and the architecture of your TrustZone applets
05:11Alex[m]17i have a pinebook pro with 64 bit userspace, and i have to run chromium in a 32 bit contianer with a widevine ripped from ChromeOS to watch Netflix. i guess im wondering if M1 machines running 64 bit linux will also have this issue
05:13davidrysk[m]macOS probably does have L1 support, though if you're using Safari it uses the FairPlay CDM instead
05:13artemistUnless someone wants to reverse engineer the interface macOS uses to ATF and Apple didn't disable it
05:14davidrysk[m]if you mean to say TrustZone, Apple doesn't use it
05:14davidrysk[m]it simply does not exist on current Apple SOCs
05:15davidrysk[m]xnu hints that some of their earlier SOCs had EL3 (which doesn't necessarily mean TZ), but then they dropped it
05:18rootspring[m]Is the SEP worse than trustzone for this project?
05:19tbodtandroid widevine is tightly coupled to the android media stack and not really relevant to chrome
05:21davidrysk[m]what CDM does intel macos use on chrome?
05:22Alex[m]17so we will still use iBoot as our bootloader for the time being? got it. too bad that we have to use something proprietary
05:22artemistHow will the SSD show up to Linux? I'm guessing the flash controller is in the SoC but I can't find much info about it and ifixit stopped giving good teardown photos with chips labelled
05:22davidrysk[m]Alex: we will always have to use iBoot, this is not going to ever be a 100% open system
05:22rootspring[m]I don’t think u can replace Iboot, correct me if I’m wrong
05:23rootspring[m]Iboot is signed
05:23marcandavidrysk[m]: the first stage needs to live on APFS, I intend for that to be a bootloader only and the real linux kernel can live on something else
05:24marcanprobably FAT32 for the first version because fatfs is just so easy to run on anything and mini has it already
05:24artemistIf you want secure boot you need a first-level loader in the bootrom. Most of the SoCs i've seen have that be propriatery
05:24rootspring[m]Wait, why does first stage have to be on apfs
05:25marcanso the first usable linux will probably look like a minimal APFS (or a full macos for dual boot) for the bootloader/mini, /boot on FAT32 (not unlike people who use the ESP as /boot, I do that on some systems), and ext4 or whatever for /
05:25rootspring[m]Will systemd boot be supported eventually
05:26mjg59rootspring[m]: Whatever iboot chains to can certainly be taught to understand the systemd boot fragment format
05:26davidrysk[m]marcan: what is the minimal set of "items" needed to have a recovery partition?
05:27* davidrysk[m]sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/EjEmcjUAItaTJznrmnwvEpRw/message.txt >
05:27rootspring[m]Can iboot be taught to directly boot Linux
05:28davidrysk[m]I suppose one could start deleting volumes and seeing if recovery is still accessible
05:28marcaniBoot can boot a mach-o object file wrapped in img4 and whose hash is inserted into the local bootpolicy
05:28mjg59The only way you're going to get iboot to boot Linux is to have Linux look like an iboot payload
05:28marcanthat could be whatever we want it to be, but the reasonable thing to do is make it be a first stage that hands off to something more controllable
05:29marcansince to update that first stage requires doing bootpolicy magic which requires being in recovery mode I believe
05:30marcanas long as we can do the entire boot setup process in recovery mode, that will be the sanest installer environment
05:30rootspring[m]Wait, you can run curl in recovery mode? Why does it give me command not found on my hackintosh
05:30aratuk has joined #asahi
05:30rootspring[m]And vi in recovery sucks
05:31davidrysk[m]rootspring: lol it reminds me of solaris 9 vi
05:31davidrysk[m]fun times :)
05:31mjg59In UEFI land we have Shim as a simple first stage bootloader that changes rarely, and which then boots the actual bootloader
05:31artemistDoes loading a binary as a shared library with dlopen bypass signing? I remember that it bypassed some controls a few years ago but they've probably fixed that
05:31davidrysk[m]artemist: they fixed that long ago
05:32rootspring[m]It’s not even funny how bad vi is in recovery
05:32Alex[m]17so we can currently boot linux in the form of a UEFI executable on M1, or thats just the first step on our road map
05:32rootspring[m]Does recovery mode have python
05:33davidrysk[m]okay that's interesting...
05:33davidrysk[m]I mounted the Recovery volume from macOS and it's EMPTY
05:33davidrysk[m]I think it's synthesized from Preboot
05:33rootspring[m]Wait, then why even have a recovery volume
05:33rootspring[m]If it’s synthesised from Preboot
05:34davidrysk[m]rootspring: for non-persistent data when running recovery
05:35davidrysk[m]it's possible that I'm missing something
05:35rootspring[m]Odd, intel Macs (or maybe just hackintoshes) have all sorts of files in recovery
05:35davidrysk[m]ahh, no, I'm looking in the wrong Recovery
05:35rootspring[m]Like hundreds of im4ms
05:35davidrysk[m]yeah, it's my error
05:35rootspring[m]BootKernelExtensions.kc.*
05:36davidrysk[m]you can't even mount the real recovery from macOS
05:36rootspring[m]I wonder what the trustcache stuff it
05:36* rootspring[m]uploaded an image: ima_ee09a3a.jpeg (127KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/cXanobhjqhlAqTPXTirrRBUN/ima_ee09a3a.jpeg >
05:37rootspring[m]Does anyone know what these files even are
05:37davidrysk[m]marcan: starting out I'd probably just use the existing Preboot volume as the "system" partition for the bootloader
05:38mjg59Alex[m]17: Choices are basically: (1) kernel that looks like an iBoot payload (bad), (2) first stage bootloader that boots Linux directly, (3) first stage bootloader that presents a UEFI environment
05:40davidrysk[m]does it have to be a UEFI environment, as opposed to a simpler bootloader like u-boot? though considering that iBoot does the hardware setup, that might not be needed
05:40davidrysk[m]and u-boot just loads the kernel directly
05:40davidrysk[m]marcan did say that EFI is not going to happen because of complexity and I basically agree with that
05:40mjg59davidrysk[m]: I think that's (2), although you could theoretically have a first stage bootloader that just chained into u-boot
05:40browzing has joined #asahi
05:41mjg59But once you're in u-boot you can do UEFI - there's support for providing enough UEFI boot services in u-boot to launch Linux
05:41davidrysk[m]oh that's interesting
05:42davidrysk[m]I ran an ARM based server for a while for my IRC bouncer and such but upgraded to an x86 box because there were no good options for an arm64 one with enough performance and storage capabilities for my needs
05:43davidrysk[m]that was well before Aarch64 was a thing even
05:44davidrysk[m]perhaps, though I'd need a TBT to 8x SATA system of some sort
05:45davidrysk[m]I found a nice 8-bay hotswappable chassis
05:45marcanwhether I go straight to Linux at that point, or u-boot first, will depend on what I see when I investigate that boot protocol on ARM64
05:46marcanbut Linux already supports crazy ARM64 machines (see: every Android phone), so I don't see why u-boot will buy me anything at *this* stage
05:46davidrysk[m]I am curious about how DFU finds iboot
05:46davidrysk[m]but that's out of scope :)
05:46marcanFWIW I think there is a SPI flash or something that contains device info and may contain an iBoot stage, but I'm unclear on the details
05:46davidrysk[m]there is a winbond chip in those teardowns
05:47marcanif they really did put APFS in ROM that will be a boon to exploiters, because there is no way in hell they didn't screw that up
05:47Alex[m]17i only mention u-boot because i dont want you having to re-invent the wheel when it comes to a bootloader, it seems to be the standard for booting arm64 SBCs and the like
05:48davidrysk[m]well at the beginnign there's this "Apple_APFS_ISC"
05:48rootspring[m]To prevent bricking, is it posibble to hide the Iboot partition from Linux
05:48davidrysk[m]but that is an APFS partition...
05:49rootspring[m]Like hide the whole apfs from Linux just to prevent dd fuck ups
05:50marcanAlex[m]17: I know, but the reason for reinventing the wheel with mini is not to write a full blown bootloader, but to have a veeery small test environment and remote RPC protocol for hardware investigation
05:50marcanand if after that all I need to do to boot linux is put it in RAM and call it with some params, that's easier than porting u-boot at that point
05:51marcanu-boot will be more useful if, say, we decide that we want a bootloder that has USB support
05:52rootspring[m]This sounds like the beginning of atmosphere tbh
05:52marcanmini may or may not gain the ability to boot from internal SSD, depending on the internal interface for that. if it's simple sure, if it's complicated then no.
05:53davidrysk[m]iboot is supposed to be able to boot macOS from external USB but there were bugs
05:53davidrysk[m]people reported that TBT3 worked, USBA worked, USBC did not
05:53davidrysk[m]I didn't do any tests of my own
05:53marcanapparently recovery mode copies stuff from external to ssd or something when you try to do that
05:53davidrysk[m]Apple has said that they intend that it works
05:53davidrysk[m]which means it's bugged
05:54Alex[m]17we have a custom bootloader for the RK3399 that simply compresses a payload containing ATF, initramfs, kernel, and the dtb to a GPT partition with a special GUID which the bootloader is able to find, decompress and then boot.
05:54davidrysk[m]oh huh
05:58davidrysk[m]not quite :)
06:00davidrysk[m]it's interesting how booting was handled for those older Macs, even Apple booted A/UX from System 7
06:06Alex[m]17Just subscribed the the Asahi Linux Patreon! off to bed, it's midnight here in texas. very excited for this project
06:09kingwill101[m] has joined #asahi
06:10ky0ko has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
06:13rootspring[m]Idk if this is bad but I kinda made an unofficial Subreddit for asahilinux
06:19loofygun has joined #asahi
06:23bear24rw has quit [Remote host closed the connection]
06:23bear24rw has joined #asahi
06:23bear24rw has quit [Read error: Connection reset by peer]
06:24bear24rw has joined #asahi
06:30bear24rw has quit [Ping timeout: 260 seconds]
06:53KarboniteKream has quit [Quit: Leaving]
06:55bear24rw has joined #asahi
06:55laroux[m] has joined #asahi
06:56laroux[m] has left #asahi [#asahi]
06:58aratuk_ has joined #asahi
07:01bear24rw has quit [Ping timeout: 240 seconds]
07:01aratuk has quit [Ping timeout: 265 seconds]
07:07theracermaster has joined #asahi
07:12aratuk has joined #asahi
07:15aratuk_ has quit [Ping timeout: 256 seconds]
07:19narmstrong has joined #asahi
07:20hotsndot[m] has joined #asahi
07:32NecrosporusI have read the page about booting macOS, but it's not as detailed as I wanted it to be
07:35tellowkrinkle[m] has joined #asahi
07:38tellowkrinkle[m] is now known as TellowKrinkle[m]
07:42bear24rw has joined #asahi
07:45lanar has joined #asahi
07:47bear24rw has quit [Ping timeout: 246 seconds]
07:50lanar has quit [Remote host closed the connection]
08:11marcanrootspring[m]: that's okay, just don't consider officially sanctioned or anything. I don't have time to manage a subreddit tbh, so if you want to do that, go ahead
08:12rootspring[m]I actually sent you a mod invite
08:13TheJollyRogerNice!
08:13* TheJollyRogerwaves hello.
08:14TheJollyRogerMaybe if news or updates get posted there I can read the news there!
08:20rootspring[m]I might make a bot that keeps posting the Asahi Linux commit history to a live chat maybe if that’s allowed by Reddit
08:21rootspring[m]That way, everyone knows the status
08:21ohnx has joined #asahi
08:21TheJollyRogerExcellent!
08:24rootspring[m]I don’t know how feasible it would be though and it might take a while given that I’ve never used PRAW
08:45bear24rw has joined #asahi
08:47bear24rw has quit [Remote host closed the connection]
08:55MuckiSG has joined #asahi
08:58ephe_meral has joined #asahi
09:09bear24rw has joined #asahi
09:14plainbits has joined #asahi
09:18jaXvi has joined #asahi
09:26newmerck[m] has joined #asahi
09:27vimal has joined #asahi
09:43plainbits has quit [Quit: Go to sleep. Night!]
09:49plainbits has joined #asahi
09:59sirn has joined #asahi
10:12bear24rw has quit [Remote host closed the connection]
10:12robinp has quit [Quit: Textual IRC Client: www.textualapp.com]
10:15robinp has joined #asahi
10:21plainbits has quit [Ping timeout: 272 seconds]
10:23plainbits has joined #asahi
10:24jjanzic has quit [Read error: Connection reset by peer]
10:55Pluggi is now known as amerseil
10:55amerseil is now known as Pluggi
11:03bear24rw has joined #asahi
11:06raster has joined #asahi
11:08bear24rw has quit [Ping timeout: 264 seconds]
11:25aat596[m] has joined #asahi
11:29bernstei_ has joined #asahi
11:33DarthCloud has quit [Ping timeout: 240 seconds]
11:33DarthCloud has joined #asahi
11:40bernste__ has joined #asahi
11:40Necrosporus> So, you need to write some code which iBoot is going to load to a certain memory address and which will need to execute certain instructions to connect to UART and send debug output. Do you know yet which memory address it's going to be loaded to, what instructions do you need to send bytes via UART?
11:40NecrosporusAnd somebody said that loading non-apple code via iBoot is still not possible even after unlocking, right, marcan ?
11:41NecrosporusUntil they release some util which tells iboot which file to load or smth
11:41bernstei_ has quit [Ping timeout: 272 seconds]
11:45bernste__ has quit [Ping timeout: 272 seconds]
11:48marcanI think the macho files should have the load address, but either way I intend to write position-independent code
11:50NecrosporusWhat machno files?
11:51Necrosporusmarcan, do you know name and position of the first file iBoot loads?
11:52NecrosporusWhat if you simply rename the old file and put yours on its place?
11:52NecrosporusDo you know how to tell the compiler (gcc?) to make mach-O files instead of elf or PE?
11:53Shizanyway, I suggest reading https://keith.github.io/xcode-man-pages/bputil.1.html Necrosporus
11:53marcan(also I might just find/make an elf/blob to macho converter, because I don't feel like requiring a macho toolchain)
11:54marcan(I always make this kind of low level stuff as "jump to entrypoint" blobs anyway, so it will work wrapped up in any executable format for the most part)
11:54rootspring[m]marcan: that sounds like it could crash if there are certain things in the elf that can’t be done easily in macho etc etc
11:54NecrosporusWhat if you both sign the file and replace it?
11:55NecrosporusShiz, I have experience of booting alternative kernel on Chromebook ARM, the kernel or u-boot has to be signed even with security off
11:55mjg59Once you're targeting a sufficiently low level it's easy enough to ensure that you can transform binaries
11:55marcanno offense but it's not terribly helpful to suggest random things because they happen to work on other platforms
11:56NecrosporusI'm not suggesting it
11:56Necrosporusmarcan, where is secureboot policy stored? In iBoot config?
11:56Shizsure, you can do terrible things with ELF (speaking from experience), but it's a rather simple format
11:57Shiz1TR is sorta akin to asserting UEFI physical presence, for an analogue if you're more familiar with EFI terminology
11:58marcanthere *may* be some horribly convoluted workaround to do that today... something along the lines of "copy python from macos, run it, use ctypes to invoke the correct methods"; not sure if W^X would prevent that from working
11:58NecrosporusI am not suggesting to do the same thing. I am just telling that I know how somewhat similar thing works. I'm not assuming that apple one is exactly same or anything
11:58Shizapropos, is there a way to enroll in macOS betas from the commandline or am I going to have to boot up the projection CRT :(
11:58ephe_meral has quit [Ping timeout: 260 seconds]
11:59marcanhaven't tried it but https://derflounder.wordpress.com/2018/01/06/setting-your-mac-to-receive-macos-beta-updates-using-seedutil/
11:59NecrosporusSo, even after you have unlocked the bootloader you still need to make apple security processor (analogue of TPM) to sign it for you and you are missing the tool which works with the processor
12:01NecrosporusIs the tool open source?
12:01davidrysk[m]Note that if you’re planning to do RE based on OS, the Apple betas are under a significantly more restrictive EULA
12:01jozzle has left #asahi ["The Lounge - https://thelounge.chat"]
12:01davidrysk[m]So if you’re going to do OS RE, better to not run the betas
12:02Shizcan confirm that `sudo /System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil enroll PublicSeed` works, fwiw
12:02marcanI don't think so, but even if it were we wouldn't be able to build and run patched versions
12:02davidrysk[m]I believe the betas are still under NDA technically
12:02davidrysk[m]I’d have to check the wording
12:03davidrysk[m]The entire release iOS SDK used to be under NDA, many people ignore it, devs got tired of it, revolted a bit, and Apple eventually removed it
12:04davidrysk[m]Ignored**
12:08Shiz You agree not to decompile, reverse engineer, disassemble, decrypt, or otherwise attempt to derive the source code of any Apple Software (except as and only to the extent the foregoing restrictions are prohibited by applicable law, or to the extent as may be permitted by licensing terms governing use of open-sourced components included with any such Apple Software).
12:08ShizYou agree that the Pre-Release Software and any information concerning the Pre-Release Software (including its nature and existence, features, functionality, and screen shots), the Seeding Tools, and any other information disclosed by Apple to you in connection with the Beta Program will be considered and referred to in this Agreement as “Confidential Information.”
12:08ShizExcept as expressly permitted in this Section 6, you agree that you will not disclose, publish, or otherwise disseminate any Confidential Information to anyone other than individuals who are enrolled in the same individual seed as you, or as otherwise expressly permitted or agreed to in writing by Apple.
12:09rootspring[m]Not like anyone cares: hackintosh
12:09NecrosporusCo, can you post something like output of cgpt show / fdisk -l or whatever on apple M1 device SSD? I'm wondering how the stuff is arranged. And if there is some tool like apfs_list_volumes (or whatever) then its output too
12:09rootspring[m]I thought EULA is not legally binding
12:10Shizif an EULA says you can't RE but legislation (like EU legislation) says you can, EULA can kick rocks
12:10rootspring[m]Beta Program seems to indicate public beta
12:11Shiz(note that I'm not saying EU legislation allows you to RE in all circumstances as IANAL, but it does in certain circumstances at least)
12:11rootspring[m]I mean, they are legit allowing custom kernels
12:11Necrosporusbut in practice it's still not possible
12:12NecrosporusApple is just trying to have some reason to sue somebody just in case maybe
12:13bent_ has quit [Ping timeout: 256 seconds]
12:13rootspring[m]0. Discussion Forums. As part of the Beta Program, you may have the ability to participate in discussion forums provided by Apple about the Pre-Release Software and other Confidential Information that Apple may make available to you. For purposes of such discussion forums, Apple is providing a limited exception to Section 6 by allowing you to discuss certain Apple Confidential Information received by you in connection
12:13rootspring[m]with a particular seed with other seed participants who are in the same seed as you in the Apple designated discussion forum for such seed, and only within this discussion forum. Except for the limited purpose of discussions with other seed participants within such forums, you acknowledge and agree that this Agreement does not grant you the right to copy, reproduce, publish, blog, disclose, transmit, or otherwise
12:13rootspring[m]disseminate any Apple Confidential Information
12:13jixare public betas distributed in a way that 5.(b) which excludes from confidentiality information that "is generally made available to the public by Apple," applies?
12:13rootspring[m]They legit state non apple discussion forums are against public beta eula
12:14rootspring[m]Wtf is the discussion forums thing about
12:14rootspring[m]Are u saying macrumors is against eula for sharing public beta info
12:15rootspring[m]Actually, their eula explicitly makes macrumors breaking the eula
12:15rootspring[m]Macrumors is not a forum provided by apple
12:16rootspring[m]And hence is not allowed by eula to share any public or Dev beta info
12:16rootspring[m]Even Reddit is breaking the eula
12:17rootspring[m]Is there a law that states that if no one follows a rule, then it doesn’t exist or smth like that
12:18rootspring[m]Given that even Reddit and macrumors is breaking apple eula, I really don’t think apple cares about Asahi Linux at all
12:18j`eymarcan: you added some info about the NOR/SecureROM, do you know if its expected that macOS updates can update iBoot?
12:18plainbits has quit [Ping timeout: 272 seconds]
12:19plainbits has joined #asahi
12:20rasterrootspring[m]: they will eventually care if it stomps on any security obfuscation and breaks it .. thus maybe compromising macos security that relied on it. of course all hypothetical at this point.
12:25awordnot has quit [Ping timeout: 264 seconds]
12:29plainbits has quit [Quit: Go to sleep. Night!]
12:30rootspring[m]This reminds me of magnethax tbh
12:31rootspring[m]Where any 3ds can be hacked using a magnet and a ds cart
12:32rootspring[m]Possibly due to an oversight by programmers/hardware developers, the 3DS checks to see if Start+Select+X is held down, and if the shell is closed.
12:32rootspring[m]If so, the 3DS will attempt to boot from an NDS cartridge from the bootrom (with bootrom access).
12:32rootspring[m]Hence, the purpose of the magnet is enable a state that the 3DS believes that the shell is closed.
12:32mjg59raster: And they haven't gone after the jailbreak community in any meaningful way, even when they're working on dev releases
12:34rootspring[m]There was a court case on jb
12:34rootspring[m]Court deemed jb legal
12:36Lightswordis the SEP firmware being signed by their newer G2 CA(https://crt.sh/?Identity=%25&iCAID=193472) or something different? one of their CA's actually has 1024 bit RSA intermediates(https://crt.sh/?Identity=%25&iCAID=45947) funny enough
12:39ephe_meral has joined #asahi
12:41Shiz'a court case' is useless to state without the details and jurisdiction (but also rather offtopic)
12:46plainbits has joined #asahi
12:54Lightswordmarcan, does the boot chain involve anything UEFI like or would you have to use something like uboot to say launch systemd-boot?
13:01brentr123[m]Does anyone know if Marcan is streaming today?
13:02brentr123[m]To yesterday
13:02brentr123[m]Hm, you said that you were going
13:02Lightswordah, so I guess uboot or something similar would be needed for running UEFI binaries on it then, is uboot what is still what is typically used to run UEFI binaries on arm based systems? little while back was trying to get that working on a raspberry pi 3
13:04LightswordShiz, sure, I'm talking about adding UEFI using uboot or something
13:04LightswordShiz, does tianocore actually work on ARM?
13:04Shizbut as said before, anyone can do that once its figured out how to have something bootable by iBoot
13:10LightswordShiz, I guess the main reason for using EFI would be just to have the ability to use more traditional UEFI bootloaders like systemd-boot which have some nice userspace tooling/integrations.
13:14LightswordI know some EFI firmware is but is that true even for something more minimal like uboot's implementation?
13:18LightswordI think it's not super common since most embedded ARM systems don't seem to have bootloaders with GPT support...which doesn't really prevent you from using GPT formatted disks but you have to add an additional MBR entry to the boot partition so that you can chain to something that does understand GPT
13:19Lightswordhad to add hybrid-MBR partition support to genimage to get that working :P https://github.com/pengutronix/genimage/pull/96
13:23LightswordI wonder if it would make sense to use uboot's SPL framework for the mini loader marcan was talking about https://github.com/u-boot/u-boot/blob/master/doc/README.SPL
13:23jamadazi has joined #asahi
13:25Lightswordmarcan, is what you have in mind for the mini loader a bit different than that?
13:29Lightswordmarcan, is that basically like a SPL but with a RPC framework?
13:33marcanbut more importantly it's dumb and simple and I know how it works and it's trivial to copy-paste-hack into a new platform
13:35marcanthe main purpose of the RPC thing is to allow experimenting from a PC, remotely, without rebooting, and to be robust enough to gracefully recover from simple faults
13:35marcanwhich easily makes testing and reverse engineering unknown hardware orders of magnitude faster
13:36marcanlike, depending on how much it interacts with other kernel frameworks, I could see gpu bringup happening here first even (we'll see)
13:36marcanit tends to have a much faster test cycle than kernel modules, and be a lot less likely to crash and burn
13:36marcanso I might well end up with an entire M1 driver prototype folder full of python scripts that run on the host
13:37marcan(extra bonus: adds another layer between any binary reversing of macos, hence more distance for avoiding copyright infringement claims)
13:37Lightswordyeah, SPL's do often do a lot of hardware initialization, although is that something iboot would probably be doing a lot of for the M1?
13:38marcanand yeah, thankfully I expect a lot of hw init to be handled by iBoot, but not everything
13:38Lightswordyeah, had to hack NAND bringup into a SPL...was a bit tricky
13:39marcanit's a heap implementation that keeps metadata on the python side, to be used by this stuff :p
13:39marcana lot of the wii hardware details, including bits that the official software never uses, were worked out this way
13:40marcanI have scripts somewhere for things like dumping whole register blocks and highlighting changes
13:40marcanbootmii is mini minus the RPC stuff plus a hardcoded main() that loads a file from SD and runs it
13:44Esmil has joined #asahi
13:44redbluescreen[m] has joined #asahi
13:44LightswordI wonder if https://github.com/OpenAMP/open-amp might be helpful for running side by side with Linux.
13:45Lightswordah, that's only on the wii?
13:46marcanoriginally on the wii linux didn't have direct hardware access, so the mini IPC framework is designed to be *extremely* fast and we were proxying all register reads/writes for stuff like USB on linux through that
13:46marcanbut mini is still used to launch linux from the other cpu and provide a couple other trivial services
13:47Lightswordyeah, I think AMP is mostly used with zynq SOCFPGA's in cases where Linux doesn't have accurate enough timing
13:48Lightswordmostly for IO stuff I think
13:58plainbits has quit [Quit: Go to sleep. Night!]
14:04hipboi[m] has joined #asahi
14:07stylefish[m] has joined #asahi
14:15AnonJah has joined #asahi
14:16AnonJah has quit [Read error: Connection reset by peer]
14:22artemistThere's always the Wii U strategy of "have an actual kernel on PPC but still use that ridiculous ARM core for IO"
14:23artemistDidn't Wii IOS have a syscall for "zero memory address with the memory priveleges of the kernel"
14:26svenyes, that sys call was something like get_ios_configuration and that 0 meant retail instead of debug or something like that. but that's all off topic :)
14:26AnonJah has joined #asahi
14:26AnonJah has quit [Read error: Connection reset by peer]
14:27AnonJah has joined #asahi
14:28AnonJah has quit [Read error: Connection reset by peer]
14:28AnonJah has joined #asahi
14:30AnonJah has quit [Read error: Connection reset by peer]
14:32AnonJah has joined #asahi
14:34AnonJah has quit [Read error: Connection reset by peer]
14:36Shiz/usr/bin/bputil (architecture arm64e): /usr/lib/libbootpolicy.dylib (compatibility version 1.0.0, current version 76.40.19)
14:36AnonJah has joined #asahi
14:38AnonJah has quit [Read error: Connection reset by peer]
14:38AnonJah has joined #asahi
14:39AnonJah has quit [Read error: Connection reset by peer]
14:39artemistHow does the SSD show up to the main application processor? Will it show up as an NVMe controller connected to the PCIe root port?
14:40AnonJah has joined #asahi
14:43AnonJah has quit [Read error: Connection reset by peer]
14:43AnonJah has joined #asahi
14:44AnonJah has quit [Read error: Connection reset by peer]
14:45modwizcode has joined #asahi
14:53MuckiSG has quit [Read error: Connection reset by peer]
14:59davidrysk[m]all the libs in Big Sur are located only in the dyld_shared_cache
15:00davidrysk[m]you need to extract it, and that tool isn't 100% updated yet
15:04davidrysk[m]there was a new dyld source code drop, but getting it to compile is a little bit of work
15:16modwizcodewhy do they even do that anyway
15:20davidrysk[m]modwizcode: performance
15:21davidrysk[m]and probably ease of shipping updates/patches
15:28jamadazi has quit [Read error: Connection reset by peer]
15:28jamadazi has joined #asahi
15:32modwizcodeWhat's the current blocker on first code exec? Understanding the hardware? I read maybe the unsigned boot stuff wasn't actually deployed yet?
15:34diz3y_ has joined #asahi
15:35modwizcodeFigured as much
15:36diz3y has quit [Ping timeout: 256 seconds]
15:43thecake21[m]this fact worries me slightly. what if apple changes their mind and never actually deploys this.
15:44svenwhy would they? they've already spent a lot of engineering effort to make this even possible
15:46modwizcodeI have a cynical view that they might partially view this as helpful with their attempts to shrug off anti-trust stuff
15:47rootspring[m]Can we somehow make our own bputil using the dylib
15:52davidrysk[m]bputil is implemented, kmutil is not
16:17plainbits has joined #asahi
16:23sharpiro_ has quit [Quit: Leaving]
16:24jinen[m]<Alex[m]17 "don't care if benchmarks are exa"> Agreed, the success of Asahi Linux decides whether or not I get the Mac Mini
16:36jamadazi has quit [Ping timeout: 240 seconds]
16:48bear24rw has joined #asahi
16:51plainbits has quit [Ping timeout: 272 seconds]
16:54plainbits has joined #asahi
17:11bear24rw has quit [Remote host closed the connection]
17:15plainbits has quit [Quit: Bye!]
17:16bear24rw has joined #asahi
17:21rootspring[m]Wow, the Asahi Linux subreddit has 74 members
17:22stormclad has joined #asahi
17:22bear24rw has quit [Remote host closed the connection]
17:27diz3y has joined #asahi
17:30diz3y_ has quit [Ping timeout: 264 seconds]
17:41bakk[m] has joined #asahi
17:41bear24rw has joined #asahi
17:42ephe_meral has quit [Ping timeout: 256 seconds]
17:49opticronyeah, beyond the x86 memory architecture mode, all the fancy stuff with x86 binaries is in macOS, not in the M1 itself
17:54davidrysk[m]It would be nice if someone could figure out static ahead-of-time translation
17:54davidrysk[m]mcsema can do some of it but I don't believe it's optimized for performance
17:54davidrysk[m]Apple is heavily leveraging AOT
17:54davidrysk[m]for Rosetta
17:55davidrysk[m]well, yeah
17:55davidrysk[m]unless you're doing things like FPGA development that rely on vendor tools
17:55davidrysk[m]but that's its own can of worms
17:57brentr123[m]How are we going to get past
17:57brentr123[m]The “recovery mode shrinks = no boot”?
17:57brentr123[m]*partition
18:05brentr123[m]thats what i meant sorry
18:12Mary_ has quit [Ping timeout: 240 seconds]
18:18davidrysk[m]that's probably a page worth adding to the resources
18:23artemistOnce Linux is booting then someone could add a prctl flag to enable the TSO bit and someone could modify QEMU to use it
18:31raster has quit [Quit: Gettin' stinky!]
18:34leah2 has quit [Ping timeout: 260 seconds]
18:38leah2 has joined #asahi
18:48bear24rw has quit [Remote host closed the connection]
18:49NecrosporusBy the way, so iBoot cannot load the system from external medium. Then what does boot menu show? Does restore OS chainload other OSes?
18:49bear24rw has joined #asahi
18:49bear24rw has quit [Remote host closed the connection]
18:50raster has joined #asahi
18:50bear24rw has joined #asahi
18:51NecrosporusIt seems that M1 can boot from external drive after all somehow
18:54Necrosporusmarcan, have you tried to boot your macmini from external drive? Your article only covers booting from internal drive so far
18:55Alex[m]17<Necrosporus "marcan, have you tried to boot y"> +1, the ability to boot from an external drive is important to avoid bricking
18:56ky0ko has joined #asahi
18:57NecrosporusI am wondering how it works, does bootROM load iBoot from external drive, or does it need iBoot and 1TR partition which somehow loads the kernel from external drive in something like kexec. The article I linked doesn't mention the layout of the boot drive, only the method how to make it with proprietary GUI tools
19:00Necrosporus NVRAM contents are listed in System Information under Software > Logs > NVRAM contents, and can still be edited using the nvram command in Terminal.
19:01NecrosporusI'm wondering what does it have in there? It seems to be something similar to u-boot env
19:02NecrosporusTarget Disk Mode, to connect to another Mac
19:02NecrosporusConnect Macs using a USB, USB-C or Thunderbolt cable. On the Target, enter Recovery Mode and use the Share Disk command in the Utilities Menu.
19:02NecrosporusAlso interesting mode. Does it make mac emulate USB storage? Or it's just network filesystem of some kind
19:10brentr123[m]you could install the os and then boot from harddrive?
19:11ch3sh1r3c4t has joined #asahi
19:12rootspring[m]Pretty sure bootrom does dfu mode
19:13rootspring[m]Someone should make a Linux software to do revival if that’s possible
19:17modwizcodeDFU being required to revive is kinda annoying :/ means you can't just keep a known good flashdrive around to restore
19:18davidrysk[m]would be worth adding those features to https://github.com/libimobiledevice/idevicerestore
19:20modwizcode has quit [Quit: Later]
19:21modwizcode has joined #asahi
19:22iandi has joined #asahi
19:33Tokamak has joined #asahi
19:37awordnot has joined #asahi
19:37awordnot has quit [Client Quit]
19:37awordnot has joined #asahi
19:40Baughn_ has joined #asahi
19:42Baughn has quit [Ping timeout: 256 seconds]
19:42Baughn_ is now known as Baughn
19:47sduarte has joined #asahi
19:58sduarte has quit [Ping timeout: 245 seconds]
19:59Mary_ has joined #asahi
20:11stormclad has quit [Ping timeout: 264 seconds]
20:16bear24rw has quit [Remote host closed the connection]
20:16bear24rw has joined #asahi
20:22tiagom has quit [Quit: tiagom]
20:46konstater has joined #asahi
21:07sam26 has joined #asahi
21:09stormclad has joined #asahi
21:11choozy has joined #asahi
21:24sam26 has quit [Remote host closed the connection]
21:33dsads[m] has joined #asahi
21:36Tokamak has quit [Quit: Textual IRC Client: www.textualapp.com]
21:37Tokamak has joined #asahi
21:38devnull[m]3 has joined #asahi
21:38devnull[m]3 is now known as sta[m]
21:43Wal has joined #asahi
21:51mellotron1[m] has joined #asahi
21:54Wal has left #asahi ["Leaving"]
21:54Wal has joined #asahi
21:54Wal has quit [Quit: Leaving]
22:01maor26 has joined #asahi
22:03raster has quit [Quit: Gettin' stinky!]
22:04raster has joined #asahi
22:04raster has quit [Client Quit]
22:04raster has joined #asahi
22:08raster has quit [Client Quit]
22:08raster has joined #asahi
22:09raster has quit [Remote host closed the connection]
22:10raster has joined #asahi
22:24konstater has quit [Ping timeout: 245 seconds]
22:32raster has quit [Quit: Gettin' stinky!]
22:36stormclad has quit [Ping timeout: 264 seconds]
23:01King_InuYasha is now known as Conan_Kudo
23:01stormclad has joined #asahi
23:01Conan_Kudo is now known as King_InuYasha
23:23stormclad has quit [Remote host closed the connection]
23:23stormclad has joined #asahi
23:24stormclad56 has joined #asahi
23:28stormclad has quit [Ping timeout: 246 seconds]
23:45maor26 has quit [Ping timeout: 264 seconds]
23:50stormclad56 has quit [Ping timeout: 246 seconds]