Re: How do I completely reset?
Posted by Roadrunnere42 on Mar 03, 2016; 10:31pm
URL: https://itus.accessinnov.com/How-do-I-completely-reset-tp131p266.html
Hi
These are the notes that i have been putting together whilst learning about how the Shield boots, in your case i would suggest getting bootloader 3 working, so it loads into linux thencopy over the new reset script modified by Hans, then run script. don't reboot but do a factory restart instead. Any problems I can use teamviewer to sort out. Make sure you have version 1.51 sp1 u-boot-octeon_rhino_itx7x.bin and ItusrestoreImage
Shield Boot Problem
Start process
bootloader 1
bootloader 2 -octboot2,bin on fat mmc 1
bootloader 3 u-boot-octeon_rhino_itx7x.bin
Programs needed
Windows
1. terterm (set to comms port of serial cable, speed 115200 )
2. extra putty
3. winscp
4. solarwind or tftpd32
5. openssh
Shield stops at bootloader stage 2
from the sff7000 prompt... (this is the stage 2 bootloader)
type
setenv octeon_stage3_bootloader u-boot-octeon_rhino_itux7x.bin_bak
bootstage3
From the cust_private_rhino_itus7x(ram) prompt... (this is stage 3 bootloader)
fatls mmc 1
this will list the boot partition. Look for the backup of your router image,you should have something named ItusrouterImage or vmlinux.64
find the image you want to load.
Type
fatload mmc 1 $(loadaddr) FILENAME
bootoctlinux $(loadaddr) mem=0 numcores=2
This should load the desired firmware into ram, then execute it. You'll want a 'router' image because that sets up a LAN with DHCP server making fixing / upgrading a little easier.
Once you get into Linux, you can mount the boot partition and clean up the files.
For example, you know the backup is good, so you can do something like this...
mount /dev/mmcblk0p1 /overlay
cd /overlay
cp backup_filename correct_filename
cd ..
umount /overlay
reboot -f
Alternative if bootloader 3 fails
Shield stops at boot-loader stage3
power on shield and at prompt type
setenv loadaddr 0x400000
fatls mmc 1
loadb (this will set shield into waiting to receive a file)
on terterm → file →transfer → Kermit → select file which is u-boot-octeon_rhino_itx7x.bin
After transfer is complete type
fatls mmc 1 (this lists the contents of the mmc which should be something like)
ItusrestoreIamge
ItusrouterImage
ItusgatewayImage
ItusbridgeImage
octboot2.bin
restore/
u-boot-octeon_rhino_itx7x.bin
updates/
backup/
May have to enable ssh on Shield
type
cd /etc/config
vi is a text editor google command before use
:i = insert
esc:wq = write changes then quit
type
vi dropbear
it should resemble the following
config dropbear
option Port '22'
option PasswordAuth 'on'
option GatewayPorts 'on'
May be in a different order
type dropbear restart
this will restart dropbear and should setup ssh
type
dhcp
This tells the shield to load the program that you just transferred over into memory. The shield will either load Linux up to the point of Snoopy sitting on his hutch or will stop, complaining at no fat partition.
Make sure the Shield is wired up correctly and in router mode.
Type
dhcp (this should obtain an ip address)
Next the network setting need setting
Type
setenv gatewayip x.x.x.x
setenv serverip x.x.x.x (set to same ip address as computer thats got solarwind on)
setenv netmask 255.255.255.0
type
printenv (this lists the environment variables that's uboot is holding)
Now test to see if both computer and Shield are pingable
type
ping x.x.x.x
ping from shield to computer that got your tftp server and from tftp server back to shield, if this does not work you have to sort out before you proceed.
Set-up solarwind for tftp and create folder containing the boot image ItusrouterImage.
Turn windows firewall off at it will interfere
Type
tftp ItusrouterImage ( this will copy file
type
bootoctlinux $(loadaddr) numcores=2 mem=0
Check that you can ping from and to the Shield, if you cant sort before continuing. If you can ping from Shield to computer but not from computer to shield you can setup a ssh server on the windows machine. This will allow the shield to pull the files from the computer.
If ping work fine then now you can use wincp set to scp mode.
On the Shield openssh
type
mount /dev/mmcblk0p1 /overlay
cd /overlay
copy all files over
cd ..
umount /overlay
mount mmcb0k1 /overlay
umount /overlay
run update script modified to get folder from dropbox
run fw_upgrade three times or will not word
If you can't ping the computer from the Shield you can reverse ssh, which tell the Shield to get files from computer and copy then to the Shield, if using windows then you have to install a ssh server I use openssh. I have had good success runing the reset script which has been modified by Han as there was a major scripting error in the orginal (/etc/itus/factory_reset.sh)copy new file over, run and then do a factory pin reset
roadrunnere42