PDA

Bekijk de volledige versie : cross compiling with the toolchain



PB_LIST
23-11-2006, 14:34
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


#!/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?

oleo
24-11-2006, 13:14
Oleg always post-include nmap binary in its firmwares.
So you can never expect the same binary. Even if nmap would not be included, binaries would not be the same becaus of possible difference in direcory tree traversing during LZMA compression.

Oleg
24-11-2006, 13:18
tcpdump. not nmap. :)

oleo
24-11-2006, 13:25
tcpdump. not nmap. :)OOps. Correct. My wheels. Out of the inner circle.


Regarding kernel module and problem with admin I must say that you must export paths in a proper way. The best way is to start with Optware packaging for Oleg firmware ant then prepare make/ndas.mk to reflect this.

See http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild
and http://www.nslu2-linux.org/wiki/FAQ/OptwareWl500gBuild

PB_LIST
27-11-2006, 02:19
Thanks for your help.

I Installed the Toolchain and produced this ndas.mk file.

I'm able to download the package but then the package is waiting for this :





export NDAS_KERNEL_PATH={kernel path}
export NDAS_KERNEL_VERSION=2.4.20
export NDAS_KERNEL_ARCH=mips
export NDAS_CROSS_COMPILE=mipsel-linux-
export NDAS_CROSS_UM_COMPILE=mipsel-linux-uclibc-gnu-
export NDAS_EXTRA_CFLAGS="-mlong-calls -DNDAS_SIGPENDING_OLD"
make ndas_version=1.0.1 ndas_build=23 all ndas-admin

How do I include these in the ndas.mk file?

Can you please help? This will be my first pakage .... is I get some support.

oleo
27-11-2006, 19:54
built target should look like


# This builds the actual binary.
#
$(NDAS_BUILD_DIR)/.built: $(NDAS_BUILD_DIR)/.configured
rm -f $(NDAS_BUILD_DIR)/.built
$(TARGET_CONFIGURE_OPTS) \
CPPFLAGS="$(STAGING_CPPFLAGS) $(NDAS_CPPFLAGS)" \
LDFLAGS="$(STAGING_LDFLAGS) $(NDAS_LDFLAGS)" \
NDAS_KERNEL_PATH=/path/to/your/full/kernel/sources \
NDAS_KERNEL_VERSION=2.4.20 \
NDAS_KERNEL_ARCH=mips \
NDAS_CROSS_COMPILE=$(TARGET_CROSS) \
NDAS_EXTRA_CFLAGS="-mlong-calls -DNDAS_SIGPENDING_OLD" \
$(MAKE) -C $(NDAS_BUILD_DIR)
touch $(NDAS_BUILD_DIR)/.built

PB_LIST
28-11-2006, 12:00
Ok once more thanks for your support.

I made the changes in the ndas.mk file that looks like this:

#
# ndas
#
################################################## #########

# You must replace "ndas" and "NDAS" with the lower case name and
# upper case name of your new package. Some places below will say
# "Do not change this" - that does not include this global change,
# which must always be done to ensure we have unique names.

#
# NDAS_VERSION, NDAS_SITE and NDAS_SOURCE define
# the upstream location of the source code for the package.
# NDAS_DIR is the directory which is created when the source
# archive is unpacked.
# NDAS_UNZIP is the command used to unzip the source.
# It is usually "zcat" (for .gz) or "bzcat" (for .bz2)
#
# You should change all these variables to suit your package.
# Please make sure that you add a description, and that you
# list all your packages' dependencies, seperated by commas.
#
# If you list yourself as MAINTAINER, please give a valid email
# address, and indicate your irc nick if it cannot be easily deduced
# from your name or email address. If you leave MAINTAINER set to
# "NSLU2 Linux" other developers will feel free to edit.
#
NDAS_SITE=http://code.ximeta.com/download/1.0.1/23/openwrt
NDAS_VERSION=1.0.1-23
NDAS_SOURCE=ndas-$(NDAS_VERSION).tar.gz
NDAS_DIR=ndas-$(NDAS_VERSION)
NDAS_UNZIP=zcat
NDAS_MAINTAINER=PB_LIST
NDAS_DESCRIPTION=Describe ndas here.
NDAS_SECTION=
NDAS_PRIORITY=optional
NDAS_DEPENDS=
NDAS_SUGGESTS=
NDAS_CONFLICTS=

#
# NDAS_IPK_VERSION should be incremented when the ipk changes.
#
NDAS_IPK_VERSION=1

#
# NDAS_CONFFILES should be a list of user-editable files
NDAS_CONFFILES=/opt/etc/init.d/S60ndas

#
# NDAS_PATCHES should list any patches, in the the order in
# which they should be applied to the source code.
#
NDAS_PATCHES=

#
# If the compilation of the package requires additional
# compilation or linking flags, then list them here.
#
NDAS_CPPFLAGS= -mlong-calls -DNDAS_SIGPENDING_OLD
NDAS_LDFLAGS=

