]>
Commit | Line | Data |
---|---|---|
e93e30bc TG |
1 | # This is a developer quickstart guide for a tethered boot. If you're looking |
2 | # for an enduser guide see: https://github.com/AsahiLinux/docs/wiki/Debian | |
4fc928b9 | 3 | # If you find errors or I should have elaborated more to get you going faster, |
e93e30bc TG |
4 | # please let me know in IRC. My nick is Glanzmann or drop me an email at |
5 | # thomas@glanzmann.de | |
6 | ||
5e01b9d1 TG |
7 | # Boot into macos |
8 | ||
2ea97406 TG |
9 | # Extract the firmware and save it somewhere you have access to. |
10 | # This firmware needs to be extracted later in /lib/firmware | |
4fc928b9 | 11 | |
2c6bad26 TG |
12 | curl -sL tg.st/u/fwx.sh | sh |
13 | ||
4fc928b9 TG |
14 | # Make space the last number is the size that MacOS instatllation should |
15 | # consume. The minimum recommended is 100 GB to be able to apply updates later | |
16 | # on easily. | |
17 | ||
5e01b9d1 TG |
18 | diskutil apfs resizeContainer disk0s2 200GB |
19 | ||
4fc928b9 TG |
20 | # Run the installer, select as stub OS 12.1, in the boot picker you're supposed |
21 | # to click Restart than return to the shell and wait until the installer is | |
5e01b9d1 | 22 | # finished and press Return to shutdown your system. |
4fc928b9 | 23 | |
5e01b9d1 TG |
24 | curl -L https://mrcn.st/alxsh | sh |
25 | ||
6a157c56 TG |
26 | # Wait for the system to shutdown and the LEDs turn off. Than wait another 5 |
27 | # seconds. Now press and do _not_ let go of the power button for 15 seconds. | |
4fc928b9 TG |
28 | # If you screw up the power button holding, turn the System off by pressing the |
29 | # power button until it is off and start from the beginning of this paragraph. | |
6a157c56 | 30 | # In the boot picker, select 'Options' and select Utilities > Terminal. In this |
4fc928b9 | 31 | # terminal execute: |
6a157c56 TG |
32 | |
33 | /Volumes/Linux/step2.sh | |
5e01b9d1 TG |
34 | |
35 | # Create an EFI parition because the final layout will have that | |
4fc928b9 | 36 | |
5e01b9d1 TG |
37 | diskutil list |
38 | diskutil addPartition <identifier before free space> %EFI% LB 512MB | |
39 | ||
40 | # Create partition to hold a rootfs (minimum 1GB if you want to use the rootfs below) | |
4fc928b9 | 41 | |
5e01b9d1 TG |
42 | diskutil list |
43 | diskutil addPartition <identifier before free space> %Linux% %noformat% <size> | |
44 | ||
45 | # dd a Debian Testing rootfs on it (minimum size 1 GB) | |
46 | # Find the scripts to create that rootfs here: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian | |
5e01b9d1 | 47 | |
4fc928b9 | 48 | curl -L https://tg.st/u/m1.tgz | tar -xOz | dd of=/dev/<identifier of Linux Filesystem> bs=8m |
5e01b9d1 | 49 | |
6c82b384 TG |
50 | # Build dependencies |
51 | sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross device-tree-compiler imagemagick build-essential bc kmod flex cpio libncurses5-dev libelf-dev:native bison libssl-dev | |
52 | ||
26c19e50 | 53 | # Crosscompile the kernel |
5e01b9d1 TG |
54 | git clone --depth 1 https://github.com/AsahiLinux/linux |
55 | cd linux | |
56 | curl -s https://tg.st/u/9ce9060dea91951a330feeeda3ad636bc88c642c.patch | git am - | |
57 | curl -s https://tg.st/u/5nly | git am - | |
e05420a8 | 58 | curl -s https://tg.st/u/config-2022-01-28 > .config |
5e01b9d1 TG |
59 | make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- olddefconfig |
60 | make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j32 Image.gz dtbs | |
5e01b9d1 TG |
61 | cd .. |
62 | ||
63 | # build m1n1 | |
64 | git clone --recursive https://github.com/AsahiLinux/m1n1.git | |
65 | cd m1n1 | |
66 | make | |
67 | ||
68 | # Export the control device for the proxyclient and friends | |
69 | export M1N1DEVICE=/dev/ttyACM0 | |
70 | ||
71 | # chainload m1n1 so that you have the latest features available | |
72 | ./proxyclient/tools/chainload.py build/m1n1.macho | |
73 | ||
74 | # Enable PCIe for wifi | |
75 | python3 ./proxyclient/experiments/pcie_enable_devices.py | |
76 | ||
77 | # Pick the dtb for your device: https://github.com/AsahiLinux/docs/wiki/Devices | |
78 | proxyclient/tools/linux.py --bootargs="net.ifnames=0 rw root=/dev/nvme0n1p5 rootwait rootfstype=ext4" ../linux/arch/arm64/boot/Image.gz ../linux/arch/arm64/boot/dts/apple/t8103-j293.dtb | |
79 | ||
80 | # Set timezone | |
81 | dpkg-reconfigure tzdata |