DSM-G600, DNS-3xx and NSA-220 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: 731
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://dns323.kood.org/downloads/ppc-uc … rc.tar.bz2


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

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: 731
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/


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

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: 119
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: 88

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: 88

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: 119
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: 731
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.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

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

BertrandB
Member
From: Dijon (France)
Registered: 2006-09-16
Posts: 119
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: 731
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

DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#16 2009-02-04 21:40:26

acruhl
Member
Registered: 2009-02-01
Posts: 9

Re: ppc toolchain

The download site at gnu changed. GCC_SITE is wrong in gcc-uclibc-3.3.mk. Remove "releases" from the link.

Offline

 

#17 2010-01-11 01:15:32

hutzel
New member
Registered: 2010-01-07
Posts: 2

Re: ppc toolchain

Oh dear! How I regret moving from my amiga to win95 instead of Linux back in 1995. I just dont get it done
I just tried to get this toolchain working, but the debian I installed in a virtual-pc box just keeps throwing errors and warnings back at me.

So, i got a recent Debian netinstall, I installed:
- gcc3.4 from the devel repository (including dependencies)
- make, since i figured out it was not part of the default install
- gcc (obviously not part of the 3.4 package?) unfortunately it came with gcc 4.3
- flex, gettext and some other stuff that was hinted at me when running make (maby gcc4.3 issue?
- did move gcc-4.3 in /usr/bin to gcc-4.3n and gcc-3.4 to gcc-4.3 following a hint given in this thread
- changed the download link for gcc 3.3.3

EDIT:
OK, compiling ran through, still I got a 4 MB logfile, I'll just try to compile sth. cross your fingers.

now I'm stuck. I cannot figure out what to do with this:
# Set up the symlinks to enable lying about target name.
set -e; (cd /home/powerpc-uclibc-toolchain/toolchain_powerpc; \
        ln -sf powerpc-linux-uclibc powerpc-linux; \
        cd bin; \
        for app in powerpc-linux-uclibc-* ; do \
            ln -sf ${app}{ \
               powerpc-linux${app##powerpc-linux-uclibc}; \
        done; \
    );
touch /home/powerpc-uclibc-toolchain/toolchain_build_powerpc/gcc-3.3-final/.installed

I assume this was not done automatically, i tried compiling gnu-hello with the posted Q'n'D script above- it failed.

any help is much appreciated, I'm frustrated, I'll take everything, useful further reading for linux-idiots as well as simple solutions

Last edited by hutzel (2010-01-11 03:52:06)

Offline

 

#18 2010-01-21 16:33:18

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

Re: ppc toolchain

hutzel wrote:

I assume this was not done automatically, i tried compiling gnu-hello with the posted Q'n'D script above- it failed.

What is exactly the error you get and for what command?

hutzel wrote:

Oh dear! How I regret moving from my amiga to win95 instead of Linux back in 1995

Well, I regret sleeping in my English class smile


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#19 2010-04-25 21:09:39

jaycuse
Member
Registered: 2010-02-23
Posts: 8

Re: ppc toolchain

uclibc.mk also contains a bad link for the source. You need to add old-releases to the link
http://www.uclibc.org/downloads/old-releases/
*Edit: Fixed formating

Last edited by jaycuse (2010-04-25 21:10:56)

Offline

 

#20 2015-01-26 01:41:01

sudos
Member
Registered: 2015-01-24
Posts: 8

Re: ppc toolchain

2015 update to anyone that needs to build the toolchain. I highly suggest you do this inside a chroot of Debian Sarge on the device, which will take some time to compile, but the end result is worth it.
You'll need to place these files in the /sources/dl/ directory upon extraction from the toolchain source tarball...

binutils-2.14.90.0.7.tar.bz2
uClibc-0.9.26.tar.bz2
gcc-3.3.3.tar.bz2
gdb-6.0.tar.bz2

so you'd cd into the folder and wget the files to that location... cd .. back to the base of that folder and run make. unless you're missing a package the compiler needs, it should start compiling the toolchain as expected. if you ARE missing something, remedy the problem, go back to the base of the folder and run make again... it should start right back up where it left off.

if you're still having trouble downloading the files from the links provided, a simple google search for the file in question will turn up mirrors for both files.

Also make sure that if you ARE compiling these on a chrooted sarge install that you have gettext, bison, libncurses5-dev and flex packages installed via apt-get/aptitude, as well as the normal assortment of essential building tools. build-essential seems to be a metapackage that really didn't do anything for me with the chrooted sarge install (usually installs a plethora of tools for compiling on newer versions), but I want to believe that it's because the files were already downloaded when the chroot initially grabbed packages.

At the current moment I type this, the toolchain is compiling on my DSM-G600 in the chroot. it's taking its normal time, but I AM compiling on a 175MHz PPC 603e core with only 32 megs of actual RAM...! and the 500-or-so odd megs of swap.

The reason for adding these files to the powerpc-ucibc-toolchain/sources/dl directory is because then make doesn't need to grab them later from obviously 404'd links. I endured this so you don't have to.
Hopefully this is of some help. also try and make sure you do the compile wiithin a screen session, it's a lot easier to detatch and come back to it later instead of having a terminal window open to it all the time. the compile will take a long time.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB