As I haven't been as prolific updating progress recently I thought I'd update on progress.
Currently I'm extremely close to basic functionality on 2.6 kernel with drivers for all of the hardware I've seen built into my kernel.
This means that we can have a single kernel for all hardware.
In order to achieve this though, I have had to make some sacrifices.
2.6 Support will only be available initially on 16M ram devices, with 4M flash.
Unfortunately kernel size with drivers is quite large, and its just not feasible to fit on a 2M device.
I can make specific 2M firmware with a subset of drivers if there is a need though, but its going to be quite tight.
Minimum hardware spec for initial release will be 16M ram, 4M flash.
If your bootloader says: "Memory Size is 0x1000000 Bytes, Flash Size is 0x400000 Bytes", then you will have a compatible unit.
Currently the kernel sits at between 1.6M size. I've been trying to reduce this, but the wifi drivers for certain cards (RT27xx I'm looking at you!) are particularly large.
I've also had to reorganize the flash layout somewhat due to size considerations, so you'll pretty much need a blank camera flash to test.
I'll need some volunteers soon too, so I can test driver support for hardware I don't have.
Assuming you have a blank flash (delete everything except the BOOT INFO), my layout is below.
I've also explained WHY I chose this layout, as decisions had to be made on how much to allocate to what..
This is not set in stone yet, but looks optimal after playing around with different layouts.
BOOT INFO (Image 0) -
no changes, as I don't use it.
LINUX KERNEL (Image 1) Bootloader flags -acx. Max Size - 2M
This starts at 0x7F020000 in flash memory (as this is the first safe free post bootloader block location).
Boots from 0x8000 in memory. (Read the NUC745 chip notes for why there).
I don't see the need to use high numbering for our images, makes more sense for 1..2..3..4...
The kernel executes from RAM, and is set Active, is Compressed, and eXecutes from RAM ( -acx )
ROMFS (Image 2) Bootloader flags -cf. Max size - 1M
I've reserved 2M space for the Kernel, so we start the ROMFS at 0x7F220000.
I've also set the Kernel to use 15M of physical memory as opposed to the full 16M so we can use 1M for a ramfs (RAM Filesystem). A RAMFS is similar to ROMFS, except its read / write.
I tell the bootloader to put the romfs in starting from 0x00D00000 (which points at the 15M-16M area in ram).
I've also told the kernel how to handle this partition via my mtd_struct setup in my kernel.
The astute may notice that our R(A/O)MFS can only be 1M size now. Thats fine, as we can use secondary partitions for our WEBUI and other data, just like the factory default firmware does.
DATA (Image 3) No Bootloader flags, as we use mtd_flash to write directly. Max Size - 64KB
Currently not used in my kernel / romfs setup.
I've allocated 0x7F320000 - 0x7F330000 for any data I need to save.
While I could set the ROMFS to use JFFS2, I am concerned that our Flash memory may not like continued writes, so I'm playing it safe.
WEBUI (Image 4) Bootloader flags -f. Max Size - 960KB
WebUI sits at 0x7F330000 - 0x7F400000, using up the rest of the flash.
I deliberately put this after the DATA partition in case I accidentally tried to update the WebUI over the Data, as I have been prone to do that in the past during testing.
I plan to redo the WebUI completely using CSS and no iFrames.
I also plan on Porting that backward to the Factory Firmware as I do have clients interested in a rewrite.
If anyone is interested in customized firmware for their particular needs, get in touch with me, as I have already done a few projects for people related to camera firmware.
My flash looks like this in my test device:
bootloader> ls -al
Image: 0 name:BOOT INFO base:0x7F010000 size:0x00000038 exec:0x7F010000 -af
Image: 1 name:linux base:0x7F020000 size:0x00198D80 exec:0x00008000 -acx
Image: 2 name:romfs base:0x7F220000 size:0x00084000 exec:0x00D00000 -cf
Image: 4 name:webui base:0x7F330000 size:0x00000038 exec:0x7F330000 -f
A testing 2.6 Kernel and ROMFS are here -
http://www.openipcam.com/files/OPENIPCAM26/I STRONGLY NOTE that this is still in testing, so only try on "broken" or spare units for now.
Lawrence.