aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Gompa <ngompa13@gmail.com>2020-01-11 13:49:16 -0500
committerNeal Gompa <ngompa13@gmail.com>2020-01-11 13:49:16 -0500
commit57d9815a4882677ebdffec0d3d568e00addc34a8 (patch)
tree3124d78e398af7fe117d08554002558573f9a971
parentba52a77532de2af6e29ab228f58d82fc33c262d1 (diff)
downloadmageia4arm-57d9815a4882677ebdffec0d3d568e00addc34a8.tar
mageia4arm-57d9815a4882677ebdffec0d3d568e00addc34a8.tar.gz
mageia4arm-57d9815a4882677ebdffec0d3d568e00addc34a8.tar.bz2
mageia4arm-57d9815a4882677ebdffec0d3d568e00addc34a8.tar.xz
mageia4arm-57d9815a4882677ebdffec0d3d568e00addc34a8.zip
Drop copying qemu binaries and ensure qemu-user is configured on host
Since Mageia 6, it has not been necessary to copy the qemu binaries and the binfmt files into the chroot to run ARM binaries inside a chroot. This change finally stops doing that. In order to make sure this works properly, we ensure that systemd-binfmt is restarted to apply binfmt changes on the system. This ensures that the host qemu-user-static is configured to execute binaries, even in chroots.
-rwxr-xr-xcreate_arm_image.sh21
1 files changed, 7 insertions, 14 deletions
diff --git a/create_arm_image.sh b/create_arm_image.sh
index 34549a1..b1d6324 100755
--- a/create_arm_image.sh
+++ b/create_arm_image.sh
@@ -111,6 +111,13 @@ function createchroot()
error "line ${LINENO} can't start qemu-user-static : exiting"
exit ${ERR_1}
fi
+ else
+ title "Restarting systemd-binfmt.service"
+ /bin/systemctl restart systemd-binfmt.service
+ if [ ${?} -ne 0 ]; then
+ error "line ${LINENO} can't start qemu-user-static : exiting"
+ exit ${ERR_1}
+ fi
fi
return 0
}
@@ -263,20 +270,6 @@ function preparechroot()
{
title "Preparing chrooting in ${BUILD_PATH}"
- #Copying qemu
-
- /bin/cp /bin/qemu-arm-static "${BUILD_PATH}/usr/bin/"
- if [ ${?} -ne 0 ]; then
- error "line ${LINENO} can't copy /bin/qemu-user-static to ${BUILD_PATH}/usr/bin/ : exiting"
- exit ${ERR_1}
- fi
- /bin/cp /usr/lib/binfmt.d/qemu-arm-static.conf "${BUILD_PATH}/usr/lib/binfmt.d"
- if [ ${?} -ne 0 ]; then
- error "line ${LINENO} can't copy /usr/lib/binfmt.d/qemu-arm-static.conf to ${BUILD_PATH}/usr/lib/binfmt.d : exiting"
- exit ${ERR_1}
- fi
-
-
info "making /etc/hostname"
echo "${HOSTNAME}" > "${BUILD_PATH}/etc/hostname"