PDA

Bekijk de volledige versie : Problems compiling custom based firmware (using Kfurge howto)



Hytekk
09-09-2007, 12:06
Hi,

I am trying to compile a custom firmware using Kfurge's howto (http://home.comcast.net/~kfurge/wl700ge.html) and DaNawq's howto (http://www.wl500g.info/showthread.php?t=6559).

I have downloaded the monster sourcefile from ASUS (1.0.4.6) as well as the toolchain.

I have followed DaNawq's howto as to setup the environment on my freshsly installed Ubuntu.

Trying to run 'make rebuild' gives me this error (I have copied from the first line where I believe it goes wrong):

make[3]: Leaving directory `/opt/WL700g/nasoc/src/linux/linux/arch/mips/lib'
make[2]: Leaving directory `/opt/WL700g/nasoc/src/linux/linux'
make[1]: Leaving directory `/opt/WL700g/nasoc/src/linux/linux'
make all
/bin/sh: line 0: cd: /opt/brcm//../mipsel-linux: No such file or directory
make[1]: Entering directory `/opt/WL700g/nasoc/src/apps'
[ ! -f libcrypto/Makefile ] || make -C libcrypto
[ ! -f nvram/Makefile ] || make -C nvram
make[2]: Entering directory `/opt/WL700g/nasoc/src/apps/nvram'
mipsel-linux-gcc -I. -I/opt/WL700g/nasoc/src/include -Wall -s -O2 -c -o nvram_linux.o nvram_linux.c
nvram_linux.c: In function `nvram_xfr':
nvram_linux.c:262: warning: cast to pointer from integer of different size
nvram_linux.c:262: warning: cast to pointer from integer of different size
nvram_linux.c: In function `nvram_ascii_ucs4':
nvram_linux.c:301: warning: suggest parentheses around assignment used as truth value
mipsel-linux-ld -shared -o libnvram.so nvram_linux.o
mipsel-linux-gcc -I. -I/opt/WL700g/nasoc/src/include -Wall -s -O2 -c -o main.o main.c
main.c: In function `main':
main.c:187: warning: implicit declaration of function `nvram_xfr'
main.c:187: warning: assignment makes pointer from integer without a cast
/opt/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux/sys-include/bits/string2.h: At top level:
main.c:34: warning: `NLS_NVRAM_U2C' defined but not used
main.c:35: warning: `NLS_NVRAM_C2U' defined but not used
mipsel-linux-gcc -I. -I/opt/WL700g/nasoc/src/include -Wall -s -O2 -o nvram main.o -L. -lnvram
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
make[2]: *** [nvram] Error 1
make[2]: Leaving directory `/opt/WL700g/nasoc/src/apps/nvram'
make[1]: *** [nvram] Error 2
make[1]: Leaving directory `/opt/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2


As just to test if there are some more errors relateted to ld (binutils / bin86 ?) i moved nvram to nvram_, and run the 'make rebuild'-command again. This time I ended up with a similar error:

make all
/bin/sh: line 0: cd: /opt/brcm//../mipsel-linux: No such file or directory
make[1]: Entering directory `/opt/WL700g/nasoc/src/apps'
[ ! -f libcrypto/Makefile ] || make -C libcrypto
[ ! -f nvram/Makefile ] || make -C nvram
[ ! -f translation/Makefile ] || make -C translation
[ ! -f netvarplugin/Makefile ] || make -C netvarplugin
[ ! -f shared/Makefile ] || make -C shared
[ ! -f webhooks/Makefile ] || make -C webhooks
[ ! -f httpd/Makefile ] || make -C httpd
[ ! -f samplenetregistration/Makefile ] || make -C samplenetregistration
make[2]: Entering directory `/opt/WL700g/nasoc/src/apps/samplenetregistration'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/WL700g/nasoc/src/apps/samplenetregistration'
make -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=/opt/WL700g/nasoc/src/linux/linux
make[2]: Entering directory `/opt/WL700g/nasoc/src/apps/iptables'
Making dependencies: please wait...
make[2]: Leaving directory `/opt/WL700g/nasoc/src/apps/iptables'
........
mipsel-linux-gcc -O2 -Wall -Wunused -I/opt/WL700g/nasoc/src/linux/linux/include -Iinclude/ -DIPTABLES_VERSION=\"1.2.7a\" -DIPT_LIB_DIR=\"/usr/lib/iptables\" -rdynamic -o iptables iptables-standalone.c iptables.o libiptc/libiptc.a -ldl
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
make[2]: *** [iptables] Error 1
rm libiptc/libip4tc.o
make[2]: Leaving directory `/opt/WL700g/nasoc/src/apps/iptables'
make[1]: *** [iptables] Error 2
make[1]: Leaving directory `/opt/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2

As far as I can see this line is the problem:
'/bin/sh: line 0: cd: /opt/brcm//../mipsel-linux: No such file or directory'

Could anyone help me out here ?
What am I doing wrong here?
If someone needs more information please dont hesitate to contact me :)

Is there perhaps anyone who could upload their vmware-installed image or perhaps working files and "settings" to my ftp, then please contact me.

Thanks in advance,
HyTeKk

Hytekk
09-09-2007, 21:22
Now I have edited the Makefile in /opt/WL700g/nasoc/src/apps

and changed the following as to set the correct path to mipsel-linux

ifeq ($(PLATFORM),mipsel)
export CROSS_COMPILE := mipsel-linux-
export CONFIGURE := ./configure mipsel-linux --build=$(BUILD)
#export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))hndtools-mipsel-linux-3.2.3/mipsel-linux && pwd -P)
export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/opt/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux && pwd -P)
endif

by doing this I dont seem to have any more errors concerning this:
"make all
/bin/sh: line 0: cd: /opt/brcm//../mipsel-linux: No such file or directory"

or

"collect2: ld terminated with signal 11 [Segmentation fault], core dumped
make[2]: *** [nvram] Error 1
make[2]: Leaving directory `/opt/WL700g/nasoc/src/apps/nvram'
make[1]: *** [nvram] Error 2
make[1]: Leaving directory `/opt/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2"

But now I rather end up with this error:
make[3]: Leaving directory `/opt/WL700g/nasoc/src/linux/linux/arch/mips/lib'
make[2]: Leaving directory `/opt/WL700g/nasoc/src/linux/linux'
make[1]: Leaving directory `/opt/WL700g/nasoc/src/linux/linux'
make all
make[1]: Entering directory `/opt/WL700g/nasoc/src/apps'
[ ! -f libcrypto/Makefile ] || make -C libcrypto
[ ! -f nvram/Makefile ] || make -C nvram
make[2]: Entering directory `/opt/WL700g/nasoc/src/apps/nvram'
mipsel-linux-gcc -I. -I/opt/WL700g/nasoc/src/include -Wall -s -O2 -c -o nvram_linux.o nvram_linux.c
make[2]: mipsel-linux-gcc: Command not found
make[2]: *** [nvram_linux.o] Error 127
make[2]: Leaving directory `/opt/WL700g/nasoc/src/apps/nvram'
make[1]: *** [nvram] Error 2
make[1]: Leaving directory `/opt/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2

Anyone ?

kfurge
11-09-2007, 02:26
You shouldn't have to make any changes to the makefile in order to get the basic tools to work. What is /bin/sh? It should be bash. Also, some of your final attempts seem to have a bad path, i.e. make can't find the mipsel cross compiler.

- K.C.

Hytekk
11-09-2007, 22:54
/bin/sh points to /bin/bash so it can't be any problem their.

what paths should i export if i have setup everything in /opt ( /opt/WL700g and /opt/brcm) ?

Currently I have setup things as this:
export CROSS_COMPILE=mipsel-linux-
export CC=mipsel-linux-gcc
export CC_FOR_BUILD=mipsel-linux-gcc
export ARCH=mipsel

export PATH=/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin:$PATH


Could there be some problems right here?

As I presume you have a working configuration ?! :)
As I understood, you are running your environment in a vmware - would it be possible for you to upload that image to my ftp?

