Topics

#toolchain #yocto #devtool #linux #yocto #toolchain #linux #devtool


andymishra97@...
 

Hi,
I am trying to build a yocto demo-coreip-cli image for my custom RISC-V SOC which only supports imafd instructions. For the compilation of cross toolchain that is used by Bitbake, I tried changing cross-binutils.inc recipe and cross-gcc.inc recipe in openembedded-core layer by including “–with-arch=rv64imafd” in "EXTRA_OECONF " variable. Is there anything else I am missing or doing wrong? Thank You.


Josef Holzmayr
 

Howdy!

Am Di., 28. Juli 2020 um 07:09 Uhr schrieb <andymishra97@...>:

Hi,
I am trying to build a yocto demo-coreip-cli image for my custom RISC-V SOC which only supports imafd instructions. For the compilation of cross toolchain that is used by Bitbake, I tried changing cross-binutils.inc recipe and cross-gcc.inc recipe in openembedded-core layer by including “–with-arch=rv64imafd” in "EXTRA_OECONF " variable. Is there anything else I am missing or doing wrong? Thank You.
Patching the cross toolchain should be the last resort. First, you
should create a MACHINE definition that suits your needs and adjust
the tune flags there.

Greetz


Khem Raj
 

On 7/27/20 10:09 PM, andymishra97@... wrote:
Hi,
I am trying to build a yocto *demo-coreip-cli* image for my custom RISC-V SOC which only supports *imafd* instructions. For the compilation of cross toolchain that is used by Bitbake, I tried changing cross-binutils.inc recipe and cross-gcc.inc recipe in openembedded-core layer by including “*–with-arch=rv64imafd*” in "*EXTRA_OECONF* " variable. Is there anything else I am missing or doing wrong? Thank You.
I think you could start by defining new tune files for this look into
meta/conf/machine/include/riscv/arch-riscv.inc and also tune-riscv.inc to understand the underlying mechanism, we currently have lp64 and ilp32 options available, its not clear what particular ABI you are looking for ( is it rv32 ? ) but you can encode it there and then use the right tunes in your machine to use it.