[CUWiN-Dev] Questions from Lawrence of CSIR

Sven-Ola Tuecke sven-ola at gmx.de
Tue Oct 31 04:00:03 CST 2006


Hi,

JFFS2 and RAM space is always an issue on retail devices like the WRT54G. 
Those have only 4Mb Flash/16 Mb RAM. Some have only 2Mb Flash/8Mb RAM. A 
binary with 1Mb size will be stored compressed on the JFFS2 partition if 
Lawrence is using the standard OpenWrt toolchain - so that size may be OK if 
you do not need large addons.

I can hardly imagine, that you guys programmed so much source lines that the 
resulting binary has really 1Mb. So here are some tipps:

- Modern opensource packs tends to grab any available library. A little 
JavaRuntime here, some funny C++ string-lib there, a full sized openssl to 
check a hash, topped by a zebra-does-any-routing-proto-since-the-1980's and 
so on. You need to cut off that deps - especially the unused stuff of 
course.

- Check the final linker ("ld") command wich generates the resulting binary. 
Treacherous libs where you pull in an unwanted chain-of-deps will be visible 
here.

- Stay away from C++. Use plain C if possible. The uClibc (offered with 
OpenWrt) is very small but the uClibc++ runtime is bigger of course.

- Try to cut off debug stuff. Sometimes up to 25% can be saved with a simple 
#define printf(...)

- If nothing works: it is possible to make custom firmwares using the cramfs 
filesystem with a preinstalled HSLS daemon. Cramfs compression is much 
better than the BBC/ARJ algos used with JFFS2. Cramfs is readonly and you 
loose the opportinuty for a wider audience which may give "ipkg install 
hsls.ipk" a chance.

HTH
// Sven-Ola

----- Original Message ----- 
From: "Ross Musselman" <rgmussel at cuwireless.net>
To: "CUWiN Development" <cu-wireless-dev at lists.cuwireless.net>; 
<lmboweni at csir.co.za>
Sent: Tuesday, October 31, 2006 9:04 AM
Subject: [CUWiN-Dev] Questions from Lawrence of CSIR


> Hey guys!
>
> Lawrence Mboweni is working on porting HSLS to the Linksys WRT54G board.
> There are several pieces of information that would be very helpful in
> this process. I'm posting this to the dev-list and hoping that someone
> can help answer his questions.
>
> Problem #1: As part of getting HSLS to run on the Linksys board,
> Lawrence is running into a problem of space. HSLS current takes up about
> 1 MB uncompressed. He would like to be able to shrink it to 500KB by
> compressing it. If I'm correct, we generally find that Bzip2 compression
> is the most effective. Am I correct? Also, are there places where he
> should concentrate his efforts in reducing the size of HSLS storage?
> Finally, do we know how much RAM is consumed solely by the HSLS
> protocol? Knowing that is essential to setting a target for shrinking 
> HSLS.
>
> Problem #2: The TelCordia port to linux was based off the 3.4.2.4
> original BSD version of HSLS. How does that compare to our current
> version of HSLS? Should Lawrence be using another version of HSLS to
> start from?
>
> Side question: I know that we are looking at moving from the ETX metric
> to the ETT metric, but I assume that this has not been started by
> anyone. Is there a timetable yet?
>
> Thanks a lot!
>
> Ross
>


--------------------------------------------------------------------------------


> _______________________________________________
> CU-Wireless-Dev mailing list
> CU-Wireless-Dev at lists.cuwireless.net
> http://lists.chambana.net/cgi-bin/listinfo/cu-wireless-dev
> 



More information about the CU-Wireless-Dev mailing list