Katu, thanks for your work on the recipe. Do you mind sending meta-gumstix-extras a pull request for this? 

Thanks,

Adam


On Thu, Mar 20, 2014 at 4:40 AM, Katu Txakur <katutxakurra@gmail.com> wrote:
Hi,

I made a recipe to flash an image to nand. It includes a systemd service. Once you've create the SD card, put it in the gumstix, power on and wait until it powers off again. Take off the SD card and it should be ready to go from nand. 

I hope someone finds it useful.

Cheers,
Katu


2014-03-20 10:23 GMT+00:00 Scott Ellis <scott@jumpnowtek.com>:
> I also had to modify your script to add nandecc sw after loading uImage.

What version of u-boot? I'm was using 2014.01 and need nandecc hw for
u-boot and uImage. It might be a recent change.

> You have said that you were not using this method to flash the gumstix.
> You run on sd card or you are using the old kermit way ?

I'm using an SD card.

Here are the steps I'm using

I compile the script I posted before with mkimage

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d nand-flash.script
boot.scr

I put MLO, u-boot.img, uImage and boot.scr on the first (FAT) partition of
an SD card.

I put a minimal linux root filesystem on the second (EXT3) partition of the
SD card.

I also put the ubi file of the final root filesystem I want to copy to NAND
onto the root filesystem on the SD card. Some card copying scripts do all
the work.

I boot the SD card, it runs the boot.scr which handles writing the first
4 partitions of NAND and then boots the kernel into the minimal root
filesystem.

>From the linux command line I then run

ubiformat -y /dev/mtd4 -f <rootfs.ubi>

That step could be automated with a startup script. TODO.

I'm using ubiformat for the rootfs based on this

http://www.linux-mtd.infradead.org/faq/ubifs.html#L_free_space_fixup

"Note that ubiformat is still the preferred flashing method if the
 image is not being flashed for the first time, since it preserves
 existing erase counters (while using nandwrite or its equivalent
 does not)."

I'm no expert on using NAND, it's always been SD cards on Gumstix
for me. Open to suggestions.




--
View this message in context: http://gumstix.8.x6.nabble.com/flashing-u-boot-to-overo-from-linux-tp4968782p4968963.html

Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users