Re: native tool from target recipe


Ross Burton <ross@...>
 

On Fri, 3 Dec 2021 at 16:16, <kkubkowski@...> wrote:
Hi all,
I have what I believe is a basic question yet I cannot find any definitive answer: is it possible for a target recipe (e.g. u-boot or barebox) to provide a native tool (i.e. mkimage) for the build system without the need to rebuild the providing recipe as a native one? To be more specific: I am using barebox as a bootloader and it always builds mkimage for host. I would like to use it later during the build process in another recipe (e.g. after the kernel is built) but I don't want to rebuild the bootloader as a native package. Given how flexible the build system is I suppose it is doable, but what is "the proper" way?
The usual solution is for the recipe to allow building native and you
install the tools from that recipe for the target recipe to use.

The better solution is that the source knows how to build host tools
for the host and target binaries for the target. barebox does, so
just set HOSTCC=${BUILD_CC} when you call make.

Ross

Join yocto@lists.yoctoproject.org to automatically receive all group messages.