How do I completely reset?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Roadrunnere42
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
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

seanmcne
Thanks RoadRunnere24 this was helpful, using TeraTerm I can transfer the file (which is great).  However, even after transferring the file, it's not being written anywhere - here is an output you can see i set the env var, then do a fatls on mmc 1, I then transfer the file using Kermit and it prints out the transfer details - but when running fatls mmc 1 again - nothing.  Any thoughts as to what would cause this?


Octeon sff7000# setenv loadaddr 0x400000
Octeon sff7000# fatls mmc 1
            updates/
            restore/

0 file(s), 2 dir(s)

Octeon sff7000# loadb
## Ready for binary (kermit) download to 0x00400000 at 115200 bps...
## Total Size      = 0x00115ef0 = 1138416 Bytes
## Start Addr      = 0x00400000
Octeon sff7000# fatls mmc 1
            updates/
            restore/

0 file(s), 2 dir(s)
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Roadrunnere42
Hi
Forgot to add, once the file is transferred it's only in memory and to have to type go 0x400000  to run the file.

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

breda
Hi, trying to run the http://itus.accessinnov.com/file/n10/Upgrade_RC_to_SP1.txt  here is my SSH


root@Shield:~# sh /tmp/Upgrade_RC_to_SP1.txt
sh: can't open '/tmp/Upgrade_RC_to_SP1.txt'
root@Shield:~# cd/ tmp
-ash: cd/: not found
root@Shield:~# sh /tmp/Upgrade_RC_to_SP1.txt
sh: can't open '/tmp/Upgrade_RC_to_SP1.txt'
root@Shield:~# wget /tmp/Upgrade_RC_to_SP1.sh http://itus.accessinnov.com/file/n
10/Upgrade_RC_to_SP1.txt
/tmp/Upgrade_RC_to_SP1.sh: Scheme missing.
--2016-04-29 18:14:59--  http://itus.accessinnov.com/file/n10/Upgrade_RC_to_SP1.txt
Resolving itus.accessinnov.com... 104.28.28.59, 104.28.29.59
Connecting to itus.accessinnov.com|104.28.28.59|:80... failed: Connection timed out.
Connecting to itus.accessinnov.com|104.28.29.59|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: 'Upgrade_RC_to_SP1.txt'

Upgrade_RC_to_SP1.t     [ <=>                  ]   4.38K  --.-KB/s   in 0s    

2016-04-29 18:17:52 (66.3 MB/s) - 'Upgrade_RC_to_SP1.txt' saved [4481]

FINISHED --2016-04-29 18:17:52--
Total wall clock time: 2m 54s
Downloaded: 1 files, 4.4K in 0s (66.3 MB/s)
root@Shield:~# sh /tmp/Upgrade_RC_to_SP1.txt
sh: can't open '/tmp/Upgrade_RC_to_SP1.txt'
root@Shield:~# sh /tmp/Upgrade_RC_to_SP1.sh
sh: can't open '/tmp/Upgrade_RC_to_SP1.sh'
root@Shield:~#
CWS
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

CWS
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

breda
Thank you  CWS can you confirm that I should run sh /tmp/Upgrade_RC_to_SP1.sh  form root?
CWS
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

CWS
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

breda
Thanks CWS I got it to work


root@Shield:/tmp# sh /tmp/Upgrade_RC_to_SP1.sh
Fetching md5sums ....
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   220  100   220    0     0    271      0 --:--:-- --:--:-- --:--:--   960
Downloading updates ....
Downloading: ItusrestoreImage
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 38.9M  100 38.9M    0     0  5628k      0  0:00:07  0:00:07 --:--:-- 6479k
Validating downloads ....
Updating ....
FIRMWARE DOWNLOAD COMPLETE, PLEASE REBOOT YOUR SHIELD TO COMPLETE THE UPGRADE.
****THE UPGRADE PROCESS WILL TAKE ABOUT 10 MINUTES TO COMPLETE*****.
WARNING: DO NOT DISCONNECT POWER FROM YOUR SHIELD DURING THE UPGRADE
root@Shield:/tmp#
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

seanmcne
In reply to this post by Roadrunnere42
@Roadrunnere42 I had to step away from the shield for a couple of months and regain sanity :)

I've tried everything I can think of to get the darn thing to take a copy of the images so I can boot, but alas every time I reboot it just wipes out and I'm back to square zero :|

I'm really not sure what to do with it, short of offering to mail it off to someone so it isn't a waste.  Maybe i have a true hardware failure but I think the final firmware update that itus pushed out before turning off the lights accidentally wiped my image and I'm just not able to get it back up and running.  Now that it's been a few months is there somewhat of a known process to get it back up and running when the memory appears to be completely wiped?  

I hate to ask for much time from anyone but I'd be willing to try out a team viewer & putty session if possible - otherwise I think it's just going to sit on the shelf :(

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Turrican
12