]>
Commit | Line | Data |
---|---|---|
2df410ee TG |
1 | #!/bin/bash |
2 | ||
3 | set -x | |
4 | set -e | |
5 | ||
6 | unset LC_CTYPE | |
7 | unset LANG | |
8 | ||
5920ad39 TG |
9 | build_m1n1() |
10 | { | |
11 | ( | |
12 | test -d m1n1 || git clone --recursive https://github.com/AsahiLinux/m1n1.git | |
13 | cd m1n1 | |
14 | git fetch | |
ce0c2c8b | 15 | git reset --hard origin/main; git clean -f -x -d |
5920ad39 TG |
16 | make -j |
17 | ) | |
18 | } | |
19 | ||
20 | build_uboot() | |
21 | { | |
22 | ( | |
23 | # Build u-boot | |
ce0c2c8b | 24 | test -d u-boot || git clone https://github.com/kettenis/u-boot |
5920ad39 TG |
25 | cd u-boot |
26 | git reset --hard origin/apple-m1-m1n1-nvme; git clean -f -x -d | |
27 | make apple_m1_defconfig | |
28 | # it is normal that it runs on an error at the end | |
ce0c2c8b | 29 | make -j 16 || true |
5920ad39 TG |
30 | ) |
31 | ||
32 | cat m1n1/build/m1n1.macho `find u-boot -name \*.dtb` u-boot/u-boot-nodtb.bin > u-boot.macho | |
33 | } | |
34 | ||
35 | ||
36 | # # Build our boot object that replaces step2.sh in the asahi installer | |
37 | # | |
38 | # # Build Linux | |
39 | # git clone https://github.com/AsahiLinux/linux | |
40 | # cd linux | |
41 | # git checkout origin/asahi | |
42 | # # SPI patches | |
43 | # curl https://tg.st/u/aa6a11b3feeda0f57284f99406188e4615e7c43c.patch | patch -p1 | |
44 | # curl https://tg.st/u/9ce9060dea91951a330feeeda3ad636bc88c642c.patch | patch -p1 | |
45 | # # Sound patch | |
46 | # curl https://tg.st/u/5nly | patch -p1 | |
47 | # # Config with sound enabled | |
48 | # curl https://tg.st/u/asahi-config-2022-01-19 > .config | |
49 | # make olddefconfig | |
50 | # make bindeb-pkg | |
51 | ||
ce0c2c8b TG |
52 | # build_m1n1 |
53 | build_uboot |