NFS, Optware, etc...

26 views
Skip to first unread message

Tim

unread,
Apr 3, 2007, 4:45:17 PM4/3/07
to neptune354-dev
Hi guys,

This isn't specifically to do with neptune354 but I figured you guys
would be the best people to ask this question! I have been playing
with (mostly breaking) your sources, trying to get NFS filesystems
supported, using the documentation here: http://www.nslu2-linux.org/wiki/HowTo/UseOptwareOnWAG354G

However, I can't get your fw to compile after making the changes on
that page (some are already made, I know). This is probably due to
some stupid mistake of my own, but I thought I'd just ask if what I
intend to do is actually possible, before I waste any more time trying
to get it to build!

My final goal is to have gnokii (the mobile phone tool) running on my
router. For this to happen, I figured I would need the extra space
provided by an nfs-mounted directory. If/when this is done, I was
wondering about how usefull ipkg/optware might be...

So... can one install packages meant for OpenWRT (or WL500G) on this
firmware, using ipkg? - or is this just silly talk? :-)

(I'm pretty new to all this...!)

Cheers

Tim

cyberstorm

unread,
Apr 4, 2007, 6:19:10 PM4/4/07
to neptune354-dev

On 3 Apr, 22:45, "Tim" <t...@timmyclub.net> wrote:

>
> My final goal is to have gnokii (the mobile phone tool) running on my
> router. For this to happen, I figured I would need the extra space
> provided by an nfs-mounted directory. If/when this is done, I was
> wondering about how usefull ipkg/optware might be...
>
> So... can one install packages meant for OpenWRT (or WL500G) on this
> firmware, using ipkg? - or is this just silly talk? :-)

In past I've tried to build uclibc libs with fp support, but they
never worked. I think because the FP support is not enabled in the
kernel, and there is no "easy" way to enable it using make menuconfig.
Anyway, support for nfs mount is not really useful for our router: to
use nfs, you have to keep one machine up with nfs server. If so, you
can use that machine to run all the software you need.
On the other side, ipkg needs a location to write the new software,
and you cannot install new software directly in flash, because the
filesystem squashfs is read-only.
So as you can see, there is no easy way to use ipkg with this
firmware.
You can use openwrt, with that ipkg is full working, but you will not
have wireless and other things you have with the official firmware.

what would you use gnooki for on an adsl router?

cheers

Tim

unread,
Apr 4, 2007, 9:35:18 PM4/4/07
to neptune354-dev
Hi Marco,

Thanks for your reply.

To answer a few of your questions.. I have one of these devices,
which runs NFS. It's silent, which is why I prefer it to running a
proper machine:
http://www.raidsonic.de/en/pages/products/external_cases.php?we_objectID=4531&PHPSESSID=3a519e3ea45c2e18da8f35126e74bba3

I want to use gnokii with an adsl router because it can be a silent,
low-power-consumption device. I have previously used a proper
computer, but it is noisy and takes a lot of power. This project
inspired me: http://www.pegasushabproject.org.uk/pegasus4.html - He
adds a phone to a router, running OpenWRT...

Do you think my idea is remotely possible?

Thanks again,

Tim

Marco Vedovati

unread,
Apr 5, 2007, 5:20:47 AM4/5/07
to neptune...@googlegroups.com

Il giorno 05/apr/07, alle ore 03:35, Tim ha scritto:

>
> I want to use gnokii with an adsl router because it can be a silent,
> low-power-consumption device. I have previously used a proper
> computer, but it is noisy and takes a lot of power. This project
> inspired me: http://www.pegasushabproject.org.uk/pegasus4.html - He
> adds a phone to a router, running OpenWRT...
>
> Do you think my idea is remotely possible?
>
> Thanks again,

Woah...

Well, you can use 2 approaches here, that (probably) let u use gnokii:

1) Using neptune354 firmware, you can create a custom image removing
not necessary sw. Probably you dont use ripd, zebra, so you can
delete this and instead add gnokii.
You also have to compile gnokii, or to find it compiled and running
with our firmware.

