Skip to content

povik/petitboot-for-m1-macs

 
 

Repository files navigation

Petitboot for Apple Silicon

This is a Buildroot tree that builds a Petitboot image for M1 Macs (the computers from Apple). It builds on work in glevand/petitboot--buildroot.

The resulting image expects to be loaded through m1n1.

Hello petitboot

Figure: Petitboot prompt on Mac mini

Some features (or their absence)

  • Produces self-standing kernel images with the appropriate userspace embedded in.

  • Supports loading of custom devicetree blobs. You can associate a custom devicetree with a boot option. Petitboot shoud correctly transfer the runtime properties obtained from m1n1 into the new devicetree.

  • Supports USB Type-A and Ethernet on Mac mini. On Mac mini, the interim Petitboot kernel has support for the USB Type-A ports and Ethernet. For these to be brought up also in the final kernel, the final kernel needs to cope with the fact that they have already been initialized in the interim kernel. This patch makes it work, although I don't expect that to be the right approach.

  • Has no support for NVMe at the moment.

How to configure the boot options

One way to configure the boot options Petitboot should offer is through a kboot.conf file on any storage device Petitboot can probe. Look here for a sample.

Petitboot also has some support for reading other bootloader's configuration format, like GRUB's.

Building

You can use buildenv/enter.sh to enter a Docker-based build container. Read buildenv/Dockerfile for dependencies if building outside the container.

make apple_m1_petitboot_defconfig
make -j4

The produced image will be at output/images/Image.gz.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Languages

  • Makefile 70.7%
  • Python 9.8%
  • C 8.2%
  • Shell 6.3%
  • HTML 1.6%
  • C++ 1.0%
  • Other 2.4%