Page 2 of 4

Re: OE cross toolchain for SH4

Posted: Mon Feb 15, 2010 2:30 pm
by tom_van
Arris,

could you please look at http://volny.cz/vanekt/sam/elfpatcher-oe.tar.gz
and eventually commit it to svn? elfpatcher is part of my arfix and may be useful
on arm TVs too. Native version is for prepatching firmware on pc.

Thanks, Tom

Re: OE cross toolchain for SH4

Posted: Mon Feb 15, 2010 7:35 pm
by arris69
tom_van wrote:Arris,

could you please look at http://volny.cz/vanekt/sam/elfpatcher-oe.tar.gz
and eventually commit it to svn? elfpatcher is part of my arfix and may be useful
on arm TVs too. Native version is for prepatching firmware on pc.

Thanks, Tom
tnx for the nice app. commited,

there was a bug in gcc for sh4, so if you use gcc-cross from oe/branch pls. rebuild it

Code: Select all

svn up
cd build ; . ./env.source ; bitbake -c clean gcc-cross ; cd -
cd build ; . ./env.source ; bitbake -v -D gcc-cross ; cd -
arris

Re: OE cross toolchain for SH4

Posted: Mon Feb 15, 2010 7:53 pm
by tom_van
Before we rebuild can you add -m4 to target CFLAGS? Or is there a compatibility reason why not?

Re: OE cross toolchain for SH4

Posted: Mon Feb 15, 2010 8:42 pm
by arris69
tom_van wrote:Before we rebuild can you add -m4 to target CFLAGS? Or is there a compatibility reason why not?
you can enable oe/conf/machine/include/tune-sh4.conf in oe/conf/machine/T-RBYDEUC.conf if you realy like, i didn't tested any "optimisation/tuning"
but if you do so pls rebuild the full toolchain
arris

ps: somebody need applications like gdb slsnif dosfstools strace lsof coreutils i2c-tools ntop ibusb?

Re: OE cross toolchain for SH4

Posted: Mon Feb 15, 2010 11:48 pm
by tom_van
I know about oe/conf/machine/T-RBYDEUC.conf and disabled tune-sh4.conf.
-m4 (generate sh4 code) is used in kernel and I'm not sure if it is default sh4-gcc mode.

I use gdbserver and cross gdb from STLinux2.3 and strace. It would be nice to have gdb 7+.
I tried compile it from source, but gdbserver does not like such old libc.

Keep up good work

I have arfix-sh package ready to commit. I'd really appreciate dev access to svn.

Re: OE cross toolchain for SH4

Posted: Wed Feb 17, 2010 6:22 pm
by arris69
tom_van wrote:I know about oe/conf/machine/T-RBYDEUC.conf and disabled tune-sh4.conf.
-m4 (generate sh4 code) is used in kernel and I'm not sure if it is default sh4-gcc mode.
m4 "should" be default :-)
tom_van wrote: I use gdbserver and cross gdb from STLinux2.3 and strace. It would be nice to have gdb 7+.
I tried compile it from source, but gdbserver does not like such old libc.
is included in svn, fix for sh4 also.
hard way is to rebuild binutils, easy way remove one include file before your build gdbserver
i wrote infos into gdb_7.0.1.bb
tom_van wrote: Keep up good work

I have arfix-sh package ready to commit. I'd really appreciate dev access to svn.
:?: erdem_ua :?:

Re: OE cross toolchain for SH4

Posted: Wed Feb 17, 2010 11:11 pm
by erdem_ua
tom_van added as a project membership. Also tskitishvili added for SH4 works like telnet enabling.
Thanks guys :)

Re: OE cross toolchain for SH4

Posted: Fri Feb 19, 2010 9:10 am
by tom_van
erdem_ua wrote:added as a project membership
Thx Erdem.
arris69 in svn wrote:r240 | arris69 | 2010-02-17 19:34:23 +0100 (Wed, 17 Feb 2010) | 2 lines

end of merge orgie, sh4 use now gcc-4.1.1
Good. Starting rebuild...

Re: OE cross toolchain for SH4

