Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 2 Guest(s)
Post Reply 
[200/300] Build your own Cross Compile toolchain - Shortcut
03-02-2010, 05:42 PM
Post: #16
RE: Build your own Cross Compile toolchain - Shortcut
mpfr and gmp compiled successfuly.

gcc is almost done. I have a little problem at make.

Code:
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/usr/local/gcc-4.3'
make: *** [all] Error 2

Configure parameters are:

Code:
./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=mips-linux-gnu --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-arch=mips32r2 --with-float=hard --enable-mips-nonpic --enable-extra-sgxxlite-multilibs --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit '--with-pkgversion=Sourcery G++ Lite 4.3-154' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery/ --with-sysroot=/usr/local/mips-4.3/mips-linux-gnu/libc --with-build-sysroot=/usr/local/mips-4.3/mips-linux-gnu/libc --with-gmp=/usr/local/ --with-mpfr=/usr/local/ --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/usr/local/mips-4.3/mips-linux-gnu/bin

maybe one of the parameters are incorrect.

any suggestions?
Find all posts by this user
Add Thank You Quote this message in a reply
03-03-2010, 06:21 PM
Post: #17
RE: Build your own Cross Compile toolchain - Shortcut
Finally i have compiled gcc crosscompiler also on x86 PC OS: Ubuntu 9.10. I will create a small howto for that also.
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to xray for this post
03-03-2010, 11:33 PM (This post was last modified: 03-03-2010 11:34 PM by xray.)
Post: #18
RE: Build your own Cross Compile toolchain - Shortcut
my first test failed.

I tried to cross compile hello world.

Code:
#include <stdio.h>
main()
{
    (void) printf("Hello World\n");
    return (0);
}

but if i execute the binary compiled file

Code:
sh-3.00# ./h
sh: ./hello: Text file busy


compile command is simply: mips-linux-gnu-gcc hello.c -o hello

vaidyasr do you know what can be the problem?
Find all posts by this user
Add Thank You Quote this message in a reply
03-04-2010, 07:36 AM (This post was last modified: 03-04-2010 07:37 AM by vaidyasr.)
Post: #19
RE: Build your own Cross Compile toolchain - Shortcut
(03-03-2010 11:33 PM)xray Wrote:  my first test failed.

I tried to cross compile hello world.

Code:
#include <stdio.h>
main()
{
    (void) printf("Hello World\n");
    return (0);
}

but if i execute the binary compiled file

Code:
sh-3.00# ./h
sh: ./hello: Text file busy


compile command is simply: mips-linux-gnu-gcc hello.c -o hello

vaidyasr do you know what can be the problem?

You need to compile any .c files with the options as below
mips-linux-gnu-gcc -EL -march=74kc -fPIC hello.c -o hello

Sriram
C200/A400/RPi - Onkyo HT-S3400 - LG 47LV3730

oPKG Available Packages and Info:
400 Series - 200/300 Series - 100 Series
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to vaidyasr for this post
03-04-2010, 10:56 AM (This post was last modified: 03-04-2010 10:57 AM by xray.)
Post: #20
RE: Build your own Cross Compile toolchain - Shortcut
finally i've crosscompiled my first app: latest version of rsync. (3.0.7) Smile

Thank you vaidyasr for your help.
Find all posts by this user
Add Thank You Quote this message in a reply
03-04-2010, 11:14 AM
Post: #21
RE: Build your own Cross Compile toolchain - Shortcut
(03-04-2010 10:56 AM)xray Wrote:  finally i've crosscompiled my first app: latest version of rsync. (3.0.7) Smile

Thank you vaidyasr for your help.

So, the v3.0.7 is working without any errors?

Sriram
C200/A400/RPi - Onkyo HT-S3400 - LG 47LV3730

oPKG Available Packages and Info:
400 Series - 200/300 Series - 100 Series
Find all posts by this user
Add Thank You Quote this message in a reply
03-04-2010, 11:27 AM
Post: #22
RE: Build your own Cross Compile toolchain - Shortcut
(03-04-2010 10:56 AM)xray Wrote:  finally i've crosscompiled my first app: latest version of rsync. (3.0.7) Smile

