]>
Commit | Line | Data |
---|---|---|
1 | # grow root filesystem | |
2 | lsblk | |
3 | resize2fs /dev/nvme0n1pX | |
4 | ||
5 | # Ethernet | |
6 | ip l s | |
7 | dhclient <device> | |
8 | ||
9 | # Wifi | |
10 | rmmod brcmfmac | |
11 | rmmod brcmutil | |
12 | mount /dev/sda1 /mnt | |
13 | tar -C /lib/firmware/ -xf /mnt/linux-firmware.tar | |
14 | umount /mnt | |
15 | modprobe brcmfmac | |
16 | vim /etc/wpa_supplicant/wpa_supplicant.conf | |
17 | wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf | |
18 | dhclient wlan0 | |
19 | ||
20 | # Time | |
21 | ntpdate pool.ntp.org | |
22 | date --set 2022-01-25 | |
23 | date --set 14:21 | |
24 | ||
25 | # Configure timezone | |
26 | dpkg-reconfigure tzdata | |
27 | ||
28 | # Fix grub | |
29 | # We deinstall grub-efi-arm64-signed- because it creates a file fbaa64.efi | |
30 | # which makes u-boot hang. | |
31 | apt-get install grub-efi grub-efi-arm64-signed- | |
32 | grub-install --target=arm64-efi --efi-directory=/boot/efi --removable | |
33 | update-grub | |
34 | # Set removable media to yes and nvram to no to make later grub updates work | |
35 | dpkg-reconfigure grub-efi-arm64 | |
36 | ||
37 | See also: https://github.com/AsahiLinux/docs/wiki/U-Boot | |
38 | ||
39 | # xorg | |
40 | ||
41 | # Keyboard use capslock as additional ctrl | |
42 | cat > /etc/X11/xorg.conf.d/00-keyboard.conf <<'EOF' | |
43 | Section "InputClass" | |
44 | Identifier "system-keyboard" | |
45 | MatchIsKeyboard "on" | |
46 | Option "XkbLayout" "us" | |
47 | Option "XkbModel" "pc105" | |
48 | Option "XkbVariant" "de_se_fi" | |
49 | Option "XkbOptions" "ctrl:nocaps" | |
50 | EndSection | |
51 | EOF | |
52 | ||
53 | # Swap command and option (windows and alt like on a pc keyboard) | |
54 | echo 1 > /sys/module/hid_apple/parameters/swap_opt_cmd | |
55 | ||
56 | # Configure the touchpad | |
57 | cat > /etc/X11/xorg.conf.d/30-input.conf <<'EOF' | |
58 | Section "InputClass" | |
59 | Identifier "libinput touchpad catchall" | |
60 | MatchIsTouchpad "on" | |
61 | MatchDevicePath "/dev/input/event*" | |
62 | Option "Tapping" "False" | |
63 | Option "TappingDrag" "False" | |
64 | Option "DisableWhileTyping" "True" | |
65 | Option "AccelProfile" "adaptive" | |
66 | Option "AccelSpeed" "0.3" | |
67 | Option "AccelerationNumerator" "2" | |
68 | Option "AccelerationDenominator" "1" | |
69 | Option "AccelerationThreshold" "4" | |
70 | Option "AdaptiveDeceleration" "2" | |
71 | Option "NaturalScrolling" "0" | |
72 | Option "TappingButtonMap" "lmr" | |
73 | Option "ClickMethod" "clickfinger" | |
74 | Driver "libinput" | |
75 | EndSection | |
76 | EOF | |
77 | ||
78 | # Create a user | |
79 | useradd -m -c 'firstname lastname' -s /bin/bash username | |
80 | passwd username | |
81 | ||
82 | # Lightweight desktop | |
83 | apt-get install lightdm blackbox xterm firefox-esr | |
84 | ||
85 | # Install gnome | |
86 | apt-get install gnome | |
87 | /etc/init.d/gdm3 start | |
88 | ||
89 | # If you need to install the kernel on a bootstrapped system or one that needs recovery | |
90 | wget https://tg.st/u/k.deb | |
91 | dpkg -i k.deb | |
92 | ||
93 | # asahi does not handle sleep well at the moment | |
94 | sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target | |
95 | ||
96 | - You can also use the live system to install Debian on the m1, the rough outline is: | |
97 | ||
98 | - Create two paritions: | |
99 | ||
100 | - One 1 GB vfat | |
101 | - Rest with ext4 | |
102 | ||
103 | - Use debootstrap to bootstrap debian | |
104 | ||
105 | - Install the kernel | |
106 | ||
107 | - Install grub | |
108 | ||
109 | - reboot |