Angstrom builds with prebuilt meta-toolchain output
Hi,
This is something I experimented a bit with and wondered if anyone else was interested in it. I just added external-toolchain.bb to OE which allows a meta-toolchain generated toolchain to be used by OE instead of building its own.
The attached patch adds the notion of different toolchains to angstrom, by default it uses the one specified by the DISTRO_VERSION_MAJOR variable I added but with ANGSTROM_TOOLCHAIN = "external" use a pre-supplied toolchain.
I don't know if Angstrom want to support this or not but this should at least show its possible and document how to do it. The patch shouldn't be committed in its current form as it needs a 2008-1 version file adding. Some of the PREFRERRED_VERSION statements related to the toolchain might also move to the toolchain definition files too but I have no strong opinions on that.
I was able to generate an external toolchain and then use that to make a minimal-image, I haven't tested further.
It is also I admit slightly glibc specific. We have to start somewhere though :).
Cheers,
Richard
============================================================
distro/include/angstrom-default-2007-9.inc +16 -0
@@ -0,0 +1,16 @@ + +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc_avr32 = "avr32-gcc-cross" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "glibc-intermediate" +PREFERRED_PROVIDER_virtual/arm-angstrom-linux-gnueabi-libc-for-gcc = "glibc-intermediate" +PREFERRED_PROVIDER_virtual/armeb-angstrom-linux-gnueabi-libc-for-gcc = "glibc-intermediate" +PREFERRED_PROVIDER_virtual/arm-angstrom-linux-libc-for-gcc = "glibc-intermediate" +PREFERRED_PROVIDER_virtual/powerpc-angstrom-linux-libc-for-gcc = "glibc-intermediate" +PREFERRED_PROVIDER_virtual/mipsel-angstrom-linux-libc-for-gcc = "glibc-intermediate" +PREFERRED_PROVIDER_virtual/sparc-angstrom-linux-libc-for-gcc = "glibc-intermediate" + +PREFERRED_PROVIDER_virtual/arm-angstrom-linux-uclibcgnueabi-libc-for-gcc = "uclibc-initial" +PREFERRED_PROVIDER_virtual/armeb-angstrom-linux-uclibcgnueabi-libc-for-gcc = "uclibc-initial" +
============================================================
distro/include/angstrom-external.inc +21 -0
@@ -0,0 +1,21 @@ +# +# Configuration to use a toolchain built by meta-toolchain.bb +# + +EXTERNAL_TOOLCHAIN = "${SDK_PREFIX}" + +PATH =. "${EXTERNAL_TOOLCHAIN}/bin:" + +PREFERRED_PROVIDER_linux-libc-headers = "external-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "external-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "external-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "external-toolchain" +PREFERRED_PROVIDER_virtual/libc = "external-toolchain" +PREFERRED_PROVIDER_virtual/libintl = "external-toolchain" +PREFERRED_PROVIDER_virtual/libiconv = "external-toolchain" +PREFERRED_PROVIDER_glibc-thread-db = "external-toolchain" +PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-toolchain" + +TARGET_CPPFLAGS_prepend = " -isystem${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/include " +TARGET_LDFLAGS_prepend = " -L${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/lib -Wl,-rpath-link,${EXTERNAL_TOOLCHAIN}/${TARGET_SYS}/lib "
============================================================
distro/angstrom-2007.1.conf +1 -18
@@ -8,6 +8,7 @@ DISTRO_VERSION = "2007.9-test-${DATE}" #DISTRO_VERSION = "2007.9" DISTRO_VERSION = "2007.9-test-${DATE}" +DISTRO_VERSION_MAJOR = "2007-9" DISTRO_REVISION = "46" require conf/distro/include/sane-srcdates.inc
@@ -106,7 +107,6 @@ PREFERRED_VERSION_binutils-cross-sdk ?= PREFERRED_VERSION_binutils-cross-sdk ?= "2.18" #avr32 only has patches for binutils 2.17 and gcc 4.1.2 in OE -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc_avr32 = "avr32-gcc-cross" PREFERRED_VERSION_avr32-gcc = "4.1.2" PREFERRED_VERSION_avr32-gcc-cross = "4.1.2" PREFERRED_VERSION_gcc-cross-sdk_avr32 = "4.0.2"
@@ -147,23 +147,6 @@ require conf/distro/include/preferred-e- require conf/distro/include/preferred-e-versions.inc -# Virtuals: -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "gcc-cross-initial" -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross" -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross" - -#Set preferred provider for the C library that is used to build the crosscompiler (NPTL voodoo) -PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "glibc-intermediate" -PREFERRED_PROVIDER_virtual/arm-angstrom-linux-gnueabi-libc-for-gcc = "glibc-intermediate" -PREFERRED_PROVIDER_virtual/armeb-angstrom-linux-gnueabi-libc-for-gcc = "glibc-intermediate" -PREFERRED_PROVIDER_virtual/arm-angstrom-linux-libc-for-gcc = "glibc-intermediate" -PREFERRED_PROVIDER_virtual/powerpc-angstrom-linux-libc-for-gcc = "glibc-intermediate" -PREFERRED_PROVIDER_virtual/mipsel-angstrom-linux-libc-for-gcc = "glibc-intermediate" -PREFERRED_PROVIDER_virtual/sparc-angstrom-linux-libc-for-gcc = "glibc-intermediate" - -PREFERRED_PROVIDER_virtual/arm-angstrom-linux-uclibcgnueabi-libc-for-gcc = "uclibc-initial" -PREFERRED_PROVIDER_virtual/armeb-angstrom-linux-uclibcgnueabi-libc-for-gcc = "uclibc-initial" - # hostap stuff, we prefer the in-kernel modules, but those don't work for all machines PREFERRED_PROVIDER_hostap-conf ?= "hostap-conf" PREFERRED_PROVIDER_hostap-modules_h2200 ?= "hostap-modules"
============================================================
distro/include/angstrom.inc +4 -0
@@ -13,6 +13,10 @@ require conf/distro/include/angstrom-${A DEPLOY_DIR = "${TMPDIR}/deploy/${ANGSTROM_MODE}" require conf/distro/include/angstrom-${ANGSTROM_MODE}.inc +# Include the toolchain definitions +ANGSTROM_TOOLCHAIN ?= "default-${DISTRO_VERSION_MAJOR}" +require conf/distro/include/angstrom-${ANGSTROM_TOOLCHAIN}.inc + #Use this variable in feeds and other parts that need a URI ANGSTROM_URI ?= "http://www.angstrom-distribution.org"
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Richard Purdie schreef:
Quoted 11 lines
Hi,
This is something I experimented a bit with and wondered if anyone else was interested in it. I just added external-toolchain.bb to OE which allows a meta-toolchain generated toolchain to be used by OE instead of building its own.
The attached patch adds the notion of different toolchains to angstrom, by default it uses the one specified by the
DISTRO_VERSION_MAJORvariable I added but withANGSTROM_TOOLCHAIN= "external" use a pre-supplied toolchain.
It has been my plan to move the toolchain configs to a seperate file for easier reuse, just haven't had time to RFC it yet :)
regards,
Koen
- --
[email protected] will go go away in december 2007, please use [email protected] instead.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFHU8R7MkyGM64RGpERApfqAJ4vW2ZjYa9NLKx39hIkGuBIkUgQPwCdF74U IrSHyqZ1DAR5ni63r08gwQU=
=9M/p
-----END PGP SIGNATURE-----
Quoted 4 lines · Richard Purdie
This is something I experimented a bit with and wondered if anyone else was interested in it. I just added external-toolchain.bb to OE which allows a meta-toolchain generated toolchain to be used by OE instead of building its own.
Woot! This is very helful, thanks.
Quoted 12 lines
The attached patch adds the notion of different toolchains to angstrom, by default it uses the one specified by the
DISTRO_VERSION_MAJORvariable I added but withANGSTROM_TOOLCHAIN= "external" use a pre-supplied toolchain.I don't know if Angstrom want to support this or not but this should at least show its possible and document how to do it. The patch shouldn't be committed in its current form as it needs a 2008-1 version file adding. Some of the
PREFRERRED_VERSIONstatements related to the toolchain might also move to the toolchain definition files too but I have no strong opinions on that.
Quoted 5 lines
I was able to generate an external toolchain and then use that to make a minimal-image, I haven't tested further.
It is also I admit slightly glibc specific. We have to start somewhere though :).
Absolutely.
Mickey.