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