#
# NDAS_BUILD_DIR is the directory in which the build is done.
# NDAS_SOURCE_DIR is the directory which holds all the
# patches and ipkg control files.
# NDAS_IPK_DIR is the directory in which the ipk is built.
# NDAS_IPK is the name of the resulting ipk files.
#
# You should not change any of these variables.
#
NDAS_BUILD_DIR=$(BUILD_DIR)/ndas
NDAS_SOURCE_DIR=$(SOURCE_DIR)/ndas
NDAS_IPK_DIR=$(BUILD_DIR)/ndas-$(NDAS_VERSION)-ipk
NDAS_IPK=$(BUILD_DIR)/ndas_$(NDAS_VERSION)-$(NDAS_IPK_VERSION)_$(TARGET_ARCH).ipk

.PHONY: ndas-source ndas-unpack ndas ndas-stage ndas-ipk ndas-clean ndas-dirclean ndas-check

#
# This is the dependency on the source code. If the source is missing,
# then it will be fetched from the site using wget.
#
$(DL_DIR)/$(NDAS_SOURCE):
$(WGET) -P $(DL_DIR) $(NDAS_SITE)/$(NDAS_SOURCE)

#
# The source code depends on it existing within the download directory.
# This target will be called by the top level Makefile to download the
# source code's archive (.tar.gz, .bz2, etc.)
#
ndas-source: $(DL_DIR)/$(NDAS_SOURCE) $(NDAS_PATCHES)

