]> git.zerfleddert.de Git - m1-debian/blame - doc/asahi.txt
more shit
[m1-debian] / doc / asahi.txt
CommitLineData
5e01b9d1
TG
1# Boot into macos
2
2ea97406
TG
3# Extract the firmware and save it somewhere you have access to.
4# This firmware needs to be extracted later in /lib/firmware
2c6bad26
TG
5curl -sL tg.st/u/fwx.sh | sh
6
5e01b9d1
TG
7# Make space the last number is the size that MacOS instatllation should consume
8diskutil apfs resizeContainer disk0s2 200GB
9
10# Run the installer, select as stub OS 12.1, in the boot picker you supposed to
11# click Restart than return to the shell and wait until the installer is
12# finished and press Return to shutdown your system.
13curl -L https://mrcn.st/alxsh | sh
14
15# 1. Press and hold down the power button to power on the system.
16# * It is important that the system be fully powered off before this step,
17# and that you press and hold down the button once, not multiple times.
18# This is required to put the machine into the right mode.
19# 2. Release it once 'Entering startup options' is displayed.
20# 3. Choose Options.
21# 4. You will briefly see a 'macOS Recovery' dialog.
22# * If you are asked to 'Select a volume to recover',
23# then choose your normal macOS volume and click Next.
24# 5. Click on the Utilities menu and select Terminal.
25# 6. Type the following command and follow the prompts:
26
27# Create an EFI parition because the final layout will have that
28diskutil list
29diskutil addPartition <identifier before free space> %EFI% LB 512MB
30
31# Create partition to hold a rootfs (minimum 1GB if you want to use the rootfs below)
32diskutil list
33diskutil addPartition <identifier before free space> %Linux% %noformat% <size>
34
35# dd a Debian Testing rootfs on it (minimum size 1 GB)
36# Find the scripts to create that rootfs here: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian
37curl -L https://tg.st/u/m1.tgz | tar -xOz | dd of=/dev/<identifier of Linux Filesystem>
38
39# Relax the boot policy for the stub os and uplaod install m1n1
40/Volumes/Linux/step2.sh
41
6c82b384
TG
42# Build dependencies
43sudo 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
44
5e01b9d1
TG
45# Compile the kernel
46git clone --depth 1 https://github.com/AsahiLinux/linux
47cd linux
48curl -s https://tg.st/u/9ce9060dea91951a330feeeda3ad636bc88c642c.patch | git am -
49curl -s https://tg.st/u/5nly | git am -
50curl -s https://tg.st/u/m1-config-2022-01-27 > .config
51
52# Crosscompile the kernel
53make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- olddefconfig
54make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j32 Image.gz dtbs
55
56cd ..
57
58# build m1n1
59git clone --recursive https://github.com/AsahiLinux/m1n1.git
60cd m1n1
61make
62
63# Export the control device for the proxyclient and friends
64export M1N1DEVICE=/dev/ttyACM0
65
66# chainload m1n1 so that you have the latest features available
67./proxyclient/tools/chainload.py build/m1n1.macho
68
69# Enable PCIe for wifi
70python3 ./proxyclient/experiments/pcie_enable_devices.py
71
72# Pick the dtb for your device: https://github.com/AsahiLinux/docs/wiki/Devices
73proxyclient/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
74
75# Set timezone
76dpkg-reconfigure tzdata
Impressum, Datenschutz