[WLANware] Problems with Firmware Builder

Dan Flett conhoolio at hotmail.com
Sat Apr 21 04:19:50 CEST 2007


Nice to see people using the Firmware Builder!  I'll get Tom to publish the 
PHP code behind the Melbourne Wireless builder.  But keep in mind it is 
customised for the Melbourne Wireless website, it's 10.10.x.x IP allocation 
system and it's MySQL user and mapping database.

The source for the bash version of the Melbourne Wireless Builder is here:

http://flett.zapto.org/automagic-20061209.tgz

It is very closely based on the Freifunk OpenWRT Kit, but does page scapes 
of the Melbourne Wireless site to obtain user data.  It also has the 
auto-generate wldhcp code in it.

The gen-openwrt in the Melbourne Wireless version has a couple of features I 
added after my last contrib to Freifunk: the "-F" flag that allows you to 
specify an output filename - so you don't have to use ">" to redirect the 
output.  This allows the next feature: the "-V" flag for Verbose output.  It 
redirects command outputs and error messages to stdout - which can then be 
directed to a web page output if desired.  I did these features so a future 
version of the PHP interface could display the build process as it happens - 
this is what the "MeshBoxKit" on the Paris Sansfil site does.  I'll 
contribute these as a patch to Freifunk's Kit if people are interested - or 
feel free to grab the code out of the Melbourne Wireless builder yourself. 
;)

I agree that /bin/bash should be declared as the interpreter.  I was 
learning a lot as I did my updates to the Kit, and I was Googling everywhere 
to find code snippets and examples - the "for((i;...))" was one of them.  I 
didn't have time to test on a range of systems - and I wasn't even sure 
which bits of code were /bin/sh compatible or not.  It just "worked for me". 
  Thanks to you guys testing I now know, and the Kit is better because of 
it. :)

Sven, can you update all the Kit script files in CVS to /bin/bash please?

>Lorenz,
>
>if you have some compat changes - just do it. The for((i;...)) notation
>seems not too compatiable - I've never realized that for loops can be done
>this way in bash.
>
>// Sven-Ola
>
>"Lorenz Schori" <lorenz.schori at gmx.ch> schrieb im Newsbeitrag
>news:4343AD53-FA82-4E43-BD5D-48E8E6D9C49A at gmx.ch...
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>A better solution would be to substitute the for with a while loop,
>this would be better for portability reasons. I don't think that
>there is much more bash-only code in Dans extension.
>
>Am 18.04.2007 um 20:00 schrieb Lorenz Schori:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Okay. function.sh for sure is called by the gen-openwrt script. i
> > guess that you have to substitute the first line of the gen-openwrt
> > script too. if you want to know which other scripts have the wrong
> > interpreter line check with:
> >
> > grep -r ./ -e "#!/bin/sh"
> >
> > Im pretty, pretty, pretty sure, that this is the issue.
> >
> > @Sven-Ola: if you agree i'll check in my enhanced version of gen-
> > openwrt which fixes the issue that nvram variables are not included
> > if the ip-address is not given on the command line and which adds
> > functionality to include custom ipk into the firmware image by just
> > dropping them in a "package"-directory inside the kit.
> >
> > Lorenz
> >
> > Am 18.04.2007 um 19:34 schrieb tetzlav:
> >
> >> Lorenz Schori schrieb:
> >>> bash --version
> >> ok, next round. :D
> >>
> >>  tetzlav at server # bash -version
> >> GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu)
> >> Copyright (C) 2002 Free Software Foundation, Inc.
> >>
> >> This is an old version, but works fine for me...
> >>
> >>
> >>  tetzlav at tp40 # bash -version
> >> GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
> >> Copyright (C) 2005 Free Software Foundation, Inc.
> >>
> >>> I'm pretty sure, that some other shell is hiding behind your /bin/
> >>> bash
> >>> Perhaps you have to install it seperately on ubuntu?
> >>
> >> Not that I remember...
> >>
> >>> i found the culprit:
> >>> http://ff-firmware.cvs.sourceforge.net/*checkout*/ff-firmware/ff-
> >>> devel/freifunk-openwrt-kit/functions.sh?content-type=text%2Fplain
> >>>
> >>> replace the first line! should be
> >>> #!/bin/bash
> >>>
> >>
> >> done.
> >> but it still says:
> >>
> >>  tetzlav at tp40 # ./gen-openwrt g > test.bin
> >> ./functions.sh: 6: Syntax error: Bad for loop variable
> >>
> >> :-(
> >>
> >> Whatever - never mind! Its just out of interest whats going
> >> wrong... ;)
> >>
> >>
> >> Thx & Greetings
> >> tetzlav
> >> _______________________________________________
> >> WLANware mailing list
> >> WLANware at freifunk.net
> >> Abonnement abbestellen? -> https://freifunk.net/mailman/listinfo/
> >> wlanware
> >>
> >> Weitere Infos zu den freifunk.net Mailinglisten und zur An- und
> >> Abmeldung unter http://freifunk.net/mailinglisten
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.5 (Darwin)
> >
> > iD8DBQFGJlzPlNX+1hvKqPsRAqCbAJ9RiLWJDIMGb1oGPzdge1Iex+Jv1ACff4DT
> > yPMLVC3wfy1Ai1Y7iMQwEmk=
> > =Ae+q
> > -----END PGP SIGNATURE-----
> > _______________________________________________
> > WLANware mailing list
> > WLANware at freifunk.net
> > Abonnement abbestellen? -> https://freifunk.net/mailman/listinfo/
> > wlanware
> >
> > Weitere Infos zu den freifunk.net Mailinglisten und zur An- und
> > Abmeldung unter http://freifunk.net/mailinglisten
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.5 (Darwin)
>
>iD8DBQFGJl6LlNX+1hvKqPsRAhKpAKCY+Ybkjm2NECpMl7B/bRGO5TtjewCfcnko
>hwSKAXR8yiftl7kS5BeifBo=
>=S3+W
>-----END PGP SIGNATURE-----
>_______________________________________________
>WLANware mailing list
>WLANware at freifunk.net
>Abonnement abbestellen? -> https://freifunk.net/mailman/listinfo/wlanware
>
>Weitere Infos zu den freifunk.net Mailinglisten und zur An- und Abmeldung
>unter http://freifunk.net/mailinglisten
>
>_______________________________________________
>WLANware mailing list
>WLANware at freifunk.net
>Abonnement abbestellen? -> https://freifunk.net/mailman/listinfo/wlanware
>
>Weitere Infos zu den freifunk.net Mailinglisten und zur An- und Abmeldung 
>unter http://freifunk.net/mailinglisten





More information about the WLANware mailing list