DSM-G600, DNS-323 and TS-I300 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2006-08-19 18:48:15

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 549
Website

ppc toolchain

I have uploaded fixed toolchain source. It is pretty much the same toolchain provided by d-link.

-Makefile missing error fixed
-"label at end of compound statement" patch added for gdb
-outdated mirrors updated

PS: Do not use gcc 4.x for compiling to avoid "invalid lvalue in increment" errors!

So for now you have to just extract files and run make smile
For me (P4 1.6GHz, 512mb) it takes about half of hour to compile

Code:

real    30m18.866s
user    25m40.310s
sys     3m22.820s

http://download.dsmg600.info/ppc-uclibc … rc.tar.bz2

Offline

 

#2 2006-09-15 16:35:25

TheWalt
Member
Registered: 2006-09-12
Posts: 39

Re: ppc toolchain

Anyone willing to help a newb out with this?

Running Ubuntu 6.0.6.1 desktop.  Compiled the toolchain without issue (least as far as I can tell).

Now I'm not really sure what to do.  I read that some paths need to be setup to use these tools?  But other then running a 'make' or some other setup script I haven't done much so need a little hand holding.

I use a Sharp Zaurus PDA running OpenEmbedded, so I know there are a lot of apps that could have potential on this unit.


Thanks in advance

Offline

 

#3 2006-09-15 17:53:45

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 549
Website

Re: ppc toolchain

The easiest and dirtiest way to cross compile with this toolchain:

Code:

# First look up usable values
./configure --help
# Somethimes it is useful to add, if possible --without-debug --disable-rpath
# --without-shared --without-ada --without-nls.
# Also sometimes, if needed, you need to set CXX and CPP as well as CC
./configure CC=/toolchain/powerpc-uclibc-toolchain/toolchain_powerpc/bin/powerpc-linux-uclibc-gcc \
CFLAGS="-Os -pipe -mcpu=603e -mtune=603e" \
CXXFLAGS="-Os -pipe -mcpu=603e -mtune=603e" \
--target="powerpc-uclibc-linux-gnu" \
--host="powerpc-uclibc-linux-gnu" \
--build="i686-linux-gnu"
# Sometimes you need yet again add CC and/or CPP and/or CXX values.
# but most times make without any parameters will work fine.
make CC=/toolchain/powerpc-uclibc-toolchain/toolchain_powerpc/bin/powerpc-linux-uclibc-gcc

Very good places to look configure parameters and cross compile patches are:
https://svn.openwrt.org/openwrt/packages/
http://svn.nslu2-linux.org/svnroot/optware/trunk/make/

Offline

 

#4 2006-10-09 19:37:57

gmckenzi
Member
Registered: 2006-09-29
Posts: 6

Re: ppc toolchain

Any chance of getting a new link to the precombiled toolchain binary? 
The link from the homepage is broken.

Gavin.

Offline

 

#5 2006-11-09 20:16:07

TheWalt
Member
Registered: 2006-09-12
Posts: 39

Re: ppc toolchain

Can one of you who have been working with the toolchain help me out with this.  I admit, just being lazy and looking for a handout.

I want to setup a 'compile environment' so I don't have to keep passing all those paramaters when doing configure and make.  I would like a setup script something like this example, only for the dsm-g600 toolchain:

Code:

#!/bin/bash
. /etc/profile
export PATH=/opt/cross/arm/3.4.5-xscale-softvfp/bin:$PATH
export QTDIR=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/qt
export KDEDIR=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/qt
export X11INC=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include
export X11LIB=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib
export PKG_CONFIG_PATH=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib/pkgconfig
echo "Type exit for leave armv5tel-cacko-linux cross environment."
/bin/bash

I'm just not familiar enough with all the export variables that would have to be set for our toolchain.  Help is much appreciated.

Offline

 

#6 2006-11-26 09:40:07

beattie
Member / Developer
From: West Coast, USA
Registered: 2006-11-17
Posts: 92
Website

Re: ppc toolchain

I'm trying to build the toolchain on Ubuntu Dapper, which has gcc4 as it's default C compiler.  When I run make I get:

/home/beattie/dsm-g600/toolchain/powerpc-uclibc-toolchain/toolchain_build_powerpc/gdb-6.0/gdb/gdbtypes.c:3059: error: invalid lvalue in increment

Not surprising given the directions not to use gcc4, but I can't figure out how to force it to use a different version.  CC=gcc-3.4 make -e fails in a way that leads me to beleive that it is using gcc-3.4 when it should be using the cross-compiler.

