From 9f987550ac58527cbf0a8b918b6c0ae2b23bac3f Mon Sep 17 00:00:00 2001 From: dkwo Date: Fri, 16 Sep 2022 14:33:22 -0400 Subject: [PATCH 1/5] add asahi to image builder --- lib.sh | 1 + mkimage.sh | 10 +++++++++- mkplatformfs.sh | 5 +++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib.sh b/lib.sh index 43d7329..4664178 100755 --- a/lib.sh +++ b/lib.sh @@ -298,6 +298,7 @@ set_target_arch_from_platform() { pinephone*) XBPS_TARGET_ARCH="aarch64";; rock64*) XBPS_TARGET_ARCH="aarch64";; rockpro64*) XBPS_TARGET_ARCH="aarch64";; + asahi*) XBPS_TARGET_ARCH="aarch64";; *) die "$PROGNAME: Unable to compute target architecture from platform";; esac diff --git a/mkimage.sh b/mkimage.sh index ddddf07..9c8422e 100755 --- a/mkimage.sh +++ b/mkimage.sh @@ -116,7 +116,7 @@ PLATFORM="${PLATFORM%-PLATFORMFS*}" # Be absolutely certain the platform is supported before continuing case "$PLATFORM" in - rpi-armv6l|rpi-armv7l|rpi-aarch64|GCP|pinebookpro|pinephone|rock64|rockpro64|*-musl);; + rpi-armv6l|rpi-armv7l|rpi-aarch64|GCP|pinebookpro|pinephone|rock64|rockpro64|asahi|*-musl);; *) die "The $PLATFORM is not supported, exiting..." esac @@ -350,6 +350,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 diff --git a/mkplatformfs.sh b/mkplatformfs.sh index 6d3ba11..1fc8bba 100755 --- a/mkplatformfs.sh +++ b/mkplatformfs.sh @@ -53,8 +53,8 @@ usage() { Supported platforms: i686, x86_64, GCP, rpi-armv6l, rpi-armv7l, rpi-aarch64, - pinebookpro, pinephone, rock64, rockpro64 - + pinebookpro, pinephone, rock64, rockpro64, asahi + OPTIONS -b Set an alternative base-system package (default: base-system) -c Set the XBPS cache directory (default: ./xbps-cachedir-) @@ -128,6 +128,7 @@ case "$PLATFORM" in pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; rock64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; rockpro64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; + asahi*) PKGS="$BASEPKG asahi-base asahi-scripts grub-arm64-efi dracut asahi-uboot" ;; *) die "$PROGNAME: invalid platform!";; esac From b794c86f9ee2202ccd93315193dbbc44b92b5239 Mon Sep 17 00:00:00 2001 From: dkwo Date: Mon, 23 Dec 2024 14:49:46 -0500 Subject: [PATCH 2/5] asahi: move from boot to boot/efi --- mkimage.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkimage.sh b/mkimage.sh index 9c8422e..84d0749 100755 --- a/mkimage.sh +++ b/mkimage.sh @@ -352,9 +352,9 @@ GCP*) ;; 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}" "mkdir -p /boot/efi/m1n1" + run_cmd_chroot "${ROOTFS}" "grub-install --target=arm64-efi --efi-directory=/boot/efi --removable" + run_cmd_chroot "${ROOTFS}" "grub-mkconfig > /boot/efi/grub/grub.cfg" run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f linux-asahi" cleanup_chroot ;; From df415ad9e428f3d0cd9903b89b75a4da593949fa Mon Sep 17 00:00:00 2001 From: dkwo Date: Thu, 26 Dec 2024 20:42:45 +0100 Subject: [PATCH 3/5] asahi: explicitly add lzfse --- mkplatformfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkplatformfs.sh b/mkplatformfs.sh index 1fc8bba..d83f8bb 100755 --- a/mkplatformfs.sh +++ b/mkplatformfs.sh @@ -128,7 +128,7 @@ case "$PLATFORM" in pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; rock64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; rockpro64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; - asahi*) PKGS="$BASEPKG asahi-base asahi-scripts grub-arm64-efi dracut asahi-uboot" ;; + asahi*) PKGS="$BASEPKG asahi-base asahi-scripts grub-arm64-efi dracut asahi-uboot lzfse" ;; *) die "$PROGNAME: invalid platform!";; esac From 4f610393e370bc5344974ff91c01adffb25f0dde Mon Sep 17 00:00:00 2001 From: dkwo Date: Thu, 26 Dec 2024 20:52:02 +0100 Subject: [PATCH 4/5] asahi: remove unneeded --- mkimage.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/mkimage.sh b/mkimage.sh index 84d0749..69b30ea 100755 --- a/mkimage.sh +++ b/mkimage.sh @@ -354,7 +354,6 @@ asahi*) mount_pseudofs run_cmd_chroot "${ROOTFS}" "mkdir -p /boot/efi/m1n1" run_cmd_chroot "${ROOTFS}" "grub-install --target=arm64-efi --efi-directory=/boot/efi --removable" - run_cmd_chroot "${ROOTFS}" "grub-mkconfig > /boot/efi/grub/grub.cfg" run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f linux-asahi" cleanup_chroot ;; From 586f4aa8139850ab29ce606a3709846b38c2bf4e Mon Sep 17 00:00:00 2001 From: dkwo Date: Mon, 30 Dec 2024 11:42:31 +0100 Subject: [PATCH 5/5] asahi: remove stuff, enlarge --- mkimage.sh | 5 ++--- mkplatformfs.sh | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mkimage.sh b/mkimage.sh index 69b30ea..bd82296 100755 --- a/mkimage.sh +++ b/mkimage.sh @@ -123,7 +123,7 @@ esac # Default for bigger boot partion on rk33xx devices since it needs to # fit at least 2 Kernels + initramfs case "$PLATFORM" in - pinebookpro*|rock64*|rockpro64*) + pinebookpro*|rock64*|rockpro64*|asahi*) : "${BOOT_FSSIZE:=512MiB}" ;; esac @@ -352,8 +352,7 @@ GCP*) ;; asahi*) mount_pseudofs - run_cmd_chroot "${ROOTFS}" "mkdir -p /boot/efi/m1n1" - run_cmd_chroot "${ROOTFS}" "grub-install --target=arm64-efi --efi-directory=/boot/efi --removable" + run_cmd_chroot "${ROOTFS}" "grub-install --target=arm64-efi --efi-directory=/boot --removable" run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f linux-asahi" cleanup_chroot ;; diff --git a/mkplatformfs.sh b/mkplatformfs.sh index d83f8bb..ef313b6 100755 --- a/mkplatformfs.sh +++ b/mkplatformfs.sh @@ -128,7 +128,7 @@ case "$PLATFORM" in pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; rock64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; rockpro64*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;; - asahi*) PKGS="$BASEPKG asahi-base asahi-scripts grub-arm64-efi dracut asahi-uboot lzfse" ;; + asahi*) PKGS="$BASEPKG asahi-base asahi-scripts grub-arm64-efi dracut lzfse" ;; *) die "$PROGNAME: invalid platform!";; esac