Project

General

Profile

Booting StarterWare image from NAND

Added by Anonymous almost 12 years ago

Hi,
We currently have our MityArm based system (MityArm CPU module, custom board)booting
into uboot and then loading out StarterWare based image from the sd card by setting the
bootcmd to:

mmc rescan; fatload mmc 0 80000000 embedded.bin; go 80000000

We would like to get all this into the NAND for booting so that the SD card will
not be used. I've read the uboot description at (http://support.criticallink.com/
redmine/projects/armc8-platforms/wiki/Das_U-Boot_Port) and it seems the boot is broken
into MLO/x-loader/SPL(not sure why there are so many names), u-boot and kernel. We would
essentially be removing the kernel to put out binary in it's place. The question is
without a sd card, what do I modify to change the boot commands so that after booting
u-boot it loads our embedded.bin from NAND and jumps to it. Does the uboot need
modification or is it the MLO/SPL/x-loader?

Thanks,
John Conover


Replies (14)

RE: Booting StarterWare image from NAND - Added by Tim Iskander almost 12 years ago

John
booting from NAND is really just a change to your uboot environment settings. If you have a stock u-boot from Critical Link, you should see a number of different boot options.
booting from nand would be something like
nand read.i ${kloadaddr} ${nand_src_addr} ${nand_img_siz}; bootm ${kloadaddr}
where kloadaddr is the RAM address to load the image to (80000000 in you example)
nand_src_addr is the offset into NAND that you wrote the image and nand_image_size is the size of your image.

hope this helps...
cheers
/Tim

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Tim,
Yes we do have a plain u-boot from you. So if I understand this correctly the MLO, uboot and boot options
are already in NAND. So by putting our image into NAND (say at where the linix kernal would be) and then
modifying the boot options I should jump into our code after the 3 second u-boot delay?

Thanks,
John C

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Tim,

I'm in the process of putting our image into NAND and noticed that when I
save the ENV variables it prints out:

Environment size: 1704/65532 bytes
U-Boot# save
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x80000 -- 100% complete.
Writing to Nand... done
U-Boot#

I thought that 0x80000 was the beginning of uboot and the ENV starts
at 0x260000. Am I right or is there something I don't understand about
the uboot print message?

Thanks,
John Conover

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Hey Tim,

I'm still having issues getting the system to boot from NAND. I've pulled
the latest MLO and uboot images from your site and run the commands below. This should
be the MLO and uboot images into NAND, but when we boot it never seems to make it into
the MLO. Is there anything obvious that we are doing wrong?

Thanks,
John Conover

-------------------------------------------------------------------------------
U-Boot# nand erase 0 0x20000

NAND erase: device 0 offset 0x0, size 0x20000
Erasing at 0x0 -- 100% complete.
OK
U-Boot# nand erase 0x20000 0x20000

NAND erase: device 0 offset 0x20000, size 0x20000
Erasing at 0x20000 -- 100% complete.
OK
U-Boot# nand erase 0x40000 0x20000

NAND erase: device 0 offset 0x40000, size 0x20000
Erasing at 0x40000 -- 100% complete.
OK
U-Boot# nand erase 0x60000 0x20000

NAND erase: device 0 offset 0x60000, size 0x20000
Erasing at 0x60000 -- 100% complete.
OK
U-Boot# nand erase 0x80000 0x1E0000

NAND erase: device 0 offset 0x80000, size 0x1e0000
Erasing at 0x240000 -- 100% complete.
OK
U-Boot# mw.b 0x82000000 0xff 0x96c0
U-Boot# mmc rescan
U-Boot# fatload mmc 0 0x82000000 mlo
reading mlo

38512 bytes read
U-Boot# nand write.i 0x82000000 0 0x96c0

NAND write: device 0 offset 0x0, size 0x96c0
38592 bytes written: OK
U-Boot# nand write.i 0x82000000 0x20000 0x96c0

NAND write: device 0 offset 0x20000, size 0x96c0
38592 bytes written: OK
U-Boot# nand write.i 0x82000000 0x40000 0x96c0

NAND write: device 0 offset 0x40000, size 0x96c0
38592 bytes written: OK
U-Boot# nand write.i 0x82000000 0x60000 0x96c0

NAND write: device 0 offset 0x60000, size 0x96c0
38592 bytes written: OK
U-Boot# mw.b 0x82000000 0xff 0x5B23C
U-Boot# mmc rescan
U-Boot# fatload mmc 0 0x82000000 u-boot.img
reading u-boot.img

373308 bytes read
U-Boot# nand write.i 0x82000000 0x80000 0x5B23C

NAND write: device 0 offset 0x80000, size 0x5b23c
373308 bytes written: OK
U-Boot# CCCCCCCCCCCCCCCC
-------------------------------------------------------------------------------

RE: Booting StarterWare image from NAND - Added by Jonathan Cormier almost 12 years ago

When you say it doesn't make it into MLO does anything get printed to the console after power up?

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Just the "C"'s you see at the bottom of the serial log.

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Are we supposed to have a specific MLO for booting from NAND. We have seen it mentioned
that older versions would not boot in NAND, but we have pulled the latest. Do we
need a different one?

Thanks,
John Conover

RE: Booting StarterWare image from NAND - Added by Michael Williamson almost 12 years ago

Hi John,

Have you adjusted your boot-strap jumpers to select a mode the uses NAND? What option have you selected?

The "C"'s you are seeing is the ROM based boot code looking to be booted from the UART. This means (if the UART is not first in the list of devices for the given boot mode) that the ROM code didn't see an image it liked in any of the other boot media that are selected by the pin configuration.

I don't know off hand if the default settings for our board, which use MMC, will also use the NAND in the proper configuration. You may need to select a different jumper configuration.

The MLO and u-boot will read a register to determine which boot device the ROM boot loader used to get into the MLO and press on from there, so you should be able to use the standard MLO image.

-Mike

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Hey Mike,

Are jumper mode is 00100b so it is serial first, MMC and then NAND. Experimenting with your board we got your board to
boot from NAND but we had to remove the header from the MLO image (first 0x200 bytes.) We also noticed that your ECC bit is set
from NAND (SYSBOOT[9]) and your SYSBOOT[8] bit is set for a 16bit device (the part on your board is a bit.)
Can you tell us if it is required to remove the header from the MLO file and also why you used 11 binary for the
SYSBOOT 8 and 9 bits.

Thanks,
John Conover

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Mike,

Here is our update. We have our board booting from NAND with no changes to the MLO image. We changed the SYSBOOT[9] to ECC
and our system boots with no issues. Is there any TI documentation/notes that would explain exactly how this bit effects the
boot process?

Thanks,
John Conover

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Hey Tim,

We have referenced that page before, the problem is that there is no mention of ECC being "Required" for any
MLO image past a certain revision to boot. As with a lot of TI documentation on the 3359, certain things are not
very clear to me.

Thanks,
John Conover

RE: Booting StarterWare image from NAND - Added by Tim Iskander almost 12 years ago

John
My understanding (which may be confused!) is that it doesn't matter so much if you use SW or HW ECC, but that you flash the image using the same ECC mode that you use to read it. So if you are using HW ECC when you flash the image (using the nandecc command), then you need to have the HW ECC enabled (pin 9).

cheers
/Tim

RE: Booting StarterWare image from NAND - Added by Anonymous almost 12 years ago

Tim,

Now it makes sense. I never did get the u-boot to build so I did not know the process of making 
the MLO. Now that you say it I remember seeing that command used to build an image with ECC. So if
we had made a plain MLO (which does not seem like a good idea in NAND) it should have worked.
Thanks for the clarification.

John Conover

    (1-14/14)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)