ALERT: Any wrong command in u-boot mode may brick your device forever !!
I recovered my bricked Javelin! But it's a very hard job, I have a good expertize in Linux, so some tasks are easier for me. My Javelin have a little part nand flash corrupted. If you have a bricked Javelin, its possible do you have an another part of corrupted flash memory and this method maybe doesn't work.
1) You will need a Ubuntu with NFS server package, fix the Ubuntu IP address like 192.168.0.51 and run in a terminal or console:
Code:
sudo bash
apt-get -y install nfs-server
ifconfig eth0 192.168.0.51
echo "/tmp *(rw,sync,fsid=0,crossmnt,no_subtree_check,insecure)" >>/etc/exports
/etc/init.d/nfs-kernel-server restart
2) Attach serial adapter into Javelin, and using u-boot, boot Javelin in safemode:
Code:
=> run ramargs addramdisk addtty mtdargs; setenv bootargs ${bootargs} ${mtdparts} init=/bin/sh
=> nand read.e 1200000 safe-k 300000;nand read.e 1b00000 safe-r 800000;nand read.e 1a00000 dtb 3000;bootm 1200000 1b00000 1a00000
3) You will see the Javelin Linux Terminal, and need edit a file using vi editor program. (some tips here: http://www.eng.hawaii.edu/Tutor/vi.html
Code:
# configure the network and start nfs client and http daemon:
mount -a
ifconfig eth0 192.168.0.52
/etc/init.d/loopback start
/etc/init.d/netbase restart
/etc/init.d/httpd start
# create a temporary dir via NFS to upgrade Javelin:
mkdir /safetmp
mount -t nfs 192.168.0.51:/tmp /safetmp
# Edit the upgrade program:
vi /promise/util/upgrade.pl
Do you need to find the theses lines:
Code:
system("/bin/mkdir $safetmp");
system("/bin/mount /dev/ram1 $safetmp");
And delete both.
Access http://192.168.0.52 with your browser and upload the upgrade file. Wait a some minutes and cross your fingers.
It's possible to boot Javelin use the rootfs or kernel from a USB flash drive, but you will need to know a little of Linux commands to do made this. Create a primary partition in your flash drive and format then as EXT2 filesystem, mount the partition and create a directory named images, copy rootfs-p file as uImage and kernel-p as kernel inside this directory:
-rw-r--r-- 1 root root 3709049 Mar 22 22:47 ./images/rootfs
-rw-r--r-- 1 root root 2339608 Mar 23 01:03 ./images/kernel
Boot Javelin in the u-boot 'mode', and type "run extboot" to start a boot using external rootfs. To start in shell mode, use this:
Code:
run enable_ext;run ramargs addtty;setenv bootargs ${bootargs} init=/bin/sh ;nand read.e 1200000 kernel 300000;run load_ext_rootfs;nand read.e 1a00000 dtb 3000;bootm 1200000 1b00000 1a00000
Run the following command to boot using a external kernel and rootfs:
Code:
run enable_ext;run ramargs addtty;echo Load kernel from external storage...;ext2load $ext_storage 0:1 1200000 images/kernel;run load_ext_rootfs;nand read.e 1a00000 dtb 3000;bootm 1200000 1b00000 1a00000
I used this command in u-boot mode, to see the "bad blocks" of Nand flash, type "=> nand bad", I saw some bad blocks:
Device 0 bad blocks:
01a00000
038c0000
048c0000
04d20000
U-boot Manual: http://www.denx.de/wiki/DULG/Manual
Remember: Any wrong command in u-boot mode may brick your device forever !!
Reedited: I revised some steps.