2022-02-22
00:15gladiac is now known as Guest98
00:15gladiac has joined #asahi
00:21Guest98 has quit [Ping timeout: 480 seconds]
00:44yuyichao has quit [Ping timeout: 480 seconds]
01:32conradevthis is a random question, but does anyone know if the A15 SoCs have the virtualization extensions that the M1 has?
01:43yuyichao has joined #asahi
02:13pg12 has quit [Ping timeout: 480 seconds]
02:25atka has joined #asahi
03:13pg12 has joined #asahi
03:17kit_ty_kateGlanzmann: your m1-debian repository doesn’t show which file you upload as grubaa64.efi
03:18kit_ty_kateis that just testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi ?
03:21kov has quit [Quit: Coyote finally caught me]
03:21kov has joined #asahi
03:37phiologe has joined #asahi
03:40PhilippvK has quit [Ping timeout: 480 seconds]
04:08marcanfor everyone messing with partitions: it would help a lot if you can narrow down what happens in confusing cases, like when partitions are out of order
04:09marcanwe can read the EFI GPT partition map directly from the installer, but we can't write to it
04:09marcanso if we determine diskutil gets confused with out-of-order partitions and there is no workaround, I can add a cross-check to detect that case
04:12tpw_rulesmarcan: if you have partitions B and A on disk but A and B in the numbering, disk utility will show (free space equal to size of A), B, A, (free space equal to size of B)
04:14tpw_rulesIME it seems to process the partitions okay but if you look for free space in such a map it's fake
04:14marcanwhat I want to know is what diskutil info -plist <partition> says, in particular PartitionMapPartitionOffset and TotalSize
04:15marcanbut I also want to know whether the disk0sN numbering is consistent with partition order (I don't think it is after making changes, but maybe it always is on boot?)
04:15kit_ty_katemarcan: (unrelated) is there an "easy" way of copying extra files to 1TR? or do i have to patch src/stub.py by adding some more shutil.copy("<extra-file>", os.path.join(self.osi.system)) ?
04:16marcanI mean nothing stops you from just opening up another terminal tab and copying some files manually
04:21marcanjust need to get all partition info first, *then* sort, *then* walk the list and insert free space
04:22kit_ty_katemarcan: I’m making a "one-click" reproducible distribution installer for fun (I’m almost done but the missing step is to copy uboot, kernel, partition image and so on to 1TR for the modified step2.sh to use there)
04:23tpw_rulesalthough i am not sure what "the partition after" will mean to diskutil when such misorderings are present
04:25tpw_rulesso it might be best to just bail completely in that case. although i'm not sure how the user will fix the problem
04:26marcanthough I'd hope it means we have to specify the partition that is *physically* before the free space we want to use
04:26tpw_rulesi wonder if e.g. shrinking the user's main partition by 1 sector will force diskutil to sort the table
04:26tpw_rulesthe manpage says it tries to place the new partition at (pos + size) of the specified partition, so yes it should do it physically
04:27marcanyou can do that in the main installer, that's literally what I'm about to implement, er, right now
04:27marcanthe only thing step2 *has* to do is bputil/kmutil m1n1 in, because that is gated on paired recovery
04:27marcanI even intend to stream the partition image directly to disk so we can avoid requiring temp storage anywhere
04:28off^ has quit [Ping timeout: 480 seconds]
04:30kit_ty_katemarcan: cool, i see. I need to go to bed right now (it’s really late^Wearly for me) but just in case you’re interested: https://github.com/kit-ty-kate/m1-linux-installer
04:31kit_ty_kateeach dockerfiles produces a component (uboot, kernel, ext4 image to dd) and everything builds from macOS which is quite handy
04:33chadmedhow do we reliably expand the dd-ed image into whatever free space the user actually specified? ik some rpi images do it but it looks like these assume any space below the root partition is free to bulldoze?
04:34kit_ty_katechadmed: resize2fs does that pretty well. I didn’t have any issues with it so far
04:40marcankit_ty_kate: btw, my idea for the future is that if you run the asahi installer from Linux, it'll prompt you to make a USB install instead
04:40marcanthat would fetch the IPSW subset it needs, and re-pack it into a zip file containing only those bits for use by the installer
04:41marcanchadmed: as a "general purpose" plan, my idea is that the installer will create the *partition* with as much space as the user requests
04:41marcanand then the distro, on first boot, will resize the *filesystem* (and whatever volume management layers it uses under it) to fit the partition size
04:42marcanbut for simple resize2fs cases it would be helpful if the installer just does it ahead of time
04:48chadmed has quit [Read error: Connection reset by peer]
04:49chadmed has joined #asahi
05:04off^ has joined #asahi
05:17babilen has quit [Remote host closed the connection]
05:17babilen has joined #asahi
05:18zvI am intending to set up this mac mini in a data center with a raspberry pi for tethering. is there anything I should know that's not documented that might be of concern?
05:29zvhm. without physical access to the power switch, how does one handle the case where /dev/ttyACM0 is no longer present for some reason?
05:30marcanzv: I would not recommend that set up. you'd need a USB-PD interface to be able to reset the device if it wedges. a rPi won't give you that.
05:31marcanalso, I haven't found a way to make the machines always power up on AC application, which means that if you ever do a clean shutdown, you're toast
05:39Xe has quit [Remote host closed the connection]
05:40Xe has joined #asahi
06:01the_lanetly_052 has joined #asahi
06:02the_lanetly_052 has quit [Remote host closed the connection]
06:03the_lanetly_052 has joined #asahi
06:07eroux has joined #asahi
06:22Glanzmannkit_ty_kate: testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi fixed in the repository.
06:30Glanzmannzv: You could use a gpio of the rapsbery pie with a optocoupler to remotely press the mini power button.
06:31GlanzmannI used a smiliar setup to remotely install system half away around the world for years when I could not afford remote management boards.
06:32GlanzmannSystems were set to pxe boot and I could press the power button using a gpio pin. I said the system using pxe to boot from disk or reinstall itself with Linux/Windows/VMware or boot a rescue system.
06:34Glanzmannzv: Povik did some development on the air using a mini remotely. as m a r c a n said it hang itself a few times. So that I had to manually power it off and on again.
06:48zvGlanzmann: let me dig into some things and get back to you tomorrow or later this week. trying to think of reliable options that others can easily set up too.
07:20Glanzmannzv: By default the mini will recover the last power state it was on. So you could also hook it up to a pdu.
07:20Glanzmannzv: What I would be most interested is a driver for Linux on m1 to be able to sissue to reset.
07:28ciggi_ has joined #asahi
07:32ciggi has quit [Ping timeout: 480 seconds]
07:53the_lanetly_052 has quit [Ping timeout: 480 seconds]
07:56MajorBiscuit has joined #asahi
08:02the_lanetly_052 has joined #asahi
08:07mpsGlanzmann: regarding syslog parsing, metalog have option to set regex triggers (as shell or perl script) when something is happens
08:14steven1lung[m] has joined #asahi
08:16chadmed has quit [Read error: No route to host]
08:32svenhttps://www.servethehome.com/wp-content/uploads/2020/12/AWS-EC2-Apple-Mac-Mini-Node-in-Rack.jpg i think there also was a better picture, but i already enjoy that one :D
08:34kettenismarcan: I don't think exposing a gpio-backlight node in the DT until we figure out the DCP interface for this would do any harm
08:44_jannau_sven: there's https://twitter.com/imbushuo/status/1334280312944123906 showing the whole sled
09:01tomtastic has quit [Quit: ZNC - https://znc.in]
09:01tomtastic has joined #asahi
09:05tomtastic has quit []
09:05tomtastic has joined #asahi
09:14Glanzmannjannau: For real? I liked my ethersex solution very much: https://www.pollin.de/p/bausatz-avr-net-io-810058 + ethersex + perl script.
09:15GlanzmannMy first solution was actually a parallel port with an optocopler and: https://pbot.rmdir.de/0rUeKX2kZ9OQ9nhA3UTgOA
09:21Glanzmannj`ey: There is mac mini dissamble video somewhere, so optocoppler hookup would also be really easy.
09:30bestouff[m] has joined #asahi
09:36tomtastic has quit [Quit: ZNC - https://znc.in]
09:36tomtastic has joined #asahi
09:40tomtastic has quit []
09:41eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:41tomtastic has joined #asahi
10:09bestouff[m]Hi everybody; I know that asking for ETA is deeply frowned upon, but does anyone know for when the next blog post is due ?
10:10j`eymarkan is working on the installer / bootloader stuff currently, with a view to making something 'release worthy'
10:13bestouff[m]sven: ... more let me do Y instead, where X is a derivative of Y
10:16GlanzmannI have tldr of the blog post: u-boot max/pro, nvme and spi support, wifi, wifi firmware extractor, smc (battery, wip: reboot/poweroff), asahi installer (retry downloads, warn user about recovery OS, m1n1 nvme support), dcp, debian installer, OpenBSD, Asahi Installer for Arch, backlight for 2020 laptops
10:18GlanzmannOkay here is that tldr: u-boot max/pro, nvme and spi support, wifi, wifi firmware extractor, smc (battery, reboot, poweroff, rtc), asahi installer (retry downloads, warn user about recovery OS, m1n1 nvme support, robustness), dcp, debian installer, OpenBSD, Asahi Installer for Arch, backlight for 2020 laptops, wip: Audio speakers on 2020 models, stable audio jack output 2020 modes, stable audio input
10:18sveni haven't written code yet, but from what i can tell usb 3 is a few dozen register pokes + applying some tunables
10:21Glanzmannpovik: Before that I had no audio every other reboot. Now I have audio on every reboot.
10:26povikthat's probably coincidental caused by some other change in new kernel. there's a failure mode with the cs42l codec we still don't understand
10:40the_lanetly_052 has quit [Ping timeout: 480 seconds]
11:33eroux has joined #asahi
12:11Gaspare has joined #asahi
12:18tomtastic has quit [Quit: ZNC - https://znc.in]
12:18tomtastic has joined #asahi
12:28tomtastic_ has joined #asahi
12:30tomtastic has quit [Ping timeout: 480 seconds]
12:38kit_ty_kateGlanzmann: cool then i had the correct one. Thanks!
12:43kit_ty_kate@marcan | which is required anyway, since a true standalone installer is not redistributable // You mean because of the firmware? Glanzmann’s solution (and by extention mine, since my work is based on his) to that is to simply create it in 1TR and move it to the EFI partition. That way on first boot it can be simply unpacked and everything is ready
12:49Gaspare has quit [Quit: Gaspare]
12:51ciggi has joined #asahi
12:53ciggi_ has quit [Ping timeout: 480 seconds]
13:05kit_ty_kateah fair enough. Ah is that a license thing? Thinking about it, the only dd-able image I came accross was FreeBSD’s for Raspberry PI
13:07kit_ty_kateyeah but as long as we build it locally in the install script and copy it to EFI, the rest can be distributed right?
13:16mpsI created tar archive on macos, copied to other linux machine and run there firmware extract script, copied tarball on alpine install usb disk, boot usb disk and untar firmware tarball during installation
13:18mpsiirc someone told earlier that it could/would be possible to download something (tar file?) from apple and extract firmware, but I forgot details
13:27GlanzmannThe ipfw are the macos images that the official macos installer downloads from the internet. It also contains the firmware.
13:30mpsGlanzmann: aha, that way complete installation media could be prepared offline on another machine (though I guess that that image is huge)
13:30Gaspare has joined #asahi
13:35Glanzmannmps: It is huge, but probably we could seek to the location the firmware is located, maybe m a r c a n already does that?
13:36the_lanetly_052 has joined #asahi
13:44yuyichao has quit [Ping timeout: 480 seconds]
14:26eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:32nico_32_ is now known as nico_32
14:39yuyichao has joined #asahi
14:49eroux has joined #asahi
14:58the_lanetly_052__ has joined #asahi
15:02kgarrington has joined #asahi
15:04kgarrington has quit [Remote host closed the connection]
15:04the_lanetly_052 has quit [Ping timeout: 480 seconds]
15:05kgarrington has joined #asahi
15:05kgarrington has quit [Remote host closed the connection]
15:32marcanmy thought is I'll make the installer have a "prepare offline install" mode where it downloads the needed bits to make a reduced ipsw
15:32marcanas of today the installer already supports loading the ipsw from a local path instead of the internet
15:33tpw_rules1TR doesn't need to correspond with apple to set the security mode and alternate kernel and stuff?
15:35svenfor some reason it needs to chat quite a bit with SEP and it takes SEP a while to reply. if you enable verbose mode it'll show all the messages it send
15:45kit_ty_katemarcan: sure, I’m not talking about having a dd-able image for everything, just for the ext4 partition, the rest of the installer stays the same
15:46kit_ty_katebut maybe I’m missing your point (sorry I am)
15:54marcankit_ty_kate: then yes, the plan was always to put the firmware in the EFI partition and have the distro copy/upgrade it on every boot (so we can handle stub/firmware upgrades)
15:55marcanI wrote the code to do all the EFI partition stuff in the installer during the stream I just finished
16:01kit_ty_kateyeah i was watching (good job btw ^^)
16:02the_lanetly_052__ has quit [Ping timeout: 480 seconds]
16:06kit_ty_kateoh btw I noticed the root.img input file during the stream. Is that the same idea as the ext4 partition image or is it meant for a USB stick? (if it is, hopefully it could be used for both with an option)
16:28the_lanetly_052 has joined #asahi
16:30off^ has quit [Remote host closed the connection]
17:24Glanzmannmarcan: PIng me when you push it, I'm eager to try it out and also to create a pull request for Debian. :-)
17:27Glanzmannmarcan: The ext4 image will be hosted on one of your systems I assume and will not be created on the fly using a tar archive (I remeber some discussion if there is a tool which can create a ext4 image from a tar archive)?
17:31j`eyGlanzmann: it creates the partitions from a json file now, and dumps the contents of the image into the partitions
17:32Glanzmannj`ey: Thank you for the recap. Does it also write the grub and grub configuration already?
17:33marcangrub configuration is in ext4 and not writable for the installer, but it doesn't need to be
17:33Glanzmannmarcan: So what I did in my installer, I wrote a fake grub config on the efi which loads the kernel.
17:35GlanzmannAnd than you have some /etc/rc.local or equivalant which extracts the wifi firmware and call resize2fs?
17:36tpw_ruleswhy does the firmware one need to run every boot? doesn't that only change if the stub partition is upgraded?
17:37marcanthat's why there's a manifest file, so the script can figure out if anything changed without unpacking everything again
17:39marcanwhat I'm doing is providing a bundle that follows the standard /lib/firmware hierarchy for the OS to consume
17:42kettenisit is indeed primarily about boot-time firmware, but I remember shipping wifi firmware was discussed as well
17:45marcanthe idea with this vendor-firmware thing is that other platforms may want to use it to do the same thing
17:55MajorBiscuit has quit [Ping timeout: 480 seconds]
17:56kettenisTheo wants to look into copying the wifi firmware into the installer from the ESP such that we can have working wifi in the OpenBSD installer
18:02the_lanetly_052 has quit [Ping timeout: 480 seconds]
18:03tpw_rulesso that would allow installation of openbsd from the script without having to prepare a flash drive or whatever
18:06tpw_rulesi was also wondering about that for nixos, but then that would require modifications to the asahi script
18:07marcanwhat I wrote today is flexible enough to copy arbitrary trees to the ESP, and otherwise leave the space unpartitioned
18:08kettenisthe real question is how we'd handle the maintenance burden of updating the installer for each new release
18:09marcanthe OS images are streamed from a ZIP file, so you could host yours if you wanted to, it wouldn't have to be on asahi infra
18:12kettenisI still think I prefer the "install u-boot using the Asahi installer and pretend this is a normal machine afterwards" approach
18:18mpsI'm not sure I will work on this for alpine linux but will propose this if someone of alpine devs wants to do all these things
18:24tpw_rulesi just think it would be nice to have an option in the installer more or less for marketing purposes
18:44Glanzmannmarcan: What I don't understand. You hardcode the efi parition in u-boot. But how does Linux know which is the corresponding EFI parition?
18:45Glanzmannmarcan: And how do you handle when someone wants to install the same distribution twice? Because than the UUID of the root filesystem will be same, won't it?
19:03sarah[m] has joined #asahi
19:05riker77 has quit [Quit: Quitting IRC - gone for good...]
19:14Glanzmannmps: I mean doing the UEFI approach is the goal, but having what marcan is doing at the moment is from my point a big gain. Because you can install a complete distribution in less than 20 minutes including everything. The majority of the time is actually spent on entering 1tr and setting up the stub. The Linux installation is done in 10 seconds.
19:15GlanzmannAlso with what marcan is currently doing you don't need any usb sticks, usb-c to usb-a convertes and god knows what, so especially for unpexerienced Linux users, it will be very easy.
19:16tpw_rulesi mean you can write the intsaller to the internal storage, but the problem is there's no way to return back to it
19:17zvj`ey: thanks; haven't had a chance to catch up on the state of the project yet so please pardon the outsider questions for now
19:19Glanzmannmps: But to be honest, even as experienced user, I prefer the dd approach. because it takes me 10 seconds to install Linux (of course setting up the stub and rebooting in 1tr also takes a little bit of time especially if you don't get it right the first time, like I always do).
19:19riker77 has joined #asahi
19:20mpsGlanzmann: all alpine install media uses 'install' method and not ready made tarballs or disk images
19:20GlanzmannBut probably the best way is to having multiple ways of setting up linux (tethered, untethered, dd, live system, distro installer).
19:21Glanzmannmps: I mean at least on Debian, the disk image is also created using debootstrap what is the exact method the installer uses itself.
19:22GlanzmannAlso on Debian you can verify the checksum of every installed file, and apply upgrades very easily. Also on of the unattended debian installation methods, fai (fully automated installation) also uses a tarball that it extracts to bootstrap systems. I used it for many year to install 100+ systems.
19:26tpw_rulestl;dr all AArch64 boards and distros should be UEFI instead of having to rely on weird setups for platform firmware (i.e. u-boot and the like)
19:29mpstbh I don't know inner points of UEFI and don't like current grub, so have some aversion to this combo
19:32bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:33bisko has joined #asahi
19:37nijifu[m] has joined #asahi
20:18bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:51zvin a tethered configuration, if some exception occurs then /dev/ttyACM0 might disappear on the host. disconnecting and reconnecting the USB cable seems insufficient to resurrect it, and only rebooting the mac appears to work. is this the only solution?
21:22eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:26svenor run Linux inside the hypervisor. It’s much harder to trigger an exception that breaks usb in that setup
21:27zvI'm playing with QEMU on here now but the issue is memory. This machine is intended to be a public-access Linux-on-M1 system for the GCC cfarm.
21:30svenbut it’ll emulate the serial console as another usb serial device and you’ll be able to quickly reboot the machine with a Python command
21:30bisko has joined #asahi
21:32Gaspare has quit [Ping timeout: 480 seconds]
21:33zvtpw_rules: haven't gotten there yet; someone mailed me a mac mini to set up and I haven't spent any time familiarizing myself with this project or modern macs yet. (the only one I own is from 2006).
21:58svendon’t think so. UART (and SWD but that’s fused off for us mere mortals) can be muxed on the usb-c port
22:03svenit has USB in its name and the wire signals are beyond cursed (seriously, look up how complex it is for what feels like a glorified uart) but other than that the reboot command has been pretty reliable
22:07zvthere was a note in one of the wiki pages about asking Hector for an early sample, "In the coming weeks we'll be designing an open hardware interface for interfacing to M1 serial ports"
22:13bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:20kit_ty_kateis there a list of tools that currently doesn’t work with a 16k page size somewhere? If there isn’t I think it might be worth adding a new wiki page to list them
22:20kit_ty_kateI’ve seen chromium listed here a couple of times but apart from this one I don’t know
22:29zvI'm using commit 501bccfe4c2d4d9524d8cafcdd4e84b7c58e976a plus a handful of patches mentioned in the docs
22:30zvand I tried a u-boot image and separately the debian installer initrd, seemingly no keyboard support
22:31tpw_rulesyeah the usb-a ports don't work in u-boot but they should work once the kernel comes up?
22:31jannauhttps://github.com/AsahiLinux/linux/commit/e42846a7fda4fc9881a8febab4f059d9923a4fc7 will support the usb-c ports
22:40kit_ty_kateI created https://github.com/AsahiLinux/docs/wiki/Software-known-to-have-issues-with-16k-page-size
22:41kit_ty_katefeel free to remove it if someone think it shouldn’t be placed there or add stuff if it’s helpful and something is missing
22:41kit_ty_katemps: feel free to add it ^
22:41joske has joined #asahi
22:44kit_ty_katemps: added
22:48kit_ty_katejoske: included as a note under chromium (I’m not sure if they should all be listed one by one given it’s a dependency issue, but if you think it’s better feel free to edit)
22:50joskekit_ty_kate: well not everyone may know that vscode (which is an electron app) uses chromium
22:53blazra[m]kit_ty_kate: webkit accepted patch by kov I think, so webkit2gtk compiled from current git main branch already works https://github.com/WebKit/WebKit/commit/0a4a03da45f7749d31ba63ca2d569e891ee58018
23:03kit_ty_kateblazra[m]: note added
23:04j`eyjoske: I would have thought that chromium worked iPhones even if they couldnt put it in the appstore
23:11j`eyI have no idea why https://github.com/chromium/chromium/blob/main/base/allocator/partition_allocator/page_allocator_constants.h#L54 cant be PAGE_SIZE related
23:16newchima[m]j`ey: it appears that they handle Apple specifically 2 lines above, but this isn't "apple" during the build
23:19newchima[m]j`ey: I'd guess if they hardcoded to something else, it would fail on that platform then ;)
23:23newchima[m]j`ey: I don't know enough about Chrome/Chromium, but it seems like the one for Apple above is almost run-time specific
23:23jannauthe original architecture used compile time constants. based on https://chromium.googlesource.com/chromium/src/+/4ebd0722856c86d339a13242bb2f5de77466895a a patch using sysconf(_SC_PAGESIZE) following the IS_APPLE example might be accepted
23:24jannauyes, see https://github.com/chromium/chromium/blob/14a5055f19d09b486a8d7f062336ce93dce95de9/base/allocator/partition_allocator/page_allocator_constants.h#L17
23:29newchima[m]jannau: I see... still above my experience :)
23:32jannauthe argument about the increased memory footprint is more important for aarch86 than for x86_64 under rosetta
23:32joske has quit [Quit: Leaving]