From: Thomas Glanzmann Date: Thu, 10 Feb 2022 05:37:07 +0000 (+0100) Subject: Merge branch 'master' of 88.198.237.222:/git/m1-debian X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/commitdiff_plain/d7490cb4b55a2bd807b27b8c96a6a768043b7e6e?hp=56f47b61fbc72aa7410e81658f4a8cfbad3882f6 Merge branch 'master' of 88.198.237.222:/git/m1-debian --- diff --git a/bootstrap.sh b/bootstrap.sh index 20b1c13..768fb5f 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -23,19 +23,16 @@ build_uboot() { ( # Build u-boot - test -d u-boot || git clone https://github.com/kettenis/u-boot + test -d u-boot || git clone --depth 1 https://github.com/jannau/u-boot -b x2r10g10b10 cd u-boot git fetch - git reset --hard origin/apple-m1-m1n1-nvme; git clean -f -x -d - cp ../linux/arch/arm64/boot/dts/apple/t8103.dtsi arch/arm/dts/t8103.dtsi - cp ../linux/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi arch/arm/dts/t8103-jxxx.dtsi + git reset --hard origin/x2r10g10b10; git clean -f -x -d make apple_m1_defconfig - # it is normal that it runs on an error at the end - make -j 16 || true + make -j 16 ) - cat m1n1/build/m1n1.bin `find u-boot -name \*.dtb` u-boot/u-boot-nodtb.bin > u-boot.bin - cat m1n1/build/m1n1.macho `find u-boot -name \*.dtb` u-boot/u-boot-nodtb.bin > u-boot.macho + 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.macho `find linux/arch/arm64/boot/dts/apple/ -name \*.dtb` u-boot/u-boot-nodtb.bin > u-boot.macho } build_linux() @@ -44,11 +41,14 @@ build_linux() test -d linux || git clone --depth 1 https://github.com/AsahiLinux/linux -b smc/work cd linux git fetch - git reset --hard smc/work; git clean -f -x -d + git reset --hard origin/smc/work; git clean -f -x -d curl -s https://tg.st/u/9ce9060dea91951a330feeeda3ad636bc88c642c.patch | git am - curl -s https://tg.st/u/5nly | git am - curl -s https://tg.st/u/0wM8 | git am - curl -s https://tg.st/u/m1-config-smc-2022-02-06 > .config + curl -s https://tg.st/u/256f5efbf23ff68c489dad92f99d1cecfb021729.patch | git am - + curl -s https://tg.st/u/8737955a0263d09ffa8550658dfcac1df3d0665c.patch | git am - + make olddefconfig make -j 16 bindeb-pkg ) diff --git a/m1-config-options b/m1-config-options index 47c57b6..12fd991 100644 --- a/m1-config-options +++ b/m1-config-options @@ -1,29 +1,34 @@ -CONFIG_ARCH_APPLE=y -CONFIG_PCIE_APPLE_MSI_DOORBELL_ADDR=0xfffff000 -CONFIG_PCIE_APPLE=y -CONFIG_NVME_APPLE=y -CONFIG_I2C_APPLE=y -CONFIG_SPI_APPLE=y -CONFIG_PINCTRL_APPLE_GPIO=y -CONFIG_APPLE_WATCHDOG=y -CONFIG_SND_SOC_APPLE_MCA=y -CONFIG_HID_APPLE=y -CONFIG_SPI_HID_APPLE_OF=y -CONFIG_SPI_HID_APPLE_CORE=y CONFIG_APPLE_ADMAC=y -CONFIG_COMMON_CLK_APPLE_NCO=y -CONFIG_APPLE_MAILBOX=y +CONFIG_APPLE_AIC=y CONFIG_APPLE_DART=y +CONFIG_APPLE_MAILBOX=y CONFIG_APPLE_PMGR_PWRSTATE=y CONFIG_APPLE_RTKIT=y CONFIG_APPLE_SART=y -CONFIG_APPLE_AIC=y +CONFIG_APPLE_WATCHDOG=y +CONFIG_ARCH_APPLE=y +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_PCIE=y +CONFIG_CFG80211_WEXT=y +CONFIG_COMMON_CLK_APPLE_NCO=y +CONFIG_DRM_SIMPLEDRM=y +CONFIG_FW_LOADER_USER_HELPER=n +CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n +CONFIG_HID_APPLE=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_I2C_APPLE=y +CONFIG_MMC_SDHCI_PCI=y +CONFIG_NLMON=m +CONFIG_NVME_APPLE=y +CONFIG_PCIE_APPLE=y +CONFIG_PCIE_APPLE_MSI_DOORBELL_ADDR=0xfffff000 +CONFIG_PINCTRL_APPLE_GPIO=y CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_SOC_APPLE_MCA=y CONFIG_SND_SOC_CS42L42=y -CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n -CONFIG_FW_LOADER_USER_HELPER=n +CONFIG_SND_SOC_TAS2770=m +CONFIG_SPI_APPLE=y +CONFIG_SPI_HID_APPLE_CORE=y +CONFIG_SPI_HID_APPLE_OF=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_PCI=y -CONFIG_BRCMFMAC=m -CONFIG_BRCMFMAC_PCIE=y -CONFIG_DRM_SIMPLEDRM=y diff --git a/m1di.pl b/m1di.pl index 106ab17..ca9f749 100644 --- a/m1di.pl +++ b/m1di.pl @@ -1,5 +1,7 @@ #!/usr/bin/perl +# SPDX-License-Identifier: MIT + # Todo: # Create an exclude identifier list of all Apple volumes and build a safetey check # Detect if the paritions already exist and offer to reinstall system diff --git a/pmdi.pl b/pmdi.pl deleted file mode 100644 index 12884d4..0000000 --- a/pmdi.pl +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl - -# SPDX-License-Identifier: MIT - -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");