File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e
3+
4+ if [ ! -d " $1 " ]; then
5+ echo " Usage:"
6+ echo " $0 <kernel build root> [kernel commandline] [initramfs]"
7+ exit 1
8+ fi
9+
10+ kernel_base=" $( realpath " $1 " ) "
11+ args=" $2 "
12+ initramfs=" "
13+ if [ ! -z " $3 " ]; then
14+ initramfs=" $( realpath " $3 " ) "
15+ fi
16+
17+ cd " $( dirname " $0 " ) "
18+
19+ echo " Creating m1n1+kernel image"
20+ cp ../../build/m1n1.bin /tmp/m1n1-linux.bin
21+ if [ ! -z " $args " ]; then
22+ echo " chosen.bootargs=$args " >> /tmp/m1n1-linux.bin
23+ fi
24+
25+ cat " $kernel_base " /arch/arm64/boot/dts/apple/* .dtb " $kernel_base " /arch/arm64/boot/Image.gz >> /tmp/m1n1-linux.bin
26+ echo " Chainloading to updated m1n1..."
27+ python chainload.py -r ../../build/m1n1.bin
28+ echo " Starting guest..."
29+ exec python run_guest.py -c " load_system_map('$kernel_base /System.map')" -r /tmp/m1n1-linux.bin
You can’t perform that action at this time.
0 commit comments