Thank you for trying to help, micky. I've successfully flashed a customised kernal to /dev/mtd1 and here's how I did:
1. Since the newest stable version of linux kernel 2.6.30 is available, I grabbed it and compiled with the stuffs I need
2. Copy the kernel uImage-2.6.30-4M to the tftp root directory
3. I put rootfs under the root directory of my nfs server
4. Interrupt the autoboot and set image_name to uImage-2.6.30-4M, also set up the mtd_parts with size of mtd1=4M
5. With step 2 and 3, I am able to boot into the linux system with the new kernel using tftp/nfs method [ which is different to what's in the documentation, with uImage.sheeva.20090319 I could never change the size of /dev/mtd1 to 4M ]
finally the result of cat /proc/mtd shows the size of mtd1: 4MB
6. flash_eraseall /dev/mtd1
nand_write -p /dev/mtd1 uImage-2.6.30-4M
flash_eraseall /dev/mtd2
nand_write -m -q /dev/mtd2 ubuntu-9.0.5.Release.jffs2
reboot
7.
setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(uboot), 0x400000@0x100000(uImage)ro,0x1fb00000@0x500000(rootfs)rw root=/dev/mtdblock2 rootfstype=jffs2'
saveenv
reset
8. Since I need to boot from SD card (whith runs Debian Lenny) from time to time, I made an easy to switch boot settings as follows:
[ btw a customized u-boot.bin is needed to boot from mmc, see
http://plugcomputer.org/plugforum/index.php?topic=183.0 for detail ]
setenv bootargs_nand 'console=ttyS0,115200 mtdparts=nand_mtd:0x100000@0x00000(uboot), 0x400000@0x100000(uImage)ro,0x1fb00000@0x500000(rootfs)rw root=/dev/mtdblock2 rootfstype=jffs2'
setenv 'bootcmd_nand 'set bootargs $(bootargs_nand); nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
setenv bootargs_mmc 'root=/dev/mmcblk0p1 rootdelay=0 rootfstype=ext3'
setenv bootcmd_mmc_init 'mmcinit;mmcinit;ext2load mmc 0 0x400000 /boot/uImage-2.6.30'
setenv bootcmd_mmc 'setenv bootargs $(console) $(bootargs_mmc); run bootcmd_mmc_init; bootm 0x400000'
saveenv
#boot from nand
run bootcmd_nand#boot from mmc
run bootcmd_mmcNow I can say good-bye to the slow and annoying usb recovery method.