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 Sep 16, 2022
1 parent 71f46a0 commit 32cc5e1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,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 All @@ -310,6 +311,9 @@ set_dracut_args_from_platform() {
# In rare cases it is necessary to set platform specific dracut
# args. This is mostly the case on ARM platforms.
case "$PLATFORM" in
asahi*)
# Taken from asahi-base/files/dracut-asahi.conf
cat /usr/lib/dracut/dracut.conf.d/10-asahi.conf ;;
*) ;;
esac
}
Expand Down
8 changes: 7 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|rpi2|rpi3|rpi4|GCP|pinebookpro|pinephone|rock64|*-musl);;
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|rpi4|GCP|pinebookpro|pinephone|rock64|asahi|*-musl);;
*) die "The $PLATFORM is not supported, exiting..."
esac

Expand Down Expand Up @@ -373,6 +373,12 @@ GCP*)
# run_cmd_chroot commands
cleanup_chroot
;;
asahi*)
# Setup GRUB via asahi-base/files/update-grub-image
mount_pseudofs
run_cmd_chroot "${ROOTFS}" update-grub-image
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, rpi2 (armv7), rpi3 (aarch64), rpi4 (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 @@ -128,6 +128,7 @@ case "$PLATFORM" in
pinebookpro*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
rock64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
asahi*) PKGS="$BASEPKG asahi-base" ;;
*) die "$PROGNAME: invalid platform!";;
esac

Expand Down

0 comments on commit 32cc5e1

Please sign in to comment.