Whatelse could I have made wrong - I am totally stuck at the moment.....

- Hytekk

kfurge
12-09-2007, 03:35
You should only have to export the path pointing to the tool-chain. I'd recommend removing all other exports. They're probably confusing the makefile since it builds both native and cross-compiled binaries during the build process.

I'll post my environment once I get my vmware "machine" loaded onto my new Linux laptop.

- K.C.

Hytekk
12-09-2007, 07:00
Alright, I tried to set only the path to the toolchain but got the same error.

I am really looking forward to get my hands on/viewing your environment :)

In the meantime I'll try and reset everything in my own environment, so if I have made some error when I did setup everything this would be corrected.....

When could I expect you to post your environment?

Thanks in advance :)

- Hytekk

kfurge
13-09-2007, 04:18
In a couple of days. If you don't see any activity, please ping this thread again.

- K.C.

Hytekk
17-09-2007, 01:27
While I am waiting for Kfurge to install his new laptop and setting up everything, I am making some progress.

Last night I installed Fedora on my laptop and then did setup everything for compiling the kernel and firmware.

I am not being able to run make rebuild as a normal user as it stops with errors complaining about permission denies:

#cd app-packages && ./rebuild
make apps-install
make[1]: Entering directory `/opt/WL700g/nasoc/src/apps'
rm -rf /opt/WL700g/nasoc/src/apps/mipsel/extarget
install -d /opt/WL700g/nasoc/src/apps/mipsel/extarget
#make busybox.ex-install
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/bin . -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/lib . -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/www . -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/web . -rf
cp: cannot stat `../exinstall/web/Layout_Taiwan/picts/CVS/Root': Permission denied
cp: cannot stat `../exinstall/web/Layout_Taiwan/picts/CVS/Repository': Permission denied
cp: cannot stat `../exinstall/web/Layout_Taiwan/picts/CVS/Entries': Permission denied
..............
cp: cannot stat `../exinstall/web/Layout_English/img/CVS/Repository': Permission denied
cp: cannot stat `../exinstall/web/Layout_English/img/CVS/Entries': Permission denied
make[1]: *** [apps-install] Error 1
make[1]: Leaving directory `/opt/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2



Here comes the last lines in make rebuild when I am running it as root instead of a normal user. The errors seem to be connected to /sbin/ldconfig - strange that I get this kind of error running it as root.

-----------

make -C apps do-packaging
make[3]: Entering directory `/opt/WL700g/nasoc/src/apps'
# added by Chen-I to link additional file
cd /opt/WL700g/nasoc/src/apps/mipsel/target/lib && rm -rf libwwwapps.so && ln -s /apps/www/libwwwapps.so libwwwapps.so
#cd /opt/WL700g/nasoc/src/apps/mipsel/target/lib && rm -rf libwwwapps.so && ln -s /shares/MYVOLUME1/MYSHARE1/wwwapps/libwwwapps.so libwwwapps.so
cd /opt/WL700g/nasoc/src/apps/mipsel/target && rm -rf `find | grep CVS`
cd /opt/WL700g/nasoc/src/apps/mipsel/target && /opt/WL700g/nasoc/src/apps/misc/rootprep.sh
/sbin/ldconfig: Can't open configuration file /etc/ld.so.conf: Permission denied
/sbin/ldconfig: Input file /lib/libpthread.so.0 not found.