Anybody have an clues?

Offline

 

#7 2006-11-26 10:47:50

BertrandB
Member
From: Dijon (France)
Registered: 2006-09-16
Posts: 108
Website

Re: ppc toolchain

simply uninstall gcc-4.0 wtih adept
install gcc-3.3
make your toolchain
uninstall gcc-3.3
and reinstall gcc-4.0

must work
the cros complier wil stay a gcc-3

Offline

 

#8 2006-11-27 17:53:46

TheWalt
Member
Registered: 2006-09-12
Posts: 39

Re: ppc toolchain

It has been a few months since I compiled mine, but I'm pretty sure I just installed gcc-3.4 and then changed the gcc link in /usr/bin to point to that instead of 4.x, and then changed it back when done.

Offline

 

#9 2006-11-28 09:04:57

beattie
Member / Developer
From: West Coast, USA
Registered: 2006-11-17
Posts: 92
Website

Re: ppc toolchain

I have found that just not building gdb seems to avoid the problem.

Offline

 

#10 2007-06-24 19:32:41

SystemR89
Member
From: >>Turin<< >>Italy<<
Registered: 2006-09-19
Posts: 73

Re: ppc toolchain

I can't compile this toolchain under my Debian sad

When I try to compile the toolchain I get this error:

...
checking for library containing socketpair... none required
checking for library containing tgetent... no
configure: error: no termcap library found
make[2]: *** [configure-gdb] Error 1
make[2]: Leaving directory `/home/systemr89/powerpc-uclibc0.9.26-toolchain/toolchain_build_powerpc/gdb-build'
make[1]: *** [/home/systemr89/powerpc-uclibc0.9.26-toolchain/toolchain_build_powerpc/gdb-build/.compiled] Error 2
make[1]: Leaving directory `/home/systemr89/powerpc-uclibc0.9.26-toolchain'
make: *** [build-stamp] Error 2

termcap library is dismissed and I haven't found any way to solve this problem.
Install termcap-compat, lib5 and ldso not solve the problem


Free is BETTER!!
Use GNU/Linux!!

Offline

 

#11 2007-06-24 19:41:00

SystemR89
Member
From: >>Turin<< >>Italy<<
Registered: 2006-09-19
Posts: 73

Re: ppc toolchain

apt-get install libncurses5-dev

this should solve the problem smile


Free is BETTER!!
Use GNU/Linux!!

Offline

 

#12 2007-10-02 20:19:17

BertrandB
Member
From: Dijon (France)
Registered: 2006-09-16
Posts: 108
Website

Re: ppc toolchain

Hello,

I've some problems with porting python on dsmg600. It seems to me that the first is that my toolchain  uclibc is not exactly the same than dsm one.
On your toolchain have you the same uClibc-0.9.26.so than on dsm ? (ls -l and md5sum) ?

Offline

 

#13 2007-10-03 09:34:01

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 549
Website

Re: ppc toolchain

It's not quite possible to compile all files with same size and with same md5 sum on a different host systems. But this toolchan is the one provided by d-link + some fixes described at first post.

Offline

 

#14 2007-10-03 12:03:02

BertrandB
Member
From: Dijon (France)
Registered: 2006-09-16
Posts: 108
Website

Re: ppc toolchain

sala wrote:

It's not quite possible to compile all files with same size and with same md5 sum on a different host systems

Ok thks ...

sala wrote:

But this toolchan is the one provided by d-link + some fixes described at first post.

I gave mine on ftp.dlink.com but the uclibc is download at make time so you're not sure to have the same uclibc than the one use by dlink. Same problem with the linux headers and gcc.

Offline

 

#15 2007-10-03 12:32:49

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 549
Website

Re: ppc toolchain

You can look sources/dl directory.
For example i got there:

Code:

-rw-r--r-- 1 sala sala  11M Oct 29  2003 binutils-2.14.90.0.7.tar.bz2
-rw-r--r-- 1 sala sala  23M May 21 12:46 gcc-3.3.3.tar.bz2
-rw-r--r-- 1 sala sala  12M Oct  4  2003 gdb-6.0.tar.bz2
-rw-r--r-- 1 sala sala 3.7M Sep 19  2003 kernel-headers-2.4.21.tar.bz2
-rw-r--r-- 1 sala sala 1.6M Jan  4  2004 uClibc-0.9.26.tar.bz2

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB