On Wed, 1 Nov 2000, Nicolas Pitre wrote:
> On Wed, 1 Nov 2000, David Woodhouse wrote:
> > JFFS itself is ready. The thing that's not quite ready is the mtdblock
> > driver, which would allow you to use ext2 and cramfs at the same time as
> > JFFS. Actually, I think it's OK for read-only use (i.e. cramfs) now - it's
> > just that it doesn't do the read/modify/erase/writeback thing that the
> > flash_mem driver does - so people with an existing ext2 filesystem on
> > /usr/local would be _forced_ to change (if they wanted to write to it),
> > which isn't very friendly.
>
> I'm working on that at the moment.
The code you committed to CVS today appears to do exactly that, and I've
transplanted it to the iPAQ kernel CVS.
I can now run both JFFS and ext2 filesystems on the iPAQ with the MTD
code, so it ought now to be possible to switch the default configuration
over to do so.
Instructions on switching an iPAQ over to use MTD and JFFS:
1. Obtain the latest kernel source from CVS.
2. Run your favourite config tool and do the following:
Disable CONFIG_BLK_DEV_FLASH
Enable CONFIG_MTD
Enable CONFIG_MTD_CFI
Enable CONFIG_MTD_CFI_INTELEXT
Enable CONFIG_MTD_BITSY
Enable CONFIG_MTD_CHAR
Enable CONFIG_MTD_BLOCK
Say 'M' to CONFIG_JFFS_JS
(This is because we're close to the 512KiB
kernel size limit, and JFFS would exceed
it.)
Build the kernel and modules.
3. Obtain the filesystem images, mount them and copy them into
local disk so that you can modify them and rebuild
your own image.
3a. In the init filesystem, replace the lines in /etc/fstab
which refer to the /dev/flash devices with the following:
/dev/mtdblock4 / cramfs ro 0 0
/dev/mtdblock5 /usr cramfs ro 0 0
/dev/mtdblock3 /mnt/init cramfs ro 0 0
/dev/mtdblock6 /usr/local jffs noauto,defaults 0 0
3b. Also in the init filesystem, change the /dev/mtd nodes to the
correct minor numbers. The minor# for /dev/mtd$n should be
$n * 2. The odd-numbered minor numbers are for the
read-only versions of the device nodes. The mtdblock
nodes are correct as shipped though.
3c. In the root filesystem, pass /linuxrc through the command
sed s:/dev/flash:/dev/mtdblock:g
3d. In the usr filesystem, add the 'eraseall' program, source
for which is in the util/ directory of the MTD CVS tree,
to the /sbin/ directory. You can also copy the 'erase'
program if you think you may ever want to erase a
single block of a partition rather than the whole
partition.
3e. Having built the kernel, also install the modules to the
/lib/modules subdirectory of the init filesystem.
e.g.:
make INSTALL_MOD_PATH=/local/iPAQ/fs/init modules_install
You can also remove the modules for the older kernel.
4. Rebuild all three filesystems with mkcramfs.
5. Xmodem-download all three filesystems and the kernel to
your beastie, as per the installation instructions.
6. Using the bootloaders 'set linuxargs' command, change the
root device to /dev/mtdblock4 instead of /dev/flash4.
e.g.:
boot> set linuxargs 'noinitrd root=/dev/mtdblock4 init=/linuxrc console=0'
6. Boot the iPAQ, log in, run 'eraseall /dev/mtd6' to CLEAR THE
ENTIRE CONTENTS OF THE /usr/local PARTITION.
7. Mount JFFS on the clean partition with 'mount /usr/local'.
If you want to continue using ext2 on /usr/local, you can put that into
/etc/fstab instead. Note that the only reason I've put 'noauto' into fstab
is because I don't expect the flash to be clean, and JFFS won't like being
asked to mount a flash partition which actually has ext2 on it. Once
you've run 'eraseall /dev/mtd6' and mounted JFFS, there's no reason why
you shouldn't remove the 'noauto' from your fstab.
A prebuilt kernel and set of filesystem images based on the v0.17 release
are (well, 'will shortly be') available at
ftp://ftp.uk.linux.org/pub/people/dwmw2/iPAQ/
I had to enable CONFIG_BITSY_TOUCHSCREEN to prevent the X server from
getting confused - registering a proper major# or miscdevice# for that
would probably be a good idea. I also had to turn off CONFIG_NETFILTER to
reduce the size of the kernel.
-- dwmw2Received on Fri Nov 3 18:02:11 2000
This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:43:45 EDT