![](https://seccdn.libravatar.org/avatar/6124bc029d834ac2ad624b48153fce70.jpg?s=120&d=mm&r=g)
Am 09.03.21 um 09:48 schrieb Michael Andres:
On Tuesday 09 March 2021 08:51:52 Richard Biener wrote:
Yeah. I've long wanted a way to deploy an arm "chroot" in /usr/arm-suse-linux/sysroot for the purpose of cross-compiling. You might remember talking about this a few (10) years ago.
See also https://hackweek.suse.com/projects/package-proper-cross-compilers
It _should_ be as simple as
# zypper --root /usr/arm-suse/linux/sysroot --arch arm {--noscripts,--scripts=qemu} install glibc-devel Well 'ZYPP_TESTSUITE_FAKE_ARCH=arm zypper --root /usr/arm-suse/linux/sysroot...' could do the trick, though the variables name looks a bit hackisch. It was introduced in a time where you didn't have things images in mind.
Anyhow, turning the VAR into a --arch option to overwrite the auto detection is no big deal, if you find this helpful. It could be tied it to the usage of --root to prevent accidentally damaging the outer system.
We then should think about using qemu-user to run scripts in the chroot targets, debootstrap does that and we used the same trick to boostrap cross compile chroots in my previous job. -- Benjamin Zeller <bzeller@suse.de> Systems Programmer SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuremberg, Germany Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/ (HRB 36809, AG Nürnberg) Managing Director: Felix Imendörffer