will check on this... seems to be a bug...
Printable View
will check on this... seems to be a bug...
Ok, fixed this. If anyone if already installed bad ipkg (i.e. it fails to work), then just type these lines
This would download correct version and fix the things.Code:cd /opt/bin
wget http://wl500g.dyndns.org/ipkg/ipkg
All things are OK now !
Thank you for your quick reaction.
Just curious:
What good is php-mysql_5.0.3-7_mipsel.ipk when there is no MySQL support present?
I guess it can be used to connect to a remote MySQL server, if you have access to one that allows external connections ?
Incentive for someone to contribute the MySQL support? ;)Quote:
Originally Posted by Jethro
-- Rod
Any idea on how to get libstdc++ (needed by mysql and many others unslung optware) support in the actual toolchain ?
The idea is to recompile everything with latest uclibc. :)
It's possible, but requires some time, which I do not have at the moment. :(
You have my blessing. :D I'll be patiently awaiting this version. :)Quote:
Originally Posted by Oleg
Could you give some hints to achieve this ?Quote:
Originally Posted by Oleg
I build a fresh toolchain using uclibc buildroot but it doesn't let me choose kernel 2.4.20. The minimum that be be used is 2.4.25... As for gcc / binutils, oldest ones I can use are 3.3.5 / 2.14.90.0.8. The final toolchain doesn't build the firmware, as expected ;)
Questions are :
1) Since Asus tarball uses a modified 2.4.20 kernel, I think I can't use an other one for my toolchain, correct ? other idea : are kernel sources involved in toolchain setup ?
2) Is there a particular gcc / binutils version that should be used to create the toolchain ?
3) Is my way the good way (i.e rebuild a full toolchain from scratch) or should I only try to build a uclibc toolchain using uclibc 0.9.28 ?
Thank ou for your help,
JF
Kernel version only make sense for include files, so you could safely use 2.4.25. My original idea was to use gcc and binutils which are supplied by broadcom and compile toolchain with uclibc 0.9.27.Quote:
Originally Posted by Jean-Fabrice
Actual kernel headers are not used, so use 2.4.25.Quote:
1) Since Asus tarball uses a modified 2.4.20 kernel, I think I can't use an other one for my toolchain, correct ? other idea : are kernel sources involved in toolchain setup ?
Perhaps the same as supplied by broadcom in the source dir.Quote:
2) Is there a particular gcc / binutils version that should be used to create the toolchain ?
You mean 0.9.27? Anyway, the only way with latest uclibcs is to rebuild toolchain from scratch. Once you will do this, post here - I will then adjust firmware.Quote:
3) Is my way the good way (i.e rebuild a full toolchain from scratch) or should I only try to build a uclibc toolchain using uclibc 0.9.28 ?
okay, here is what I did since my last post :)
My goal is to build a completely new uclibc toolchain based on uclibc 0.9.27, binutils 2.6.12, gcc 3.2.3 and kernel 2.4.25.
I'm using uclibc buildroot to build the new toolchain. Since latest snapshot of buildroot doesn't let me choose binutils 2.6.12 and gcc 3.2.3, I applied some patches to it to be able to do so.
My latest tests gave me the following results :
1. binutils build fine
2. first pass of gcc ( --disable-shared ) builds fine
3a. uclibc does'nt build if I let the option 'Support global constructors and destructors' defaultly selected (UCLIBC_CTOR_DTOR=y). The build of uclibc terminates with 'crtbeginS.o : no such file or directory'. It seems that crtbeginS.o is not generated by the previous gcc build stage. Dunno why ! but since crtbeginS.o is not present in the broadcom toolchain, I thought I was walking the wrong way.
3b. uclibc builds if I don't select the UCLIBC_CTOR_DTOR option
==> At this point, in order to continue, I decided to use 3b.
4. second pass of gcc (with --enable-shared) fails with some errors on decl.c ("decl.c:561: invalid lvalue in assignment")
5. no more :( I can't continue
Any idea how I could solve 4 or maybe 3a ?
Attached are my buildroot patch and .config, uclibc's .config is the default generated one.
JF
okay, 4. solved thanks to http://66.102.9.104/search?q=cache:r...signment&hl=frQuote:
Originally Posted by Jean-Fabrice
now gcc build ends with
any idea ?Code:/home/buildroot/build_mipsel/staging_dir/mipsel-linux-uclibc/bin/ld: libgcc/./_muldi3.o: compiled for a little endian system and target is big endian
File in wrong format: failed to merge target specific data of file libgcc/./_muldi3.o
Problem solved again using 'mips' as ARCH (not MIPSEL) at the buildroot 'make menuconfig' stage. (This should be a problem since MIPS is big endian while MIPSEL is a shorcut for MIPS Little Endian)
So compilation restarts... and now fails with :
As usual, no crtbeginS.o in my toolchain's dirs. :(Code:/home/buildroot/toolchain_build_mips/gcc-3.2.3-final/gcc/xgcc -B/home/buildroot/toolchain_build_mips/gcc-3.2.3-final/gcc/ -B/home/buildroot/build_mips/staging_dir/mips-linux-uclibc/bin/ -B/home/buildroot/build_mips/staging_dir/mips-linux-uclibc/lib/ -isystem /home/buildroot/build_mips/staging_dir/mips-linux-uclibc/include -O2 -DIN_GCC -DCROSS_COMPILE -DUSE_UCLIBC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o libgcc_s.so.1 libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_exit.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_pack_sf.o libgcc/./_unpack_sf.o libgcc/./_addsub_sf.o libgcc/./_mul_sf.o libgcc/./_div_sf.o libgcc/./_fpcmp_parts_sf.o libgcc/./_compare_sf.o libgcc/./_eq_sf.o libgcc/./_ne_sf.o libgcc/./_gt_sf.o libgcc/./_ge_sf.o libgcc/./_lt_sf.o libgcc/./_le_sf.o libgcc/./_unord_sf.o libgcc/./_si_to_sf.o libgcc/./_sf_to_si.o libgcc/./_negate_sf.o libgcc/./_make_sf.o libgcc/./_sf_to_df.o libgcc/./_thenan_sf.o libgcc/./_sf_to_usi.o libgcc/./_usi_to_sf.o libgcc/./_pack_df.o libgcc/./_unpack_df.o libgcc/./_addsub_df.o libgcc/./_mul_df.o libgcc/./_div_df.o libgcc/./_fpcmp_parts_df.o libgcc/./_compare_df.o libgcc/./_eq_df.o libgcc/./_ne_df.o libgcc/./_gt_df.o libgcc/./_ge_df.o libgcc/./_lt_df.o libgcc/./_le_df.o libgcc/./_unord_df.o libgcc/./_si_to_df.o libgcc/./_df_to_si.o libgcc/./_negate_df.o libgcc/./_make_df.o libgcc/./_df_to_sf.o libgcc/./_thenan_df.o libgcc/./_df_to_usi.o libgcc/./_usi_to_df.o libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde.o libgcc/./unwind-sjlj.o -lc && rm -f libgcc_s.so && ln -s libgcc_s.so.1 libgcc_s.so
/home/buildroot/build_mips/staging_dir/mips-linux-uclibc/bin/ld: cannot open crtbeginS.o: No such file or directory
I wasn't able to get rid of the crtbeginS.o problem :(
So I start a new way :
I rebuild a full libc toolchain using gcc 3.2.3, binutils 2.13.2.1 and glibc 2.2.5.
This seems to be ok after some hard work and many hours...
Now, how can I build mipsel-uclibc-gcc since compiling latest uclibc doesn't create it ? uclibc building only produce libs.
JF
JF, no way. You've to use uclibc instead of glibc...Quote:
Originally Posted by Jean-Fabrice
BTW, have you checked openwrt buildroot for correct uclibc config? We should use the same. As for gcc/binutils - well, we would probably switch to gcc-3.3.x then...
P.S. Sorry for delay, I've missed this post somehow.
I was trying a glibc toolchain since broadcom uclibc toolchain seems to make use of the glibc one they provide (mipsel-uclibc-gcc is very small. is it a wrapper for mipsel-linux-gcc which links against uclibc ?)
I'll give a look at openwrt uclibc and check their config file.
I'm now making a last try with gcc 3.2.3 & uclibc snapshot and switch to gcc 3.3 if no success.
JF
Yes, this is a wrapper. Actually, uclibc switched from wrappers to real toolchain at some point.Quote:
Originally Posted by Jean-Fabrice
P.S. uclibc 0.9.28 released a few days ago.
uclibc 0.9.28 crosstoolchain based on gcc 3.3.6 / binutils 2.16 builds without error using uclibc buildroot plus openwrt uclibc config file.
There's no challenge here :(
JF
My suggestion is to take one step at the time.
Upgrade just uClibc to 0.9.28 and keep broadcom 3.2.3 toolchain.
Here is my uClibc build script which proves this:
Attached Oleg config aligned for new uClibc, build script and tiny install tar conformance patch for Makefile.Code:#!/bin/sh
PATH="/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin:${PATH}"
export PATH
VERSION=0.9.28
UCLIBC=uClibc-${VERSION}
CONFIG=uClibc-${VERSION}.config
[ ! -f ${UCLIBC}.tar.bz2 ] && wget http://www.uclibc.org/downloads/${UCLIBC}.tar.bz2
rm -rf ${UCLIBC}
tar xjf ${UCLIBC}.tar.bz2
patch -d${UCLIBC} -p1 < Makefile.patch
make -C ${UCLIBC} clean
cat ${CONFIG} > ${UCLIBC}/.config
make -C ${UCLIBC} all install CROSS=mipsel-linux- TARGET_ARCH=mips
Of course, one should take a look for changes of patches from http://wl500g.dyndns.org/uClibc-0.9.19/ and possible reintroduction.
After many hours I have managed to port uClibc++ library to 3.2.3 toolchain used to build Oleg firmware. This port enabled many previously non working optware packages to start working! (eg. python, py-*, mysql, ctorrent, groff, man, mutt, nmap, nload, nagios-plugins & nrpe, appweb, cdargs, cogito, cherokee, ruby, ...) Visit http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/ for complete list of packages.
See Optware wl-500g Build FAQ page for details of this wl500g toolchain upgrade.
There are still many packages that we wish to be built but they are limited with current firmware uClibc library. The biggest limitation is lack of wchar support needed by many packages. There are also some issues with linking of shared libraries (resolved in uClibc 0.9.22). I hope that with all this advances Oleg will take an effort and resolve this issues with upgrade to latest uClibc in his upcoming firmware.
Here are some of my notes on still broken packages:
Quote:
WL500G_BROKEN_PACKAGES = \
asterisk = xscale dependent
atk = glib
bitlbee = glib iconv
bzflag = c++
cvs = wchar
dict = ?
elinks = xbel.c:15:19: expat.h: No such file or directory
erlang = Makefile Cross compile problem \
ficy = http.cc:20: `getline' not declared
freetds = ld: cannot find -lreadline
gawk = wchar
gettext = ?
giftcurs = glib
git-core = iconv
glib = iconv
gnupg = wchar
gtk = iconv
hnb = uClib stdio problem
ice = x11
iperf = missing thread
iptables = conntrack?
ivorbis-tools = ASM problem
jabber = modf undefined
jamvm = mipsel not supported
ldconfig = ?
libdvb = fpros
libftdi = linking PIC files with non-PIC files
libgc = esdep.h
libtorrent = ambiguous overload for `std::basic_istream
libvorbisidec = ASM problem
lsof = configure
mdadm = ftw.h
mod-fastcgi = ipkg problem
mod-python = configure
monotone = libboost_filesystem failure
mtr = resolver missing
nail = define problem
nfs-server = innetgr undefined
nfs-utils = download problem
nget = C++ map
ntp = tm_gmtoff
pango = iconv
py-mssql = -lreadline
py-sqlobject = svn download
unslung-devel \
qemu = unslung
qemu-libc-i386 = unslung
rtorrent = bencode c++
sdl = x11
ser = undefined reference to `__res_search'
sm = MB_CUR_MAX' undeclared
snownews = wctomb
sqsh = -lreadline
sudo = errx
tethereal = No iconv()
transcode = libiconv missing
unrar = unicode.cpp
vte = No iconv()
wget-ssl = clock_getres
x11 = stdc_wcstocts
xauth
xaw
xchat
xcursor
xdpyinfo
xext
xfixes
xft
xmu
xpdf
xpm
xrender
All wl500g packages on http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/
are gone. Does anybody have any idea what happened and when they will be back ;)?
The problem is with sourceforge which happend to change their repositories names. jp30 is responsible for update change. And maybe rwhitby will help with this. I suggest to wait a day or two for rebuild.
We have moved the Optware source code repository from sourceforge.net to our new svn.nslu2-linux.org site.
http://svn.nslu2-linux.org/svnroot/optware
You can also browse the source with the nice Trac interface at:
http://trac.nslu2-linux.org/optware
If you are an Optware developer, you need an NSLU2-Linux SSL client certficate to write to the new repository. All sourceforge.net write access has been disabled. Contact me if you need a certificate.
There is no change to the feed contents or location.
-- Rod
After many rip & build cycles, buildroot uClibc toolchain is finished and
ready for testing on mipsel arch.
It provides:
- uclibc-0.9.28 with wchar support target for base instalation into /opt/lib
- target toolchain 3.4.6 for packages cross compilation w/ ccache
- native toolchain for compilation on embeded system w/ ccache
- uClibc++ 0.2.0 for C++ packages
I have prepared uClibc buildroot toolchain to compile within optware. It
creates both host and target toolchain along with uClibc 0.9.28.
Target uClibc is installed into /opt/lib along with loader ld-uClibc.so
For testing purposes I've prebuild packages at http://www.wlan-sat.com/boleo/optware/oleg
Instalation scenario should be:
- Prepare /opt directory as usual
- ipkg.sh update
- ipkg install ipkg
- ipkg install uclibc
- edit /opt/etc/ipkf.conf to src unslung http://www.wlan-sat.com/boleo/optware/oleg
- ipkg update
- ipkg install foobar
For people wanting native compiling on router one should install buildroot package instead of uclibc package only. Please note that this should be clean install of /opt packages to prevent search path clashes.
I have tested many packages on stock WL500gx-1.9.2.7-7f-pre4.trx and
confirmed that they works as expected. Native compilation verified.
Many packages now works as intended. Most notable mysql, svn, enhanced-ctorrent, elinks, ...
Here is complete list of 400+ AVAILABLE packages for Oleg firmware for testing: http://www.wlan-sat.com/boleo/optware/oleg/Packages
I am talking to Rod Whitby to provide official support for package download from nslu2-linux.org for Oleg and DD-WRT firmware.
Today official support for Oleg firmwares got additional package feed which completely replaces buggy uClibc 0.9.19 provided in firmware.
The main feature of this packages is that it installs all required files under /opt with 400+ ported applications. With buildroot toolchain is added also system library indenpendence. This means that packages now depends od /opt/lib/uClibc.so and dynamic loader also in /opt/lib with separate /opt/etc/ld-opt.so.conf for custom .so cache. Applications are built with wchar and locale support which makes uClibc library somewhat greater than other uClibc packages, but still far smaller than glibc based aplications.
Buildroot toolchain features:
- GCC 3.4.6
- uClibc 0.9.28 with patches
- uClibc++ 0.2.1
- Native POSIX Threads Library (NPTL) Support for uClibc
Users using package feed should change /opt/etc/ipkg.conf to
And then run ipkg update.Code:src unslung http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable
dest root /
First we will install uClibc library which is required by all packages.
Alternatively if one wants to have C and C++ compiler to do native compiling on router, ipkg install buildroot can be issued instead. But this requires al least 100MB of free space for the whole toolchain.Code:~ # ipkg install uclibc
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc_0.9.28-1_mipsel.ipk ...
Connecting to ipkg.nslu2-linux.org[212.18.63.81]:80
uclibc_0.9.28-1_mips 100% |*************************************************************| 440 KB 00:00:00 ETA
Done.
Unpacking uclibc...Done.
Configuring uclibc...Updating /opt/etc/ld-opt.so.cache
Done.
Old application from http://ipkg.nslu2-linux.org/feeds/unslung/wl500g should be reinstalled withTho get a list of installed packages use:Code:ipkg install -force-reinstall package
Code:ipkg list_installed
Hi,
I am afraid that I don't have the skills to compile packages myself - anybody interested in having a go at sdparm and sg_start as described in http://www.wl500g.info/showthread.php?t=6197&page=2 ?
Thanks,
Jens
Oleo mentions above that he has succeeded in providing an updated uClibc package removing some of the issues with the current uClibc package - which is great news because I'm actually stuck on some of the current packages I want to get compiled because of uClibc issues.
However from the post I can't understand how I am supposed to be using this new package. I am currently compiling packages following the instructions at http://www.nslu2-linux.org/wiki/Unsl...ckageToUnslung, together WL500g recommendations at http://www.nslu2-linux.org/wiki/FAQ/OptwareWl500gBuild and I don't get how I should get the new uClibc from oleo installed (probably because I'm still not very clear on the whole toolchain story). So I'd like to have some concrete guidance on how to use this or if possible a complete step-by-step overview on how to cross-compile C/C++ programs for the WL-500g.
Any help on this would be very much appreciated!
Wrong pointer. Build is not wl500g but oleg. See http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild
Hi Oleo,
Thanks for the fast reply - indeed I was compiling with the wrong target (wl500g instead of oleg). So I will adjust my MakeFile to use the right target. But I will off course also need to get the correct toolchain (with uClibc 0.9.28) installed. I was using the one mentioned at the build page for WL500g (downloaded from http://www.wlan-sat.com/boleo/optwar...0.1.12.tar.bz2 which included uClibc 0.9.19. How can I now get/create a toolchain with uClibc 0.9.28?
And another question: in order to use these packages on my WL-500g I guess I will have to use the "oleg" feed (mentioned in your post), so this means I have to reinstall all packages I already had installed from the "wl500g" feed right?
Sorry for these probably basic questions but I'm still quite new to the whole cross-compiling topic...
Kind regards,
Peter.
Reinstall is necessary due to built in /opt//lib search path for shared libs in wl500g package feed.
Building toolchain is simple enough:
toolchain will reside in toolchain/mipsel-linux-uclibc. Add toolchain/mipsel-linux-uclibc/gcc-3.4.6-uclibc-0.9.28/bin to search path and use toolchain/mipsel-linux-uclibc/gcc-3.4.6-uclibc-0.9.28/lib and toolchain/mipsel-linux-uclibc/gcc-3.4.6-uclibc-0.9.28/includeCode:svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware
cd optware
export OPTWARE_TARGET=oleg
make directories
make toolchain
for building.
Although I recomend using Optware build facilities with
and edit make/mypackage.mkCode:make make/mypackage.mk
When finished, I can include this package in the Optware.
Hi Oleo,
Thanks for the info - I think I'm actually starting to understand the whole "chain". I'll give your suggestion a try later on when I get home (and can access my router), in the meantime I have tried to summarise all info about this updated uClibc topic on one single webpage (mainly to make sure I understand and remember myself, but also to share with others who may be in my position...)
I have put this online at http://www.freewebs.com/ptnemot/wl50...clibcsumm.html, feel free to have a look and give any comments you may have. If you think this is useful it can also be added to the Unslung Wiki.
Kind regards,
Peter.
Great introduction. Feel free to include this info on nslu2 wiki page.
Bear in mind that updated uClibc is also available for dd-wrt firmware. See http://www.dd-wrt.com/wiki/index.php/Optware and maybe the same introduction is missing there.
My wonder firmware would be dd-wrt GUI, QOS, with NFS, ext3 and other server functionality from Oleg firmware. But until then Oleg is a choice no.1.
I'll update the page with some DD-WRT info (won't be a lot as I actually only have experience with Oleg - I'm more looking for file/ftp/news servers/clients on my router than the actual WLAN tuning which as I understand is the DD-WRT strength?) and see if I can get it into the Wiki.
Now I have installed your updated uClibc library on my router and reinstalled all packages from the oleg feed. Most things seem to be working (including unrar - one of my main missing items) however python now gives an error message. Whenever I start it up it says "python: can't load library 'libstdc++.so.6'". I'll try compiling it myself (my buildroot is still compiling at this moment so I'll need to be patient) but do you have already any idea what could be the problem here?
Kind regards,
Peter.
There are two versions of python 2.4 and 2.5 separated. 2.4 worked with much troubles on 0.9.19. When I moved to 0.9.28 I did not check python. libstdc++ is wrong link as it should be linked with libuclibc++.
It seems that python25 is indeed better - I tried it and it actually works (at least it starts to run my program). However the program I am needing it for also depends on some other python packages (py-cherrypy, py-cheetah and py-elementtree) so I don't get very far. All of these packages are also available from the feed but they all are assuming a Python24 installation, they don't work with Python25. I'm trying to get them working also on Python25, let's hope this works...
Once that is working the final missing piece I need to get me setup working is par2cmdline. As this one is not available from the feeds I tried compiling it myself. It worked but once loaded on my router I got the "cannot find libstdc++" message again. I created a patch for the Makefile.am file not to add this library anymore, however when compiling I noticed that it still showed up. After some googling it appears that actually the g++ compiler is adding the "-lstdc++" itself automatically! There are some workarounds I have been thinking about (e.g. using the "-nodefaultlibs" option in g++) but as this must be a common problem for everyone using the build environment do you have any idea on the best/standard way to solve this?
I have changed shared library linking option in python24_2.4.4-2_mipsel.ipk and now python works. Run regression tests with
Code:cd /opt/lib/python2.4/test
for f in test_[a-z]*.py; do python $f 2>/dev/null>/dev/null || echo "$f failed with error #$?" ; done > /tmp/harddisk/tmp/python-regression-test.txt
Hi oleo,
buildroot_3.4.6-8_mipsel.ipk (or maybe uclibc-opt_0.9.28-8_mipsel.ipk) package seems to be broken (lies in http://ipkg.nslu2-linux.org/feeds/op...g/cross/stable feed):
1. it misses /opt/sbin/ldconfig
2. even after I properly updated library cache every program in /opt doesn't work (as if libraries are missed or broken).
I reverted package to the version I had before upgrade (3.4.6-5 in particular) and everything works fine now.
Please, take a look. Merry Christmas! :)