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