/sbin/ldconfig: Input file /lib/libattr.so.1.1.0 not found.

/sbin/ldconfig: Input file /lib/libresolv.so.2 not found.

/sbin/ldconfig: Input file /lib/libacl.so.1.1.0 not found.

/sbin/ldconfig: Input file /lib/libgcc_s.so.0 not found.

/sbin/ldconfig: Input file /lib/libc.so.6 not found.

/sbin/ldconfig: Input file /lib/libnsl.so.1 not found.

/sbin/ldconfig: Input file /lib/libbigballofmud.so not found.

/sbin/ldconfig: Input file /lib/libcrypt.so.1 not found.

/sbin/ldconfig: Input file /lib/libdl.so.2 not found.

/sbin/ldconfig: Input file /lib/libnss_files.so.2 not found.

/sbin/ldconfig: Input file /lib/libnss_dns.so.2 not found.

/sbin/ldconfig: Input file /usr/lib/libnvram.so not found.

/sbin/ldconfig: Input file /usr/lib/libgmp.so not found.

/sbin/ldconfig: Input file /usr/lib/libwebhooks.so not found.

/sbin/ldconfig: Input file /usr/lib/libshared.so not found.

/sbin/ldconfig: Input file /usr/lib/libnetconf.so not found.

/sbin/ldconfig: Input file /usr/lib/libiconv_e.so not found.

