All of lore.kernel.org
 help / color / mirror / Atom feed
* Building and using a second toolchain
@ 2017-09-07 11:13 Mike Crowe
  2017-09-07 12:21 ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Crowe @ 2017-09-07 11:13 UTC (permalink / raw)
  To: openembedded-core

I'm trying to compile a vendor bootloader for an AArch64-based chip. This
bootloader requires both a 32-bit "arm" compiler and a 64-bit "aarch64"
compiler to build. The rest of the system only requires the aarch64
compiler, so I'm using arch-armv8.inc in my machine configuration.

Since this is for a bootloader, the 32-bit compiler can probably be the
equivalent of gcc-cross-initial, and of course I need binutils-cross too.

Inspired by native.bbclass, I produced binutils-cross-arm and
gcc-cross-initial-arm recipes that rewrite lots of TARGET_ variables and
then copied the handful of require lines from the standard binutils-cross
and gcc-cross-initial recipes. This seems to work well - the binaries end
up in sysroots-components as would be expected.

I then added gcc-cross-initial-arm to DEPENDS for the bootloader recipe.
Unfortunately, things seem to go wrong when populating the recipe-specific
sysroot as the secondary toolchain is not present. I get messages like:

 WARNING: bootloader-7 do_prepare_recipe_sysroot: Manifest .../tmp-glibc/sstate-control/manifest-x86_64_aarch64-gcc-cross-initial-arm.populate_sysroot not found?
 WARNING: bootloader-7 do_prepare_recipe_sysroot: Manifest .../tmp-glibc/sstate-control/manifest-x86_64_aarch64-binutils-cross-arm.populate_sysroot not found?

These manifest files do exist though:

 tmp-glibc/sstate-control/manifest-x86_64_arm-gcc-cross-initial-arm.populate_sysroot
 tmp-glibc/sstate-control/manifest-x86_64_arm-binutils-cross-arm.populate_sysroot

These filenames appear to come from staging.bbclass and are generated from:

 manifest-${BUILD_ARCH}_${TARGET_ARCH}-%s.populate_sysroot

It thought that the simplest path to making this work would be to ensure
that the manifest files generated during the build have the names that all
other recipes will expect, but this means using the wrong TARGET_ARCH in my
binutils-cross-arm and gcc-cross-initial-arm recipes which I can't do
without also overriding TARGET_SYS and PN at least which definitely isn't
pretty.

I remember reading posts about doing this on the list in the past, but my
search engine skills aren't up to the job of finding anything. Am I missing
an easier way to make this work?

Thanks.

Mike.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-05 17:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07 11:13 Building and using a second toolchain Mike Crowe
2017-09-07 12:21 ` Richard Purdie
2017-09-07 17:00   ` Mike Crowe
2017-09-07 21:28     ` Richard Purdie
2017-09-08  6:04       ` Mike Crowe
2017-09-08  6:53         ` Richard Purdie
2017-10-05 17:12           ` Mike Crowe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.