2) Install openwrt. At this point, as I have written you will lose
wireless functionality, but probably it will be easier to set up gnokii.


If you need help with serial port, tell me. The firmware tells that
there are 2 available ports:

admin@neptune:~# cat /proc/tty/driver/serial
serinfo:1.0 driver:5.05c revision:2001-07-08
0: uart:16550A port:A8610E00 irq:15 baud:2258 tx:331397 rx:55 RTS|DTR
1: uart:16550A port:A8610F00 irq:16 tx:0 rx:0 RTS|DTR

but at now I have connected only one of them, tha is already used by
the system for debugging purpose, and I dont know if you can use it
for a phone.

Also, if you are pratical of hardware/electronic, maybe you could
help us adding a SD card to the router. I already have drivers for
AR7, we just need to find the necessary gpio pins...


good luck with your project.

marco

Tim

unread,
Apr 6, 2007, 6:58:06 AM4/6/07
to neptune354-dev
Thanks again, Marco..

I think I will try and remove some things from your fw and see if I
can add gnokii. Shame about the NFS support, but that's life eh.. :-)

I'm certainly no hardware expert, but hoping to learn as I go! I will
let you know anything I learn on my way... Adding an SD card would
be a great idea.

I don't have time to try at the minute, but I will probably be back
asking for your help when I can't compile the sources.. !

Great job you've done with the fw already, by the way. :-)

Cheers,

Tim

Tim

unread,
Apr 9, 2007, 6:00:39 PM4/9/07
to neptune354-dev
> 1) Using neptune354 firmware, you can create a custom image removing
> not necessary sw. Probably you dont use ripd, zebra, so you can
> delete this and instead add gnokii.
> You also have to compile gnokii, or to find it compiled and running
> with our firmware.
>

So I've checked out the latest sources and they compile and work
great. Nice to be finally able to ssh to my home network without
having to leave a computer on. Nice work guys...!

Now I start my task of removing some of your chosen software and
adding gnokii...

Should this be as simple as removing the router/zebra directory and
then removing/commenting any lines relating to zebra in router/
Makefile? - Then make a gnokii directory and add some lines to the
Makefile to get gnokii to compile...?

Also, is there anything else that would be good for me to remove if I
need more space? I'm keen to keep dropbear in there, but nothing else
is essential really.. - so long as it works!

Thanks

Tim

Marco Vedovati

unread,
Apr 10, 2007, 4:04:53 AM4/10/07
to neptune...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Il giorno 10/apr/07, alle ore 00:00, Tim ha scritto:

>
> Now I start my task of removing some of your chosen software and
> adding gnokii...
>
> Should this be as simple as removing the router/zebra directory and
> then removing/commenting any lines relating to zebra in router/
> Makefile? - Then make a gnokii directory and add some lines to the
> Makefile to get gnokii to compile...?
>