/sbin/ldconfig: Input file /usr/lib/libwinnet.so not found.

/sbin/ldconfig: Input file /usr/lib/libsamplenetregistration.so not found.

/sbin/ldconfig: Input file /usr/lib/libcrypto.so not found.

/sbin/ldconfig: Input file /usr/lib/libtranslation_database.so not found.

/sbin/ldconfig: Input file /usr/lib/libprintwebhooks.so not found.

/sbin/ldconfig: Input file /usr/lib/libnetvarplugin.so not found.

/sbin/ldconfig: Input file /usr/lib/libmiscio.so not found.

/sbin/ldconfig: Input file /usr/lib/libsamplehooks.so not found.

/sbin/ldconfig: Input file /usr/lib/libnetregistration.so not found.

/sbin/ldconfig: Input file /usr/lib/libiconv.so not found.

/sbin/ldconfig: Input file /usr/lib/libnetwebhooks.so not found.

/sbin/ldconfig: Input file /usr/lib/libcorewebhooks.so not found.

/sbin/ldconfig: Input file /usr/lib/libtranslation.so not found.

/sbin/ldconfig: Input file /usr/lib/libdiskwebhooks.so not found.

/sbin/ldconfig: Input file /usr/lib/libubsec.so not found.

/sbin/ldconfig: Input file /usr/lib/libbcm.so not found.

/sbin/ldconfig: Input file /usr/lib/libcharset.so not found.

