Hi,
nico!
On Mon, 5 Feb 2001 you wrote:
**************************************************
Instead, you should use the MTD drivers to access flash data directly. If
your Assabet has only 4MB of flash, then replace them with bigger parts
(they are socketed so that's easy to do). Look at
drivers/mtd/sa1100-flash.c to see how you can partition your flash so to
leave your boot firmware in a partition of its own. Then you may use any
kind of filesystem in your flash partitions, even cramfs if compression is
required. The MTD layer has a block interface driver that can present flash
partitions just as if they were hard disk partitions. Get familiar with
this, make it work for you, and see how much free ram you then have! The
kernel is quite smart at moving what it really needs into ram, uncompressing
it on the fly if needed, and dropping unused content from ram when ram is
required by some other applications. This is simply not possible with a
ramdisk.
When you've reached that point, then you may consider another structural
level, the best I found so far, which consist of using two flash partitions:
the first one being a single flash sector long to hold your bootloader, and
the second one spaning onto the entire remaining flash using JFFS
(Journaling Flash File System). For partitions that contained compressed
filesystems before, you just need to use the loopback block interface to
access them while holding their images into the JFFS partition. Even the
kernel zImage can be stored into that partition and be booted by the
bootloader from there (John Dorsey made a patch for Compaq's bootldr to do
just that). This is how you will get the most efficient and secure usage of
your flash memory. If you still need more filesystem space then consider
bigger flash or networked filesystems.
Also note that for volatile storage purpose like /tmp you should consider
using ramfs since the flash has a limited number of write cycles.
Now PLEASE let's stop those jumbo ramdisk discussion since this is really
not the way to do things, OK?
Nicolas
***************************************************
I decide to implement your thought on my assabet/neponset.
I can copy anything (in ramdisk) into /rootfs,then make a
jffs image file(rootfs.jffs) using command mkfs.jffs. I use
JD's bootldr which surports jffs:
boot > load jffs
Then I send rootfs.jffs by Xmodem. But what address does my
rootfs.jffs be loaded. 0x00040000 (the end of bootldr
partition)?
I also have difficulty with the following:
Also note that for volatile storage purpose like /tmp you
should consider using ramfs since the flash has a limited
number of write cycles.
How can I use ramfs ?
I download these files from www.handhelds.org:
init-src-2-70.tar.gz
root-src-2-57.tar.gz
usr-src-2-61.tar.gz
There is a file named "linuxrc" in root-src-2-57.tar.gz,
These are the contents:
***********************************
#!/bin/sh
echo "LINUX RC is executing"
echo "LINUX RC is executing"
echo "before ramfs"
/bin/mount -n -t ramfs ramfs /mnt/ramfs
/bin/mount -n -t cramfs -o ro /dev/mtdblock3 /mnt/init
echo "Setting up RAMFS, please wait ... "
/bin/cp -a /mnt/init/etc /mnt/ramfs
/bin/cp -a /mnt/init/home /mnt/ramfs
/bin/cp -a /mnt/init/root /mnt/ramfs
/bin/cp -a /mnt/init/tmp /mnt/ramfs
/bin/cp -a /mnt/init/var /mnt/ramfs
# re-create the /etc/mtab entries
/bin/mount -f -t cramfs -o ro /dev/mbtdblock4 /
/bin/mount -f -t ramfs ramfs /mnt/ramfs
/bin/mount -f -t proc none /proc
/bin/mount -f -t cramfs -o ro /dev/mtdblock3 /mnt/init
# Setup /dev in DRAM using RAMFS
/bin/mount -t ramfs ramfs /dev
/bin/cp -a /mnt/init/dev/* /dev
echo "RAMFS setup complete"
#echo "moving network.opts.blue -> network.opts"
#/bin/cp /etc/pcmcia/network.opts.blue /etc/pcmcia/network.opts
#echo "init.d/netstd_init"
#/etc/init.d/netstd_init start
#echo "init.d/portmap"
#/etc/init.d/portmap start
#echo "init.d/netbase"
#/etc/init.d/netbase start
#echo "init.d/pcmcia"
#/etc/init.d/pcmcia start
#sleep 5
#echo "mounting -t cramfs /dev/mtdblock5 as /mnt/cramfs"
#/bin/mount -t crams -o ro /dev/mtdblock5 /mnt/cramfs
echo "Cleaning up"
#umount -f /proc
echo "done and exiting"
exec /sbin/init
***************************************
Should I use ramfs as the way in "linuxrc" ?
Do I need a "linuxrc" in rootfs.jffs ?
Of all,how can I get a jffs image to use as rootfs?
______________________________________
===================================================================
������ѵ������� (http://mail.sina.com.cn)
����Ѱ��ǧ�ٶ�!û��"��������",����"��˫�ɶ�"? (http://newchat.sina.com.cn)
_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.