On Wed, Nov 23, 2011 at 9:19 AM, Michael E Brown <[email protected]> wrote: > On Tue, 2011-11-22 at 17:53 -0600, Khem Raj wrote: >> On Thu, Nov 10, 2011 at 2:36 PM, <[email protected]> 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. > > I am porting a build from a pre-existing build system where I already > have full working rootfs and kernel, so porting our kernel is slightly > lower on the priority list than getting userland up and running. I'll be > working on kernel in a couple weeks, though I may get an sh4 qemu kernel > building in the meantime. If I get that going, I'll send patches, but I > would like to see the oe-core/yocto fixed up to build sh4 properly. > > There are a total of 3 packages that require fixes to get all the > userspace packages building, and one fix to qemu to restore building sh4 > binaries. In addition to the already posted gcc fixes: > > 1) libatomics needs to be upgraded to the latest, 7.2alpha6 for sh4 > fixes. This upgrade is simply renaming the file and removing the > already-applied patches. > > 2) libart: the sh4 art_config.h was dropped in oe-core. Simply copy over > from oe.
post patches for above two. Layered architecture of OE facilitates maintaining other architectures easily enough. If there are common fixes needed send them to oe-core otherwise meta-oe can carry some of fixes if you keep them uptodate if they go stale they may be then left out. > > -- > Michael > > > > _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
