[U-Boot-Users] Quick booting

Dear Friends,
I am using u-boot and it is first loading into the ram from flash and then starts booting. The problem is its taking a lot of time in loading the image from flash to ram and then starts booting from it. Following is the output for printenv variables. I am new to u-boot and thus not much aware of it. On other board there is redboot installed and it loads kernel in just flash and starts booting the kernel.
Kindly let me know if you need any information.
Thank you, Ankur.
# printenv bootargs=root=/dev/mtdblock2 rw init=/linuxrc console=ttyS0,115200 mem=32M rootfstype=jffs2 bootcmd=nand read.jffs2 0x30007FC0 0x80000 0x300000;bootm 0x30007FC0 bootdelay=5 baudrate=115200 ipaddr=10.0.1.8 serverip=10.0.1.2 netmask=255.255.255.0 partition=nand0,2 stdin=serial stdout=serial stderr=serial Environment size: 304/2044 bytes
Snapshot of OUTPUT On BOARD:
NAND read: device 0 offset 0x80000, size 0x300000
Reading data from 0x37f800 -- 100% complete. 3145728 bytes read: OK ## Booting image at 30007fc0 ... Image Name: Linux-2.6.22.2 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1382536 Bytes = 1.3 MB Load Address: 30008000 Entry Point: 30008000 Verifying Checksum ... OK OK
Starting kernel ...

conn intel wrote:
Dear Friends,
I am using u-boot and it is first loading into the ram from flash and then starts booting. The problem is its taking a lot of time in loading the image from flash to ram and then starts booting from it. Following is the output for printenv variables. I am new to u-boot and thus not much aware of it. On other board there is redboot installed and it loads kernel in just flash and starts booting the kernel.
Kindly let me know if you need any information.
Thank you, Ankur.
# printenv bootargs=root=/dev/mtdblock2 rw init=/linuxrc console=ttyS0,115200 mem=32M rootfstype=jffs2 bootcmd=nand read.jffs2 0x30007FC0 0x80000 0x300000;bootm 0x30007FC0
Hi Ankur,
I have no experience with NAND/jffs2, but the following thread probably applies: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/32434
Summary: jffs2 is slow. The thread has discussion of various options to speed up boot time.
Best regards, gvb

Dear Jerry Van Baren,
Thanks for your kind and quick response.
I read the thread and it is going to be very useful to me. Can we use DMA to load image from flash to ram ?
Currently I am using following command to load kernel image from flash to ram,
bootcmd=nand read.jffs2 0x30007FC0 0x80000 0x153000;bootm 0x30007FC0
Can someone suggest me better way to quicker the process?
Thank you, Ankur.
On Wed, Feb 27, 2008 at 8:09 AM, Jerry Van Baren gvb.uboot@gmail.com wrote:
conn intel wrote:
Dear Friends,
I am using u-boot and it is first loading into the ram from flash and then starts booting. The problem is its taking a lot of time in loading the image from flash to ram and then starts booting from it. Following is the output for printenv variables. I am new to u-boot and thus not much aware of it. On other board there is redboot installed and it loads kernel in just flash and starts booting the kernel.
Kindly let me know if you need any information.
Thank you, Ankur.
# printenv bootargs=root=/dev/mtdblock2 rw init=/linuxrc console=ttyS0,115200 mem=32M rootfstype=jffs2 bootcmd=nand read.jffs2 0x30007FC0 0x80000 0x300000;bootm 0x30007FC0
Hi Ankur,
I have no experience with NAND/jffs2, but the following thread probably applies: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/32434
Summary: jffs2 is slow. The thread has discussion of various options to speed up boot time.
Best regards, gvb

Hi "conn intel" and Jerry,
Currently I am using following command to load kernel image from flash to ram,
bootcmd=nand read.jffs2 0x30007FC0 0x80000 0x153000;bootm 0x30007FC0
These are actually two commands - the first one copies data from NAND flash into RAM, but although the command name has a "jffs2" in it, this really has nothing to do with the JFFS2 filesystem. The command does not parse the NAND storage as a filesystem, but simply respects the out of band bad block markers in the NAND. See doc/README.nand:
nand read.jffs2 addr ofs|partition size Like `read', but the data for blocks that are marked bad is read as 0xff. This gives a readable JFFS2 image that can be processed by the JFFS2 commands such as ls and fsload.
In the "bootm" it seems like you actually use that data transferred as a Linux kernel. (How do you know the offset 0x80000 is correct btw.?) This kernel uses whatever is /dev/mtdblock2 as its rootfilesystem, which is jffs2. So the Linux kernel will need to parse JFFS2 and here the comments from the thread Jerry mentioned apply, but the "nand read.jffs2" does not suffer from any JFFS2 parsing.
If this is to slow for you, you have to at least tell us the platform you're working on and then maybe the maintainer of this platform can tell you whether he sees a chance to improve on pure nand read performance.
Cheers Detlev
participants (3)
-
conn intel
-
Detlev Zundel
-
Jerry Van Baren