Meego Wiki
Views

Build Infrastructure/Sysadmin Distro/CrossToolchain Components

From MeeGo wiki
< Build Infrastructure | Sysadmin Distro(Difference between revisions)
Jump to: navigation, search
(How packages are transferred between arches/schedulers)
(categorise)
 
(2 intermediate revisions 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 the emulation.
+
= Component overview =
= Component overview =
The setup has 4 different components:
The setup has 4 different components:
-
* packages being transferred from x86 to ARM
+
* packages being transferred from x86 to ARM
-
* packages being transferred from ARM to x86
+
* packages being transferred from ARM to x86
-
* supplementary packages
+
* supplementary packages
-
* cross-toolchain for use in meego directly
+
* cross-toolchain for use in meego directly
== How packages are transferred between arches/schedulers ==
== How packages are transferred between arches/schedulers ==
Line 25: Line 24:
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 .
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  
+
* speedup  
-
  * glibc-x86  - (mandatory also for cross-compiler)
+
** glibc-x86  - (mandatory also for cross-compiler)
-
  * bash-x86
+
** bash-x86
-
  * gmp-x86
+
** gmp-x86
-
  * mpfr-x86
+
** mpfr-x86
-
  * ncurses-libs-x86
+
** ncurses-libs-x86
-
  * zlib-x86
+
** zlib-x86
-
  * more to come (research shows that especially rpm, bzip, gzip, sed, cat, m4 and perl are candidates which improve speed much)
+
** 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
+
* cross-compiler in 2 flavours
-
  * Available as 'normal' cross-compiler e.g. cross-<targetarch>-binutils/gcc  in /opt/cross  on MeeGo@i586
+
** Available as 'normal' cross-compiler e.g. cross-<targetarch>-binutils/gcc  in /opt/cross  on MeeGo@i586
-
  * cross-armv5tel-binutils
+
*** cross-armv5tel-binutils
-
  * cross-armv5tel-gcc
+
*** cross-armv5tel-gcc
-
  * and for the Build Service acceleration with "-accel" added to the name e.g. cross-<targetarch>-binutils/gcc-accel
+
** 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-binutils-accel
-
  * cross-armv5tel-gcc-accel
+
*** cross-armv5tel-gcc-accel
== Packages being transferred from ARM to x86 ==
== Packages being transferred from ARM to x86 ==
Line 46: Line 45:
The packages have also the extension "-x86" added to the package name as part of the baselib operation e.g.  
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
Naming scheme: glibc-arm-x86-<version>.i586.rpm
-
* glibc-arm
+
* glibc-arm
-
* glibc-devel-arm
+
* glibc-devel-arm
-
* glibc-headers-arm
+
* glibc-headers-arm
-
* kernel-headers-arm
+
* kernel-headers-arm
== Supplementary packages ==
== Supplementary packages ==
-
* meego-accelerator  (only on 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
+
** 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)
+
* meego-cross-armv5tel-sysroot  (only on i586)
-
  * /opt/cross/armv5tel-meego-linux-gnueabi/sys-root basic files/directories
+
** /opt/cross/armv5tel-meego-linux-gnueabi/sys-root basic files/directories
-
* meego-cross-armv7l-sysroot    (only on i586)
+
* meego-cross-armv7l-sysroot    (only on i586)
-
  * /opt/cross/armv7l-meego-linux-gnueabi/sys-root basic files/directories
+
** /opt/cross/armv7l-meego-linux-gnueabi/sys-root basic files/directories
== Cross-toolchain for use in MeeGo directly ==
== Cross-toolchain for use in MeeGo directly ==
As the work is 90% same for cross acceleration and 'traditional' cross toolchain, this was done in one effort.
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:
Packages are partly built on i586 and partly transferred directly from the ARM side:
-
* transferred from ARM via baselibs
+
* transferred from ARM via baselibs
-
  * glibc-arm
+
** glibc-arm
-
  * glibc-devel-arm
+
** glibc-devel-arm
-
  * glibc-headers-arm
+
** glibc-headers-arm
-
  * kernel-headers-arm
+
** kernel-headers-arm
-
  * more possible - depending on the need for sdk ?
+
** more possible - depending on the need for sdk ?
-
* built on i586
+
* built on i586
-
  * cross-armv5tel-binutils
+
** cross-armv5tel-binutils
-
  * cross-armv5tel-gcc
+
** cross-armv5tel-gcc
-
* supplementary
+
* supplementary
-
  * meego-cross-armv5tel-sysroot  
+
** meego-cross-armv5tel-sysroot  
Current layout:
Current layout:
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]]

Latest revision as of 12:06, 26 April 2011

Contents

Basic concept

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.

Component overview

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

How packages are transferred between arches/schedulers

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.

Packages being transferred from x86 to ARM

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

Packages being transferred from ARM to x86

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

Supplementary packages

  • 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

Cross-toolchain for use in MeeGo directly

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.

Personal tools