#
…

2022-08-03

00:06mofux[m] has joined #asahi-re
00:09nik875[m]alright i watched one of marcan's streams and got as far as attempting to change boot policy for a second macos installation on my target device
00:10nik875[m]running bputil -nkcas in 1tr gave me this error:
00:10nik875[m]Boot objects update failed for /Volumes/macOS RE: Error Domain=BYErrorDomain Code=401 "Failed to create local policy" UserInfo=(NSLocalizedDescription=Failed to create local policy, NSUnderlyingError=®x60000009d380 (Error Domain=com.apple.bootpolicy Code=11 "AP boot mode (11)" UserInfo={NSLocalizedDescription=AP boot mode (11)}}}
00:10nik875[m]anyone know what might be going on here
00:10nik875[m]* on here?
00:11AlbertoBasaglia[m] has joined #asahi-re
00:16joerosenberg[m] has joined #asahi-re
00:31dani0611[m] has joined #asahi-re
00:35nunoxyz[m] has joined #asahi-re
01:01nik875[m]possibly more helpful error from when i tried to run csrutil disable:... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/gpGIEiXTVFaBESwsGxDUgHEv)
01:03chadmedyou need to bless the partition youre trying to change the boot policy for so that its the nominated startup disk
01:04nik875[m]so do the option-click thing for always use?
01:04chadmedon versions of macOS >12.0, the system-wide 1TR is no longer used and the SEP "pairs" the recovery from the nominated startup disk to be the 1TR environment. if you try to change security settings on a volume that isnt paired to that particular rOS then it doesnt work
01:10ceinem has quit [Quit: Textual IRC Client: www.textualapp.com]
01:27amarioguynik875[m]: make sure you're in 1TR
01:27amarioguyoh lol it's answered nvm
02:03nik875[m]another error at the same step, running csrutil disable gives:
02:03nik875[m]The OS environment does not allow changing security configuration options.
02:04marcanyou're not in 1tr
02:04marcan"AP boot mode" means it's not 1TR
02:04marcanthat means you didn't do the power button hold dance properly
02:04nik875[m]okay okay hang on
02:05nik875[m]i thought that you held the power button for 5 seconds during startup to go to startup options
02:05marcanyes, you do
02:05nik875[m]then you select options to enter macos recovery, then select the second macos installation
02:05marcanbut if you double tap it, accidentally release it, etc. you can end up in startup options that is *not* 1TR
02:05marcan1TR is not just "startup options"
02:05marcan1TR is a very specific mode that is more stringent in the exact thing you did
02:06nik875[m]that's probably the issue then lol, lemme try again
02:06marcanmake sure the machine is fully off, wait a few extra seconds
02:06marcanthen press once and do not let go until startup options appears
02:07marcanthe pairing thing is something else; you can only change boot settings for the volume that is currently the default boot volume. both are required.
02:07marcanone way to end up in both of those situations is to double-tap power. that gets you into system recoveryOS, which is neither 1TR nor paired to anything
02:07marcanso that could be what you did
02:08nik875[m]Out of curiosity, is there any way to tell once you’re in recoveryOS whether it’s 1tr?
02:08marcan`bputil -d` should tell you
02:09marcanlook for "Current OS environment:"
02:09marcanone of 'macOS', 'one true recoveryOS', 'recoveryOS'
02:10marcancould be "OS Type" instead, in another version
02:17nik875[m]marcan: that worked, thanks!
02:17nik875[m]next question i have is how to install m1n1 as a custom boot object, does that just mean run the asahi installer for m1n1?
02:18nik875[m]or is there some special configuration that links m1n1 to the macos partition?
02:28amarioguynik875[m]: nowadays i believe you just allocate some free space and the asahi installer will more or less do it for you
02:29amarioguybut you can use kmutil to do it as well, if for example the partition you wish to associate m1n1 with is a macOS install
02:30amarioguykmutil configure-boot will have the details (entry-point is 2048, lowest-virtual-address is 0
02:30nik875[m]I used kmutil on the macOS partition according to the hypervisor documentation, is that what you mean?
02:31amarioguywhat was the command you used
02:31nik875[m]Kmutil create with a lot of options that I copy pasted
02:32amarioguythis needs to be done from 1tr again
02:32nik875[m]Rip lol, what’s wrong with that?
02:32amarioguythe hypervisor page is what creates a kernelcache
02:32amarioguythat command is for linking the kernel/kexts together to make a dev kernelcache that's bootable with m1n1
02:33amarioguyso you can use symbols apple provides via the KDK
02:33nik875[m]Is that not what we want lol?
02:33amarioguythat's what you want if you need to create a kernelcache
02:33amarioguyyour question was to install a custom boot object
02:33amarioguyyou need to be in 1tr to actually install the custom boot object
02:34nik875[m]Well yes, installing a custom boot object is part of the documentation for setting up the hypervisor
02:34amarioguyyou're on step 4 right?
02:36amarioguycreating the kernelcache is one thing, setting m1n1 as a custom boot object is another (the command to set the boot object is kmutil configure-boot -c [path to m1n1.bin] --entry-point 2048 --lowest-virtual-address 0)
02:36amarioguyremember that you need to be in 1tr to *actually set* the boot object
02:37PhilippvK has joined #asahi-re
02:38nik875[m]Where is the m1n1 bin? The build from the repo is supposed to be on the host machine I thought?
02:38chadmedyou have to copy it over to the rOS environment somehow
02:38chadmedyou can either use scp or start the python http server in the build dir and use curl
02:39amarioguyi believe macOS volumes are accessible from rOS too
02:39nik875[m]Huh okay, I can scp it
02:40phiologe has quit [Ping timeout: 480 seconds]
02:49nik875[m]Missing the —volume argument it seems
02:53amarioguybtw i can say now that from very very initial testing
02:53amarioguym2 does in fact support maintenance interrupts now lol
02:54amarioguyidk if this was found out already but here you go
02:54nik875[m]nik875[m]: Also says “could not find mount point” when I select the correct volume, even after running diskutil mount
02:57amarioguy(on maintenance interrupts ICH_MISR_EL2 is configurable and register changes behaves as the spec says it should, furthermore having maintenance interrupts pending and enabling virtual interrupts results in an interrupt storm as there's no handling for this)
02:58amarioguyin m1n1 anyways
03:00amarioguynik875[m]: general dev questions usually go in asahi-dev
04:01doggkruse has joined #asahi-re
05:32doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:38marcanyou don't need to create a kernelcache, you can just use a retail one
05:38marcanwe need to stop pushing that story, 99% of the time it's not necessary. I haven't used dev kernelcaches in forever.
05:38marcanthose were only useful for some really early hypervisor debugging
05:54bisko has joined #asahi-re
06:53CatDentures has joined #asahi-re
07:03nicolas17 has quit [Ping timeout: 480 seconds]
07:51eeqk[m] has joined #asahi-re
08:13MajorBiscuit has joined #asahi-re
08:49everfree has quit [Quit: leaving]
08:49everfree has joined #asahi-re
09:00the_lanetly_052 has joined #asahi-re
09:04j`eyamarioguy: interesting, do you have linux running? maybe you can try enable the maint irq, if not maybe markan or jann4u can
10:19MajorBiscuit has quit [Quit: WeeChat 3.5]
10:40TiangangYang[m] has joined #asahi-re
10:41dingodoppelt_ has quit [Quit: ZNC 1.9.x-git-170-9be0cae1 - https://znc.in]
10:41dingodoppelt has joined #asahi-re
10:52amarioguyj'ey: i can do enablement on that sure
10:54amarioguystill gotta fix the i2c stuff as well anyways so i can do this soon enough
11:11amarioguythough i do want to do some more testing on this before i commit to making the patch series lol
11:27CatDentures has quit [Quit: leaving]
11:43MajorBiscuit has joined #asahi-re
12:15marcanyou want to talk to maz (who isn't here) about the kvm stuff
13:23Guest6943 has quit []
13:23DragoonAethis has joined #asahi-re
13:33mini0n has joined #asahi-re
13:35nicolas17 has joined #asahi-re
14:48duban has quit [Ping timeout: 480 seconds]
14:52duban has joined #asahi-re
14:59doggkruse has joined #asahi-re
16:32doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:33doggkruse has joined #asahi-re
16:35MajorBiscuit has quit [Ping timeout: 480 seconds]
16:52doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:03doggkruse has joined #asahi-re
18:17the_lanetly_052 has quit [Ping timeout: 480 seconds]
18:41MajorBiscuit has joined #asahi-re
20:36mini0n has quit [Read error: Connection reset by peer]
21:09doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:23doggkruse has joined #asahi-re
22:18MajorBiscuit has quit [Ping timeout: 480 seconds]
22:44nsklaus_ has quit [Read error: Connection reset by peer]
22:44nsklaus has joined #asahi-re
22:44nsklaus has quit [Read error: Connection reset by peer]
22:45nsklaus has joined #asahi-re
22:49MajorBiscuit has joined #asahi-re
23:11MajorBiscuit has quit [Ping timeout: 480 seconds]
23:47surgeon[m] has joined #asahi-re
…