[yocto] Add custom tools to yocto build environment

2015-07-22 Thread Lukas Weiss
Hello yocto friends,

I have a problem with yocto you could help me with. The Background:
Iam working on a yocto-linux for a TI OMAP-L138, which is a ARM9+DSP in one
package. The Linux on ARM is running fine, and does everything I want. I
have implemented a kernel driver to start the DSP-Core from the Linux on
the ARM9-Core, but now I need to generate the Firmware for the DSP with the
Yocto buid system. Main problem is, that I need a compiler/toolchain from
TI to compile the Code for the DSP in the yocto build environment.

At this point I did not understand how to add tools to the yocto build
environment at all. I think there must be a way to add software to my host
(build) system for generating code for my target. But I have no idea how to
do it. When I write a BB-recipe, the architecture of the resulting files is
checked to be from targets type (arm in my case), but host tools are of
type x86... (which is totally correct!)

I think I need a recipe, which downloads the compiler/toolchain for the
DSP, extracts and installs it to my yocto build environment, so that I can
use it in another recipe that compiles my code to a loadable firmware-image
(which is placed to my targets rootfs).

Do you have any suggestions for me how to do that?

Thanks,

Lukas
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Add custom tools to yocto build environment

2015-08-12 Thread Khem Raj

> On Jul 22, 2015, at 12:00 AM, Lukas Weiss  wrote:
> 
> Hello yocto friends,
> 
> I have a problem with yocto you could help me with. The Background:
> Iam working on a yocto-linux for a TI OMAP-L138, which is a ARM9+DSP in one 
> package. The Linux on ARM is running fine, and does everything I want. I have 
> implemented a kernel driver to start the DSP-Core from the Linux on the 
> ARM9-Core, but now I need to generate the Firmware for the DSP with the Yocto 
> buid system. Main problem is, that I need a compiler/toolchain from TI to 
> compile the Code for the DSP in the yocto build environment.
> 
> At this point I did not understand how to add tools to the yocto build 
> environment at all. I think there must be a way to add software to my host 
> (build) system for generating code for my target. But I have no idea how to 
> do it. When I write a BB-recipe, the architecture of the resulting files is 
> checked to be from targets type (arm in my case), but host tools are of type 
> x86... (which is totally correct!)
> 
> I think I need a recipe, which downloads the compiler/toolchain for the DSP, 
> extracts and installs it to my yocto build environment, so that I can use it 
> in another recipe that compiles my code to a loadable firmware-image (which 
> is placed to my targets rootfs).
> 
> Do you have any suggestions for me how to do that?

This is a multi machine build case, and in single bitbake invocation we only 
support single arch. But this is not a big issue you can issue two cmds

MACHINE=dsp-machine bitbake blah

and then

MACHINE=arm-machine bitbake blah

I think DSP firmware is another rootfs+kernel  or may be bare metal app, you 
could certainly use OE/Yocto tooling for that however, I think its not trivial 
if you want to build from source and I think there is no support for this DSP 
chip as supported architecture in OE, which means it will require changes in 
OE-Core to support the DSP architecture and then you would either build the 
toolchain internally or you can also hook in a prebuilt toolchain into OE and 
only after that you can start to build
packages for firmware. You can look into git history and see how a new 
architecture is added ( mips64 was one I remember last I did ) you will need 
something like that.

quick method would be to keep building DSP firmware outside OE/yocto 
environment ( as you have been ) then just package the final firmware blob into 
ARM image

> 
> Thanks,
> 
> Lukas
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



signature.asc
Description: Message signed with OpenPGP using GPGMail
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto