#
…

2022-02-22

00:15gladiac is now known as Guest98
00:15gladiac has joined #asahi
00:21Guest98 has quit [Ping timeout: 480 seconds]
00:43marcankettenis: SMC sends HID events for the key, we wouldn't be using the GPIO directly
00:43marcanwe do not support interrupts; lid is a special case
00:43marcanthere's an SMC HID driver planned
00:43marcanwe *can* support interrupts for the GPIOs, but GPIO1 behaves differently anyway
00:44marcanso in fact we can't for that one, it sends special case events instead :-)
00:44marcan*for the lid
00:44yuyichao has quit [Ping timeout: 480 seconds]
00:45marcankettenis: don't think backlight is supposed to go through GPIO directly
00:45marcanthat one is DCP's job
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:09marcanbut we need to know exactly what happens
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:14tpw_rulesyou parse the plist?
04:14marcanwe certainly don't parse the user-friendly output ;)
04:14tpw_ruleswell it sounds like it has the same invalid info as that
04:15marcanthe plist doesn't have a concept of free space
04:15marcanit only lists partition offsets and sizes
04:15marcanso I can sort by offset and compute free space properly, if the data is good
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:16marcankit_ty_kate: what is your use case?
04:16marcanI mean nothing stops you from just opening up another terminal tab and copying some files manually
04:16marcanbut is this something you want the installer to do?
04:18tpw_rulesmarcan: yeah, it looks like you will want to sort by offset
04:18marcanok, that changes the logic a bit
04:21tpw_rulesby more than a sort call?
04:21marcanjust need to get all partition info first, *then* sort, *then* walk the list and insert free space
04:21marcanalready implemented it, about to test
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:23tpw_rulesif there is both fake and real free space
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:25marcanpushed & updated installer
04:26marcantpw_rules: that is something I'd like people to test
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:26marcanwhich is what I do now
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:26marcankit_ty_kate: why would you copy uboot/kernel/partition image in step2?
04:27marcanyou can do that in the main installer, that's literally what I'm about to implement, er, right now
04:27marcan(streaming shortly)
04:27marcanthe only thing step2 *has* to do is bputil/kmutil m1n1 in, because that is gated on paired recovery
04:27marcaneverything else can be done ahead of time
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:35chadmedoh good stuff then
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:40marcanwhich is required anyway, since a true standalone installer is not redistributable
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:40marcankit_ty_kate: I'm interested in the resize2fs build for macos though
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:30marcanthe Mac Mini 10G supposedly has LOM, but none of that has been reverse engineered yet
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:32marcan(there is AC restore but not always power)
05:32zvremotely-managed power switches or PDUs are easily obtained, maybe Wake-on-LAN is possible?
05:32marcanI doubt WOL would work on cold power-up on the regular 1G Mini
05:32marcanmaybe on the 10G one, but that NIC is very unexplored so far
05:32marcanfeel free to dig around into it but I can't promise anything right now
05:33zvno worries; seriously great work going on here.
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:22Glanzmannmps: Thank you for testing.
06:26Glanzmanntpw_rules: Whenever I did something with diskutil, it reoordered the partitions.
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:32Glanzmannmarcan: Do you have any more information of the LOM 10G mini support?
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:31_jannau_Amazon uses a servo in their mac aws instances to press the power button
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:26povik_jannau_: you can't be serious
08:26povikoh, *mac* aws instances
08:26poviki thought it's something they do in general
08:30_jannau_I suppose they do it to use unmodified mac minis
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:34as400[m]And this way Apple became a servers producer - accidentally :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:35kettenissound like the lid is a different matter though
08:35marcankettenis: sure, while DCP isn't there
08:36marcanfor the lid I was already planning a macsmc-hid thing, should be really easy to do
08:36marcanwe also get the power button that way
08:38kettenisdoes the smc actually provide HID packets of some sort?
08:44svenyup, that’s the one :)
08:46j`eyso maybe rpi + servo + mini could work!
08:48svenor just ask aws nicely if they could give you one of these sleds :D
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:22Glanzmannmps: Thank you I'll have a look at it.
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
09:43marcanstreaming installer stuff in a bit
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:10svenHi, I know that I shouldn't do X, but let me do X anyway!
10:10j`eyI guess that's what the next blog will be about, so in N weeks where N is probably 3
10:10j`eyor 2, or maybe 4
10:13bestouff[m]sven: ... more let me do Y instead, where X is a derivative of Y
10:13svenand how does that make it any better?
10:13psykosethe next blog post gets moved back every time someone asks
10:14psykosethe current expected date is 2037
10:14psykosethank you for your patience
10:14j`eyjeez, we'll be on m50 by then
10:14psykosegonna overtake the bmw model numbers
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:17povikGlanzmann: don't forget mention of audio!
10:17svenand if it takes another weeks possibly also usb 3 ;)
10:17GlanzmannThank you, also forgot rtc.
10:17GlanzmannOkay I add that.
10:17Glanzmannsven: Can I include tb a well?
10:17sveni was half-joking, but no
10:17svenusb 3 seems to be relatively painless
10:17j`eysven: so we need to keep asking markan so that you have time >:D
10:18sventb is seems to be very painful though
10:18mpssven: this is good news
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:18Glanzmannjack 2020 models, wip: usb-3
10:19mpsGlanzmann: audio capture
10:19Glanzmann'stable audio input'
10:19mpsah you added
10:19GlanzmannOkay, I'll rename it.
10:19povikuh, don't wave the 'stable' too much, just to be sure
10:19mpsno, no problem, I just didn't read it carefully
10:20j`eypovik: stable and perfectly working, no bugs, fully guaranteed or your money back
10:20mpsnothing is 'stable' but working
10:20j`eypovik: that's what the github sponsorhip stuff is for ;)
10:20mpsthough it is quite stable for me
10:20Glanzmannpovik: It did not fail for me once since the last patch.
10:20povikuh oh, i didn't read the terms then
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:26povikso i don't think it's fixed yet
10:30povikcould be related to what remains of the m1n1 tipd issue
10:40mpsI don't noticed this problem on MBP
10:40mpss/don't/didn't/
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:43marcankit_ty_kate: no, because of the stub OS
12:44marcanalso that's not Glanzmann's solution, that's my solution :p
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:06Glanzmannkit_ty_kate: The problem is the wifi firmware.
13:06GlanzmannWe're not allowed to redistribute it.
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:26Glanzmannmps: That is what the ipfw is about.
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:35GlanzmannAnd only get that chunk.
13:36the_lanetly_052 has joined #asahi
13:37sventhe installer already only streams the parts of the IPSW it actually needs afaik
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:30marcanGlanzmann: it is not just about the firmware
15:30marcanit is about the whole stub OS
15:30marcanincluding the entire macOS recovery environment
15:31marcanalso it's "ipsw"
15:31marcankit_ty_kate: it is 1GB+ of nonredistributable stuff you have to download from apple
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:33marcanyou mean phone home?
15:33marcanthe installer already switches to reduced security to avoid any phone home calls
15:33marcanhaven't actually tested it 100% offline but it *should* work
15:33tpw_rulesit always took a weirdly long time so i thought that's what it was doing
15:33marcanI'll do that once I plumb in the sparse ipsw stuff
15:34marcanit's talking to SEP
15:34marcanand resigning all boot policies
15:34marcanand the more junk boot policies you have left over, the slower it gets
15:34tpw_rulescan you clear them out?
15:34marcaninstalling n OSes is O(n²) time the way this is designed
15:34marcanyes, I wrote a cleanup script during today's stream
15:35j`ey(right near the start)
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:54marcanthat's why I wrote the whole manifest thing
15:55marcanso you can compare that to find out if it changed
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:02mpsmarcan: that sounds good as solution
16:02mpsthough I will always install all manually
16:02the_lanetly_052__ has quit [Ping timeout: 480 seconds]
16:04marcanthat's why there's a "just give me the bootloader" option
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:24marcankit_ty_kate: it's an ext4 partition image (well, it will be)
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:25Glanzmannmarcan: Of course, I forgot about the rest of the ipsw to setup the stub partition.
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:30Glanzmannj`ey: Can you give me a quick recap how far marcan got with the installer?
17:31j`eyGlanzmann: it creates the partitions from a json file now, and dumps the contents of the image into the partitions
17:31j`eyincluding running the wifi fw script etc
17:32j`ey(oh and creating some detailed logs for debugging)
17:32Glanzmannj`ey: Thank you for the recap. Does it also write the grub and grub configuration already?
17:32GlanzmannI see, but that is a 10 liner for marcan.
17:33marcangrub configuration is in ext4 and not writable for the installer, but it doesn't need to be
17:33GlanzmannIt's pretty easy because 'diskutil list' gives a first number the parition number.
17:33marcanthere is nothing to be changed there
17:33Glanzmannmarcan: So what I did in my installer, I wrote a fake grub config on the efi which loads the kernel.
17:33GlanzmannOnce properly booted, grub can be properly installed.
17:34marcanthe system as installed will use static UUIDs and everything will work out of the box
17:34marcanon first boot I will make it randomize its own UUIDs
17:34marcanthat will involve a grub re-config
17:34marcanthere is no fakery or weirdness involved
17:34Glanzmannmarcan: I see, good idea.
17:34marcanthe image as built will have a real grub config with static UUIDs
17:35GlanzmannAnd than you have some /etc/rc.local or equivalant which extracts the wifi firmware and call resize2fs?
17:35marcanwell, a systemd early unit but yes
17:35marcanone will be one-time and do the disk stuff, the firmware stuff will run on every boot
17:36GlanzmannI see. cool.
17:36tpw_ruleswhy does the firmware one need to run every boot? doesn't that only change if the stub partition is upgraded?
17:36GlanzmannI assume it checks.
17:36GlanzmannAnd extracts if file has changed.
17:36kettenismarcan: EBBR contains a proposal to name firmware directories on an ESP
17:36tpw_rulessure, but that's going to happen like, yearly, right?
17:37marcantpw_rules: that's the point
17:37marcanit can happen
17:37marcanthat's why there's a manifest file, so the script can figure out if anything changed without unpacking everything again
17:37kettenisthe EBBR use case is a little bit different because it is targeted at "AP" firmware
17:38kettenisbut it still might make sense to align with it
17:39marcankettenis: that looks to be about boot-time firmware?
17:39marcannot really what we're doing here, that's more like the stub partition story
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:43kettenisseems that isn't explicitly mentioned in the text though
17:43marcannot going to work; we need symlinks
17:43marcanthat's one reason why I'm using a tarball
17:44marcan(also case sensitivity - that could be a mess on FAT without)
17:44kettenissure, but you could stick the tarball into /FIRMWARE/APPLE or /FIRMWARE/ASAHI
17:45kettenisin the end it probably doesn't matter
17:45marcanyeah but then that makes the mechanism apple-specific
17:45marcanthe idea with this vendor-firmware thing is that other platforms may want to use it to do the same thing
17:45marcani.e. provide vendor-supplied firmware for linux driver consumption
17:45marcan(or bsd for that matter)
17:47marcanhow does bsd do firmware anyway, is it /lib/firmware or is there some other mechanism?
17:48kettenisit is called /etc/firmware (to make sure it lands on the root partition)
17:48marcansame hierarchy though?
17:49kettenisdoesn't strictly match what Linux does
17:49ketteniswe have a tool to update the firmware
17:49marcannot even the wifi stuff?
17:49kettenisso I'm going to look into extending that tool to pick up the firmware from the ESP
17:50kettenisfor bwfm(4) the filenames are the same as what Linux uses
17:51marcanI think everything else will be asahi-specific
17:51marcanso we can just agree on that too and then you won't need to do any weird logic
17:53marcananyway, I should get some sleep
17:53kettenissorry, I lost you, what asahi-specific bits are you thinking of?
17:53marcanAVD and that USB XHCI firmware for the iMacs
17:53kettenisah, right
17:54marcanapple video decoder
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
17:57kettenisso as soon as you push your current work I'll have a closer look
17:58tpw_rulesare you planning on shipping a pre-canned rootfs for the installer?
18:00kettenisthat doesn't make sense
18:00tpw_rulessorry, by "the installer" i mean "the asahi linux 1TR/macOS resident install script"
18:01kettenishow would a filesystem image of some sort help you?
18:02tpw_rulesafaik that's how that installer will install things
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:05kettenisoh, you mean an OpenBSD rootfs?
18:05kettenisNot keen on that
18:05marcanhe wants to go the UEFI-only route for bsd, works for me
18:06marcanthe canned images are an option, not a requirement
18:06tpw_rulesyeah, i was thinking the same for nixos. but it's a bit of a barrier
18:06ketteniswhat may make sense is to copy bsd.rd and BOOTAA64.EFI into the ESP
18:06tpw_rulesi was also wondering about that for nixos, but then that would require modifications to the asahi script
18:06marcanif that's all you need to boot the installer, we could have a "bsd installer" OS option
18:07marcanwhat I wrote today is flexible enough to copy arbitrary trees to the ESP, and otherwise leave the space unpartitioned
18:07tpw_rulescan your json setup thing be changed to allow both the ext4 and ESP as targets?
18:07kettenisFreeBSD an NetBSD do things in a different way I think
18:07marcanit's completely flexible
18:08marcanyou list the partitions and it can copy a raw image, or a tree into the ESP
18:08marcanit can have a partition that stretches to fit the user-specified space or not
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:10marcanwe could move the bulk of the OS definition into there too, to make it self-contained
18:12kettenisI still think I prefer the "install u-boot using the Asahi installer and pretend this is a normal machine afterwards" approach
18:12marcanhttps://mrcn.st/p/e8uvrPQC fwiw, this is what the os defs look like right now
18:12tpw_ruleskettenis: fwiw i do too
18:16mpskettenis: I prefer your 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:18mpsand will help, ofc
18:18mpsactually i think I have POC ready for this
18:19mpsbut I'm not in hurry, waiting for most important things to be in u-boot and kernel mainline
18:22mpsand I know that two experienced alpine developers 'lurking' on both asahi channels ;)
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:16zvGlanzmann: is there a specific page/script you're referring to here?
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:17j`eyzv: but doesnt yet have the stuff that was worked on, on todays stream
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:17mpsGlanzmann: that is ok. but I expect that alpine users are experienced ones
19:18mpsGlanzmann: and alpine 'smells' more like OpenBSD than popular linux distros
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:22mpsGlanzmann: yes, I know. I was on debian more than 15 years
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:23Glanzmannmps: I see. Anyway having different choices is nice. Pick whatever fits best.
19:23mpsGlanzmann: I agree
19:25mpsGlanzmann: and I really appreciate your work and help
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:27mpstpw_rules: and armv7?
19:27mpstpw_rules: don't take this as serious question, please
19:28tpw_rulesi want to say yes? but 32 bit arm is not as supported on nixos
19:29mpstbh I don't know inner points of UEFI and don't like current grub, so have some aversion to this combo
19:30mpsbut I'm not against this, even first alpine installer script for alpine I created with grub
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:05GlanzmannThis is the way.
21:05Glanzmannzv: Or you have another mac and can use macvdmtool to reboot the mac.
21:22eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:26zveep. not currently an option.
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:27svenah. that makes it much harder unfortunately
21:27j`eywhat do you mean the issue is memory?
21:28svenhm, wait, or maybe I just got confused
21:28svendo you develop qemu and need Linux to run in EL2 for that?
21:29zvoh, perhaps I misunderstood. I read "run Linux inside a hypervisor".
21:29svenno, that sounds about right. We have a very thin hypervisor inside m1n1
21:29svenit passes through ~everything
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:32zvI see; that will be ttyACM1 ?
21:32Gaspare has quit [Ping timeout: 480 seconds]
21:32tpw_ruleszv: just out of curiosity, do you plan to use 4K or 16K pages?
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:34tpw_rulesah. if you use 4K i don't think it would be different to any other aarch64 machine
21:34tpw_rules16K is also noticeably faster
21:35j`eyits still faster than other machines at 4k
21:36zvsounds like I should aim for 16k then
21:39zvthere is one other issue. when ttyACM0 disappears so does ttyACM1
21:40j`eywhat kinda exception causes it to disappear?
21:41tpw_ruleszv: they disappear under different circumstances in the hypervisor
21:43zvI don't recall; will let you know next time I do that.
21:44j`eyas sven has said many times, USB is cursed
21:45j`eyif the HV loses USB, there's not really much you can do
21:47zvare there any interesting headers inside? haven't opened it up.
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
21:59j`eysven: the USD PD is very reliable right?
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:03j`eyfor a remote mini, it seems like the best option
22:04sventhe only thing it can’t do is power on a mini that’s turns off fwiw
22:05svenand I haven’t figured out how to reliably enable “auto power on” yet
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:08j`eythat didn't happen
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:21j`eyjemalloc compiles the page size into it
22:22j`ey(so works with if compiled with 16k, but isnt portable)
22:23tpw_ruleslibunwind and webkitgtk
22:26zvare there kernel patches to enable a 2020 mac mini to use a usb-a keyboard?
22:28j`eyzv: does it not work?
22:28jannauzv: with an upstream kernel? the usb-a ports should work
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:30j`ey4k or 16k kernel?
22:30zvgreat question
22:31tpw_rulesyeah the usb-a ports don't work in u-boot but they should work once the kernel comes up?
22:31tpw_rulesdo you not have a usb a to c adapter?
22:32jannauerr, with the asahi branch the usb-c ports should work
22:32zvI do, but it doesn't fit when I have the usb/serial cable attached and HDMI too
22:34j`eythe type A ports need the 4k IOMMU patch right?
22:34zvso CONFIG_ARM64_4K_PAGES=y
22:34tpw_ruleswell if you are using a 4k kernel
22:34tpw_ruleslike i implied earlier, give 16 a try
22:34tpw_ruleshopefully it breaks things and then users fix them :)
22:34tpw_ruless/users/developers/
22:34zvI will try 16 now
22:35j`eyzv: check dmesg? any errors?
22:37zvlet me prepare a rootfs first. (OK to do so on the nvme, just one partition?)
22:37mpskit_ty_kate: f2fs doesn't with 16K page size
22:37mpsonly with 4K
22:37j`eyzv: yeah one partition is fine if youre using the m1n1 hv
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:41mpskit_ty_kate: I don't have github account
22:41joske has joined #asahi
22:42joskekit_ty_kate: add vscode, electron
22:42joskebalena etcher
22:42mpskit_ty_kate: so please add f2fs
22:42joskeall those use chromium underneath, so all are broken on 16k pages
22:44mpskit_ty_kate: thanks
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:50joskeas do all electron apps, they run in a chromium window
22:51joskeso I want to use vscode in linux, so I need 4k pages ;-)
22:51joskeand now I can thanks to sven's patch
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
22:56joskeI doubt that chromium will fix this any time soon
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:05joskej`ey: no idea, chrome works on iphones I guess
23:05joskemaybe there is a custom build for iOS
23:10jannauI would expect that chrome/chromium works natively on macos with 16k pages by now
23:12joskeaccording to this bug, it does on macOS
23:16newchima[m]j`ey: it appears that they handle Apple specifically 2 lines above, but this isn't "apple" during the build
23:17j`eynewchima[m]: exactly, and it's weird that they just hardcode it to 4096 otherwise
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:24j`eyproblem is that it will pessimise the code
23:29newchima[m]jannau: I see... still above my experience :)
23:30jannauthey prefer the constexpr -> const downgrade over increasing the page size
23:31j`eythe best way would be to only use sysconf() on Linux+arm64, keeping android a constant
23:32jannauthe argument about the increased memory footprint is more important for aarch86 than for x86_64 under rosetta
23:32j`eyaarch86? lol
23:32joske has quit [Quit: Leaving]
23:33jannaubut aarch64 + linux might be too important for google due to chromebooks
23:33j`eyforgot about chromebooks
…