Skip to content

Commit

Permalink
m1n1: switch from 1,2 to kernel,uboot
Browse files Browse the repository at this point in the history
  • Loading branch information
dkwo committed Dec 23, 2024
1 parent cfd02bf commit 76bdfdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions srcpkgs/m1n1/files/kernel.d/m1n1.post-install
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh
#
# Kernel hook for m1n1,
# taken from update-m1n1 and efibootmgr.
# Kernel hook for m1n1, taken from update-m1n1 and efibootmgr.
#
# Arguments passed to this script: $1 pkgname, $2 version.

Expand Down Expand Up @@ -33,14 +32,14 @@ if [ -e "$CONFIG" ]; then
done <$CONFIG
fi

if [ "$PAYLOAD" -eq 1 ]; then
if [ $PAYLOAD = "kernel" ]; then
cat "${M1N1}" $m1n1config >"${TARGET}.new"
cat ${DTBS} >>"${TARGET}.new"
gzip -c "${BOOT}/initramfs-${VERSION}.img" >>"${TARGET}.new"
gzip -c "${BOOT}/vmlinux-${VERSION}" >>"${TARGET}.new"
echo "Payload: m1n1 config dtbs initram kernel"
fi
if [ "$PAYLOAD" -eq 2 ]; then
if [ $PAYLOAD = "uboot" ]; then
cat "${M1N1}" ${DTBS} >"${TARGET}.new"
gzip -c "${U_BOOT}" >>"${TARGET}.new"
cat $m1n1config >>"${TARGET}.new"
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/m1n1/files/m1n1-kernel-hook.confd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CONFIG=/etc/m1n1.conf
# can be either 1=kernel or 2=uboot (default)
PAYLOAD=2
# payload can be either kernel or uboot (default)
PAYLOAD=uboot
# the location where kernel, initramfs, dtbs are located
BOOT=/boot
DTBS=${BOOT}/dtbs/"dtbs-${VERSION}"/apple/*.dtb
Expand Down

0 comments on commit 76bdfdf

Please sign in to comment.