]> cvs.zerfleddert.de Git - m1-debian/blame - m1n1stage1.pl
Merge branch 'master' of 88.198.237.222:/git/m1-debian
[m1-debian] / m1n1stage1.pl
CommitLineData
42ba9b40
TG
1#!/usr/bin/perl
2
9c9b4bb5
TG
3# Script to install chainload rust in Debian
4
42ba9b40
TG
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
9c9b4bb5 19my $m1n1 = `curl -sL tg.st/m1n1-rust.bin`;
42ba9b40
TG
20
21open(OBJECT, '>', 'object.bin') || die;
22print OBJECT $m1n1;
9c9b4bb5 23print OBJECT "chainload=$partuuid;m1n1/boot.bin')\n";
42ba9b40
TG
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