Contents |
Crossbuilding and speedup use a so-called "mixed chroot" of ARM and selected x86 binaries. Normally, the ARM binaries are called and execute the transparent emulation (qemu-arm) through the binfmt_handler. x86 binaries don't need to call the emulation.
The setup has 4 different components:
* packages being transferred from x86 to ARM * packages being transferred from ARM to x86 * supplementary packages * cross-toolchain for use in meego directly
Originally this process was developed to support -32bit sub-package sharing between x86_64 and i586. So any packages built on i586 with libraries needed on x86_64 for 32bit operations could just be exported from the i586 build without any need to rebuild the sources. Instead it repackages the binaries and stores them into the x86_64 tree (:full). Through extension of the configurations, this is also possible e.g. from x86 to ARM and vice versa. This enables the folowing operations.
Currently, all i586 binaries/libraries are installed (in the ARM compile chroot) using a prefix of /emul/ia32-linux/ . Additionally, binaries to be called get appropriate RPATH and dynamic-linker sections added to the ELF header to look in the folders according to the new prefix.
Most packages can be handled by a template specfile designed for this purpose.
Naming scheme: on i586 the packages have -x86 in their name and the transferred packages have "-arm" added. The package to install on the ARM side is then e.g. glibc-x86-arm-2.11.90-7.1.armv5tel.rpm .
* speedup * glibc-x86 - (mandatory also for cross-compiler) * bash-x86 * gmp-x86 * mpfr-x86 * ncurses-libs-x86 * zlib-x86 * more to come (research shows that especially rpm, bzip, gzip, sed, cat, m4 and perl are candidates which improve speed much)
* cross-compiler in 2 flavours * Available as 'normal' cross-compiler e.g. cross-<targetarch>-binutils/gcc in /opt/cross on MeeGo@i586 * cross-armv5tel-binutils * cross-armv5tel-gcc * and for the Build Service acceleration with "-accel" added to the name e.g. cross-<targetarch>-binutils/gcc-accel * cross-armv5tel-binutils-accel * cross-armv5tel-gcc-accel
These packages are copied into the appropriate /opt/cross/<target_platform>/sys-root directory . Thus no staging build on x86-side is needed, which would potentially differ from the "native" ARM side builds. 2nd benefit is the speed gain at it reuses the already built ARM versions. The packages have also the extension "-x86" added to the package name as part of the baselib operation e.g. Naming scheme: glibc-arm-x86-<version>.i586.rpm
* glibc-arm * glibc-devel-arm * glibc-headers-arm * kernel-headers-arm
* meego-accelerator (only on ARM) * base files/directories for the acceleration on the ARM side, package is aaa_meego_acceleration, as the runscript extension of the build service is executed alphabetically * meego-cross-armv5tel-sysroot (only on i586) * /opt/cross/armv5tel-meego-linux-gnueabi/sys-root basic files/directories * meego-cross-armv7l-sysroot (only on i586) * /opt/cross/armv7l-meego-linux-gnueabi/sys-root basic files/directories
As the work is 90% same for cross acceleration and 'traditional' cross toolchain, this was done in one effort. Packages are partly built on i586 and partly transferred directly from the ARM side:
* transferred from ARM via baselibs * glibc-arm * glibc-devel-arm * glibc-headers-arm * kernel-headers-arm * more possible - depending on the need for sdk ? * built on i586 * cross-armv5tel-binutils * cross-armv5tel-gcc * supplementary * meego-cross-armv5tel-sysroot
Current layout:
/opt/cross/bin/armv5tel-meego-linux-gnueabi-*
/opt/cross/armv5tel-meego-linux-gnueabi/sys-root
Work on the cross-toolchain is not yet completed. Especially installation side-by-side of the armv5tel and armv7l version is not yet supported. Goal is to support multiple cross-compilers and allow parallel installation/execution.