From 32cc5e1d0e5f527bf2c69c816cc1a4195707aec7 Mon Sep 17 00:00:00 2001 From: dkwo Date: Fri, 16 Sep 2022 14:33:22 -0400 Subject: [PATCH] add asahi to image builder --- lib.sh.in | 4 ++++ mkimage.sh.in | 8 +++++++- mkplatformfs.sh.in | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib.sh.in b/lib.sh.in index 3a235f0a65..64c47d9fc4 100644 --- a/lib.sh.in +++ b/lib.sh.in @@ -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 @@ -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 } diff --git a/mkimage.sh.in b/mkimage.sh.in index 46bf4e7a72..ef9843ca12 100644 --- a/mkimage.sh.in +++ b/mkimage.sh.in @@ -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 @@ -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 diff --git a/mkplatformfs.sh.in b/mkplatformfs.sh.in index f72fd373f5..de6b0d5866 100644 --- a/mkplatformfs.sh.in +++ b/mkplatformfs.sh.in @@ -51,7 +51,7 @@ Usage: $PROGNAME [options] 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 Set an alternative base-system package (defaults to base-system) @@ -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