curl -s https://tg.st/u/0001-4k-iommu-patch.patch | git am -
curl -s https://tg.st/u/DXyl.patch | git am -
curl -s https://tg.st/u/0001-apple-mca-correct-prinkts.patch | git am -
- curl -s https://tg.st/u/0001-Hookup-gpio-backlight.patch | git am -
+ curl -s https://tg.st/u/0001-Hookup-backlight-for-MacBook-Pro-13-inch-M1-2020-J29.patch | git am -
curl -s https://tg.st/u/XKVZ.patch | git am -
curl -s https://tg.st/u/config-2022-02-19 > .config
make olddefconfig
cd testing
+ sudo rm etc/fstab
+
+ sudo mkdir -p boot/efi
+
sudo bash -c 'echo live > etc/hostname'
sudo bash -c 'echo > etc/motd'
sudo cp ../../files/sources.list etc/apt/sources.list
sudo cp ../../files/hosts etc/hosts
sudo cp ../../files/resolv.conf etc/resolv.conf
- sudo cp ../../files/fstab etc/fstab
sudo cp ../../files/quickstart.txt root/
sudo cp ../../files/interfaces etc/network/interfaces
sudo cp ../../files/wpa.conf etc/wpa_supplicant/wpa_supplicant.conf
+ sudo cp ../../files/rc.local etc/rc.local
sudo bash -c 'chroot . apt update'
sudo bash -c 'chroot . apt install -y firmware-linux'
tune2fs -O extents,uninit_bg,dir_index -m 0 -c 0 -i 0 media
sudo mount -o loop media mnt
sudo cp -a testing/* mnt/
+ sudo touch mnt/etc/fstab
sudo rm mnt/init
sudo umount mnt
tar cf - media | pigz > m1.tgz
)
}
+build_efi()
+{
+(
+ rm -rf EFI
+ mkdir -p EFI/boot EFI/debian
+ cp testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi EFI/boot/bootaa64.efi
+
+ export INITRD=`ls -1 testing/boot/ | grep initrd`
+ export VMLINUZ=`ls -1 testing/boot/ | grep vmlinuz`
+ export UUID=`blkid media | awk -F\" '{print $2}'`
+ cat > EFI/debian/grub.cfg <<EOF
+search.fs_uuid ${UUID} root
+linux (\$root)/boot/${VMLINUZ} root=UUID=${UUID} rw
+initrd (\$root)/boot/${INITRD}
+boot
+EOF
+ tar czf efi.tgz EFI
+)
+}
+
build_di_stick()
{
rm -rf di-stick
{
export KERNEL=`ls -1rt linux-image*.deb | grep -v dbg | tail -1`
cp ${KERNEL} k.deb
- sudo cp m1-d-i.tar m1.tgz asahi-debian-live.tar u-boot.bin u-boot.macho di-stick/vmlinuz k.deb m1n1/build/m1n1.bin m1n1/build/m1n1.macho /u/
+ sudo cp m1-d-i.tar m1.tgz efi.tgz asahi-debian-live.tar u-boot.bin u-boot.macho di-stick/vmlinuz k.deb m1n1/build/m1n1.bin m1n1/build/m1n1.macho testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi /u/
}
mkdir -p build
build_live_stick
build_di_stick
build_dd
+build_efi
publish_artefacts