Hi, We are working on userspace aarch64 and aarch32 apps and we are trying to run 32/64 mode app simultaneously. Is there any multi-arch support for mixed rootfs (has linkers/libs of both arm and arm64)?
Hi,
On 16 October 2013 11:45, Zhou Zhu zzhu3@marvell.com wrote:
Hi, We are working on userspace aarch64 and aarch32 apps and we are trying to run 32/64 mode app simultaneously. Is there any multi-arch support for mixed rootfs (has linkers/libs of both arm and arm64)?
It is possible to run both AArch32 (arm) and AArch64 (arm64) applications under an arm64 kernel.
What is not possible is for an AArch32 user-space program to use an AArch64 user-space library (or any combination like this).
So if you want to run 32-bit user-space programs you need to have installed all the 32-bit user-space libraries as well.
Thanks,
Matt
On 10/17/2013 06:31 PM, Matthew Gretton-Dann wrote:
Hi,
On 16 October 2013 11:45, Zhou Zhu zzhu3@marvell.com wrote:
Hi, We are working on userspace aarch64 and aarch32 apps and we are trying to run 32/64 mode app simultaneously. Is there any multi-arch support for mixed rootfs (has linkers/libs of both arm and arm64)?
It is possible to run both AArch32 (arm) and AArch64 (arm64) applications under an arm64 kernel.
What is not possible is for an AArch32 user-space program to use an AArch64 user-space library (or any combination like this).
So if you want to run 32-bit user-space programs you need to have installed all the 32-bit user-space libraries as well.
Thanks,
Matt
So how does the libraries place in the rootfs? like lib/lib64 as in x86/x64? Is there any similar rule in arm/arm64 system (whatever openebedded/ubuntu/android/...) for that? Like multi arch spec in ubuntu?
Am 17.10.2013 13:21, schrieb Zhou Zhu:
On 10/17/2013 06:31 PM, Matthew Gretton-Dann wrote:
Hi,
On 16 October 2013 11:45, Zhou Zhu zzhu3@marvell.com wrote:
Hi, We are working on userspace aarch64 and aarch32 apps and we are trying to run 32/64 mode app simultaneously. Is there any multi-arch support for mixed rootfs (has linkers/libs of both arm and arm64)?
It is possible to run both AArch32 (arm) and AArch64 (arm64) applications under an arm64 kernel.
What is not possible is for an AArch32 user-space program to use an AArch64 user-space library (or any combination like this).
So if you want to run 32-bit user-space programs you need to have installed all the 32-bit user-space libraries as well.
Thanks,
Matt
So how does the libraries place in the rootfs? like lib/lib64 as in x86/x64? Is there any similar rule in arm/arm64 system (whatever openebedded/ubuntu/android/...) for that? Like multi arch spec in ubuntu?
This should be {,/usr}/lib/{arm-linux-gnueabihf,aarch64-linux-gnu} on Ubuntu.
Matthias
On 10/17/2013 07:21 AM, Zhou Zhu wrote:
So how does the libraries place in the rootfs? like lib/lib64 as in x86/x64? Is there any similar rule in arm/arm64 system (whatever openebedded/ubuntu/android/...) for that? Like multi arch spec in ubuntu?
OpenEmbedded unfortunately does not support multiarch and when I last asked about it [1], it didn't sound like there was any intention to add it. I briefly looked into doing it myself, but I'm just not yet familiar enough with the internals.
1. http://lists.linaro.org/pipermail/cross-distro/2013-April/000434.html
As Matthias mentioned, the multi-arch paths, assuming /usr squash, are:
/lib/arm-linux-gnueabihf /lib/aarch64-linux-gnu
I've also toyed with a /bin/$TRIPLET extension to the scheme, but don't yet have a good solution for scripts with shebang lines.
It would be nice if it were easier to install the binary toolchain releases into a multi-arch rootfs, but it's been a while since I set everything and I don't recall the specifics of why it wasn't two straight copy operations. It would makes things easier if one didn't have to always pass -dynamic-linker and -rpath settings to get dynamic linking working on multiarch root filesystems, but at least that works. In my opinion, multiarch is the best option out there, and I'd love to see improved support for it, but I understand that there's a lot of work involved, the benefits are mostly for pretty fringe (or should I say cutting edge?) use cases, and it's tricky to not break things in the transition.
Regards, Christopher
+++ Christopher Covington [2013-10-18 10:25 -0400]:
On 10/17/2013 07:21 AM, Zhou Zhu wrote:
It would be nice if it were easier to install the binary toolchain releases into a multi-arch rootfs,
It would. Currently you can use distro cross-toolchains (from Ubuntu, and Debian soon if I get my finger out). Which 'just work, but are not as cutting-edge as the linaro ones.
I started work on wrapping the linaro binary releases into (fake) debs so that they were easy to install with bits in the right place, but it wasn't working quite right when I got sidetracked, so that's still a 'would be nice'.
I still haven't determined to my satisfaction whether the linaro binary (cross) toolchains can be used for multiarch cross-building by just moving files about/symlinking and fiddling with configs or if in fact a rebuild is necessary. I can think of good reasons why it could go either way. Does anyone else know for sure?
Wookey
Hi Wookey,
On 10/18/2013 11:49 AM, Wookey wrote:
+++ Christopher Covington [2013-10-18 10:25 -0400]:
I still haven't determined to my satisfaction whether the linaro binary (cross) toolchains can be used for multiarch cross-building by just moving files about/symlinking and fiddling with configs or if in fact a rebuild is necessary. I can think of good reasons why it could go either way. Does anyone else know for sure?
I have gotten them to work by moving files, updating symlinks, and hard-coding the linker and library paths into the software I'm building (INTERP, RPATH). I don't know if that last step meets your requirements or not. I think if you wanted to avoid the explicit linker settings you would need to rebuild the linker/loader, or is there an easier way?
Thanks, Christopher
+++ Matthew Gretton-Dann [2013-10-17 11:31 +0100]:
Hi,
On 16 October 2013 11:45, Zhou Zhu zzhu3@marvell.com wrote:
Hi, We are working on userspace aarch64 and aarch32 apps and we are trying to run 32/64 mode app simultaneously. Is there any multi-arch support for mixed rootfs (has linkers/libs of both arm and arm64)?
It is possible to run both AArch32 (arm) and AArch64 (arm64) applications under an arm64 kernel.
What is not possible is for an AArch32 user-space program to use an AArch64 user-space library (or any combination like this).
So if you want to run 32-bit user-space programs you need to have installed all the 32-bit user-space libraries as well.
Which is done for you by the dependency system on Ubuntu and Debian using multiarch. https://wiki.debian.org/Multiarch/HOWTO
And Ubuntu Saucy now has lots of arm64 packages you can use: http://ports.ubuntu.com/dists/saucy/main/binary-arm64/
So you should be able to debootstrap an arm64 image and add armhf binaries to it, or vice versa.
I've not actually tried that so I don't know how well it works. There may still be important bits missing.
Wookey
linaro-toolchain@lists.linaro.org