(see also http://agendawiki.com/cgi-bin/aw.pl?FlashDiskPartitions)
Since the root disk of H20 1.2.6 is less then 7MB there are further
3 MB available for your personal data.
There's the possibility to rebuild the root cramf but storing always
the big root filesystem to flash is very time consumly.
Instead I've splitted the root flash file system area into two different
blocks. One containing the root file system the other for my personal files.
It's under your decision if you use this area as cramfs to store your personal
tools and data or to use it as 2nd jffs for reading and writing of data.
My actual partitition of the file system looks like:
| start address | size | contains |
|---|---|---|
| 0x00000000 | 0x00200000 | Kernel |
| 0x00200000 | 0x00800000 | Root (containing the original H2O 1.2.6 ) |
| 0x00a00000 | 0x00200000 | new available 2MB flash area (leave 1 MB for increased root) |
| 0x00c80000 | 0x00380000 | jffs2 |
First of all the vmlinux kernel config should
contain:
CONFIG_CRAMFS=y
# CONFIG_CRAMFS_LINEAR is not set # CONFIG_CRAMFS_LINEAR_XIP is not set # CONFIG_ROOT_CRAMFS_LINEAR is not set
... CONFIG_BLK_DEV_LOOP=y
The original vmlinux uses a cramfs at a fixed address, I don't since
I also support the possibility to install a 2nd cramfs into the new partitions.
For testing purpose I've also included the loop driver to install a cramfs
stored on a jffs.
The 2nd step is to configure the flash layout in the nora.c where also the original layout of the agenda is defined. Since mtdpart.o is now also needed the drivers/mtd/Makefile has to be changed.
For ease I've replaced the /dev/rom root disk with the new flash
device in init/main.c (it's ugly but it works for
the 1st step).
agenda> cat /proc/mtd
mtd0: 00380000 "Agenda JFFS Partition Un-Normal (testing)" mtd1: 00c00000 "Agenda Flash" mtd2: 00200000 "Kernel" mtd3: 00800000 "Root-Cramfs" mtd4: 00200000 "Tools-Cramfs"Afterwards you have to define the new device files:
agenda> mknod /dev/mtd8 c 90 8
agenda> mknod /dev/mtdblock4 b 31 4
Now it's possible to erase the new flash area
agenda> /sbin/eraseall /dev/mtd8
and to mount it as jffs
agenda> mkdir /flash/opt
agenda> mount -t jffs /dev/mtblock4 /flash/opt
agenda> cat /proc/mount
/dev/root / cramfs ro 0 0 none /ram ramfs rw 0 0 /dev/mtdblock0 /flash jffs rw 0 0 none /proc proc rw 0 0 /dev/mtdblock4 /flash/opt jffs rw 0 0Now you have additional 2 MB on a separate jffs available.
If you like to build and use a personal cramfs instead you can afterwards store it on the new device with
host> vrflash myCramfs 0x00a00000
and mount it on the agenda with
agenda> mount -t cramfs -n /dev/mtdblock4 /flash/opt/
Using the loop driver it's also possible to mount a cramfs file lying on the jffs with the loop driver (with the original kernel this wasn't possible since it always mounts the root file system instead. This is caused by using the fixed address of the cramfs in the original linux kernel config)
host> rsync myCramfs agenda::root/flash/opt
agenda> mkdir /flash/opt/local
agenda> mount -t crams -n -o loop /flash/opt/myCramfs
/flash/opt/local
This gives youe the possibility to save flash space (by using the compression
of cramfs) and to use the jffs read/write facillity in parallel.