Posted: Fri Feb 19, 2010 2:36 pm
by tom_van
Some orgies here with glibc-initial-2.5.0-2.7.0-r1:
as, ld version expected up to 2.19, 2.20 on karmic - easy patch in configure, ready to commit
limits.h missing in /usr/lib/gcc/i686-linux-gnulp/4.4.1/include/
- just made empty file
but then some code is compiled by build gcc :?: log.do_install.9329:

Code: Select all

...
make[2]: Entering directory `/home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/csu'
gcc  ../sysdeps/unix/sysv/linux/init-first.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes      -I../include -I/home/sam
/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD/csu -I/home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD
 -I../sysdeps/sh/elf -I../nptl/sysdeps/unix/sysv/linux/sh/sh4 -I../sysdeps/unix/sysv/linux/sh/sh4 -I../nptl/sysdeps/unix/sysv/linux/sh -I../sysdeps/unix/sysv/linux/sh -
I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix
/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/sh -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sy
sdeps/sh/sh4/fpu -I../sysdeps/sh/sh4 -I../nptl/sysdeps/sh -I../sysdeps/sh -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/
ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/i686-linux-gnulp/4.4.1/include -isystem /home/sam/b
uild/tmp/cross/sh4-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -DHAVE_INITFINI -o /home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.
7.0-r1/GLIBC/glibc-2.5/BUILD/csu/init-first.o -MD -MP -MF /home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD/csu/init-first.o.dt -MT
/home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD/csu/init-first.o
gcc  libc-start.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes      -I../include -I/home/sam/build/tmp/work/sh4-linux/g
libc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD/csu -I/home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD -I../sysdeps/sh/elf -I../n
ptl/sysdeps/unix/sysv/linux/sh/sh4 -I../sysdeps/unix/sysv/linux/sh/sh4 -I../nptl/sysdeps/unix/sysv/linux/sh -I../sysdeps/unix/sysv/linux/sh -I../nptl/sysdeps/unix/sysv/
linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/ine
t -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/sh -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/sh/sh4/fpu -I../sysde
ps/sh/sh4 -I../nptl/sysdeps/sh -I../sysdeps/sh -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generi
c/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/i686-linux-gnulp/4.4.1/include -isystem /home/sam/build/tmp/cross/sh4-linux/in
clude -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -DHAVE_INITFINI -o /home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUIL
D/csu/libc-start.o -MD -MP -MF /home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD/csu/libc-start.o.dt -MT /home/sam/build/tmp/work/sh
4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD/csu/libc-start.o
libc-start.c: In function '__libc_start_main':
libc-start.c:253: error: unknown register name 'r1' in 'asm'
libc-start.c:253: error: unknown register name 'r0' in 'asm'
make[2]: *** [/home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD/csu/libc-start.o] Error 1
Any idea what's wrong?

Re: OE cross toolchain for SH4

Posted: Fri Feb 19, 2010 3:12 pm
by arris69
tom_van wrote:Some orgies here with glibc-initial-2.5.0-2.7.0-r1:
as, ld version expected up to 2.19, 2.20 on karmic - easy patch in configure, ready to commit
limits.h missing in /usr/lib/gcc/i686-linux-gnulp/4.4.1/include/
- just made empty file
but then some code is compiled by build gcc :?: log.do_install.9329:

Code: Select all

...
...
libc-start.c: In function '__libc_start_main':
libc-start.c:253: error: unknown register name 'r1' in 'asm'
libc-start.c:253: error: unknown register name 'r0' in 'asm'
make[2]: *** [/home/sam/build/tmp/work/sh4-linux/glibc-initial-2.5.0-2.7.0-r1/GLIBC/glibc-2.5/BUILD/csu/libc-start.o] Error 1
Any idea what's wrong?
something goes wrong on movig around the directories, i review the compile and svn logs since today morning and try to build a diff .
i hope error is in glibc and not in compiler (now i made new checkout and rever just glibc to r234, this hopefully ends with a compiler error in math dir at __atan. if its true just the cfalgs are to changed to disable -fomit-frame-pointer)

sry
arris