[U-Boot] tftp not working for larger rootfs image

Hi All,
I am using Freescale's iMX51 based custom board with NAND flash size of 128MB. My root file system image size happens to be 75MB. I have DDR RAM of 128MB. My DDR Start Address is 0x9000_0000. I am trying to load my root file system to 0x9080_0000.(8MB after the starting location). But when i execute the tftp command, it loads some amount after that it hangs up. U-Boot> tftp 0x90800000 rootfs.jffs2
1. How much memory does the u-boot requires? Is 8MB enough?
2. Since I have 128MB of RAM, I should be able to load 120MB of image file. Why does it hangs up?
3. I tried to write the byte data to 0x97ff_ffff (the very last location of my RAM). It is working U-Boot > md.b 0x97ffffff 1 97ffffff: 04 . U-Boot > mm.b 0x97ffffff 97ffffff: 04 ? 32 U-Boot > md.b 0x97ffffff 1 97ffffff: 32 .
Now I tried to write the data to the next locations. I expected it to hang up. but it writes. Then i read the starting locations. But the data was written to there. Why these behavior? Is this behavior is correct? Is there anything wrong with my DDR Initialization? U-Boot > mm.b 0x97ffffff 97ffffff: 04 ? 32 98000000: 09 ? 32 98000001: 00 ? 21 98000002: 0c ? 12 98000003: 00 ? 12 98000004: 08 ? U-Boot > md.b 0x90000000 4 90000000: 32 21 12 12 2!..
A reply would be greatly appreciated.
Thanks in advance.
Thanks & Regards, Navaneethan P

--- On Mon, 5/10/10, Navaneethan P Navaneethan.P@Lntemsys.com wrote:
From: Navaneethan P Navaneethan.P@Lntemsys.com Subject: [U-Boot] tftp not working for larger rootfs image To: "u-boot@lists.denx.de" u-boot@lists.denx.de Date: Monday, May 10, 2010, 12:11 PM Hi All,
I am using Freescale's iMX51 based custom board with NAND flash size of 128MB. My root file system image size happens to be 75MB. I have DDR RAM of 128MB. My DDR Start Address is 0x9000_0000. I am trying to load my root file system to 0x9080_0000.(8MB after the starting location). But when i execute the tftp command, it loads some amount after that it hangs up. U-Boot> tftp 0x90800000 rootfs.jffs2
...
You could flash your rootfs.jffs2 directly to NAND and mount it from there, or if you have access to the FEC you could mount your rootfs via NFS.
Can't you use one of these approaches instead?
Regards,
Fabio Estevam

Thanks for reply...!
You could flash your rootfs.jffs2 directly to NAND and mount it from
there, No idea how to do it. Is there any way, I can directly load the data to NAND through tftp or any other command?
or if you have access to the FEC you could mount your rootfs via NFS.
I have tried boot to linux, and i am using nandwrite utility to flash the root file system. There also it hangs up after some time. nandwrite writes from offset 0 to 2880000. Then it gives "Unable to handle kernel paging request at virtual address 01000000" error (kernel panic).
Any help would be appreciated.
Thanks & Regards, Navaneethan P
Fabio Estevam fabioestevam@yahoo.com 05/10/2010 08:52 PM
To "u-boot@lists.denx.de" u-boot@lists.denx.de, Navaneethan P Navaneethan.P@Lntemsys.com cc
Subject Re: [U-Boot] tftp not working for larger rootfs image
--- On Mon, 5/10/10, Navaneethan P Navaneethan.P@Lntemsys.com wrote:
From: Navaneethan P Navaneethan.P@Lntemsys.com Subject: [U-Boot] tftp not working for larger rootfs image To: "u-boot@lists.denx.de" u-boot@lists.denx.de Date: Monday, May 10, 2010, 12:11 PM Hi All,
I am using Freescale's iMX51 based custom board with NAND flash size of 128MB. My root file system image size happens to be 75MB. I have DDR RAM of 128MB. My DDR Start Address is 0x9000_0000. I am trying to load my root file system to 0x9080_0000.(8MB after the starting location). But when i execute the tftp command, it loads some amount after that it hangs up. U-Boot> tftp 0x90800000 rootfs.jffs2
...
You could flash your rootfs.jffs2 directly to NAND and mount it from there, or if you have access to the FEC you could mount your rootfs via NFS.
Can't you use one of these approaches instead?
Regards,
Fabio Estevam

Dear Navaneethan P,
In message OF6CFF30FC.3B42CC59-ON6525771F.005C0640-6525771F.005CEEE2@lntemsys.com you wrote:
You could flash your rootfs.jffs2 directly to NAND and mount it from
there, No idea how to do it. Is there any way, I can directly load the data to NAND through tftp or any other command?
Yes, there is - using an appropriate JTAG debugger for example, or using Linux or another OS of your choice.
or if you have access to the FEC you could mount your rootfs via NFS.
I have tried boot to linux, and i am using nandwrite utility to flash the root file system. There also it hangs up after some time.
Ah, now this is interesting. Are you sure your memory is really cionfigured correctly (and is there really as much RAM as you believe there is)?
nandwrite writes from offset 0 to 2880000. Then it gives "Unable to handle kernel paging request at virtual address 01000000" error (kernel panic).
Any help would be appreciated.
We cannot help you with custom hardware and unknown code - that's a really bad combination.
Best regards,
Wolfgang Denk

Dear Navaneethan P,
In message OFC0F5B214.FB6727D8-ON6525771F.0051D939-6525771F.00535BA6@lntemsys.com you wrote:
I am using Freescale's iMX51 based custom board with NAND flash size of 128MB.
This code is not in mainline, so how should we able to know where or how you (mis)configured your system?
My root file system image size happens to be 75MB. I have DDR RAM of 128MB. My DDR Start Address is 0x9000_0000. I am trying to load my root file system to 0x9080_0000.(8MB after the starting location). But when i execute the tftp command, it loads some amount after that it hangs up.
That's not really a surprise on ARM, if the system configuration does not match the hardware.
- How much memory does the u-boot requires? Is 8MB enough?
U-Boot needs only a few 100 kB for itself; 1 MB should be more than enough for most configurations.
- Since I have 128MB of RAM, I should be able to load 120MB of image
file. Why does it hangs up?
Maybe you misconfigured U-Boot so the U-Boot image sits right in the middle of your RAM?
Why these behavior? Is this behavior is correct? Is there anything wrong with my DDR Initialization?
You don't provide any information about where your code comes from, or how you configured it, so it's difficult to make even educated guesses.
How did you configure TEXT_BASE?
Best regards,
Wolfgang Denk
participants (3)
-
Fabio Estevam
-
Navaneethan P
-
Wolfgang Denk