Documentation:NGW/Newbie/boot from flash
From AVRFreaks Wiki
[edit] Howto: Boot from Flash
There are several reasons you may need to reset your board to boot from flash -
1) You screwed up following the directions to boot from SD ;]
2) your SD card is corrupt
3) you just want it back the way it came
[edit] Procedure
If you've done nothing with your uBoot so far, I'd suggest writing down your configuration.
printenv
Write down the details and save 'em for whenever you might need them. When I messed up the commands in Uboot, I was lucky a friend of mine had one as well and gave me the data I needed to set it back.
It's actually very simple to put it back if all you did was try to follow the wiki on booting from an SD card.
Familiarize yourself with entering uBoot and get to the uBoot prompt.
Here is the code
Uboot> askenv bootcmd Please enter 'bootcmd':fsload;bootm Uboot> set bootargs 'console=ttyS0 root=/dev/mtdblock1 rootfstype=jffs2' Uboot> saveenv Uboot> boot
Note there is no '=' (equal sign) between set bootargs and 'console...' - when you do the 'printenv' command the output will show you with an equal sign. If you put the symbol in, it won't work.
This of course assumes your flash filesystem is intact. Also, if you had changed any other variables, you may have to reset those as well.
Hope that helps. It's a 30 second operation that is impossible without a little info!
-- technicavolous, 30 August 2008
For what it's worth, I found that the above bootcmd was not quite enough, resulting in a the following complaint when booting:
### JFFS2 loading 'uImage' to 0x10400000 find_inode failed for name=uImage load: Failed to find inode ### JFFS2 LOAD ERROR<0> for uImage! ## Booting image at 10400000 ... Bad Magic Number
When I changed the bootcmd to 'fsload boot/uImage; bootm', the my newly-flashed system booted correctly. --KerwoodDerby 16:28, 10 September 2008 (UTC)