/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
#cd /opt/WL700g/nasoc/src/apps/mipsel/target && /opt/WL700g/nasoc/src/apps/misc/rootprep.sh && rm -rf www/English/wwwapps && ln -sf /shares/MYVOLUME1/MYSHARE1/wwwapps www/English/wwwapps && rm -rf www/Taiwan/wwwapps && ln -s /shares/MYVOLUME1/MYSHARE1/wwwapps www/Taiwan/wwwapps
#cd /opt/WL700g/nasoc/src/apps/mipsel/target && /opt/WL700g/nasoc/src/apps/misc/rootprep.sh && rm -rf www/English && ln -sf /shares/MYVOLUME1/MYSHARE1/broadcom.English www/English && rm -rf www/Taiwan && ln -s /shares/MYVOLUME1/MYSHARE1/broadcom.Taiwan www/Taiwan
#cd /opt/WL700g/nasoc/src/apps/mipsel/target/usr/lib && rm -rf libsamplehooks.so && ln -sf /shares/MYVOLUME1/MYSHARE1/libsamplehooks.so libsamplehooks.so
cd /opt/WL700g/nasoc/src/apps/mipsel/target && echo "#!/bin/sh" > ./bin/rcsysver && echo "nvram set firmver="1.0"."4.6"" >> ./bin/rcsysver && echo "nvram set productid="WL700gE"" >> ./bin/rcsysver && chmod +x ./bin/rcsysver
make apps-install
make[4]: Entering directory `/opt/WL700g/nasoc/src/apps'
rm -rf /opt/WL700g/nasoc/src/apps/mipsel/extarget - tagit bort denna rad självmant...
install -d /opt/WL700g/nasoc/src/apps/mipsel/extarget
#make busybox.ex-install
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/bin . -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/lib . -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/www . -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/web . -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/usr . -rf
#cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && cp ../exinstall/Utility . -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && rm -rf `find | grep CVS`
cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && echo "#!/bin/sh" > ./bin/rcver && echo "nvram set apps_ver="1.02"" >> ./bin/rcver && echo "nvram commit" >> ./bin/rcver && chmod +x ./bin/rcver
#cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && tar cvf apps.tar usr bin lib www web
#cd /opt/WL700g/nasoc/src/apps/mipsel/extarget && compress apps.tar && mv apps.tar.Z ../apps_"1.02".zip -f && rm -f apps.tar
make[4]: Leaving directory `/opt/WL700g/nasoc/src/apps'
cd /opt/WL700g/nasoc/src/apps/mipsel/target && rm -rf apps && cp ../extarget apps -rf
#cd /opt/WL700g/nasoc/src/apps/mipsel/target && rm -rf apps && rm -rf usr/sbin/iptables && rm -rf bin/setf* #&& cp ../extarget apps -rf
cd /opt/WL700g/nasoc/src/apps/mipsel/target && mkcramfs . /opt/WL700g/nasoc/src/apps/mipsel/target.cramfs
warning: gids truncated to 8 bits. (This may be a security concern.)
cp /opt/WL700g/nasoc/src/linux/linux/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz /opt/WL700g/nasoc/src/apps/mipsel/
/opt/WL700g/nasoc/tools/addver /opt/WL700g/nasoc/src/apps/mipsel/target.cramfs "1.0" "4.6" WL700g "0.02" "2.99" "" "" "" "" "" "" /opt/WL700g/nasoc/src/apps/mipsel/vmlinuz
Append Version Information to file ...
Kernel Version : 1.0
File system Version : 4.6
Product ID : WL700g �
Hardware compatible list:
1: 0.2
2: 2.99
3: 0.0
4: 0.0
5: 0.0
6: 0.0
7: 0.0
8: 0.0
K: 1182411
Kernel size : /opt/WL700g/nasoc/src/apps/mipsel/vmlinuz 120ae8
File Length: 16384000
/opt/WL700g/nasoc/tools/trx -o /opt/WL700g/nasoc/src/apps/mipsel/"WL700gE"_"1.0"."4.6".trx /opt/WL700g/nasoc/src/apps/mipsel/vmlinuz /opt/WL700g/nasoc/src/apps/mipsel/target.cramfs
warning: increasing offset 1182439 to 1182440
cp /opt/WL700g/nasoc/src/apps/mipsel/"WL700gE"_"1.0"."4.6".trx /opt/WL700g/nasoc/src/apps/mipsel/broadnas.trx
/opt/WL700g/nasoc/tools/trx -o /opt/WL700g/nasoc/src/apps/mipsel/root.trx /opt/WL700g/nasoc/src/apps/mipsel/target.cramfs
make[3]: Leaving directory `/opt/WL700g/nasoc/src/apps'
if test -f apps/mipsel/broadnas.trx; then cp apps/mipsel/broadnas.trx /opt/WL700g/nasoc/image/broadnas.trx; fi;
if test -f apps/mipsel-uclibc/broadnas.trx; then cp apps/mipsel-uclibc/broadnas.trx /opt/WL700g/nasoc/image/broadnas-uclibc.trx; fi;
/opt/WL700g/nasoc/tools/naspack --output=/opt/WL700g/nasoc/image/broadnas.nas --tag=apps/mipsel/target/etc/buildinfo.txt --flash=/opt/WL700g/nasoc/image/broadnas.trx
/opt/WL700g/nasoc/tools/naspack --output=/opt/WL700g/nasoc/image/broadnas_split.nas --tag=apps/mipsel/target/etc/buildinfo.txt --flash=apps/pivot_root/mipsel/pivot_root.trx --disk=apps/mipsel/root.trx
/opt/WL700g/nasoc/tools/naspack --output=/opt/WL700g/nasoc/image/broadnas_disk.nas --tag=apps/mipsel/target/etc/buildinfo.txt --disk=apps/mipsel/broadnas.trx
make[2]: Leaving directory `/opt/WL700g/nasoc/src'
cp -f ../../image/broadnas_split.nas /opt/WL700g/nasoc/src/apps/mipsel/WL700gE_"1.0"."4.6".nas
make[1]: Leaving directory `/opt/WL700g/nasoc/src/apps'

As far as I can understand this firmware should be working but.....

...booting using this firmware I get another error about some shared library during the boot-process (kernel-panic if I remember correctly)

Any ideas?

- Hytekk

kfurge
19-09-2007, 03:19
OK... The new laptop is setup. All I had to do was add the following to my path and install the appropriate missing packages:

PATH=/opt/brcm/hndtools-mipsel-linux/bin

I'm a little confused with how you're kicking off the rebuild. You should be in the ./nasorc/src/apps directory and simply 'make clean' then 'make rebuild'.

- K.C.

Hytekk
19-09-2007, 20:29
Hi again Kfurge,

and thanks for getting back!

I am as confused as you are.....
I'm running 'make clean' and 'make rebuild' in /opt/WL700g/nasoc/src/apps so I dont see any problems there, I also have set the same path as you have.

what have you installed - ubuntu in a vmware or something else?
As I can see it, I have done a new install trying both ubuntu (7.04) and Fedora 7 and it seem to be less errors when I am using Fedora 7.

Could I perhaps get a copy of your environment or is that asking to much ? :)
If that is possible you could mess me and I will setup an ftp-account so that you can dump it in their :)

- Hytekk

kfurge
20-09-2007, 02:29
I originally started on another laptop running windoze. It was not practical to install linux natively on that machine, so the path of least resistance was a vmware-server install running ubuntu linux. That worked OK, but was quite slow. So I experimented with coLinux on that same laptop with one of the off-the-shelf starter images to make the builds faster. That worked too.

Since then, I now have another laptop running the latest version of ubuntu linux. The build works OK here also.

So..., I don't think your problem is related to a particular distribution.

I don't know how to continue besides you allowing me to poke around your box or having you start over from a fresh install and methodically building the system up step by step, over the course of a couple of days, until it works.

- K.C.

Hytekk
20-09-2007, 06:25
Ok, lets say I install a freshly new ubuntu on my laptop today. And after that I should install any possible updates.

*Second, I should install ash as well as symlink '/bin/sh' -> '/bin/bash', right?
*untar the toolchain (tools.3.0 ?) as well as GPL-file. Both the files should be untared in /opt.
* symlink mkcramfs
* export PATH=/opt/brcm/hndtools-mipsel-linux/bin
* make clean && make rebuild in /opt/WL700g/nasoc/src/apps

and should be it ?

Damn it, I must have done this a thousand times, what am I missing or doing wrong....

Do you have skype or msn - it's easier to stay in contact and also for me to receive help. I believe you can find info about me in forum (at least I did edit it last night).

- Hytekk

kfurge
21-09-2007, 03:37
Relative to a fresh ubuntu install, I had to install the gcc toolchain, kernel sources, make, rcs, binutils and a few others.

What's your /opt/brcm directory look like? Should be:

kfurge@kfurge-laptop:/opt/brcm$ ls -l
total 16
lrwxrwxrwx 1 kfurge kfurge 25 2007-09-12 21:11 hndtools-mipsel-linux -> hndtools-mipsel-linux-3.0
drwxr-xr-x 9 kfurge kfurge 4096 2007-09-12 21:11 hndtools-mipsel-linux-3.0
drwxr-xr-x 9 kfurge kfurge 4096 2005-10-25 00:52 hndtools-mipsel-linux-3.2.3
lrwxrwxrwx 1 kfurge kfurge 29 2007-09-12 21:11 hndtools-mipsel-uclibc -> hndtools-mipsel-uclibc-0.9.19
drwxr-xr-x 6 kfurge kfurge 4096 2007-09-12 21:11 hndtools-mipsel-uclibc-0.9.19

The GPL source file can be put anywhere. I put mine in my user account in /home/kfurge.

I do this when bringing up a new system:

1) Untar tools into /opt and make sure symlinks are as above
2) apt-get make and dash
3) symlink /bin/ash to /bin/dash
4) Untar source into my user directory under my username
5) cd into ~/WL700g_*/nasoc/src/apps
6) do a "make rebuild"
7) Wait for it to barf, and install missing pieces
8) Repeat step 7 until it builds

Please post the output from step 7.

- K.C.

Hytekk
21-09-2007, 23:58
I get this error......

#cd app-packages && ./rebuild
make apps-install
make[1]: Entering directory `/opt/WL700g/nasoc/src/apps'
rm -rf /opt/WL700g/nasoc/src/apps/mipsel/extarget
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_Japan/img' to `CVS': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_Japan/picts' to `PersonalData': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_Japan/picts' to `basic': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_Japan/picts' to `CVS': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_Taiwan/img' to `CVS': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_Taiwan/picts' to `PersonalData': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_Taiwan/picts' to `basic': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_Taiwan/picts' to `CVS': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_English/img' to `CVS': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_English/picts' to `PersonalData': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_English/picts' to `basic': Permission denied
rm: cannot chdir from `/opt/WL700g/nasoc/src/apps/mipsel/extarget/web/Layout_English/picts' to `CVS': Permission denied
make[1]: *** [apps-install] Error 1
make[1]: Leaving directory `/opt/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2

If I do list any of these directories it looks like this:
total 0
?--------- ? ? ? ? ? mipsel/extarget/web/Layout_English/picts/CVS/.
?--------- ? ? ? ? ? mipsel/extarget/web/Layout_English/picts/CVS/

Any ideas?

- Hytekk

Hytekk
22-09-2007, 10:42
Hi again,

all the time I have run 'make rebuild' as a normal user, but this time I tried it out as root - and what do you know, it works !!! :D

Strange how it is I'm quite happy - could perhaps anyone explain why it is working as root and not as a normal user? The way I see it's about these damn directories in '.../apps/mipsel/extarget/web/' that a normal user can't seem to access....

Isn't there anyone who have experienced the same problem as I have ??

Anyway, Im moving along as root, following Kfurge's "Step #2, Adding support for executing a custom startup script (rc.local)"

- Hytekk

Hytekk
23-09-2007, 03:07
Hmm, I seem to have some issues concerning the adduser-package.

Trying to download for an example, util-linux gives me this:
'Installing util-linux (2.12r-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/util-linux_2.12r-2_mipsel.ipk
Configuring adduser
syntax error
postinst script returned status 255
ERROR: adduser.postinst returned 255
Configuring util-linux
Successfully terminated.'

and if I try reinstalling adduser I end up with this:

'ipkg install adduser
Package adduser (1.5.1-1) installed in root is up to date.
Configuring adduser
syntax error
postinst script returned status 255
ERROR: adduser.postinst returned 255
Nothing to be done
Successfully terminated.'

Is this normal ? I also seem to be "missing" passwd - so that I can change a users password (not smbpasswd, this I have and seem to work ok - at least as far as I can see at the moment!)

/ Hytekk

tiwag
23-09-2007, 11:26
Hmm, I seem to have some issues concerning the adduser-package.

Trying to download for an example, util-linux gives me this:
'Installing util-linux (2.12r-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/util-linux_2.12r-2_mipsel.ipk
Configuring adduser
syntax error
postinst script returned status 255
ERROR: adduser.postinst returned 255
Configuring util-linux
Successfully terminated.'

and if I try reinstalling adduser I end up with this:

'ipkg install adduser
Package adduser (1.5.1-1) installed in root is up to date.
Configuring adduser
syntax error
postinst script returned status 255
ERROR: adduser.postinst returned 255
Nothing to be done
Successfully terminated.'

Is this normal ? I also seem to be "missing" passwd - so that I can change a users password (not smbpasswd, this I have and seem to work ok - at least as far as I can see at the moment!)

/ Hytekk


there are a few packages which don't install clean with using ipkg
e.g. fail2ban, syslog-ng and adduser (as far as i've tried till now)

the adduser tool basically works but i had to comment out the commands in
/opt/lib/ipkg/info/adduser.postinst and adduser.prerm in order to get rid of the error message.

brgds

kfurge
24-09-2007, 03:38
Hi again,

all the time I have run 'make rebuild' as a normal user, but this time I tried it out as root - and what do you know, it works !!! :D



Weird, but easy enough to fix. Just "chmod -R" the directory until it stops complaining and build as a normal user.

- K.C.