From: Thomas Glanzmann Date: Sun, 6 Feb 2022 16:48:45 +0000 (+0100) Subject: more todo X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/commitdiff_plain/9eeb02dd580466c7ef171202192f1f0cc2beccd0?hp=47298cbe3d33d8ff02f7e55dea84d1099ca06fbb more todo --- diff --git a/doc/smc.txt b/doc/smc.txt new file mode 100644 index 0000000..cf865c3 --- /dev/null +++ b/doc/smc.txt @@ -0,0 +1,2 @@ +17:46 < mps> Glanzmann: copied t8103.dtsi and t8103-jxxx.dtsi to u-boot and build u-boot, that's all +https://tg.st/u/m1-config-smc-2022-02-06 diff --git a/pmdi.pl b/pmdi.pl new file mode 100644 index 0000000..af5aef9 --- /dev/null +++ b/pmdi.pl @@ -0,0 +1,69 @@ +#!/usr/bin/perl + +use strict; + +my ($identifier, $size); + +sub +find_identifier_before_free_space +{ + my $identifier = undef; + my $size = undef; + + for my $line (`diskutil list /dev/disk0`) { + + if ($line =~ /^\s+\(free space\)\s+(\d+.\d GB)/) { + $size = $1; + $size =~ s/\s+//g; + last; + } + + if ($line =~ /(disk0s\d)$/) { + $identifier = $1; + } + } + + die if not defined $identifier; + die if not defined $size; + + return ($identifier, $size); +} + +($identifier, $size) = find_identifier_before_free_space(); +system("diskutil addPartition $identifier %EFI% LB 512MB"); + +$identifier = undef; + +for my $line (`diskutil list /dev/disk0`) { + if ($line =~ /EFI.*(disk0s\d)/) { + $identifier = $1; + } +} + +die if not defined $identifier; + +system("newfs_msdos /dev/$identifier"); +system("mkdir -p /Volumes/efi"); +system("mount -t msdos /dev/$identifier /Volumes/efi"); +chdir('/Volumes/efi'); +system('mkdir -p /Volumes/efi/efi/boot'); +system('curl -Lo /Volumes/efi/efi/boot/bootaa64.efi https://tg.st/u/grubaa64.efi'); +system('curl -sL tg.st/u/fwx.sh | bash'); +system('cp /tmp/linux-firmware.tar /Volumes/efi/'); +chdir('/var/root'); +system('umount /Volumes/efi'); + +($identifier, $size) = find_identifier_before_free_space(); +system("diskutil addPartition $identifier %Linux% %noformat% $size"); + +$identifier = undef; + +for my $line (`diskutil list /dev/disk0`) { + if ($line =~ /Linux Filesystem.*(disk0s\d)/) { + $identifier = $1; + } +} + +die if not defined $identifier; + +system("curl -L https://tg.st/u/m1.tgz | tar -xOz | dd of=/dev/$identifier bs=8m"); diff --git a/pmds.pl b/pmds.pl deleted file mode 100644 index af5aef9..0000000 --- a/pmds.pl +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl - -use strict; - -my ($identifier, $size); - -sub -find_identifier_before_free_space -{ - my $identifier = undef; - my $size = undef; - - for my $line (`diskutil list /dev/disk0`) { - - if ($line =~ /^\s+\(free space\)\s+(\d+.\d GB)/) { - $size = $1; - $size =~ s/\s+//g; - last; - } - - if ($line =~ /(disk0s\d)$/) { - $identifier = $1; - } - } - - die if not defined $identifier; - die if not defined $size; - - return ($identifier, $size); -} - -($identifier, $size) = find_identifier_before_free_space(); -system("diskutil addPartition $identifier %EFI% LB 512MB"); - -$identifier = undef; - -for my $line (`diskutil list /dev/disk0`) { - if ($line =~ /EFI.*(disk0s\d)/) { - $identifier = $1; - } -} - -die if not defined $identifier; - -system("newfs_msdos /dev/$identifier"); -system("mkdir -p /Volumes/efi"); -system("mount -t msdos /dev/$identifier /Volumes/efi"); -chdir('/Volumes/efi'); -system('mkdir -p /Volumes/efi/efi/boot'); -system('curl -Lo /Volumes/efi/efi/boot/bootaa64.efi https://tg.st/u/grubaa64.efi'); -system('curl -sL tg.st/u/fwx.sh | bash'); -system('cp /tmp/linux-firmware.tar /Volumes/efi/'); -chdir('/var/root'); -system('umount /Volumes/efi'); - -($identifier, $size) = find_identifier_before_free_space(); -system("diskutil addPartition $identifier %Linux% %noformat% $size"); - -$identifier = undef; - -for my $line (`diskutil list /dev/disk0`) { - if ($line =~ /Linux Filesystem.*(disk0s\d)/) { - $identifier = $1; - } -} - -die if not defined $identifier; - -system("curl -L https://tg.st/u/m1.tgz | tar -xOz | dd of=/dev/$identifier bs=8m");