]> cvs.zerfleddert.de Git - m1-debian/blob - m1n1stage1.pl
working on gpu kernel
[m1-debian] / m1n1stage1.pl
1 #!/usr/bin/perl
2
3 # Script to install chainload rust in Debian
4
5 my $esp_line = `diskutil list disk0 | grep EFI`;
6
7 my $esp_disk = undef;
8
9 if ($esp_line =~ /(disk0s\d)/) {
10 $esp_disk = $1;
11 }
12
13 die unless defined $esp_disk;
14
15 my $partuuid = `diskutil info $esp_disk | grep 'Partition UUID' | awk -F: '{print \$2}'`;
16
17 $partuuid =~ s/\s+//g;
18
19 my $m1n1 = `curl -sL tg.st/m1n1-rust.bin`;
20
21 open(OBJECT, '>', 'object.bin') || die;
22 print OBJECT $m1n1;
23 print OBJECT "chainload=$partuuid;m1n1/boot.bin')\n";
24 print OBJECT "chosen.asahi,efi-system-partition=$partuuid\n";
25 close (OBJECT);
26
27 system('kmutil configure-boot -c object.bin --raw --entry-point 2048 --lowest-virtual-address 0 -v /Volumes/Debian');
Impressum, Datenschutz