@@ -117,7 +117,7 @@ PLATFORM="${PLATFORM%-PLATFORMFS*}"
117117
118118# Be absolutely certain the platform is supported before continuing
119119case " $PLATFORM " in
120- bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|rpi4|GCP|pinebookpro|pinephone|rock64|* -musl);;
120+ bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|rpi4|GCP|pinebookpro|pinephone|rock64|asahi| * -musl);;
121121 * ) die " The $PLATFORM is not supported, exiting..."
122122esac
123123
@@ -226,9 +226,18 @@ _EOF
226226 esac
227227 mkfs.${ROOT_FSTYPE} ${disable_journal: +" $disable_journal " } " ${LOOPDEV} p2" > /dev/null 2>&1
228228 mount " ${LOOPDEV} p2" " $ROOTFS "
229- mkdir -p " ${ROOTFS} /boot"
230- mount " ${LOOPDEV} p1" " ${ROOTFS} /boot"
231- BOOT_UUID=$( blkid -o value -s UUID " ${LOOPDEV} p1" )
229+ case " $PLATFORM " in
230+ asahi* )
231+ # we need /boot/efi
232+ mkdir -p " ${ROOTFS} " /boot/efi
233+ mount " ${LOOPDEV} p1" " ${ROOTFS} /boot/efi"
234+ ;;
235+ * )
236+ mkdir -p " ${ROOTFS} /boot"
237+ mount " ${LOOPDEV} p1" " ${ROOTFS} /boot"
238+ ;;
239+ esac
240+ BOOT_UUID=$( blkid -o value -s UUID " ${LOOPDEV} p1" )
232241 ROOT_UUID=$( blkid -o value -s UUID " ${LOOPDEV} p2" )
233242 ROOT_PARTUUID=$( blkid -o value -s PARTUUID " ${LOOPDEV} p2" )
234243 ;;
@@ -373,6 +382,13 @@ GCP*)
373382 # run_cmd_chroot commands
374383 cleanup_chroot
375384 ;;
385+ asahi* )
386+ # setup GRUB
387+ mount_pseudofs
388+ run_cmd_chroot " ${ROOTFS} " " grub-install --target=arm64-efi --efi-directory=/boot/efi --removable"
389+ run_cmd_chroot " ${ROOTFS} " " grub-mkconfig > /boot/grub/grub.cfg"
390+ cleanup_chroot
391+ ;;
376392esac
377393
378394# Release all the mounts, deconfigure the loop device, and remove the
0 commit comments