From 81f2a876b598589660a9928e56d9687607992a37 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Sat, 5 Nov 2022 05:05:39 +0000 Subject: [PATCH] Partition sizes need to be divisible by 4096 --- make-asahi-installer-package.sh | 16 +++++++++++----- platforms/workstation.xml | 1 - 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/make-asahi-installer-package.sh b/make-asahi-installer-package.sh index 5ba3eae..f4d0c2a 100755 --- a/make-asahi-installer-package.sh +++ b/make-asahi-installer-package.sh @@ -47,11 +47,17 @@ fatcat "${workdir}/${imagename}1" -x "${workdir}/package/esp" mv "${workdir}/${imagename}2" "${workdir}/package/boot.img" mv "${workdir}/${imagename}3" "${workdir}/package/root.img" +esp_volume_id="$(file "${workdir}/${imagename}1" | awk -v 'RS=,' '/serial number/ { print $3 }')" +esp_size="$(stat -c %s "${workdir}/${imagename}1")" +boot_size="$(stat -c %s "${workdir}/package/boot.img")" +# TODO: round up the size instead of hardcoding +truncate -s 10G "${workdir}/package/root.img" +root_size="$(stat -c %s "${workdir}/package/root.img")" + pushd "${workdir}/package" > /dev/null zip -r "${basedir}/${package}" . popd > /dev/null -volume_id="$(file "${workdir}/${imagename}1" | awk -v 'RS=,' '/serial number/ { print $3 }')" cat > installer_data.json < installer_data.json < installer_data.json < - 15 false