All of lore.kernel.org
 help / color / mirror / Atom feed
* Issues adding bare meta toolchain to yocto build
@ 2019-10-24 14:48 Westermann, Oliver
  0 siblings, 0 replies; 3+ messages in thread
From: Westermann, Oliver @ 2019-10-24 14:48 UTC (permalink / raw)
  To: richard.purdie, yocto

> On Thu, 2019-10-24 at 04:01 +0000, Richard Purdie wrote:
> If its a native recipe, there are no packages and therefore FILES
> doesn't make sense.

Oh, I have to admit I'm pretty new to the concept of the native packages.
Where can I find the list of files that are considered to be installed into
a "native" packages sysroot?

An good option for me would be to eg. install the toolchain into the native
sysroots /opt/ dir for usage by other recipes.

> Can you confirm that recipe does work?

For the TI recipe, no, I can't. I found it online and used it as a guide for
my first steps on the topic.


> If you install the binaries into ${bindir} they will. If you place them
> somewhere else which the system doesn't know about, they probably
> won't.
> 
> There are ways to make alternative locations work but I don't see any
> of that in the above recipe.

Can you point me to these ways? :)

> There isn't anything that special about a baremetal compiler except it
> sets some different default flags and is missing the library support.

I agree, though using linaro has the benefit that we would use the same
toolchain in yocto as in "regular development" of the m4 functionality.

Best regards, Olli


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

* Re: Issues adding bare meta toolchain to yocto build
  2019-10-23 11:23 Westermann, Oliver
@ 2019-10-23 22:34 ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2019-10-23 22:34 UTC (permalink / raw)
  To: Westermann, Oliver, yocto

On Wed, 2019-10-23 at 11:23 +0000, Westermann, Oliver wrote:
> Hey,
> 
> I'm having issues adding a build for a bare metal target to my yocto
> toolchain. I've a NXP SoC with a M4 core and I would like to
> integrate the M4 binary build into yocto.
> My M4 binary has a CMAKE file that depends on ARMGCC_DIR being set to
> locate the toolchain and everything works fine locally.
> 
> I've create a recipe for the toolchain that is heavily inspired by a
> TI recipe for the gcc-arm-none-eabi (available here: 
> http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-ti/devtools/gcc-arm-none-eabi_7-2018-q2-update.bb?h=master
> ).
> I've made sure that GCC_ARM_NONE_TOOLCHAIN_RECIPE is set.
> 
> After calling bitbake -cpopulate-sysroot gcc-arm-none-eabi-native the
> image/${GCC_ARM_NONE_TOOLCHAIN_RECIPE} path contains the complete
> toolchain.
> 
> My M4 recipe looks like this (plus SUMMARY, LICENSE, SRC_URI, ...):
> 
> inherit pkgconfig cmake
> DEPENDS = "gcc-arm-none-eabi-native"
> 
> S = "${WORKDIR}/git "
> 
> EXTRA_OECMAKE = '-DCMAKE_TOOLCHAIN_FILE="../armgcc.cmake" \
>                  -G "Unix Makefiles" \
>                  -DCMAKE_BUILD_TYPE=release'
> 
> From my understanding depending on gcc-arm-none-eabi-native should
> result in the native toolchain being installed into the m4's recipe-
> sysroot-native folder.
> The sysroot-providers in the recipe-sysroot-native folder does list
> gcc-arm-none-eabi-native, but I don't get the files and therefore
> have no toolchain.
> 
> Any suggestions on what I'm doing wrong or how to debug this further?

Sounds like the sysroot filtering code doesn't know about this
directory and therefore doesn't pass it through to the recipe sysroot?

The recipe you link to is for an on target compiler, not one in the
sysroot.

I'm actually a little surprised you can't use our standard cross
compiler assuming this M4 core is on an ARM chip? It should be a case
of passing the right options to the compiler to target the M4?

Cheers,

Richard



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

* Issues adding bare meta toolchain to yocto build
@ 2019-10-23 11:23 Westermann, Oliver
  2019-10-23 22:34 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Westermann, Oliver @ 2019-10-23 11:23 UTC (permalink / raw)
  To: yocto

Hey,

I'm having issues adding a build for a bare metal target to my yocto toolchain. I've a NXP SoC with a M4 core and I would like to integrate the M4 binary build into yocto.
My M4 binary has a CMAKE file that depends on ARMGCC_DIR being set to locate the toolchain and everything works fine locally.

I've create a recipe for the toolchain that is heavily inspired by a TI recipe for the gcc-arm-none-eabi (available here: http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-ti/devtools/gcc-arm-none-eabi_7-2018-q2-update.bb?h=master).
I've made sure that GCC_ARM_NONE_TOOLCHAIN_RECIPE is set.

After calling bitbake -cpopulate-sysroot gcc-arm-none-eabi-native the image/${GCC_ARM_NONE_TOOLCHAIN_RECIPE} path contains the complete toolchain.

My M4 recipe looks like this (plus SUMMARY, LICENSE, SRC_URI, ...):

inherit pkgconfig cmake
DEPENDS = "gcc-arm-none-eabi-native"

S = "${WORKDIR}/git "

EXTRA_OECMAKE = '-DCMAKE_TOOLCHAIN_FILE="../armgcc.cmake" \
                 -G "Unix Makefiles" \
                 -DCMAKE_BUILD_TYPE=release'

From my understanding depending on gcc-arm-none-eabi-native should result in the native toolchain being installed into the m4's recipe-sysroot-native folder.
The sysroot-providers in the recipe-sysroot-native folder does list gcc-arm-none-eabi-native, but I don't get the files and therefore have no toolchain.

Any suggestions on what I'm doing wrong or how to debug this further?

Best regards, Olli


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

end of thread, other threads:[~2019-10-24 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24 14:48 Issues adding bare meta toolchain to yocto build Westermann, Oliver
  -- strict thread matches above, loose matches on Subject: below --
2019-10-23 11:23 Westermann, Oliver
2019-10-23 22:34 ` Richard Purdie

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.