File:  [NetBSD Developer Wiki] / wikisrc / ports / evbarm / apple.mdwn
Revision 1.14: download - view: text, annotated - select for diffs
Sat May 7 08:35:18 2022 UTC (8 weeks ago) by wiki
Branches: MAIN
CVS tags: HEAD
web commit by skrll: More notes

[[!meta title="NetBSD/evbarm on Apple Silicon"]]

Initial support was added to NetBSD -current for Apple M1 systems on Aug 30, 2021.

# Installation

As of April 2022 it is best to use the Asahi installer.

- Follow instruction as documented here: <https://asahilinux.org/2022/03/asahi-linux-alpha-release/> to get the "UEFI environment" 

- Uncompress <http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/evbarm-aarch64/binary/gzimg/arm64.img.gz> and write it to a USB drive. *Make sure this file was built after May 7th, 2022*

- Reboot with an arm64.img USB drive plugged into a USB C port.

The old installation instructions are:

Please note that installation on an Apple M1 requires macOS 11.2 or later to be installed first.

- Uncompress <http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/evbarm-aarch64/binary/gzimg/arm64.img.gz> and write it to a USB drive. *Make sure this file was built after Aug 30, 2021!*

- Build and install `sysutils/u-boot-apple-m1` from pkgsrc.
   - The bootloader for the Mac mini (M1, 2020) will be installed to `/usr/pkg/share/u-boot/apple-m1/u-boot-t8103-j274.macho`.
   - j274 - Mac mini (M1, 2020)
   - j293 - MacBook Pro (13-inch, M1, 2020)

- Boot the M1 system into 1TR mode by holding the power button at startup. Until the "Loading startup options..." message is displayed, then select Options.
   - In the Utilities menu, select Terminal to bring up a root shell.

- Downgrade security and disable SIP. (If you get any errors while doing this, first run `csrutil clear`, reboot, and try again)
    - `# bputil -nkcas`
    - `# csrutil disable`

- Copy the u-boot.macho from pkgsrc to the mini over the network (curl, sftp, etc).

- Install the new bootloader:
    - `# kmutil configure-boot -c u-boot-t8103-j274.macho -C -v /Volumes/Macintosh\ HD/`

- Reboot with an arm64.img USB drive plugged in.

# Supported hardware
- Apple Mac mini (M1, 2020)
    - SMP
    - Interrupt controller
    - IOMMU
    - PCIe
        - USB (Type-A ports)
        - Ethernet
    - USB (Type-C ports)
    - Framebuffer console
        - X11 (requires `startx -- -depth 30`)

# Back to MacOS

# Commits

Add some missing barriers:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131945.html>
- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131946.html>

Support EL2 host mode:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131947.html>
- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131948.html>

Add 10-bit pixel format support:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131949.html>

Fix bus_dmamap_sync usage in bge(4):

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131950.html>

Fix PCI resource allocation:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131951.html>

Disable dwc3 when iommu support is required:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131952.html>

Do not touch CNTCTL_IMASK in generic timer driver:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131953.html>

Fix incorrect KASSERT in cpu_lwp_fork:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131954.html>

Add IOMMU support to arm bus_dma:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131955.html>

Identify M1 CPU IDs:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131956.html>

Support 64-bit cpu-release-addr for spin-table:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131959.html>

Add support for FIQs:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131960.html>

Initial Apple M1 support:

- <https://mail-index.netbsd.org/source-changes/2021/08/30/msg131961.html>

Make scheduler aware of efficiency and performance cores:

- <https://mail-index.netbsd.org/source-changes/2021/09/01/msg131982.html>

Support 8-bit ASID field in pmap:

- <https://mail-index.netbsd.org/source-changes/2021/10/10/msg132887.html>
- <https://mail-index.netbsd.org/source-changes/2021/10/10/msg132889.html>

Add mailbox and power-domain support:

- <https://mail-index.netbsd.org/source-changes/2022/03/04/msg137351.html>

EFI boot from 4K devices support:

- <https://mail-index.netbsd.org/source-changes/2022/04/24/msg138177.html>
- <https://mail-index.netbsd.org/source-changes/2022/04/24/msg138178.html>

Sync DART and PCIE with OpenBSD:

- <https://mail-index.netbsd.org/source-changes/2022/04/27/msg138239.html>
- <https://mail-index.netbsd.org/source-changes/2022/04/27/msg138242.html>

Power domain controller support:

- <https://mail-index.netbsd.org/source-changes/2022/04/27/msg138240.html>

GPIO controller support:

- <https://mail-index.netbsd.org/source-changes/2022/04/27/msg138241.html>

Mailbox and RTKit OS communications protocol support:

- <https://mail-index.netbsd.org/source-changes/2022/04/27/msg138243.html>

Pointer Authentication fix:

- <https://mail-index.netbsd.org/source-changes/2022/05/06/msg138377.html>

NVME support:

- <https://mail-index.netbsd.org/source-changes/2022/05/07/msg138395.html>

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb