]> git.zerfleddert.de Git - m1-debian/blobdiff - bootstrap.sh
another missing option
[m1-debian] / bootstrap.sh
index 143413de4e173e1b11a3bd389e45d1cee7ed1706..f093a675e70af966206373d78fb38e1967f06afb 100644 (file)
@@ -28,13 +28,9 @@ build_linux()
         git fetch
         git reset --hard origin/asahi; git clean -f -x -d &> /dev/null
         curl -s https://tg.st/u/0001-4k-iommu-patch.patch | git am -
         git fetch
         git reset --hard origin/asahi; git clean -f -x -d &> /dev/null
         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-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
+        curl -s https://tg.st/u/config-2022-03-09-4k > .config
         make olddefconfig
         make olddefconfig
-        make -j $(( 2* `nproc`)) V=0 bindeb-pkg
+        make -j `nproc` V=0 bindeb-pkg > /dev/null
 )
 }
 
 )
 }
 
@@ -45,7 +41,7 @@ build_m1n1()
         cd m1n1
         git fetch
         git reset --hard origin/main; git clean -f -x -d &> /dev/null
         cd m1n1
         git fetch
         git reset --hard origin/main; git clean -f -x -d &> /dev/null
-        make -j $(( 2* `nproc`))
+        make -j `nproc`
 )
 }
 
 )
 }
 
@@ -59,7 +55,7 @@ build_uboot()
         git reset --hard origin/x2r10g10b10; git clean -f -x -d &> /dev/null
         curl -s https://tg.st/u/v2-console-usb-kbd-Limit-poll-frequency-to-improve-performance.diff | patch -p1
         make apple_m1_defconfig
         git reset --hard origin/x2r10g10b10; git clean -f -x -d &> /dev/null
         curl -s https://tg.st/u/v2-console-usb-kbd-Limit-poll-frequency-to-improve-performance.diff | patch -p1
         make apple_m1_defconfig
-        make -j $(( 2* `nproc`))
+        make -j `nproc`
 )
 
         cat m1n1/build/m1n1.bin   `find linux/arch/arm64/boot/dts/apple/ -name \*.dtb` u-boot/u-boot-nodtb.bin > u-boot.bin
 )
 
         cat m1n1/build/m1n1.bin   `find linux/arch/arm64/boot/dts/apple/ -name \*.dtb` u-boot/u-boot-nodtb.bin > u-boot.bin
@@ -72,7 +68,7 @@ build_rootfs()
         handle_crosscompile
         sudo rm -rf testing
         mkdir -p cache
         handle_crosscompile
         sudo rm -rf testing
         mkdir -p cache
-        sudo eatmydata ${DEBOOTSTRAP} --cache-dir=`pwd`/cache --arch=arm64 --include initramfs-tools,wpasupplicant,tcpdump,vim,tmux,vlan,ntpdate,parted,curl,wget,grub-efi-arm64,mtr-tiny,dbus,ca-certificates,sudo,openssh-client,mlabel testing testing http://ftp.fau.de/debian
+        sudo eatmydata ${DEBOOTSTRAP} --cache-dir=`pwd`/cache --arch=arm64 --include initramfs-tools,wpasupplicant,tcpdump,vim,tmux,vlan,ntpdate,parted,curl,wget,grub-efi-arm64,mtr-tiny,dbus,ca-certificates,sudo,openssh-client,mtools testing testing http://ftp.fau.de/debian
 
         export KERNEL=`ls -1rt linux-image*.deb | grep -v dbg | tail -1`
 
 
         export KERNEL=`ls -1rt linux-image*.deb | grep -v dbg | tail -1`
 
@@ -103,7 +99,7 @@ build_rootfs()
         sudo chroot . dpkg -i ${KERNEL}
         sudo rm ${KERNEL}
 
         sudo chroot . dpkg -i ${KERNEL}
         sudo rm ${KERNEL}
 
-        sudo bash -c 'apt-get clean'
+        sudo bash -c 'chroot . apt-get clean'
 )
 }
 
 )
 }
 
