]>
Commit | Line | Data |
---|---|---|
42ba9b40 TG |
1 | #!/usr/bin/perl |
2 | ||
3 | my $esp_line = `diskutil list disk0 | grep EFI`; | |
4 | ||
5 | my $esp_disk = undef; | |
6 | ||
7 | if ($esp_line =~ /(disk0s\d)/) { | |
8 | $esp_disk = $1; | |
9 | } | |
10 | ||
11 | die unless defined $esp_disk; | |
12 | ||
13 | my $partuuid = `diskutil info $esp_disk | grep 'Partition UUID' | awk -F: '{print \$2}'`; | |
14 | ||
15 | $partuuid =~ s/\s+//g; | |
16 | ||
17 | my $m1n1 = `curl -sL tg.st/u/m1n1-rust.bin`; | |
18 | ||
19 | open(OBJECT, '>', 'object.bin') || die; | |
20 | print OBJECT $m1n1; | |
21 | print OBJECT "chainload=$partuuid;m1n1/boot.bin\n"; | |
22 | print OBJECT "chosen.asahi,efi-system-partition=$partuuid\n"; | |
23 | close (OBJECT); | |
24 | ||
25 | system('kmutil configure-boot -c object.bin --raw --entry-point 2048 --lowest-virtual-address 0 -v /Volumes/Debian'); |