2021-09-12
00:42tomtastic has quit [Quit: ZNC - https://znc.in]
00:42tomtastic has joined #asahi
01:15dfip^ has quit [Ping timeout: 480 seconds]
01:30kettenis has joined #asahi
01:32___nick___ has joined #asahi
02:05chadmednoob-tier question, is there a particular technical reason why one might want to expose the UEFI interface on these machines other than to make the Linux experience more PC-like? the only obvious thing I can think of is it might make the life of distro kernel maintainers a little easier, but UEFI is... problematic... and i can see some users specifically complaining about it if made a requirement
02:06chadmedbut then again those users would probably have far bigger philosophical issues with this platform than needing to use UEFI
02:13marcanUEFI allows distributions to use the same installation process as on ARM SystemReady platforms (and x86), with GRUB and such, which users are used to and things integrate with
02:14marcanthe OS still needs to be modified; *bootloaders* don't, and thus neither does a lot of the installation machinery
02:14marcanthat means once we upstream things into the kernel/userspace, distros don't have to do *anything*
02:14marcanyou just install m1n1+u-boot, plug in a USB install image, and it just works like on any other machine
02:15marcanwe are going to be using the UEFI implementation that is part of U-Boot; we are not throwing EDK2 on here
02:17marcanOSes can only use an extremely restricted set of services, basically the framebuffer that is already set up and EFI variable storage
02:17phireI though OSes could continue to use UEFI interfaces after boot as a fallback for not having a driver. Guess I was wrong
02:18chadmedyeah no i dont have a personal problem with using it. it is disliked mostly in infosec circles because it is a large and complex interface (generally something youd want to avoid for security reasons) and non-libre. like i said though, these sorts of people likely have far bigger things to complain about with this platform than the UEFI
02:20marcanof course once manufacturers go and put that on devices they throw in a million proprietary modules
02:20marcanbut this isn't even that, this is a completely separate implementation in U-Boot, which has nothing to do with EDK2 as far as I know
02:21chadmedyeah ive worked with uboot precisely once but didnt really pay attention to what parts of uefi it actually incorporates
02:21marcanthere are of course technical reasons not to like UEFI's design (e.g. the fact that it uses the Windows PE executable format of all things), but those are minor gripes; the reality is that for better or for worse it's a standard well worth supporting
02:22marcanof course if you want to build U-Boot without UEFI support and install that with m1n1, you are completely free to do that too :)
02:22marcanthen you get to roll your own install tooling though, most mainstream distros won't be managing U-Boot configs for you
02:23chadmedwell yeah if youre building your own kernel youll be able to load it and the dt straight from m1n1 like is possible now, right?
02:24marcanyeah though I wouldn't recommend skipping U-Boot, because it means you have to go into macos recovery for every kernel update
02:25marcanthe point of the m1n1 -> U-Boot -> GRUB chain is that each step of the way gets closer to distro/user-friendly management
02:26chadmedyeah and once youre out of boot services theres no difference to the user experience while the machine is running, apart from not having to mess around with macos every time theres a kernel update
02:27yuyichao has quit [Quit: Konversation terminated!]
02:29marcanso we might still need to have users manually move grub if installed to a nondefault path, or patch u-boot to recognize "typical" boot paths for distros, to make it properly seamless
02:29yuyichao has joined #asahi
02:30marcansince unless we use the M1's actual nvram (which seems reeeeal hairy), we'd have to store variables on disk
02:30marcanOTOH, it would be possible to just patch efibootmgr to access efivars differently, or even if u-boot uses an EFI variable storage as flat files, just bind mount that into /sys/firmware/efi/efivars
02:33chadmedits probably worth finding ways to avoid exposing the machine's nvram at all costs. someone will inevitably brick their machine if they have the means to do so
02:35marcanOTOH I've heard that, in fact, these machines *are* fully unbrickable via DFU even if you manage to nuke the entire NOR
02:35marcanI guess that works by grabbing certs/calibration from the mothership? which is neat if it works
02:43tomtastic_ has joined #asahi
02:44tomtastic has quit [Ping timeout: 480 seconds]
02:50malvo has quit [Ping timeout: 480 seconds]
02:51malvo has joined #asahi
02:56PhilippvK has joined #asahi
03:00phiologe has quit [Ping timeout: 480 seconds]
03:44marvin24_ has joined #asahi
03:47marvin24 has quit [Ping timeout: 480 seconds]
04:57zigmars has quit [Remote host closed the connection]
05:04zigmars has joined #asahi
05:12zigmars has quit [Ping timeout: 480 seconds]
05:22zigmars has joined #asahi
05:31zigmars has quit [Ping timeout: 480 seconds]
05:33zigmars has joined #asahi
05:38sorearcan the fuses be used to brick the soc during usage or do they have a "lock out fuse writes" fuse
05:58amwmarcan: I'm testing your installer again so I can update the wiki but it's failing with "Unable to determine primary OS" - https://paste.debian.net/1211454/
07:02amwI think my problem might be because I upgraded MacOS 11.5.2 (was 11.4 when it worked last time)
08:08aleasto has joined #asahi
08:36marcanif you have multiple installs in one APFS container it won't work, I need to rearchitect things a bit to fix that
08:36j_eyamw: if you want to debug the code, im pretty sure the issue is that https://github.com/AsahiLinux/asahi-installer/blob/bfbd5dbca42ae772949a03426c0bbdea4ce87ac7/src/osenum.py#L45 is returning early, just not sure which part is failing
09:03akemin_dayo has quit [Ping timeout: 480 seconds]
09:05riker77 has quit [Quit: Quitting IRC - gone for good...]
09:15riker77 has joined #asahi
09:16Benjamin2365 has joined #asahi
09:20Benjamin2365 has quit [Remote host closed the connection]
09:20Benjamin2365 has joined #asahi
09:21akemin_dayo has joined #asahi
09:37Benjamin2365 has quit [Quit: Page closed]
09:37Benjamin2365 has joined #asahi
09:42Benjamin2365 has quit []
09:45kettenis has quit [Ping timeout: 480 seconds]
10:00abilash1994[m] has joined #asahi
10:03kettenis has joined #asahi
10:23amwmarcan: I don't know which partition you want - so all are here https://paste.debian.net/1211464/
10:52Tom__ has joined #asahi
10:59StupidYui has quit [Ping timeout: 480 seconds]
11:16zigmars has quit [Remote host closed the connection]
11:17zigmars has joined #asahi
11:36jmcneillmarcan: U-Boot can provide quite a few UEFI runtime services apart from variable services
11:41jmcneillNetBSD will use UEFI RT services for RTC access and if PSCI isn't available, for shutdown/reset
13:17zigmars has quit [Remote host closed the connection]
13:23zigmars has joined #asahi
13:31zigmars has quit [Ping timeout: 480 seconds]
13:49zigmars has joined #asahi
13:51zigmars_ has joined #asahi
13:51zigmars has quit [Read error: Connection reset by peer]
13:59zigmars_ has quit [Ping timeout: 480 seconds]
14:01zigmars has joined #asahi
14:09zigmars has quit [Ping timeout: 480 seconds]
14:47svenshutdown may a bit tricky. it requires talking to the SMC co-processor which can't easily be multiplexed between the os and u-boot. and the os will probably need to talk to SMC for e.g. enabling wifi
15:02everslick_ has joined #asahi
15:08everslick has quit [Ping timeout: 480 seconds]
15:41zigmars has joined #asahi
15:49zigmars has quit [Ping timeout: 480 seconds]
15:51boardwalk has quit [Quit: The Lounge - https://thelounge.chat]
16:42jmcneillfor shutdown/reset your OS stack is probably quiescent or crashed by the time you make those calls, so it's not as much of a problem
16:44sventrue. i guess uboot could just reinitialize communication with SMC at that point and send the shutdown command
16:48method_ has joined #asahi
16:50kettenisthis includes the ResetSystem() call so we don't have to bend over backwards to implement that in u-boot
16:52Method has quit [Ping timeout: 480 seconds]
16:55Andalu30 has joined #asahi
16:58kettenisNot being able to set the BootOrder variable and others isn't really an issue if you don't install multiple OSes that boot via UEFI as the removable media boot flow will just work
16:59kettenisI believe most of the arm64 linux distros that use the UEFI bootflow can handle that already and so can OpenBSD
17:25marcankettenis: I don't know if this is different on arm64, but at least on x86 it's common to put grub on a nonstandard path and rely on BootOrder to point to it
17:42Andalu30 has quit [Ping timeout: 480 seconds]
17:53jvoisin has joined #asahi
17:58lanodan has quit [Quit: WeeChat 3.1]
18:11zigmars has joined #asahi
18:42lanodan has joined #asahi
19:04aleasto has quit [Remote host closed the connection]
19:10psykose has quit [Remote host closed the connection]
19:17zigmars has quit [Remote host closed the connection]
19:32zigmars has joined #asahi
19:35zigmars has quit [Remote host closed the connection]
19:38boardwalk has joined #asahi
19:49nsklaus_ has quit [Quit: WeeChat 3.2]
19:50nsklaus has joined #asahi
20:14zigmars has joined #asahi
20:34lanodan has quit [Quit: WeeChat 3.1]
20:58bpye has quit [Quit: The Lounge - https://thelounge.chat]
21:05bpye has joined #asahi
21:12lanodan has joined #asahi
21:46zigmars has quit [Remote host closed the connection]
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:01yrlf has joined #asahi
22:20Darksecond has quit [Read error: Connection reset by peer]
22:20Darksecond has joined #asahi
22:24akemin_dayo has quit [Ping timeout: 480 seconds]
22:25ella-0[m] has quit [Ping timeout: 480 seconds]
22:31ella-0[m] has joined #asahi
22:40___nick___ has quit [Ping timeout: 480 seconds]