Skip to content

Commit

Permalink
add asahi to image builder
Browse files Browse the repository at this point in the history
  • Loading branch information
dkwo committed Dec 1, 2022
1 parent c9dbeed commit 2fd75a6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ set_target_arch_from_platform() {
pinebookpro*) XBPS_TARGET_ARCH="aarch64";;
pinephone*) XBPS_TARGET_ARCH="aarch64";;
rock64*) XBPS_TARGET_ARCH="aarch64";;
asahi*) XBPS_TARGET_ARCH="aarch64";;
*) die "$PROGNAME: Unable to compute target architecture from platform";;
esac

Expand Down
10 changes: 9 additions & 1 deletion mkimage.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ PLATFORM="${PLATFORM%-PLATFORMFS*}"

# Be absolutely certain the platform is supported before continuing
case "$PLATFORM" in
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi-armv6l|rpi-armv7l|rpi-aarch64|GCP|pinebookpro|pinephone|rock64|*-musl);;
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi-armv6l|rpi-armv7l|rpi-aarch64|GCP|pinebookpro|pinephone|rock64|asahi|*-musl);;
*) die "The $PLATFORM is not supported, exiting..."
esac

Expand Down Expand Up @@ -373,6 +373,14 @@ GCP*)
# run_cmd_chroot commands
cleanup_chroot
;;
asahi*)
mount_pseudofs
run_cmd_chroot "${ROOTFS}" "mkdir /boot/m1n1"
run_cmd_chroot "${ROOTFS}" "grub-install --target=arm64-efi --efi-directory=/boot --removable"
run_cmd_chroot "${ROOTFS}" "grub-mkconfig > /boot/grub/grub.cfg"
run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f linux-asahi"
cleanup_chroot
;;
esac

# Release all the mounts, deconfigure the loop device, and remove the
Expand Down
3 changes: 2 additions & 1 deletion mkplatformfs.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Usage: $PROGNAME [options] <platform> <base-tarball>
Supported platforms: i686, x86_64, GCP, bananapi, beaglebone,
cubieboard2, cubietruck, odroid-c2, odroid-u2,
rpi-armv6l, rpi-armv7l, rpi-aarch64, ci20,
pinebookpro, pinephone, rock64
pinebookpro, pinephone, rock64, asahi
Options
-b <syspkg> Set an alternative base-system package (defaults to base-system)
Expand Down Expand Up @@ -125,6 +125,7 @@ case "$PLATFORM" in
pinebookpro*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
rock64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
asahi*) PKGS="$BASEPKG asahi-base grub-arm64-efi dracut asahi-uboot" ;;
*) die "$PROGNAME: invalid platform!";;
esac

Expand Down

0 comments on commit 2fd75a6

Please sign in to comment.