News for hackers. Stuff that matters.
Re:How We Ported Linux to the M1 by mbreese on Thursday January 21, 2021 @12:06PM (#25861190)
Here is how they actually set the kernel for booting. It's hidden behind a `curl <url> | sh` in their post:

    #!/bin/sh
    bputil -d | grep "CustomerKC" | grep -v "absent"
    KC=$?
    if [ $KC -eq 1 ]
    then
      bputil -n -k -c -a -s
      csrutil disable
      csrutil authenticated-root disable
    fi
    cd /Volumes/Preboot
    curl https://$LONGURL/linux.macho > linux.macho
    kmutil configure-boot -c linux.macho -v /Volumes/Macintosh\ HD/
    echo "Kernel installed. Please reboot";
So, it looks like they download their pre-compiled kernel onto a Preboot volume. This is then set as the booting kernel? How long until there is a grub-like option?

I should add -- I don't know what most of these commands are. It would probably be helpful if they had spelled these out more, but this is all a great place to start.

bputil - Utility to precisely modify the security settings on Apple Silicon Macs.

csrutil - Configure System Integrity Protection (SIP)

kmutil - replaces kextload, kextunload, and other earlier tools for loading and managing kexts

Re:How We Ported Linux to the M1 by easton on Thursday January 21, 2021 @12:58PM (#25861847)
The plan, IIUC, is to use PongoOS[0] as a bootloader which will then be able to load XNU/macOS or Linux. PongoOS already works on M1, so once the Linux support is done there will be a GRUB substitute.

0: https://github.com/checkra1n/pongoOS

Re:How We Ported Linux to the M1 by saagarjha on Thursday January 21, 2021 @01:33PM (#25862244)
(All those commands have good man pages.)
Re:How We Ported Linux to the M1 by garrepi on Thursday January 21, 2021 @03:38PM (#25863926)
common BSD user vs. common Linux user
Re:How We Ported Linux to the M1 by azinman2 on Thursday January 21, 2021 @12:32PM (#25861515)
And in doing so it turns of SIP. Probably necessary to boot a non-Apple kernel, but it means if you do want to switch back to the Mac side you’ve got one of the main security mechanisms turned off.
Re:How We Ported Linux to the M1 by GeekyBear on Thursday January 21, 2021 @12:59PM (#25861859)
Security settings are stored per partition, not per machine, so you can have a Linux partition where SIP is disabled and a macOS partition where it is not on the same machine.
Re:How We Ported Linux to the M1 by azinman2 on Thursday January 21, 2021 @08:23PM (#25867051)
Got it. Nice!