OpenWrt Kamikaze 7.07 and Fonera : Can’t locate c0000(786432) bytes free in FLASH
While trying to update my Fonera to d'OpenWrt Kamikaze 7.07, i got :
Can't locate c0000(786432) bytes free in FLASH
In others words : unable to allocate 786432 bytes in flash memory, not enough space. There is a kernel size problem with openwrt-atheros-2.6-vmlinux.lzma. Olds OpenWrt Kamikaze kernels are 720896 bytes long (0xB0000) but news ones are bigger : 786432 bytes long (0xC0000). We need to play with RedBoot's images directory.
Here is what we have :
RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0xA8000000 0xA8000000 0x00030000 0x00000000 rootfs 0xA8030000 0xA8030000 0x00700000 0x00000000 vmlinux.bin.l7 0xA8730000 0x80041000 0x000B0000 0x80041000 FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000 RedBoot config 0xA87EF000 0xA87EF000 0x00001000 0x00000000
To make more space for kernel we need to allow less space for rootfs. We want this :
RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0xA8000000 0xA8000000 0x00030000 0x00000000 rootfs 0xA8030000 0xA8030000 0x006F0000 0x00000000 vmlinux.bin.l7 0xA8720000 0x80041000 0x000C0000 0x80041000 FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000 RedBoot config 0xA87EF000 0xA87EF000 0x00001000 0x00000000
The new process is :
load -r -b 0x80041000 openwrt-atheros-2.6-root.jffs2-64k fis create -b 0x80041000 -f 0xA8030000 -l 0x006F0000 -e 0x00000000 rootfs
then
load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7
0x00700000 change to 0x006F0000 ! You can (need to) delete olds images from flash with fis delete or, easier, init flash memory with fis init -f. You will get fresh new flash with the bootloader and an empty system directory. It's important to write rootfs first. With the -f we give a location : 0xA8030000. If you write kernel first this location will be in use and you cannot write rootfs anymore.