to remove things in a clean way, simply comment out the lines "obj-$
(CONFIG_...." in router/Makefile.
E.g. for zebra:

#obj-$(CONFIG_ZEBRA) += zebra


To set up gnokii, first add this to router/Makefile:

CONFIG_GNOKII=y
obj-$(CONFIG_GNOKII) += gnokii

Then put in router/ the folder and rename it "gnokii".
Then set up gnooki with the very essential features. Enter in gnokii
folder, maybe you need to run "./configure". Check with "./configure
- --help" what options you can pass.
Then you can edit Makefile, config.h or .config, and comment out all
unnecessary options.

BTW, why dont you try first to download a compiled packet for mipsel
from openwrt and test it?

> Also, is there anything else that would be good for me to remove if I
> need more space? I'm keen to keep dropbear in there, but nothing else
> is essential really.. - so long as it works!


You could try to remove also freeswan, igmp-proxy, and if you dont
use them also dhcp-relay and upnpd.

cheers

marco
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGG0Um8PPSbh9Zs4YRAkKcAJ0c560+zp0Cm/YuDevB9cw8ydAlSgCePuOh
589HSLBzmn/Jf1NCPWCTnIk=
=sD72
-----END PGP SIGNATURE-----

Tim

unread,
Apr 10, 2007, 5:08:08 AM4/10/07
to neptune354-dev

>
> to remove things in a clean way, simply comment out the lines "obj-$
> (CONFIG_...." in router/Makefile.
> E.g. for zebra:
>
> #obj-$(CONFIG_ZEBRA) += zebra
>
> To set up gnokii, first add this to router/Makefile:
>
> CONFIG_GNOKII=y
> obj-$(CONFIG_GNOKII) += gnokii
>
> Then put in router/ the folder and rename it "gnokii".
> Then set up gnooki with the very essential features. Enter in gnokii
> folder, maybe you need to run "./configure". Check with "./configure
> - --help" what options you can pass.
> Then you can edit Makefile, config.h or .config, and comment out all
> unnecessary options.
>

I will give this a try today some time, thanks.

> BTW, why dont you try first to download a compiled packet for mipsel
> from openwrt and test it?
>

I have already tried this I think. (If I did it correctly) -
I extracted this package: http://pauli.borodulin.fi/hw/OpenWRT_packages/packages/gnokii_0.6.14-1_mipsel.ipk
And moved the contents to router/misc
Then added the following lines to router/misc/Makefile:
install $(TOP)/misc/gnokii $(INSTALLDIR)/usr/bin/
install $(TOP)/misc/waitcall $(INSTALLDIR)/usr/bin/
install $(TOP)/misc/libgnokii.so.3 $(INSTALLDIR)/usr/lib/
install $(TOP)/misc/libgnokii.so.3.0.0 $(INSTALLDIR)/usr/lib/
install $(TOP)/misc/gnokiid $(INSTALLDIR)/usr/sbin/
install $(TOP)/misc/mgnokiidev $(INSTALLDIR)/usr/sbin/
install $(TOP)/misc/gnokiirc $(INSTALLDIR)/etc/
And created the router/mipsel-uclibc/install/misc/usr/bin sbin and lib
directories.
Then did a 'make install' 'make rom' and 'make upgrade'.

When I updated the fw, everything seems to be in the right place.
However, I always get this output when I run gnokii:
root@neptune:~# gnokii
/usr/bin/gnokii: /usr/bin/gnokii: 1: Syntax error: "&" unexpected

Does this mean the binary is not understood properly by the AR7?

> You could try to remove also freeswan, igmp-proxy, and if you dont
> use them also dhcp-relay and upnpd.

Great, will keep that in mind...

Thanks again Marco,

Tim

Marco Vedovati

unread,
Apr 10, 2007, 6:35:07 AM4/10/07
to neptune...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Il giorno 10/apr/07, alle ore 11:08, Tim ha scritto:

>
> When I updated the fw, everything seems to be in the right place.
> However, I always get this output when I run gnokii:
> root@neptune:~# gnokii
> /usr/bin/gnokii: /usr/bin/gnokii: 1: Syntax error: "&" unexpected
>
> Does this mean the binary is not understood properly by the AR7?


yes this means that binaries are not compatible.

Let me know how how far do u go compiling gnokii. You could also try
building older versions of gnokii, this would probably reduce the
amount of errors you'll get.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGG2hc8PPSbh9Zs4YRApBPAKCtX+35q3gTaHY6gmK3afigXVq2GgCfY9UW
quP9oBdM7aj3JiFGWuQYxmI=
=YEkk
-----END PGP SIGNATURE-----

Tim

unread,
Apr 10, 2007, 10:58:25 AM4/10/07
to neptune354-dev
> Let me know how how far do u go compiling gnokii.

Not very far! This cross compiling stuff is pretty new to me.

Just adding the two lines to router/Makefile doesn't seem to do
anything..
When I run 'make', it seems nothing is done inside the router/gnokii
folder.

Could it not be configured with '--target=mipsel-linux' and built with
gcc make?

Cheers,
Tim

Marco Vedovati

unread,
Apr 10, 2007, 1:59:51 PM4/10/07
to neptune...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Il giorno 10/apr/07, alle ore 16:58, Tim ha scritto:

>
>> Let me know how how far do u go compiling gnokii.
>
> Not very far! This cross compiling stuff is pretty new to me.
>
> Just adding the two lines to router/Makefile doesn't seem to do
> anything..
> When I run 'make', it seems nothing is done inside the router/gnokii
> folder.


enter make "make gnokii"

>
> Could it not be configured with '--target=mipsel-linux' and built with
> gcc make?

Of course first of make you need to run ./configure from inside the
gnokii folder, to generate the Makefile.
The target option must be "mipsel-uclibc", but in this way you'll get
an error, because platform it is not recognized. For these you need
custom config.sub / config.guess files (I dont remember which of
them). You can take them from the dropbear folder.

cheers

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGG9CY8PPSbh9Zs4YRAtLQAJ4owHqNVopsRcA4z9MYxYAXiC68KACgwgdA
sw9ufL2nfieO+p90xROKNqg=
=4WfQ
-----END PGP SIGNATURE-----

Tim

unread,
Apr 10, 2007, 5:35:29 PM4/10/07
to neptune354-dev
Cheers Marco..

I've got it to compile ok, but one of the libs produced is 3.8MB..
Way to big!

I will try some older versions and see what else I can do to make it
smaller.

Tim

cyberstorm

unread,
Apr 11, 2007, 7:37:07 AM4/11/07
to neptune354-dev

check also if you can remove some extra option in config.h. Maybe you
could save some more space...

anyway good news!

Tim

unread,
Apr 12, 2007, 11:28:26 AM4/12/07
to neptune354-dev
Success...!

root@neptune:~# gnokii --version
GNOKII Version 0.6.14
Copyright (C) Hugh Blemings <hu...@blemings.org>, 1999, 2000
Copyright (C) Pavel Janik ml. <Pavel...@suse.cz>, 1999, 2000
Copyright (C) Pavel Machek <pa...@ucw.cz>, 2001
Copyright (C) Pawel Kot <pk...@linuxnews.pl>, 2001-2006
Copyright (C) BORBELY Zoltan <bo...@andrews.hu>, 2002

Now the hard part, eh? :-)

I was thinking, before I go digging around looking for the required
gpio pins (I am going to need a smaller soldering iron and some very
nimble fingers!), I would try and use the existing serial port. Of
course, the system console already uses that port... I realise this
may be dangerous, but can you think of a way to stop the console
process starting?

Thanks again for your help so far..!

Tim

Tim

unread,
Apr 12, 2007, 11:44:25 AM4/12/07
to neptune354-dev
tim@xubuntu:~/wagfin/trunk/linux/linux$ grep CONSOLE .config
CONFIG_SERIAL_CONSOLE=y

Maybe turning this off..? I'll give it a try.

T

Marco Vedovati

unread,
Apr 12, 2007, 12:07:29 PM4/12/07
to neptune...@googlegroups.com
yes, that could be a try.
You can also try the patch i'm sending u...
From inside the rc/ folder:
patch -p1 < rcpatch.diff

rcpatch.diff

Tim

unread,
Apr 12, 2007, 4:09:45 PM4/12/07
to neptune354-dev
Well, i've killed it. Posting from my mobile phone now. :-)
During fw upgrade via web interface, a box popped up saying the
upgrade was unsuccessful
. Now the power led just flashes rapidly. Do you think there is much
chance of recovering this by the tftp method?
Cheers,
Tim
> --Apple-Mail-5-518354359
> Content-Type: application/octet-stream
> Content-Transfer-Encoding: base64
> Content-Disposition: inline;
> filename="rcpatch.diff"
> X-Google-AttachSize: 492

Marco Vedovati

unread,
Apr 13, 2007, 3:08:44 AM4/13/07
to neptune...@googlegroups.com
Il giorno 12/apr/07, alle ore 22:09, Tim ha scritto:

>
> Well, i've killed it. Posting from my mobile phone now. :-)
> During fw upgrade via web interface, a box popped up saying the
> upgrade was unsuccessful
> . Now the power led just flashes rapidly. Do you think there is much
> chance of recovering this by the tftp method?
> Cheers,
> Tim

yes of course. If you have a switch/hub, connect the router to the pc
using them, so that the ethernet connection remains up. Then assign
to you pc a static 192.168.1.x ip.

Then from tftp:

connect 192.168.1.1
binary
verbose
trace
rexmt 1

*plug the main to the router;
(wait 0-3 seconds)
put upgrade_code.bin

(maybe also swap these last 2 steps)

the window of acceptance of pspboot is 3 seconds.

Refer to this guide:
http://cyberstorm.altervista.org/2007/01/unbricking-wag354g.html

be very patient, it's hard to guess the right timing...

good luck

Tim

unread,
Apr 13, 2007, 6:52:38 AM4/13/07
to neptune354-dev
Well, that worked great. I really thought I'd bricked it proper. :-)

I think the console is still running, with both of those
modifications:

root@neptune:~# cat /dev/tty
Everything I type is repeated
Everything I type is repeated

root@neptune:~# cat /proc/tty/driver/serial


serinfo:1.0 driver:5.05c revision:2001-07-08

0: uart:16550A port:A8610E00 irq:15 baud:2258 tx:4990 rx:0 RTS|DTR


1: uart:16550A port:A8610F00 irq:16 tx:0 rx:0 RTS|DTR

The fact that anything sent to /dev/tty is echoed back to the
terminal, does this indicate that the system console is still active?
Is there any other sure way to tell if the console is running (without
plugging a serial cable into it)?

Cheers,
Tim

Marco Vedovati

unread,
Apr 13, 2007, 7:22:19 AM4/13/07
to neptune...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Il giorno 13/apr/07, alle ore 12:52, Tim ha scritto:

>
> Well, that worked great. I really thought I'd bricked it proper. :-)
>

:)

