Finished !
In fact, the only read method form nand is binary read, so I have to make a image file of the 4th partition with uImage and uInitrd in it.
First I use the installer to re-write UBIFS ubuntu in the Flash-nand with the new sizes.
For this, I have modified "uboot-nand-custom.txt"
the line :
mtdpartitions mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
becomes
mtdpartitions mtdparts=orion_nand:0x400000@0x100000(uImage),0x1ef00000@0x500000(rootfs),0xc00000@0x1f400000(debian)
and I run the installer (without any mods in /etc/init.d.rcS)
Second after booting with the Ubuntu in the Nand, I mount the '/boot' partition of Debian Squeeze (in external USB disk) and copy 'uImage' and 'uInitrd' in a working directory.
root@ubuntu:~# mkdir squeeze
root@ubuntu:~# cd squeeze
root@ubuntu:~/squeeze# mount -t ext2 /dev/sda1 /mnt
root@ubuntu:~/squeeze# cp /mnt/uImage .
root@ubuntu:~/squeeze# cp /mnt/uInitrd .
root@ubuntu:~/squeeze# umount /mnt
root@ubuntu:~/squeeze#
Third I use a seflmade script to create the partition image file named "mkpart4"
#! /bin/sh
TOTAL_SIZE=12582912
UIMAGE_SIZE=3145728
UINITRD_SIZE=9437184
UIMAGE="uImage"
UINITRD="uInitrd"
OUTFILE="part4"
TMPFILE="tmp"
dd if=$UIMAGE bs=$UIMAGE_SIZE conv=sync of=1$TMPFILE
dd if=$UINITRD bs=$UINITRD_SIZE conv=sync of=2$TMPFILE
cat 1$TMPFILE 2$TMPFILE > $OUTFILE
rm ?$TMPFILE
ls -l
#copy to nand partition 4
#dd if=$OUTFILE of=/dev/mtdblock2 bs=65536
and I run it
root@ubuntu:~/sqeeze# ./mkpart4
0+1 records in
1+0 records out
3145728 bytes (3.1 MB) copied, 0.342115 s, 9.2 MB/s
0+1 records in
1+0 records out
9437184 bytes (9.4 MB) copied, 1.27071 s, 7.4 MB/s
total 31276
-rw-r--r-- 1 root root 3145728 Jun 6 22:26 1tmp
-rw-r--r-- 1 root root 9437184 Jun 6 22:26 2tmp
-rwxr-xr-x 1 root root 290 Jun 6 21:47 mkpart4
-rw-r--r-- 1 root root 12582912 Jun 6 22:26 part4
-rw-r--r-- 1 root root 1431260 Jun 6 21:51 uImage
-rw-r--r-- 1 root root 5422261 Jun 6 21:51 uInitrd
root@ubuntu:~/sqeeze#
I obtain a "part4" file with exactly the same size as the 4th partition
Fouth I write this file in the partition
root@ubuntu:~/sqeeze# dd if=part4 of=/dev/mtdblock2 bs=65536
192+0 records in
192+0 records out
12582912 bytes (13 MB) copied, 4.85796 s, 2.6 MB/s
root@ubuntu:~/sqeeze#
Fifth I reboot the plug and get control under uboot
root@ubuntu:~/sqeeze# reboot
I set new Uboot variables to boot
Marvell> setenv bootargs_console 'console=ttyS0,115200n8'
Marvell> setenv bootroot_usb 'root=/dev/sda2 rootdelay=10 rootfstype=ext4'
Marvell> setenv my_parts 'mtdparts=orion_nand:0x400000@0x100000(uImage),0x1ef00000@0x500000(rootfs),0xc00000@0x1f400000(debian)'
Marvell> setenv my_read 'nand read.e 0x0800000 0x1f400000 0x0c00000'
Marvell> setenv my_boot 'setenv bootargs $(bootargs_console) $(my_parts) $(bootroot_usb); run my_load; bootm 0x0800000 0x0b00000'
Marvell> saveenv
Marvell> reset
Last When I get control, I type
Marvell> run my_boot
Enjoy !