diff --git a/edition/min b/edition/min index 2c0393d..e96750c 100644 --- a/edition/min +++ b/edition/min @@ -1,4 +1,5 @@ export LIMA_INSTALL_CLOUD_INIT=false export LIMA_INSTALL_LIMA_INIT=false +export LIMA_INSTALL_BINFMT_MISC=false export LIMA_INSTALL_K3S=false export LIMA_INSTALL_SSHFS=false diff --git a/edition/std b/edition/std index ee3a6ba..5ef551b 100644 --- a/edition/std +++ b/edition/std @@ -1,3 +1,4 @@ source edition/min LIMA_INSTALL_LIMA_INIT=true +LIMA_INSTALL_BINFMT_MISC=true LIMA_INSTALL_SSHFS=true diff --git a/genapkovl-lima.sh b/genapkovl-lima.sh index 9fa087e..9cc598b 100755 --- a/genapkovl-lima.sh +++ b/genapkovl-lima.sh @@ -118,6 +118,19 @@ if [ "${LIMA_INSTALL_K3S}" == "true" ]; then rc_add k3s default fi +if [ "${LIMA_INSTALL_BINFMT_MISC}" == "true" ]; then + echo "qemu-aarch64" >> "$tmp"/etc/apk/world + + mkdir -p "${tmp}/etc/init.d/" + APKBUILD=/home/build/aports/community/qemu-openrc/APKBUILD + PKGVER=$(awk '/^pkgver=/ {split($1, a, "="); print a[2]}' ${APKBUILD}) + URL=$(awk '/^url=/ {split($1, a, "="); print a[2]}' ${APKBUILD} | tr -d '"' | sed 's/github/raw.githubusercontent/') + wget "${URL}/v${PKGVER}/qemu-binfmt.initd" -O "${tmp}/etc/init.d/qemu-binfmt" + chmod +x "${tmp}/etc/init.d/qemu-binfmt" + + rc_add qemu-binfmt default +fi + if [ "${LIMA_INSTALL_SSHFS}" == "true" ]; then echo "sshfs" >> "$tmp"/etc/apk/world fi diff --git a/mkimg.lima.sh b/mkimg.lima.sh index d089261..ce6ef30 100755 --- a/mkimg.lima.sh +++ b/mkimg.lima.sh @@ -20,6 +20,9 @@ profile_lima() { if [ "${LIMA_INSTALL_LIMA_INIT}" == "true" ]; then apks="$apks e2fsprogs lsblk sfdisk shadow sudo udev" fi + if [ "${LIMA_INSTALL_BINFMT_MISC}" == "true" ]; then + apks="$apks qemu-aarch64" + fi if [ "${LIMA_INSTALL_K3S}" == "true" ]; then apks="$apks k3s" fi