Thank you vaidyasr for your help.
Hello

have you started to write the howto?

I would be interested as well

Thanks
Find all posts by this user
Add Thank You Quote this message in a reply
03-04-2010, 11:59 AM (This post was last modified: 03-04-2010 12:02 PM by xray.)
Post: #23
RE: Build your own Cross Compile toolchain - Shortcut
(03-04-2010 11:14 AM)vaidyasr Wrote:  So, the v3.0.7 is working without any errors?

Yes it is.
(03-04-2010 11:27 AM)cyberic Wrote:  Hello

have you started to write the howto?

I would be interested as well

Thanks

I will post it soon. My system is a little bit messed up... there are gigs of source code files i need to clean up and summarize the compile commands.
Find all posts by this user
Add Thank You Quote this message in a reply
03-12-2010, 02:04 PM (This post was last modified: 03-12-2010 02:31 PM by Freebyter.)
Post: #24
RE: Build your own Cross Compile toolchain - Shortcut
Hi,

I am also compiling under Ubuntu 9.10 but at the moment I am stucked.

AS I could not compile the gcc (got the same errors as xray on page 1) I tried to compile
a) gmp
error => checking for suitable m4... configure: error: No usable m4 in $PATH or /usr/5bin (see config.log for reasons).

b) fmpr
error => configure: error: gmp.h can't be found, or is unusable.

I tried to compile with without parameter as stated by vaidyasr.

Any Idea someone ?
Ok, the gmp problem is solved by installing m4 !

Now I have still a problem with mpfr:

configure:25189: error: libgmp not found or uses a different ABI.

Or is it the wrong way to compile without parameters ?
Find all posts by this user
Add Thank You Quote this message in a reply
03-13-2010, 05:49 AM
Post: #25
RE: Build your own Cross Compile toolchain - Shortcut
(03-12-2010 02:04 PM)Freebyter Wrote:  configure:25189: error: libgmp not found or uses a different ABI.

Did you installed mpfr & gmp in native OS as I mentioned in page 1?

Sriram
C200/A400/RPi - Onkyo HT-S3400 - LG 47LV3730

oPKG Available Packages and Info:
400 Series - 200/300 Series - 100 Series
Find all posts by this user
Add Thank You Quote this message in a reply
03-15-2010, 09:39 AM
Post: #26
RE: Build your own Cross Compile toolchain - Shortcut
Yes, I tried it for this two onyl with ./configure.
Find all posts by this user
Add Thank You Quote this message in a reply
03-16-2010, 10:59 PM (This post was last modified: 03-16-2010 11:00 PM by xray.)
Post: #27
RE: Build your own Cross Compile toolchain - Shortcut
(03-15-2010 09:39 AM)Freebyter Wrote:  Yes, I tried it for this two onyl with ./configure.

Hello install os and platform native mpf and gmp package and add the path to --with-gmp and --with-mpfr switch.
Find all posts by this user
Add Thank You Quote this message in a reply
03-17-2010, 02:07 PM (This post was last modified: 03-17-2010 02:10 PM by Freebyter.)
Post: #28
RE: Build your own Cross Compile toolchain - Shortcut
it seems that it's long ago that I compiled some stuff......

The gmp and mpfr seemed to be ok now, but now the binutils part throws the following

Code:
config.status: executing default commands
make[3]: Verlasse Verzeichnis '/usr/local/mips-4.3-154-mips-linux-gnu/binutils-stable/bfd/po'
make[3]: Betrete Verzeichnis '/usr/local/mips-4.3-154-mips-linux-gnu/binutils-stable/bfd/po'
make[3]: Für das Ziel »info« ist nichts zu tun.
make[3]: Verlasse Verzeichnis '/usr/local/mips-4.3-154-mips-linux-gnu/binutils-stable/bfd/po'
make[3]: Betrete Verzeichnis '/usr/local/mips-4.3-154-mips-linux-gnu/binutils-stable/bfd'
make[3]: Für das Ziel »info-am« ist nichts zu tun.
make[3]: Verlasse Verzeichnis '/usr/local/mips-4.3-154-mips-linux-gnu/binutils-stable/bfd'
make[2]: *** [info-recursive] Fehler 1
make[2]: Verlasse Verzeichnis '/usr/local/mips-4.3-154-mips-linux-gnu/binutils-stable/bfd'
make[1]: *** [all-bfd] Fehler 2
make[1]: Verlasse Verzeichnis '/usr/local/mips-4.3-154-mips-linux-gnu/binutils-stable'
make: *** [all] Fehler 2

