[yocto] SH4 build failure fix

Khem Raj raj.khem at gmail.com
Tue Nov 22 15:53:18 PST 2011


On Thu, Nov 10, 2011 at 2:36 PM,  <Michael_E_Brown at dell.com> wrote:
>
> I'm presently working on porting the build environment for three existing embedded projects over to use yocto. Unfortunately, the project which has to go first is based on an SH4 chip, which isn't on the officially supported yocto architecture list. I gave the compile a go, and ran into a build error in gcc-cross-intermediate:
>
> build-edison-sh4/tmp/sysroots/i686-linux/usr/bin/sh4-poky-linux/sh4-poky-linux-ld: cannot find crti.o: No such file or directory
> build-edison-sh4/tmp/sysroots/i686-linux/usr/bin/sh4-poky-linux/sh4-poky-linux-ld: cannot find -lc
> build-edison-sh4/tmp/sysroots/i686-linux/usr/bin/sh4-poky-linux/sh4-poky-linux-ld: cannot find crtn.o: No such file or directory
>
> Trying to figure out the source of this build error, I found that base openembedded does compile this package successfully, so I started focusing on the differences. I narrowed the build failure down to this line in gcc-cross4.inc, which is present in openembedded, but absent in yocto/poky:
>    gcc-cross4.inc
>    EXTRA_OECONF_append_sh4 = " --with-multilib-list= --enable-incomplete-targets "
>
> After I added this one line, I was able to sucessfully build a base yocto image for qemu sh4. Is it possible to get this added to the upstream yocto build?

there is much more than just building toolchain. You need to make sure
that kernel is configured properly too and last time I remember doing
it in oe.dev I needed some patches on vanilla
kernel that may have changed now. I think adding SH4 to meta-oe can be
considered if you post
patches for that layer. Then the question remains where the remaining
machine support goes. It can be a new layer for secondary qemu
architectures.

> --
> Michael Brown
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



More information about the yocto mailing list