#
# This target unpacks the source code in the build directory.
# If the source archive is not .tar.gz or .tar.bz2, then you will need
# to change the commands here. Patches to the source code are also
# applied in this target as required.
#
# This target also configures the build within the build directory.
# Flags such as LDFLAGS and CPPFLAGS should be passed into configure
# and NOT $(MAKE) below. Passing it to configure causes configure to
# correctly BUILD the Makefile with the right paths, where passing it
# to Make causes it to override the default search paths of the compiler.
#
# If the compilation of the package requires other packages to be staged
# first, then do that first (e.g. "$(MAKE) <bar>-stage <baz>-stage").
#
# If the package uses GNU libtool, you should invoke $(PATCH_LIBTOOL) as
# shown below to make various patches to it.
#
$(NDAS_BUILD_DIR)/.configured: $(DL_DIR)/$(NDAS_SOURCE) $(NDAS_PATCHES) make/ndas.mk
# $(MAKE) <bar>-stage <baz>-stage
rm -rf $(BUILD_DIR)/$(NDAS_DIR) $(NDAS_BUILD_DIR)
$(NDAS_UNZIP) $(DL_DIR)/$(NDAS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
if test -n "$(NDAS_PATCHES)" ; \
then cat $(NDAS_PATCHES) | \
patch -d $(BUILD_DIR)/$(NDAS_DIR) -p0 ; \
fi
if test "$(BUILD_DIR)/$(NDAS_DIR)" != "$(NDAS_BUILD_DIR)" ; \
then mv $(BUILD_DIR)/$(NDAS_DIR) $(NDAS_BUILD_DIR) ; \
fi
#(cd $(NDAS_BUILD_DIR); \
# $(TARGET_CONFIGURE_OPTS) \
# CPPFLAGS="$(STAGING_CPPFLAGS) $(NDAS_CPPFLAGS)" \
# LDFLAGS="$(STAGING_LDFLAGS) $(NDAS_LDFLAGS)" \
# ./configure \
# --build=$(GNU_HOST_NAME) \
# --host=$(GNU_TARGET_NAME) \
# --target=$(GNU_TARGET_NAME) \
# --prefix=/opt \
# --disable-nls \
# --disable-static \
#)
#$(PATCH_LIBTOOL) $(NDAS_BUILD_DIR)/libtool
touch $(NDAS_BUILD_DIR)/.configured

ndas-unpack: $(NDAS_BUILD_DIR)/.configured

# This builds the actual binary.
#
$(NDAS_BUILD_DIR)/.built: $(NDAS_BUILD_DIR)/.configured
rm -f $(NDAS_BUILD_DIR)/.built
$(TARGET_CONFIGURE_OPTS) \
CPPFLAGS="$(STAGING_CPPFLAGS) $(NDAS_CPPFLAGS)" \
LDFLAGS="$(STAGING_LDFLAGS) $(NDAS_LDFLAGS)" \
NDAS_KERNEL_PATH=/root/broadcom/src/linux/linux \
NDAS_KERNEL_VERSION=2.4.20 \
NDAS_KERNEL_ARCH=mips \
NDAS_CROSS_COMPILE=$(TARGET_CROSS) \
NDAS_BUILD=23 \
NDAS_EXTRA_CFLAGS="-mlong-calls -DNDAS_SIGPENDING_OLD" \
$(MAKE) -C $(NDAS_BUILD_DIR)
touch $(NDAS_BUILD_DIR)/.built

#
# This builds the actual binary.
#
#
$(NDAS_BUILD_DIR)/.built: $(NDAS_BUILD_DIR)/.configured

#
# This is the build convenience target.
#
ndas: $(NDAS_BUILD_DIR)/.built




export OPTWARE_TARGET=oleg
make make/ndas.mk
make ndas



make[1]: Entering directory `/opt/slug/optware/builds/ndas'
/opt/slug/optware/toolchain/mipsel-linux-uclibc/gcc-3.4.6-uclibc-0.9.28/bin/mips
el-linux-uclibc-gcc -include /root/broadcom/src/linux/linux/include/linux/modver
sions.h -DMODVERSIONS -DKBUILD_BASENAME=debug -DEXPORT_SYMTAB -DMODULE -DLINUX -
I/opt/slug/optware/builds/ndas/inc -DNDAS_WRITE=1 -D__KERNEL__ -I/root/broadco
m/src/linux/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-stri
ct-aliasing -fno-common -fomit-frame-pointer -I/root/broadcom/src/linux/linux/..
/../include -DBCMDRIVER -I /root/broadcom/src/linux/linux/include/asm/gcc -G 0 -
mno-abicalls -fno-pic -pipe -mcpu=r4600 -mips2 -Wa,--trap -D_mips -mlong-calls
-DNDAS_SIGPENDING_OLD -DNDAS_VERSION=1.0.0 -DNDAS_BUILD=0 -c -o sal/debug.o sal
/debug.c
cc1: error: invalid option `cpu=r4600'
make[1]: *** [sal/debug.o] Error 1
make[1]: Leaving directory `/opt/slug/optware/builds/ndas'
make: *** [/opt/slug/optware/builds/ndas/.built] Error 2



Seam that is very close but ...

Help

oleo
28-11-2006, 17:25
If you are going to build kernel module for firmware on wl500g.dyndns.org then "oleg" is not the right target. You should use "wl500g" as target. This will use correct tolchain.

And the path should be /root/broadcom/src/linux/linux according to your log.

Here is a portion which builds for me:


#
# This builds the actual binary.
#
$(NDAS_BUILD_DIR)/.built: $(NDAS_BUILD_DIR)/.configured
rm -f $(NDAS_BUILD_DIR)/.built
$(TARGET_CONFIGURE_OPTS) \
CPPFLAGS="$(STAGING_CPPFLAGS) $(NDAS_CPPFLAGS)" \
LDFLAGS="$(NDAS_LDFLAGS)" \
NDAS_KERNEL_PATH=/local/leon/p/wl/wl500gx/broadcom/src/linux/linux \
NDAS_KERNEL_VERSION=2.4 \
NDAS_KERNEL_ARCH=mips \
NDAS_CROSS_COMPILE=$(TARGET_CROSS) \
NDAS_EXTRA_CFLAGS="-mlong-calls -DNDAS_SIGPENDING_OLD" \
$(MAKE) -C $(NDAS_BUILD_DIR) all ndas-admin
touch $(NDAS_BUILD_DIR)/.built


If you are going to submit the whole ndas.mk and building ipk then please bear in mind that there should be no absolute paths.

PB_LIST
28-11-2006, 19:07
Almost there...

ndas.mk file


# You must replace "ndas" and "NDAS" with the lower case name and
# upper case name of your new package. Some places below will say
# "Do not change this" - that does not include this global change,
# which must always be done to ensure we have unique names.

#
# NDAS_VERSION, NDAS_SITE and NDAS_SOURCE define
# the upstream location of the source code for the package.
# NDAS_DIR is the directory which is created when the source
# archive is unpacked.
# NDAS_UNZIP is the command used to unzip the source.
# It is usually "zcat" (for .gz) or "bzcat" (for .bz2)
#
# You should change all these variables to suit your package.
# Please make sure that you add a description, and that you
# list all your packages' dependencies, seperated by commas.
#
# If you list yourself as MAINTAINER, please give a valid email
# address, and indicate your irc nick if it cannot be easily deduced
# from your name or email address. If you leave MAINTAINER set to
# "NSLU2 Linux" other developers will feel free to edit.
#
NDAS_SITE=http://code.ximeta.com/download/1.0.1/23/openwrt
NDAS_VERSION=1.0.1-23
NDAS_SOURCE=ndas-$(NDAS_VERSION).tar.gz
NDAS_DIR=ndas-$(NDAS_VERSION)
NDAS_UNZIP=zcat
NDAS_MAINTAINER=PB_LIST
NDAS_DESCRIPTION=Describe ndas here.
NDAS_SECTION=
NDAS_PRIORITY=optional
NDAS_DEPENDS=
NDAS_SUGGESTS=
NDAS_CONFLICTS=

#
# NDAS_IPK_VERSION should be incremented when the ipk changes.
#
NDAS_IPK_VERSION=1

#
# NDAS_CONFFILES should be a list of user-editable files
NDAS_CONFFILES=/opt/etc/init.d/S60ndas

#
# NDAS_PATCHES should list any patches, in the the order in
# which they should be applied to the source code.
#
NDAS_PATCHES=

#
# If the compilation of the package requires additional
# compilation or linking flags, then list them here.
#
NDAS_CPPFLAGS= -mlong-calls -DNDAS_SIGPENDING_OLD
NDAS_LDFLAGS=

#
# NDAS_BUILD_DIR is the directory in which the build is done.
# NDAS_SOURCE_DIR is the directory which holds all the
# patches and ipkg control files.
# NDAS_IPK_DIR is the directory in which the ipk is built.
# NDAS_IPK is the name of the resulting ipk files.
#
# You should not change any of these variables.
#
NDAS_BUILD_DIR=$(BUILD_DIR)/ndas
NDAS_SOURCE_DIR=$(SOURCE_DIR)/ndas
NDAS_IPK_DIR=$(BUILD_DIR)/ndas-$(NDAS_VERSION)-ipk
NDAS_IPK=$(BUILD_DIR)/ndas_$(NDAS_VERSION)-$(NDAS_IPK_VERSION)_$(TARGET_ARCH).ipk


#.PHONY: ndas-source ndas-unpack ndas ndas-stage ndas-ipk ndas-clean ndas-dirclean ndas-check

.PHONY: ndas-source ndas-unpack ndas ndas-ipk ndas-clean ndas-dirclean ndas-check

#
# This is the dependency on the source code. If the source is missing,
# then it will be fetched from the site using wget.
#
$(DL_DIR)/$(NDAS_SOURCE):
$(WGET) -P $(DL_DIR) $(NDAS_SITE)/$(NDAS_SOURCE)

#
# The source code depends on it existing within the download directory.
# This target will be called by the top level Makefile to download the
# source code's archive (.tar.gz, .bz2, etc.)
#
ndas-source: $(DL_DIR)/$(NDAS_SOURCE) $(NDAS_PATCHES)

#
# This target unpacks the source code in the build directory.
# If the source archive is not .tar.gz or .tar.bz2, then you will need
# to change the commands here. Patches to the source code are also
# applied in this target as required.
#
# This target also configures the build within the build directory.
# Flags such as LDFLAGS and CPPFLAGS should be passed into configure
# and NOT $(MAKE) below. Passing it to configure causes configure to
# correctly BUILD the Makefile with the right paths, where passing it
# to Make causes it to override the default search paths of the compiler.
#
# If the compilation of the package requires other packages to be staged
# first, then do that first (e.g. "$(MAKE) <bar>-stage <baz>-stage").
#
# If the package uses GNU libtool, you should invoke $(PATCH_LIBTOOL) as
# shown below to make various patches to it.
#
#$(NDAS_BUILD_DIR)/.configured: $(DL_DIR)/$(NDAS_SOURCE) $(NDAS_PATCHES) make/ndas.mk
# $(MAKE) <bar>-stage <baz>-stage
# rm -rf $(BUILD_DIR)/$(NDAS_DIR) $(NDAS_BUILD_DIR)
# $(NDAS_UNZIP) $(DL_DIR)/$(NDAS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# if test -n "$(NDAS_PATCHES)" ; \
# then cat $(NDAS_PATCHES) | \
# patch -d $(BUILD_DIR)/$(NDAS_DIR) -p0 ; \
# fi
# if test "$(BUILD_DIR)/$(NDAS_DIR)" != "$(NDAS_BUILD_DIR)" ; \
# then mv $(BUILD_DIR)/$(NDAS_DIR) $(NDAS_BUILD_DIR) ; \
# fi
# #(cd $(NDAS_BUILD_DIR); \
# $(TARGET_CONFIGURE_OPTS) \
# CPPFLAGS="$(STAGING_CPPFLAGS) $(NDAS_CPPFLAGS)" \
# LDFLAGS="$(STAGING_LDFLAGS) $(NDAS_LDFLAGS)" \
# ./configure \
# --build=$(GNU_HOST_NAME) \
# --host=$(GNU_TARGET_NAME) \
# --target=$(GNU_TARGET_NAME) \
# --prefix=/opt \
# --disable-nls \
# --disable-static \
#)
#$(PATCH_LIBTOOL) $(NDAS_BUILD_DIR)/libtool
touch $(NDAS_BUILD_DIR)/.configured

ndas-unpack: $(NDAS_BUILD_DIR)/.configured

# This builds the actual binary.
#
$(NDAS_BUILD_DIR)/.built: $(NDAS_BUILD_DIR)/.configured
rm -f $(NDAS_BUILD_DIR)/.built
$(TARGET_CONFIGURE_OPTS) \
CPPFLAGS="$(STAGING_CPPFLAGS) $(NDAS_CPPFLAGS)" \
LDFLAGS="$(STAGING_LDFLAGS) $(NDAS_LDFLAGS)" \
NDAS_KERNEL_PATH=/root/broadcom/src/linux/linux \
NDAS_KERNEL_VERSION=2.4.20 \
NDAS_KERNEL_ARCH=mipsel \
NDAS_CROSS_COMPILE=$(TARGET_CROSS) \
NDAS_BUILD=23 \
NDAS_EXTRA_CFLAGS="-mlong-calls -DNDAS_SIGPENDING_OLD" \
$(MAKE) -C $(NDAS_BUILD_DIR)
touch $(NDAS_BUILD_DIR)/.built

#
# This builds the actual binary.
#
#
$(NDAS_BUILD_DIR)/.built: $(NDAS_BUILD_DIR)/.configured

#
# This is the build convenience target.
#
ndas: $(NDAS_BUILD_DIR)/.built

#
# If you are building a library, then you need to stage it too.
#
#$(NDAS_BUILD_DIR)/.staged: $(NDAS_BUILD_DIR)/.built
# rm -f $(NDAS_BUILD_DIR)/.staged
# $(MAKE) -C $(NDAS_BUILD_DIR) DESTDIR=$(STAGING_DIR) install
# touch $(NDAS_BUILD_DIR)/.staged

#ndas-stage: $(NDAS_BUILD_DIR)/.staged

#
# This rule creates a control file for ipkg. It is no longer
# necessary to create a seperate control file under sources/ndas
#






make[1]: Entering directory `/opt/slug/optware/builds/ndas'
/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-ld -r -x -L/opt/slug/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/opt/slug/optware/staging/opt/lib -o /opt/slug/optware/builds/ndas/ndas_sal.o sal/debug.o sal/libc.o sal/mem.o sal/net.o sal/sal.o sal/sync.o sal/thread.o sal/time.o ndas_sal_main.o
/opt/brcm/hndtools-mipsel-linux/bin/mipsel-linux-ld: unrecognized option '-Wl,-rpath,/opt/lib'
/opt/brcm/hndtools-mipsel-linux/bin/mipsel-linux-ld: use the --help option for usage information
make[1]: *** [/opt/slug/optware/builds/ndas/ndas_sal.o] Error 1
make[1]: Leaving directory `/opt/slug/optware/builds/ndas'
make: *** [/opt/slug/optware/builds/ndas/.built] Error 2


How do I get rid of the

"-L/opt/slug/optware/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/opt/slug/optware/staging/opt/lib"

please please

oleo
28-11-2006, 20:08
carefuly inspect my prevoius post and you will be there. Prepare packaging as instructed in ipkg directory. Remove absolute paths from building and post it here if it works. Overcome somehow confirmation for the copyright and include it in ipkg.

PB_LIST
29-11-2006, 13:18
It compiled. But :mad: it does not work.

modules load OK
ndasadmin works ok
./ndasadmin start OK
./ndasadmin register OK
./ndasadmin enable router just stops.

They have other rev. in the site I will try to see if the other works:rolleyes:

I will keep you posted.

Regarding other IPK packages that use the kernal do you know any that I can look to learn? To see how is done "Remove absolute paths from building"

I could just put a variable at the begining of the mk file would this be OK?


You have been great
Thank you

wpte
25-05-2008, 14:09
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:

newbiefan
25-05-2008, 18:04
don't know exactly, but there is a howto in german:
http://translate.google.at/translate?u=http%3A%2F%2Fwl500g.info%2Fshowthread. php%3Ft%3D13817&sl=de&tl=en&hl=de&ie=UTF-8

hope it helps....

wpte
25-05-2008, 19:48
thanks, I''ll take a look at it:)

I''m not really planning to do any IPKG packages, but I think it''s just the extra parameter that change it into an ipkg...
I''m first going to test some simple packages, then i''ll write a full detailed how-to, hopefully for ubuntu and puppy-linux, because I believe those are a bit more open for the public:)

I do want to try to get wine to work, maybe some windows programs will work with it:)
probably some pocket pc applications... because "wine is not an emulater":p

newbiefan
25-05-2008, 21:21
thanks, I''ll take a look at it:)

I''m not really planning to do any IPKG packages, but I think it''s just the extra parameter that change it into an ipkg...


Right.:eek:


Well, would be nice to see a really good (complete) howto........:rolleyes:

wpte
25-05-2008, 23:46
well, I guess it''s time to grab the cow at the horns (dutch say;))
I mean, things that aren''t clear are just rubbish, just like the wireless amp:rolleyes:

I mean open source, should be open, most real developments I''ve seen so far are in russian or german (wich I speak a little). that''s not really open.
why not share importand things in english:confused:
anyway, you got my word on the how-to:);)

DrChair
27-05-2008, 20:49
I do want to try to get wine to work, maybe some windows programs will work with it:)

Don't waste your time... Wine needs a x86 or x64 processor.
(and i think it would otherwise be way to heavy)

DrChair
27-05-2008, 20:55
I also still wonder why ppl write a readme without any [enters], so you get one big line:mad:

Try opening that readme in Wordpad (instead of notepad) or better Notepad++

wpte
28-05-2008, 23:18
Don't waste your time... Wine needs a x86 or x64 processor.
(and i think it would otherwise be way to heavy)

yeh for running the programs... so it might be possible, some pocket pc applications will work, you got them in mips too:)

I''m also going to try dosbox... might be a bit weird, but I still got loads of nice dos programs;)

olo
02-06-2008, 19:09
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



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



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


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


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


TARGET_CC=$(TARGET_CROSS)gcc

TARGET_CROSS is defined in make/toolchain-oleg.mk


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/



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/



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



...
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



...
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.


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/



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



...
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



$ 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

rsu
15-06-2008, 09:19
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/index.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!

andersos
21-06-2008, 11:09
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 :



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



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?

andersos
23-06-2008, 20:14
It happened that the version I wanted now became available in optware. But it would still be nice to get a solution for this problem.

oleo
23-06-2008, 21:11
use inltool 0.35 instead of 0.40.
Similar problem reported here. (http://trac.transmissionbt.com/ticket/1052)

andersos
23-06-2008, 22:13
I'm on Lenny (testing) where only 0.40 is available. I'll try to install it from Etch repo. The issue is reported to Debian package maintainers btw. It breaks many things.

shinji257
28-06-2008, 23:50
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.

shinji257
02-07-2008, 14:44
Debian based arch:
EDIT: There is a bug in binutils. One of the regex statements in the configure script for it is messed up. In particular it is the one to detect makeinfo. For some reason it messes up the compile. I corrected the line after the compile broke then had it restart and it went past that part so I'll start over and post the error along with the diff for the file.

Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453216

Looks like buildroot could use a patch file for that in their repository.

Relevant Error Segment:

WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[5]: *** [/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8/bfd/doc/bfd.info] Error 1
make[5]: Leaving directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd/doc'
Making info in po
make[5]: Entering directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd/po'
( if test 'x/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8/bfd/po' != 'x.'; then \
posrcprefix='/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8/bfd/'; \
else \
posrcprefix="../"; \
fi; \
rm -f SRC-POTFILES-t SRC-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ $posrcprefix& \\\\@" < /home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8/bfd/po/SRC-POTFILES.in \
| sed -e '$s/\\$//') > SRC-POTFILES-t \
&& chmod a-w SRC-POTFILES-t \
&& mv SRC-POTFILES-t SRC-POTFILES )
( rm -f BLD-POTFILES-t BLD-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ ../& \\\\@" < /home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8/bfd/po/BLD-POTFILES.in \
| sed -e '$s/\\$//') > BLD-POTFILES-t \
&& chmod a-w BLD-POTFILES-t \
&& mv BLD-POTFILES-t BLD-POTFILES )
cd .. \
&& CONFIG_FILES=po/Makefile.in:po/Make-in \
CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing default commands
make[5]: Leaving directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd/po'
make[5]: Entering directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd/po'
make[5]: Nothing to be done for `info'.
make[5]: Leaving directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd/po'
make[5]: Entering directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd'
make[5]: Nothing to be done for `info-am'.
make[5]: Leaving directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd'
make[4]: *** [info-recursive] Error 1
make[4]: Leaving directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd'
make[3]: *** [all-bfd] Error 2
make[3]: Leaving directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build'
make[1]: *** [/home/shinji/optware/oleg/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/binutils/objdump] Error 2
make[1]: Leaving directory `/home/shinji/optware/oleg/toolchain/buildroot'
make: *** [/home/shinji/optware/oleg/toolchain/buildroot/.built] Error 2


Ok. I got the diff attached now. When the compile breaks you have to go to <optware>/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8/ or if you are building inside a target folder <optware>/<target>/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8/

Save configure.diff to that folder then apply it to the configure script by running "patch configure configure.diff".

Replace <optware> with the root location that you placed the optware folder at. For me it is /home/shinji/optware. Replace <target> with the target folder if you chose to go that way. For me it is oleg.

Configure.diff:

--- configure.bak 2008-07-02 10:15:24.000000000 -0400
+++ configure 2008-07-02 10:21:39.000000000 -0400
@@ -3679,7 +3679,7 @@
# For an installed makeinfo, we require it to be from texinfo 4.4 or
# higher, else we use the "missing" dummy.
if ${MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.([1-3][0-9]|[4-9])|[5-9])' >/dev/null 2>&1; then
:
else
MAKEINFO="$MISSING makeinfo"


Once that is done you can go back to the folder where you started the build process and re-run it again. It should pickup a little earlier by re-running configure and then building all of the items for you. Please note that you must have the flex package installed before letting it re-run configure. If it still fails then go back and simply run `touch configure` after installing the flex package and it will continue. I just found this out when trying to build it on xubuntu 8.04 (i386).

The build was successful on Ubuntu 8.04 64-bit.

andersos
02-07-2008, 22:14
This is now solved in Transmission trunk. So I can keep on compiling these "betas" :)
Btw, are you maybe planning to remove transmissiond when transmission 1.3 is released? I don't see what use it will be when transmission-daemon is so good as it will be in 1.3 with json communication. No offense, just wondering.