>
> The fact that anything sent to /dev/tty is echoed back to the
> terminal, does this indicate that the system console is still active?

No, my powerbook has the same behaviour but I dont think it has a
serial console :)


> Is there any other sure way to tell if the console is running (without
> plugging a serial cable into it)?

I think this does mean serial console is still active:

> 0: uart:16550A port:A8610E00 irq:15 baud:2258 tx:4990 rx:0 RTS|DTR

Look at "tx".

Another way is redirect /dev/tts/0 to a file for example using mkfifo.
You have to enable it in busybox, using "make menuconfig" from
busybox folder.
If file is not empty, it means console is still active.

Another easy way is to connect to the tx pin on the board a led
+resistor. If it randomly flashes, console is active.

Anyway if want to use gnokii you'll probably have a data cable. If
you have a spare one, you can easily turn it into a console cable:

http://www.nslu2-linux.org/wiki/HowTo/AddASerialPort

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFGH2fs8PPSbh9Zs4YRAog9AJ0QVVwpLzvMZTLUduPBlOVlSo7C1gCfRoYE
MqW2kxSb+yaSRKLTd4ur4sk=
=G79c
-----END PGP SIGNATURE-----

Tim

unread,
Apr 14, 2007, 12:51:04 PM4/14/07
to neptune354-dev
I will see what I can do with the serial cable.. had a quick try
earlier without much luck.

I was using the diagram here as a guide: http://wiki.openwrt.org/OpenWrtDocs/Hardware/Linksys/WAG354G

It's not very clear as to which label relates to which pin.... but
is that correct to the best of your knowledge?

Cheers

Tim

Reply all
Reply to author
Forward
0 new messages