Cross-Compiling dif result
Hi,
Tried to build a Cross-Compiling platform to compile the firmware:
-rw-r--r-- 1 root root 273177367 May 29 2005 GPL_1927.zip
-rw-r--r-- 1 root root 2015762 Jun 24 2005 hndtools-mipsel-uclibc-3.2.3-full.tar.bz2
-rw-r--r-- 1 root root 16200754 Jun 11 18:51 wl500g-1.9.2.7-7e.tar.bz2
Files that I got from from oleg's Page http://wl500g.dyndns.org/
Using
Code:
#!/bin/sh
OLEG=wl500g-1.9.2.7-7e
if [ -d broadcom ]; then
echo "Removing old broadcom tree..."
rm -rf broadcom
fi
echo "Unpacking Asus GPL source..."
tar xzf GPL_1927.zip
echo "Unpacking OLEG source..."
tar -C broadcom/src/ -xjf ${OLEG}.tar.bz2
if [ ! -G /opt ]; then
echo "You should create /opt as root:"
echo "mkdir /opt && chgrp users /opt && chmod g+w /opt"
echo "Then continue as regular user!"
exit 1
fi
if [ -d /opt/brcm ]; then
echo "Removing old toolchain..."
rm -rf /opt/brcm
fi
echo "Installing broadcom toolchain..."
mv broadcom/opt/brcm /opt
BRCM="/opt/brcm/hndtools-mipsel"
PATH=${BRCM}-linux/bin:${BRCM}-uclibc/bin:${PATH}
export PATH
cd broadcom/src/${OLEG}
echo "Creating uClibc..."
make uClibc
echo "Creating kernel..."
make kernel
echo "Creating gateway..."
make
echo "Compiling gateway..."
cd ../gateway
make
echo "Creating firmware..."
make image-WL500g
No error but the result files are different from OLEG's
11/22/2006 04:06a 3,489,792 WL500g-1.9.2.7-7e.trx mine
06/11/2006 09:25p 3,751,936 WL500g-1.9.2.7-7e.trx Oleg’s
I also tried to compile the http://code.ximeta.com/trac-ndas/wiki/OpenWRT
ndas-1.0.1-23.tar.gz that compile without problems but them...
The modules load OK but
-r-xr-xr-x 1 root 46687 Nov 22 00:04 ndasadmin
[@wl500g tmp]$ ./ndasadmin
-sh: ./ndasadmin: not found
Can someone help me on these 2 problems?
cross compiling with the toolchain
allright, I have:
asus toolchain for mips
puppy linux
an open source source package that needs to be compiled
so, my question is: how do I use the toolchain to compile a source?
I''ve looked all over the internet but I can only find things like "hey its not working".
Does anyone knows something about this?
even if you answer "look at this file"
it''ll be helpfull:D
I also still wonder why ppl write a readme without any [enters], so you get one big line:mad:
cannot cross compile toolchain
hi people,
i have problems compiling the toolchain. here is what i do and what problems i encounter
my setup
* distro MiniMe2008 (a minimal PcLinuxOs)
* make (GNU Make 3.81)
* gcc (gcc (GCC) 4.1.1 20060724 (prerelease) (4.1.1-4pclos2007))
* ld 4.1.1 ( GNU ld version 2.16.91.0.7 20060317 )
* bash (GNU bash, version 3.1.17(1)-release (i586-mandriva-linux-gnu))
this is reported during the build
Code:
Checking build system dependencies:
CC clean: Ok
CXX clean: Ok
CPP clean: Ok
CFLAGS clean: Ok
CXXFLAGS clean: Ok
sed works: Ok
which installed: Ok
GNU make version '3.81': Ok
C compiler '/usr/bin/gcc'
C compiler version '4.1.1': Ok
bison installed: Ok
flex installed: Ok
gettext installed: Ok
Build system dependencies: Ok
I try to cross-compile the toolchain for OPTWARE_TARGET=oleg
Code:
mkdir -p /opt/slug
cd /opt/slug
svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware
cd optware
make oleg-target
cd oleg
make directories
make ipkg-utils
make toolchain
when making oleg-target i see the following message printed to standard out
Code:
make: /opt/slug/optware/toolchain/armv5b-softfloat-linux/gcc-3.3.5-glibc-2.2.5/bin/armv5b-softfloat-linux-gcc: Command not found
this may not be a problem as everything else goes well and i can proceed with making directories and ipkg-utils without problems. when I make this two targets i get a similar warning from make, but this time for the mipsel gcc version
Code:
make: /opt/slug/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-gcc: Command not found
the printed path is constructed in the root Makefile
Code:
TARGET_CC=$(TARGET_CROSS)gcc
TARGET_CROSS is defined in make/toolchain-oleg.mk
Code:
TARGET_CROSS = $(TOOL_BUILD_DIR)/$(TARGET_ARCH)-$(TARGET_OS)/$(CROSS_CONFIGURATION)/bin/$(TARGET_ARCH)-$(TARGET_OS)-
when building a target, all makefiles in the make directory are included in the root Makefile and one of them seems to use TARGET_CC variable even it is not used to build the corresponding package and complains about the non-existence of the directory and binary.
ok, this is not a problem now but just polutes the log output a bit. the first serious problem occurs when making the toolchain. while building, the kernel headers for the oleg-kernel are downloaded from the wrong location http://www.uclibc.org/downloads/toolchain/
Code:
wget --passive-ftp -nd -P /opt/slug/optware/oleg/toolchain/buildroot/dl http://www.uclibc.org/downloads/toolchain/linux-libc-headers-oleg.tar.bz2
--2008-06-02 17:37:49-- http://www.uclibc.org/downloads/toolchain/linux-libc-headers-oleg.tar.bz2
Resolving www.uclibc.org... 140.211.166.42
Connecting to www.uclibc.org|140.211.166.42|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
i temporary work around this by inserting the following line in the kernel-headers.mk file which is located in oleg/toolchain/buildroot/toolchain/kernel-headers/
Code:
include toolchain/kernel-headers/kernel-headers-new.makefile
include toolchain/kernel-headers/kernel-headers-old.makefile
# the correct download location
LINUX_HEADERS_SITE=http://www.wlan-sat.com/boleo/optware
i specified the server where the oleg-headers can be found . now i can proceed with right(?) headers
Code:
...
wget --passive-ftp -nd -P /opt/slug/optware/oleg/toolchain/buildroot/dl http://www.wlan-sat.com/boleo/optware/linux-libc-headers-oleg.tar.bz2
--2008-06-02 17:47:51-- http://www.wlan-sat.com/boleo/optware/linux-libc-headers-oleg.tar.bz2
Resolving www.wlan-sat.com... 212.18.63.81
Connecting to www.wlan-sat.com|212.18.63.81|:80... connected.
...
but in the next step, the patching of uclibc fails
Code:
...
wget --passive-ftp -nd -P /opt/slug/optware/oleg/toolchain/buildroot/dl http://www.uclibc.org/downloads/snapshots/uClibc-snapshot.tar.bz2
--2008-06-02 17:48:21-- http://www.uclibc.org/downloads/snapshots/uClibc-snapshot.tar.bz2
Resolving www.uclibc.org... 140.211.166.42
Connecting to www.uclibc.org|140.211.166.42|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3534786 (3.4M) [application/x-tar]
Saving to: `/opt/slug/optware/oleg/toolchain/buildroot/dl/uClibc-snapshot.tar.bz2'
100%[=======================================================================================================================================>] 3,534,786 11.0K/s in 6m 20s
2008-06-02 17:54:42 (9.09 KB/s) - `/opt/slug/optware/oleg/toolchain/buildroot/dl/uClibc-snapshot.tar.bz2' saved [3534786/3534786]
mkdir -p /opt/slug/optware/oleg/toolchain/buildroot/toolchain_build_mipsel
bzcat /opt/slug/optware/oleg/toolchain/buildroot/dl/uClibc-snapshot.tar.bz2 | tar -C /opt/slug/optware/oleg/toolchain/buildroot/toolchain_build_mipsel -xf -
toolchain/patch-kernel.sh /opt/slug/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/uClibc toolchain/uClibc/ uClibc-0.9.29\*.patch
cat ../../sources/buildroot/uClibc-patches/*.patch | patch -d /opt/slug/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/uClibc -p1
patching file Makefile
Hunk #1 FAILED at 163.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file libc/sysdeps/linux/mips/sigaction.c
Hunk #1 FAILED at 49.
1 out of 1 hunk FAILED -- saving rejects to file libc/sysdeps/linux/mips/sigaction.c.rej
patching file libc/sysdeps/linux/mips/pipe.S
Hunk #1 FAILED at 10.
...
this comes due to the fact that the latest snapshot version of uclibc gets downloded. the snapshot seems to be version 0.9.29(?) but the patches are for version 0.9.28. while configuring the kernel, there was no possibility to select another uclibc version as the snapshot was pre-selected.
Code:
uClibc C library Version
1. uClibc 0.9.28 (BR2_UCLIBC_VERSION_0_9_28)
> 2. daily snapshot (BR2_UCLIBC_VERSION_SNAPSHOT)
choice[1-2?]: 2
Date (yyyymmdd) of snapshot or 'snapshot' for latest (BR2_USE_UCLIBC_SNAPSHOT) [snapshot] (NEW)
i also worked around that problem by inserting the following line in buildroot.mk which is located in oleg/make/
Code:
247 ...
247 # change uclibc version from snapshot to 0.9.28
248 sed -i -e 's|^# BR2_UCLIBC_VERSION_0_9_28 is not set|BR2_UCLIBC_VERSION_0_9_28=y|' $(BUILDROOT_BUILD_DIR)/.config
249 sed -i -e 's|^BR2_UCLIBC_VERSION_SNAPSHOT=.*|# BR2_UCLIBC_VERSION_SNAPSHOT is not set|' $(BUILDROOT_BUILD_DIR)/.config
250 #endif
251 # change toolchain staging dir
now uclibc 0.9.28 is used and the build comes pretty far until uclibc++ has to be build. this fails with the following errors
Code:
...
make -C abi/libgcc_eh all
make[3]: /opt/slug/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-gcc: Command not found
make[3]: Entering directory `/opt/slug/optware/oleg/builds/libuclibc++/src/abi/libgcc_eh'
/bin/sh: /opt/slug/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-gcc: No such file or directory
/bin/sh: /opt/slug/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-ld: No such file or directory
/bin/sh: /opt/slug/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-gcc: No such file or directory
../../../scripts/find_libgcc_eh.sh: line 8: /opt/slug/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-gcc: No such file or directory
/opt/slug/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-ar x
make[3]: /opt/slug/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-ar: Command not found
make[3]: *** [unwind-c.o] Error 127
make[3]: Leaving directory `/opt/slug/optware/oleg/builds/libuclibc++/src/abi/libgcc_eh'
make[2]: *** [libgcc_eh] Error 2
make[2]: Leaving directory `/opt/slug/optware/oleg/builds/libuclibc++/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/slug/optware/oleg/builds/libuclibc++'
now one can see that the non existence of the path defined in TARGET_CC causes serious build failures. all the binaries like gcc, ld and ar were build along uclibc but just exist in the staging dir of uclibc
Code:
$ cd /opt/slug/optware/oleg/toolchain/buildroot/build_mipsel/staging_dir/mipsel-linux-uclibc/bin
$ la
> ./ ../ ar* as* cc@ gcc* ld* nm* objdump* ranlib* strip*
now i give up at this point as i have no idea why all this errors occur. maybe some of u people can help me further in getting the toolchain to compile as i would like to add some packages for the asus wl550g router.
txs in advance and sorry for the long post. :)
peace olo
Can anyone help me with cross-compiling a kernel module
Hi all,
I have wl500gp v2 running the latest oleg firmware (1.9.2.7-10), everything works great (thanks oleg), except i don't have the correct driver for my web cameras.
I have a sony eyetoy (Vendor:054c, ProdID:0155) and a creative web im vista (VF0330), this hacked driver (http://www.rastageeks.org/ov51x-jpeg....php/Main_Page) works great for these 2 cameras, I downloaded the driver and compiled & installed to my ubuntu desktop.
However when i try to cross compile the driver for the wl500gp, I failed, I downloaded the GPL source, toolchain and everything, but I still cannot figure out how to cross-compile the driver, I just don't have enough linux knowledge to cross-compile the kernel module.
Can anyone help me with a howto cross compile kernel module? Or can anyone please compile the latest hacked ov51x driver for me? Thank you!
crosscompile intltool error
This is a known problem on Debian and Ubuntu, and just now someone said that it's same on Arch Linux. When checking for intltool, the file intltool-update.in is checked.
So we get this error :
Code:
checking for intltool >= 0.23... awk: cmd. line:1: fatal: cannot open file `./intltool-update.in' for reading (No such file or directory)
Normally it could be fixed by symlinks
Code:
ln -s /usr/share/intltool/intltool-update.in intltool-update.in
ln -s /usr/share/intltool/intltool-extract.in intltool-extract.in
ln -s /usr/share/intltool/intltool-merge.in intltool-merge.in
but not in optware as the directory is emptied at every make. I'm trying to build transmission. Someone have some advice?
Creating a cross compile environment
I am having trouble doing this. Anyone out there get one setup? Oleo do you want to drop me on some input on how to do this? The main goal here is to create new ipkg files. Right now I am using the instructions at nslu2-linux.org however it gets stuck while trying to build crosstools somewhere in the binutils part of things.