All of lore.kernel.org
 help / color / mirror / Atom feed
* SH4 build failure fix
@ 2011-11-10 22:36 ` Michael_E_Brown
  2011-11-10 22:50   ` McClintock Matthew-B29882
  2011-11-22 23:53   ` Khem Raj
  0 siblings, 2 replies; 6+ messages in thread
From: Michael_E_Brown @ 2011-11-10 22:36 UTC (permalink / raw)
  To: yocto


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?
--
Michael Brown


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SH4 build failure fix
  2011-11-10 22:36 ` SH4 build failure fix Michael_E_Brown
@ 2011-11-10 22:50   ` McClintock Matthew-B29882
  2011-11-11  3:20     ` Michael E Brown
  2011-11-22 23:53   ` Khem Raj
  1 sibling, 1 reply; 6+ messages in thread
From: McClintock Matthew-B29882 @ 2011-11-10 22:50 UTC (permalink / raw)
  To: Michael_E_Brown; +Cc: yocto

On Thu, Nov 10, 2011 at 4:36 PM,  <Michael_E_Brown@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?

Can you find the offending commit with 'git blame'?

-M


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SH4 build failure fix
  2011-11-10 22:50   ` McClintock Matthew-B29882
@ 2011-11-11  3:20     ` Michael E Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Michael E Brown @ 2011-11-11  3:20 UTC (permalink / raw)
  To: McClintock Matthew-B29882; +Cc: yocto

On Thu, 2011-11-10 at 16:50 -0600, McClintock Matthew-B29882 wrote:
> On Thu, Nov 10, 2011 at 4:36 PM,  <Michael_E_Brown@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?
> 
> Can you find the offending commit with 'git blame'?

Nope. It's been exactly that way since it was first checked in to poky,
as far as I can tell. All of the commits referencing this file are
missing this line.

Additionally, upstream openembedded has one additional
"sh4-multilib.patch" that isnt carried in poky. I dont know if I need
this, actually. It builds without it.

$  git log --follow  ./gcc-cross4.inc 
commit 29d6678fd546377459ef75cf54abeef5b969b5cf
Author: Richard Purdie <rpurdie@linux.intel.com>
Date:   Fri Aug 27 15:14:24 2010 +0100

    Major layout change to the packages directory
    
    Having one monolithic packages directory makes it hard to find
things
    and is generally overwhelming. This commit splits it into several
    logical sections roughly based on function, recipes.txt gives more
    information about the classifications used.
    
    The opportunity is also used to switch from "packages" to "recipes"
    as used in OpenEmbedded as the term "packages" can be confusing to
    people and has many different meanings.
    
    Not all recipes have been classified yet, this is just a first pass
    at separating things out. Some packages are moved to meta-extras as
    they're no longer actively used or maintained.
    
    Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>

commit 70abb2e3e8671b3d10c7db5a16e37d646014a4b6
Author: Richard Purdie <rpurdie@linux.intel.com>
Date:   Wed Mar 31 13:43:09 2010 +0100

    gcc-cross: Use NATIVEDEPS
    
    Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>

commit 91d2e7d1bc725f2c3a39b4c7413bf96e85d17375
Author: Joshua Lock <josh@linux.intel.com>
Date:   Tue Dec 22 15:41:01 2009 +0000

    gcc: add gettext to dependencies
    
    Signed-off-by: Joshua Lock <josh@linux.intel.com>

commit b905e04eae5e557199c689ac63f56f996c3da27c
Author: Richard Purdie <richard@openedhand.com>
Date:   Tue Mar 18 10:44:24 2008 +0000

    gcc: Add missing files + changes from the last commit
    
    git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4039
311d38ba-8fff-0310-9ca6-ca027cbcb966




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SH4 build failure fix
  2011-11-10 22:36 ` SH4 build failure fix Michael_E_Brown
  2011-11-10 22:50   ` McClintock Matthew-B29882
@ 2011-11-22 23:53   ` Khem Raj
  2011-11-23 17:19     ` Michael E Brown
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2011-11-22 23:53 UTC (permalink / raw)
  To: Michael_E_Brown; +Cc: yocto

On Thu, Nov 10, 2011 at 2:36 PM,  <Michael_E_Brown@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@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SH4 build failure fix
  2011-11-22 23:53   ` Khem Raj
@ 2011-11-23 17:19     ` Michael E Brown
  2011-11-23 17:26       ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Michael E Brown @ 2011-11-23 17:19 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

On Tue, 2011-11-22 at 17:53 -0600, Khem Raj wrote:
> On Thu, Nov 10, 2011 at 2:36 PM,  <Michael_E_Brown@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.

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.

--
Michael





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SH4 build failure fix
  2011-11-23 17:19     ` Michael E Brown
@ 2011-11-23 17:26       ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2011-11-23 17:26 UTC (permalink / raw)
  To: Michael E Brown; +Cc: yocto

On Wed, Nov 23, 2011 at 9:19 AM, Michael E Brown
<Michael_E_Brown@dell.com> wrote:
> On Tue, 2011-11-22 at 17:53 -0600, Khem Raj wrote:
>> On Thu, Nov 10, 2011 at 2:36 PM,  <Michael_E_Brown@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.
>
> 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
>
>
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-23 17:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AQHMn/k5DNKfuvujVk+xPJByWnze6g==>
2011-11-10 22:36 ` SH4 build failure fix Michael_E_Brown
2011-11-10 22:50   ` McClintock Matthew-B29882
2011-11-11  3:20     ` Michael E Brown
2011-11-22 23:53   ` Khem Raj
2011-11-23 17:19     ` Michael E Brown
2011-11-23 17:26       ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.