NK.bin in Flash

Nov 15, 2009 at 9:19 AM

Hi Joel,

Thanks for putting all this effort in.

One question - have you figured out a way to flash NK.bin to the Beagleboard onboard flash? I'd like to try and boot without an SD card, but when I do "fatload mmc 0 80200000 nk.bin" in preparation for copying it to flash it just hangs...

Regards,
Mike

Nov 16, 2009 at 7:36 AM

Hi Mike,

To load NK.bin to NAND you will need to build with IMGFLASH=1.  Then load NK.bin via EBOOT.  IMGFLASH sets the ROMOFFSET value in config.bib, which in turn EBOOT uses to determine where to write the bin file.  I suspect you will want to format the Flash device prior to loading.

Once you run the fatload mmc command, you will have a copy of NK.bin in RAM.  This image is not formated to format the Flash driver is expecting.

Try loading via EBOOT.  Once that works then sort out XLDRNAND -> MLO and EBOOTNAND.nb0.

 

Joel

Nov 17, 2009 at 7:09 AM

Thanks Joel,

However, I'm not clear exactly what you mean with some of the comments:

> To load NK.bin to NAND you will need to build with IMGFLASH=1.

Yep - understood

> Then load NK.bin via EBOOT

Do you mean boot NK.bin from the SD card as per normal? Or is there some way to load NK.bin from the SD card using EBOOT and burn it to flash?

> IMGFLASH sets the ROMOFFSET value in config.bib, which in turn EBOOT uses to determine where to write the bin file.

While it's booting it from the SD card you mean?

> I suspect you will want to format the Flash device prior to loading.

If I understand correctly we're just booting of the SD card, so how will the image get burned to flash? Do I format the whole flash, or just a subset?

> Once you run the fatload mmc command, you will have a copy of NK.bin in RAM.

That's assuming we've booted to U-boot, not EBOOT - right? (as fatload is a U-boot command). As I mentioned, when I try "fatload mmc 0 80200000 nk.bin" it never finishes reading the file - just hangs. Any other (smaller) file works fine. My NK.bin file is 26MB, but the ram on the board is 256MB so it should fit - right?

> This image is not formated to format the Flash driver is expecting.

Sorry, I don't understand what this means...

> Try loading via EBOOT.

Do you mean booting, or is there some way in EBOOT to read the KN.bin from the SD card and burn it to flash? If so I can't seem to find it. If we're only booting, how do I transfer the image to flash?

>  Once that works then sort out XLDRNAND -> MLO and EBOOTNAND.nb0.

I assume that (once that works) that I have to set some flag to cause MLO to be created from XLDRNAND rather than from XLDRSD. What is that flag?

 

Finally, assuming that I get my head around all of the above, what flash addresses do I have to burn EBOOTNAND and NK.bin to?

Sorry if I'm being a bit of a dummy, but I'm sure that the answers will be useful to others.

 

Nov 17, 2009 at 8:14 AM

Hi Mike,

I just booted NK.bin from Flash.  I'll document the steps and answer your questions tomorrow evening, as I need to hit the hay right now.

Nov 18, 2009 at 5:22 AM

Hi Mike,

I updated the documentation on steps to flash NK.bin.  Run through it, get your bearings, then update your questions.

 

Cheers,

Joel