@@ -112,7 +108,8 @@ build_live_stick()
 (
         rm -rf live-stick
         mkdir -p live-stick/efi/boot live-stick/efi/debian/
 (
         rm -rf live-stick
         mkdir -p live-stick/efi/boot live-stick/efi/debian/
-        sudo bash -c 'cd testing; find . | cpio --quiet -H newc -o | pigz > ../live-stick/initrd.gz'
+        sudo cp ../files/wifi.pl testing/etc/rc.local
+        sudo bash -c 'cd testing; find . | cpio --quiet -H newc -o | pigz -9 > ../live-stick/initrd.gz'
         cp testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi live-stick/efi/boot/bootaa64.efi
         cp testing/boot/vmlinuz* live-stick/vmlinuz
         cp ../files/grub.cfg live-stick/efi/debian/grub.cfg
         cp testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi live-stick/efi/boot/bootaa64.efi
         cp testing/boot/vmlinuz* live-stick/vmlinuz
         cp ../files/grub.cfg live-stick/efi/debian/grub.cfg
@@ -126,13 +123,13 @@ build_dd()
         rm -f media
         dd if=/dev/zero of=media bs=1 count=0 seek=1G
         mkdir -p mnt
         rm -f media
         dd if=/dev/zero of=media bs=1 count=0 seek=1G
         mkdir -p mnt
-        mkfs.ext4 -O metadata_csum_seed,64bit media
+        mkfs.ext4 media
         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 rm mnt/init
         sudo umount mnt
         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 rm mnt/init
         sudo umount mnt
-        tar cf - media | pigz > m1.tgz
+        tar cf - media | pigz -9 > m1.tgz
 )
 }
 
 )
 }
 
@@ -156,6 +153,14 @@ EOF
 )
 }
 
 )
 }
 
+build_asahi_installer_image()
+{
+        rm -rf esp
+        mkdir esp
+        mv EFI esp/
+        zip -r9 debian-base.zip esp media
+}
+
 build_di_stick()
 {
         rm -rf di-stick
 build_di_stick()
 {
         rm -rf di-stick
@@ -167,7 +172,7 @@ build_di_stick()
         sudo cp -a testing/lib/modules/* initrd/lib/modules/
         sudo cp ../files/wifi.sh initrd/
         sudo cp ../files/boot.sh initrd/
         sudo cp -a testing/lib/modules/* initrd/lib/modules/
         sudo cp ../files/wifi.sh initrd/
         sudo cp ../files/boot.sh initrd/
-        (cd initrd; find . | cpio --quiet -H newc -o | pigz > ../di-stick/initrd.gz)
+        (cd initrd; find . | cpio --quiet -H newc -o | pigz -9 > ../di-stick/initrd.gz)
         sudo rm -rf initrd
         cp testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi di-stick/efi/boot/bootaa64.efi
         cp testing/boot/vmlinuz* di-stick/vmlinuz
         sudo rm -rf initrd
         cp testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi di-stick/efi/boot/bootaa64.efi
         cp testing/boot/vmlinuz* di-stick/vmlinuz
@@ -181,7 +186,7 @@ publish_artefacts()
 {
         export KERNEL=`ls -1rt linux-image*.deb | grep -v dbg | tail -1`
         cp ${KERNEL} k.deb
 {
         export KERNEL=`ls -1rt linux-image*.deb | grep -v dbg | tail -1`
         cp ${KERNEL} k.deb
-        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/
+        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 debian-base.zip /u/
 }
 
 mkdir -p build
 }
 
 mkdir -p build
@@ -193,8 +198,9 @@ build_linux
 build_m1n1
 build_uboot
 build_rootfs
 build_m1n1
 build_uboot
 build_rootfs
-build_live_stick
 build_di_stick
 build_dd
 build_efi
 build_di_stick
 build_dd
 build_efi
+build_asahi_installer_image
+build_live_stick
 publish_artefacts
 publish_artefacts
Impressum, Datenschutz