This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Reflashing OMAP3530-GES3.1 NAND 256 MiB with external SD card

Other Parts Discussed in Thread: OMAP3530, SEGGER

Hi, 

I would need to restore the NAND of a OMAP3530 which has been completely erased and I need some help to restore it and make my board ready to use again.

This device is installed on a embedded board which runs Linux.

I used to reflash the NAND with this script from SD:

dir=$PWD
uboot=u-boot.bin
uimage=uImage.bin
rootfs=fs-image.tar.bz2

if [ -e $uimage ]; then
   echo "Erasing kernel partition ..."
   flash_eraseall /dev/mtd3
   echo "Writing kernel to NAND ..."
   nandwrite -p /dev/mtd3 $uimage
else
   echo "ERROR:  couldn't find kernel binary"
fi

if [ -e $rootfs ]; then
   umount /dev/mtdblock4

   echo "Erasing and formatting rootfs partition ..."
   flash_eraseall -j /dev/mtd4

   echo "Mounting rootfs partition ..."
   mkdir -p /media/mtdblock4
   mount -t jffs2 /dev/mtdblock4 /media/mtdblock4

   cd /media/mtdblock4
   tar -xjvf $dir/$rootfs
   sync

   echo "Loading Files ..."
   cp -Rf $dir/MYDEV/* .
   
   echo "Installation complete
   halt
else
   echo "ERROR:  couldn't find rootfs tarball"
fi

When I run u-boot, the built-in command I could use are these:

base
bdinfo
bdinfo
boot
bootd
bootm
bootp
cmp 
coninfo
cp 
crc32
echo    - echo args to console
editenv - edit environment variable
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
false   - do nothing, unsuccessfully
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
go      - start application at address 'addr'
help    - print command description/usage
i2c     - I2C sub-system
imxtract- extract a part of a multi-image
itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
ls      - list files in a directory (default /)
md      - memory display
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub-system
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nandecc - switch OMAP3 NAND ECC calculation algorithm
nboot   - boot from NAND device
nm      - memory modify (constant address)
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true    - do nothing, successfully
version - print monitor version

Now, when I plug the SD card, it seems that u-boot and the whole system is going to be installed, but on reboot nothing is reinstalled.

Is there a common script useful to properly re-flash the NAND of the device ? Alternatively, could I use the JTAG programmer from SEGGER?

Well, any suggestion is appreciated.

Thank you in advance.

Regards,

Simon