Michael Buesch <[email protected]> writes: > On Monday 15 June 2009 12:58:18 Ferenc Wagner wrote: >> Bastian Bittorf <[email protected]> writes: >> >>> * Ferenc Wagner <[email protected]> [14.06.2009 14:45]: >>> >>>> For my purposes using a region with smaller blocks for jffs2 >>>> would be a big gain, as currently I've got a single 64 KB erase >>>> block for it, which obviously does not fly. Is it really >>>> possible? >>> >>> AFAIK the blocksize is fixed/hardlocked for this flashchip to 64k. >>> Ever played with 'printk-patch' or similar things the get a smaller kernel? >> >> Not yet. But would that by me another 64k? I don't think so... By >> optimising the kernel for size I'm at 4 (!) erase blocks now, so I'd >> need one more to get an operating jffs2. But this agains gives me the >> feeling that jffs2 is rather inefficient at using flash space: I need >> 384k to store a single byte! :/ I wonder how much more I could store >> there in this case... > > I am running a OpenWRT with a 2.6 kernel on a WAP54G. > It's rather difficult to get it stripped down, but it _does_ work. The device > does run in production since several months.
Thanks, that's good to know! Don't you feel like putting this into the Wiki and linking it from the WAP54g page from WiP? :) > So what are the issues? It turns out RAM is _not_ an issue. Just disable all > services > that are not absolutely required (dhcp, etc...) and you'll get enough free > RAM. > The issue is flash. In fact the 5 erase blocks are the issue. Exactly. > First start with disabling _everything_ that is not needed to keep the device > alife. It took me some time to learn that hotplug2 and udevtrigger is needed... > In the kernel and in the openwrt config (busybox config, too). Thanks for reminding me of BusyBox. The menuconfig interface hides that submenu, like, completely! > The second step is to search for big flash consumers. It turns out > the crypto modules do consume a large amount of flash. Even if the > functionality is already compiled into the kernel image itself. Which of them are really needed, btw? > Attached is a patch which strips down several hundred kiB of flash > space. I think it doesn't apply anymore to current trunk, but you > might get the idea. Yes, I was experimenting with things like this. But there's some more to do, as it seems. > Another rather big flash consumer is the b43 driver firmware. > There's an option in openwrt config to include only the necessary > firmware files. Use it. Yes, that's pretty important. I've found it already. And did you try optimising your kernel for size (CONFIG_CC_OPTIMIZE_FOR_SIZE)? > I'm not sure if this is any useful for you running a 2.4 image, but > I just wanted to drop it into the discussion. Have fun! No, I'm running 2.6, so this was immensely useful. Thank you very much! A question, though: after you managed to get your 5th erase block and had a working jff2, did you actually use it for anything else than setting up a couple of variables, like eg. operating mode and IP addresses? Because if not, then I think a startup/shutdown script pair, which translated between nvram variables and /etc/config, could work just as well, without requiring us to squeeze things this bad. -- Regards, Feri. _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
