Hi, Quoting Pirate Praveen (2024-12-15 14:12:28) > Would it be posisble to use apt/dpkg from host architecture to resolve > dependencies and unpacking which does not need to run on the same architecture > (avoiding qemu and possibly speeding up the process). Possibly using --root > option of dpkg to install into target chroot. postinst would still need to use > qemu as it will need run in the target arch.
I'm a bit confused what you are asking for because if I understand your query one way then the answer is: yes it already does that and if not then what you want to do looks like you want chrootless mode installations? > Context for building arm64 images from an amd64 machine > https://source.puri.sm/pureos/infra/pureos-image-recipes/-/issues/4#note_288559 Right, mmdebstrap can build bit-by-bit reproducible and bootable ext4 system image for arm64 on amd64 without superuser privileges. I maintain a script which does that for the MNT Reform which is also using the imx8mq just like the Librem 5 does. I think I first need to understand what you want to do and what you think mmdebstrap cannot do. >From what I read in the issue you cite, your goal is to create those images on amd64 (why don't you create them directly on a arm64 machine?) in a way that is fast and you want to avoid slowness by avoiding qemu as much as possible. Did you already benchmark how much runtime gets lost by apt and dpkg running inside the chroot? I did and the main problem in terms of slowness is not apt or dpkg but the decompression process. So technically you do not need to run apt or dpkg on the outside, you just need to run a native-arch decompressor. That being said, you know that the initial package installation is already done with apt and dpkg from the outside, right? The problem is the installation of more packages than the essential set later on. And for those, the big runtime wins are not from avoiding emulation of decompression but by avoiding emulated maintainer scripts. Especially running mkinitramfs & friends is horribly slow when you emulate it. You can also avoid qemu completely by using chrootless mode. This is how we currently are able to create bootable GNU Hurd images on linux (qemu does not allow you to run hurd binaries on linux). Nothing from the foreign architecture chroot is run. All the tools are from the outside. Note though, that not all packages support chrootless mode (also known as DPKG_ROOT support). Can you clarify what exactly you are trying to do? This sounds like an X/Y problem to me so far. :) Thanks! cheers, josch
signature.asc
Description: signature