Salut, Stanislav,
On Mon, 2 Mar 2009 14:14:31 -0800 (PST), Stanislav Sinyagin wrote:
What you can fit into 2MB flash is Linux kernel 2.4.x, plus some very limited number of libraries, daemons and utilities. Also, even the newest 2.6.x kernel is permanently popping up with ipv6 improvements and bugfixes. It is physically impossible to run a 2.6.x Linux system from 2MB flash. You can, however, run it from 4MB, and there's even some room for ipv6. The dd-wrt software for Linksys routers seems to support it, but I didn't test it.
A slimmed down NetBSD kernel can fit into 2MB including IPv6 support. (You have to put some work into it though.)
unfortunately, NetBSD is way behind Linux in regards to new hardware support, especially for those consumer-grade devices. Most of the new reference boards come with quite poorly designed Linux BSP, and I haven't heard of any BSD support from the embedded hardware vendors.
Besides, as I told already, this linux/bsd hacking is for geek enthusiasts. Consumer electronics vendors will just push new hardware to the market.
You only claimed before that common IPv6 implementations are hard to fit onto a small amount of flash memory, which is not true. Also, I do see many consumer-grade devices capable of running NetBSD without any modification besides installation, but that's really off-topic.
I looked into the ipv6 linux kernel sources, and found quite a lot of hton/ntoh conversions. Also, for example, subnet mask matching is way more complex in foreign endianness :)
I fixed part of a BGP toolchain today and didn't need to do any extensive byte order conversions on my little-endian netbook, merely because I was aware of what operations I (can) perform in network byte order and which I can't.
ipv6 has many more bytes to swap in the packet header, that's the only reason :)
Only 64 of them are ever needed. Woah there, what a coincidence that most modern CPUs come with 64-bit registers (and those will eventually end up in the embedded market was well in a couple of years. Well, not the current CPUs, don't take me by the word, I dare you. :-P).
Tonnerre