(categorise) |
|||
| (One intermediate revision not shown) | |||
| Line 1: | Line 1: | ||
= Basic concept = | = Basic concept = | ||
Crossbuilding and speedup use a so-called "mixed chroot" of ARM and selected x86 binaries. | 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 | + | Normally, the ARM binaries are called and execute the transparent emulation (qemu-arm, from scratchbox also know as cpu-transparency) through the binfmt_handler. x86 binaries don't need to call that emulation layer for obvious reasons. |
| - | the binfmt_handler. x86 binaries don't need to call | + | |
= Component overview = | = Component overview = | ||
| Line 83: | Line 82: | ||
Work on the cross-toolchain is not yet completed. Especially installation side-by-side of the armv5tel and armv7l version is not yet supported. | 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. | Goal is to support multiple cross-compilers and allow parallel installation/execution. | ||
| + | |||
| + | [[Category:Build Infrastructure]] | ||
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, from scratchbox also know as cpu-transparency) through the binfmt_handler. x86 binaries don't need to call that emulation layer for obvious reasons.
The setup has 4 different components:
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 .
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
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:
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.