oleo
03-07-2008, 08:46
now that Charles Kerr took over http://recurser.com/trac/transmission/timeline
It surely will be a advanced solution. Maybe clutch will be merged into mainline. I am just hoping that someday Clutch will have queuing and inactive torrents repository. Untill then I will stick to my daemon.

oleo
03-07-2008, 08:54
I am suggesting you that you stick with an old stable release of Debian or Ubuntu 6 if you plan to build toolchain.

Anyway I will be glad if someone can spent a few days and upgrade buildroot to uclibc 0.9.29 and port my patches tor toolchain so that it will work on oleg, ddwrt, and other brcm platforms , isolated from system uClibc.

andersos
03-07-2008, 11:46
Ok so transmissiond has more features. I didn't know that. I can just exclude transmissiond in the makefile so build doesn't break.

lly
03-07-2008, 12:06
oleo
As I know, Oleg also has plans to migrate to new toolchain, but he is on vacation now.

I builded new toolchain based on OpenWRT development trunk 2008-06-14 (gcc 3.4.6, uClibc 0.9.29, binutils 2.17) under SuSe 10.1. Only a few extra patches needed for toolchain itself, but firmware also has to be patched due to gcc upgrade.
If you want to take a look to my patches - drop me a line.

shinji257
03-07-2008, 18:48
One thing I'll mention is that I installed the new toolchain from nslu2-linux.org fine on 64-bit Ubuntu 8.04 once the above mentioned binutils configure script patch was applied. The resulting ipkg file installed correctly and the binaries ran although the end result wasn't what I had expected. Just a fyi. I was trying to build nfs-utils if I can however I think the whole thing needs the kernel to be updated to support the function. :( Otherwise the binaries worked without segfaulting.

My second attempt was on the cygwin platform so that I may simply work on my project on both systems but I'll need to solve the error on the gcc side if I want it to work.

@lly: GCC version is 4.1 so I don't know what you mean that it has to be updated to support the new version. All gcc versions are binary compatible with each other.

EDIT: Oh. I just realized what you were talking about. You updated the firmware build toolkit. That was different from what my goal was. I am just trying to build ipkg files and not necessarily the firmware.

oleo
14-07-2008, 10:55
oleo
As I know, Oleg also has plans to migrate to new toolchain, but he is on vacation now.

I builded new toolchain based on OpenWRT development trunk 2008-06-14 (gcc 3.4.6, uClibc 0.9.29, binutils 2.17) under SuSe 10.1. Only a few extra patches needed for toolchain itself, but firmware also has to be patched due to gcc upgrade.
If you want to take a look to my patches - drop me a line.

So let see what you have had in mind. Oleg is using mine toolchain. This toolchain crates packages with uClibc independent of system libc!
If you meant that Oleg will upgrade its toolchain for fimware and system uclibc to 0.9.29 then this is good news. But again I am looking to upgrade of mine toolchain what will again bi independent of system uClibc. This way ddwrt and other brcm24 platforms can run without library clash!

engy
28-08-2008, 08:35
I have fixed makeinfo check bug in binutils http://trac.nslu2-linux.org/optware/changeset/8980

oleo
28-08-2008, 10:30
Thank you. Now toolchain can be built on newer systems.

shinji257
28-08-2008, 20:15
Yes. Now I don't need to apply the patch midway when the compile breaks. It will "just work" now.

engy
28-08-2008, 21:31
Thank you. Now toolchain can be built on newer systems.

Yes. I'm using Suse 11.0 and Fedora 8. Some packages depends on concrete version (1.9) of aclocal and automake. I will fix it soon.

oleo
29-08-2008, 07:38
The challenge to upgrade toolchain and uClibc to newer version is still open.
I can help with explanation of pathches bot have no time to spend on on upgrade.

There is also pending branch http://trac.nslu2-linux.org/optware/browser/branches/uclibc-unstable
which introduced LJSJ in config that solves C++ exceptions problem on mipsel arch. Besides upgrade of course.

shinji257
31-08-2008, 21:48
I have fixed makeinfo check bug in binutils http://trac.nslu2-linux.org/optware/changeset/8980

Yay! The last time I built I was able to do the build from ground zero without stopping this time. Ubuntu 8.04 x86

KMustermann
13-09-2008, 12:34
I know the last post is quite long ago, but i hope someone can remember the discussed problem.

I have compiled the ximeta binary (version 1.1-20) in order to use them in combination with an avm fritzbox. I succeeded in compiling, loading modules, starting ndasadmin and registering my device, as PB_LIST did. I get an slot number, but enabling with these slot number fails. The router (fritzbox) stops working and reboot after one or two minutes of inactivity. I think it's the same behaviour PB_LIST has described some in his last post.
I want to know, if anybody has managed to enable an NDAS-drive successful on an router ?
I would be grateful for any support, you can give me.

shinji257
18-10-2008, 19:35
I am using the cross-compile environment from nslu2-linux.org. The toolchain built fine and most packages do so as well however libmemcache fails to do so at all.

It gets up to a certain point then fails complaining about either libtool or thinking the parameters given are commands.

My OS is Ubuntu 8.10 beta. It is using libtool version 2.2.4. Any ideas?

Here is the error code. I can't seem to find a fix for this.


shinji@shinji-laptop:~/optware/oleg$ make libmemcache
rm -f /home/shinji/optware/oleg/builds/libmemcache/.built
make -C /home/shinji/optware/oleg/builds/libmemcache
make[1]: Entering directory `/home/shinji/optware/oleg/builds/libmemcache'
make all-recursive
make[2]: Entering directory `/home/shinji/optware/oleg/builds/libmemcache'
Making all in doc
make[3]: Entering directory `/home/shinji/optware/oleg/builds/libmemcache/doc'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/shinji/optware/oleg/builds/libmemcache/doc'
Making all in include
make[3]: Entering directory `/home/shinji/optware/oleg/builds/libmemcache/include'
Making all in memcache
make[4]: Entering directory `/home/shinji/optware/oleg/builds/libmemcache/include/memcache'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/shinji/optware/oleg/builds/libmemcache/include/memcache'
make[4]: Entering directory `/home/shinji/optware/oleg/builds/libmemcache/include'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/shinji/optware/oleg/builds/libmemcache/include'
make[3]: Leaving directory `/home/shinji/optware/oleg/builds/libmemcache/include'
Making all in src
make[3]: Entering directory `/home/shinji/optware/oleg/builds/libmemcache/src'
if /bin/sh ../libtool --tag=CC --mode=compile /home/shinji/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -O2 -pipe -I/home/shinji/optware/oleg/staging/opt/include -D__linux -O3 -std=c99 -Wall -pipe -Wpacked -Wdisabled-optimization -MT memcache.lo -MD -MP -MF ".deps/memcache.Tpo" -c -o memcache.lo memcache.c; \
then mv -f ".deps/memcache.Tpo" ".deps/memcache.Plo"; else rm -f ".deps/memcache.Tpo"; exit 1; fi
../libtool: line 790: X--tag=CC: command not found
../libtool: line 823: libtool: ignoring unknown tag : command not found
../libtool: line 790: X--mode=compile: command not found
../libtool: line 956: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 957: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../libtool: line 1100: X/home/shinji/optware/oleg/toolchain/mipsel-linux-uclibc/gcc-4.1.1-uclibc-0.9.28/bin/mipsel-linux-uclibc-gcc: No such file or directory
../libtool: line 1100: X-DHAVE_CONFIG_H: command not found
../libtool: line 1100: X-I.: command not found
../libtool: line 1100: X-I.: command not found
../libtool: line 1100: X-I..: command not found
../libtool: line 1100: X-I../include: No such file or directory
../libtool: line 1100: X-O2: command not found
../libtool: line 1100: X-pipe: command not found
../libtool: line 1100: X-I/home/shinji/optware/oleg/staging/opt/include: No such file or directory
../libtool: line 1100: X-D__linux: command not found
../libtool: line 1100: X-O3: command not found
../libtool: line 1100: X-std=c99: command not found
../libtool: line 1100: X-Wall: command not found
../libtool: line 1100: X-pipe: command not found
../libtool: line 1100: X-Wpacked: command not found
../libtool: line 1100: X-Wdisabled-optimization: command not found
../libtool: line 1100: X-MT: command not found
../libtool: line 1100: Xmemcache.lo: command not found
../libtool: line 1100: X-MD: command not found
../libtool: line 1100: X-MP: command not found
../libtool: line 1100: X-MF: command not found
../libtool: line 1100: X.deps/memcache.Tpo: No such file or directory
../libtool: line 1100: X-c: command not found
../libtool: line 1151: Xmemcache.lo: command not found
../libtool: line 1156: libtool: compile: cannot determine name of library object from `': command not found
make[3]: *** [memcache.lo] Error 1
make[3]: Leaving directory `/home/shinji/optware/oleg/builds/libmemcache/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/shinji/optware/oleg/builds/libmemcache'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/shinji/optware/oleg/builds/libmemcache'
make: *** [/home/shinji/optware/oleg/builds/libmemcache/.built] Error 2

oleo
24-10-2008, 19:59
usually it helps if an older version of tool is installed.

shinji257
25-10-2008, 00:12
Yea. I figured that out after a while. Unfortunately Ubuntu 8.10 (intrepid) doesn't have an appropriate version in the repository. I had to downgrade to 8.04 to make it all work. I'm "borrowing" some intrepid packages though. I have compiled and created new lighttpd 1.4.20 packages that include all current features. I also did a 1.5 pre-release package. The 1.5.x branch may have a new dependency on glib but I placed it under suggest until I know it will be needed for runtime. The package is marked as experimental but does compile cleanly.

Pim Borst
02-11-2008, 15:32
Hi,

I found this link about the problem: http://moc.daper.net/node/352
Someone mentions that in the generated file /opt/optware/oleg/builds/libmemcache/libtool the $echo variable is not set. When the error occurs you can add a line echo='echo' just after the line ECHO='echo'. If you do a make again libmemcache will compile.

With make lighttpd you will now get another error...
It cannot find the curses/termcap library when the mysql library is compiled.

Pim.

shinji257
02-11-2008, 16:15
Well the odd thing was that libmemcache compiled fine for the host but not for the target as I tested that theory. It is an oddity and looks like a small incompatibility with something in libtool 2.x and the environment. I had downgraded to 8.04 (in a VM now) and it compiles fine since I can use libtool 1.5 there.

kuzfix
20-11-2008, 15:45
Is there a way of checking if binary is OK, before risking the upload?

As oleo explained, diff won't do:

Oleg always post-include nmap binary in its firmwares.
So you can never expect the same binary. Even if nmap would not be included, binaries would not be the same becaus of possible difference in direcory tree traversing during LZMA compression.

Also there are several binaries in http://oleg.wl500g.info/1.9.2.7-10/, for each model a different one (diff reveals they ARE different).
How can you change for which target you are compiling. Either that's not written in the guides or I missed it.

Thanx for any help.

delmo
28-06-2009, 12:58
Hallo,

I try to crosscompile packages for Wl50gpv2 but did not make it up to now. Using the oleg-target toolchain has no success. Is there a special toolchain for the v2?

Best regards
delmo

Ciuflingar
17-08-2009, 23:23
Hi!

I want to build and use TntNet (http://www.tntnet.org/) tools for the oleg's firmware.

Is this possible or I need to build a whole firmware from scratch. I like the olegs firmware and I don't want to switch but if I cant, I cant...

Can someone guide me with some links or ideas so I can start? All my searches goes in wrong directions.

Here (http://osdir.com/ml/embedded.freewrt.devel/2007-05/msg00006.html) is the proof that the packages are maintained for the openwrt so I think I can build them.

Are there other repository for olegs where I can search for the respective application?