Mark Kettenis | fdfe2a2 | 2021-10-23 16:58:07 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | U-Boot for Apple Silicon Macs |
| 4 | ============================= |
| 5 | |
| 6 | Allows Apple Silicon Macs to boot U-Boot via the m1n1 bootloader |
| 7 | developed by the Asahi Linux project. At this point the machines with |
| 8 | the following SoCs work: |
| 9 | |
| 10 | - Apple M1 SoC |
| 11 | |
| 12 | On these SoCs the following hardware is supported: |
| 13 | |
| 14 | - S5L serial port |
| 15 | - Framebuffer |
| 16 | - USB 3.1 Type-C ports |
| 17 | |
| 18 | Device trees are currently provided for the M1 Mac mini (2020, J274) |
| 19 | and M1 MacBook Pro 13" (2020, J293). The M1 MacBook Air (2020) is |
| 20 | expected to work with the J293 device tree. The M1 iMac (2021) may |
| 21 | work with the J274 device tree. |
| 22 | |
| 23 | Building U-Boot |
| 24 | --------------- |
| 25 | |
| 26 | .. code-block:: bash |
| 27 | |
| 28 | $ export CROSS_COMPILE=aarch64-none-elf- |
| 29 | $ make apple_m1_defconfig |
| 30 | $ make |
| 31 | |
| 32 | This will build ``u-boot-nodtb.bin`` as well as devices trees for some |
| 33 | of the supported machines. These device trees can be found in the |
| 34 | ``arch/arm/dts`` subdirectory of your build. |
| 35 | |
| 36 | Image creation |
| 37 | -------------- |
| 38 | |
| 39 | In order to run U-Boot on an Apple Silicon Mac, U-Boot has to be used |
| 40 | as a payload for the m1n1 bootloader. Instructions for building m1n1 |
| 41 | can be found here: |
| 42 | |
| 43 | https://github.com/AsahiLinux/docs/wiki/SW%3Am1n1 |
| 44 | |
| 45 | .. code-block:: bash |
| 46 | |
| 47 | $ cat m1n1.macho t8103-j274.dtb u-boot-nodtb.bin > u-boot.macho |
| 48 | |
| 49 | This uses ``u-boot-nodtb.bin`` as the device tree is passed to U-Boot |
| 50 | by m1n1 after making some adjustments. |
| 51 | |
| 52 | Image installation |
| 53 | ------------------ |
| 54 | |
| 55 | Instructions on how to install U-Boot on your Mac can be found at: |
| 56 | |
| 57 | https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart |
| 58 | |
| 59 | Just replace ``m1n1.macho`` with ``u-boot.macho`` in the instructions. |