used command line:

Code:
./configure --build=i686-pc-linux-gnu --target=mips-linux-gnu --prefix=/opt/codesourcery --host=i686-pc-linux-gnu '--with-pkgversion=Sourcery G++ Lite 4.3-154' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --with-sysroot=/opt/codesourcery/mips-linux-gnu/libc --enable-poison-system-directories
Find all posts by this user
Add Thank You Quote this message in a reply
04-28-2010, 05:02 PM (This post was last modified: 04-28-2010 05:03 PM by yellow.)
Post: #29
RE: Build your own Cross Compile toolchain - Shortcut
Guys,
do you think we could focus our effort on getting openwrt
http://www.openwrt.org
support for SMP8643 ?
It would be wonderful to have a full cross compiling environment with lots and lots of applications available.

Popcorn Hour A200 repaired once
NMT Firmware: 02-03-100918-21-POP-411-000
NMT Apps: 02-03-100427-21-POP-411
Kernel Version: 21-POP
Internal Harddrive: Samsung HD203WI 2TB
Find all posts by this user
Add Thank You Quote this message in a reply
04-29-2010, 10:01 AM
Post: #30
RE: Build your own Cross Compile toolchain - Shortcut
Hi Yellow,

Sounds like a very good idea! I'm currently working (professionally) with openwrt and will have a look to see if this is difficult to do.. Openwrt generates a complete flash or disk image containing a bootable linux kernel and file system. This flash image is normally programmed into the target hardware. It is a problem for the PCH devices, because it does not allow us to reprogram the flash Big Grin. The only advantage would be to have a well defined cross compile environment and ability to build additional software easily. The cross compiled software needs to be copied manually to the PCH, but that should not keep you from not using openwrt.

Just my 2cents...

SoloHan.

(04-28-2010 05:02 PM)yellow Wrote:  Guys,
do you think we could focus our effort on getting openwrt
http://www.openwrt.org
support for SMP8643 ?
It would be wonderful to have a full cross compiling environment with lots and lots of applications available.
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [200] TP-LINK TL-WN723N v2 Cross Compiled Drivers black_dragon 17 6,902 02-26-2014 11:28 AM
Last Post: say2k
  [200/300/400] Mono - Cross Platform .NET Development Framework - v3.2.6 vaidyasr 3 898 01-22-2014 05:38 PM
Last Post: vaidyasr
  [200] Compile Kernel linux-2.6.22.19 JerryLutor 6 3,164 01-07-2014 11:46 AM
Last Post: romanr
  [400] Build your own Cross Compile toolchain - Shortcut vaidyasr 19 5,053 09-12-2013 08:18 PM
Last Post: drh104
  [200/300] Building MIPSEL Toolchain to Cross Compile Kheo 18 2,463 09-10-2013 01:31 PM
Last Post: vaidyasr
  [100/200/300/400] Cross Compile Request Thread - For all NMT Series vaidyasr 33 10,633 08-22-2013 06:05 PM
Last Post: vaidyasr
  [200] Cross-compiling CUPS davep27 8 6,912 06-10-2013 05:48 AM
Last Post: nyk.mat
  [400] Cross compiled aria2c for A-400 with mips-linux-gnu-gcc henryleelee0326 3 1,388 05-21-2013 08:16 AM
Last Post: vaidyasr
  [200/300/400] Cross compile JAVA 6 (to run YAMJ) vaidyasr 35 9,720 12-11-2012 09:39 AM
Last Post: vaidyasr
  [300] toolchain for user apps development flyck 2 1,243 08-23-2012 05:33 AM
Last Post: flyck

Forum Jump: