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
|

How do I completely reset?

seanmcne
This post was updated on .
My Shield had been running smooth as silk for 72 days, today I had to cut the power to replace a powerstrip and then it never came back.  

This is now showing when I hook up the CLI:

Entering main loop.
Hit any key to stop autoboot:  0
reading u-boot-octeon_sff7000.bin
Could not read u-boot-octeon_sff7000.bin, trying failsafe
Error: environment variable octeon_stage3_failsafe_bootloader is not set.



If I hold down the reset button for 30 seconds during boot - nothing happens it just returns to this - any thoughts?  I have no clue why this happened right now as the past two months have been wonderful.

Thanks,
Sean

PS: This site really must got to using SSL even if the forum freeware, if it doesn't use SSL it needs to be switched, this day in age everything must have support for SSL. Looking at the naggle or nabble support website the author/admin clearly doesn't get it, she or he keeps asking why SSL would be necessary and why it would be required - even saying they're not sure how they'd even accomplish supporting it (shocking!).  It looks cool but there must be another way...
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

seanmcne
Brutal, I found someone with a similar issue: https://webcache.googleusercontent.com/search?q=cache:h5U6KE5Hzi4J:https://packetinspector.org/archive/index.php%3Fthread-807.html+&cd=1&hl=en&ct=clnk&gl=us 

this is not looking good :(  anyone know how to completely replace the bootloader or analyze what's going on here?   Crap, would be kind of nice to have Marco or Garrett around about now.
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

orl1pcc
In reply to this post by seanmcne
I may have the same issue.  I was asked to get a console cable to analyze further, but never heard from support again.  Need some instructions on how to get Win10, Hyperterm, putty or kitty to communicate with shield using USB to RJ45 console cable.  Any help would be appreciated.  
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Turrican
This post was updated on .
If you're using a usb to serial adapter in conjunction with your serial cable then download these device drivers if they're not already installed. http://www.prolific.com.tw/US/ShowProduct.aspx?pcid=41&showlevel=0041-0041

Then
1) Download putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
2) Connect the console cable to the Shield.
3) In Putty, set the Serial Line to COM3 (may vary, check device manager in Windows) and Speed to 115200. Or if you're on OS X do: screen /dev/tty.usbserial 115200
4) When you initially connect you'll get a blank screen. Just hit the enter key a few times to get a connection.

That's the easy part :)

Running Bridge Mode
v1.51 SP1 + Hotfix Mar 9
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Roadrunnere42
In reply to this post by seanmcne
Hi
i have been helping Craig out with his shield not booting but have hit a brick wall with his,can get his up and running but the bootloader refuses to play on it's own,

what version of uboot are you running ( you see this when it starts to load,

For me to help you need teamviewer  which is free for personal use so i can remote in, a copy of putty.

Are you on Linux or windows.

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Roadrunnere42
In reply to this post by orl1pcc
Hi
If you need help with the booting process the only real way is to use teamviewer, this programs would allow me to log in remotely and try to sort out,  if you need help just ask.

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Hans
Administrator
Hi Roadrunner

are you able to make a full guide how to solve this issue?

I've ran into this problem before, about 9 months ago. At that time ITUS (Daniel) helped me restore my Shield.
Here is a part of the email conversation that I have collected:

1) UNTESTED_Stage2_repair.txt
2) UNTESTED_Stage3_repair.txt

However I've never done it myself so I cannot verify if all steps are included.

Here is my backup of the bootloaders:

Octboot2.bin: https://www.dropbox.com/s/jksr5uv1ba3w023/octboot2.bin?dl=1
u-boot-octeon_rhino_itus7x.bin: https://www.dropbox.com/s/rszzfb2kn5dfjzh/u-boot-octeon_rhino_itus7x.bin?dl=1
md5sum of both files:  https://www.dropbox.com/s/gittxfbuscg838m/md5sum.txt?dl=1
Using Shield Pro v1, Chaos Calmer, FW 1.51 SP1, Bridge Mode

2nd Shield as Sandbox, Chaos Calmer, FW 1.51 SP1 + hotfixes
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Roadrunnere42
Hans
it's a bit involve but will give it a try, but do you have the bootloader version 1.4

Download bootloader v1.4 from share drive, put it in tftp folder
u-boot-octeon_rhino_itus7x.bin

I have been help Craig out but his uboot is dated 2014 where as i have 2015 and they seem to boot differently and the u-boot-octeon_rhino_itus7x.bin files seems to be name slightly different on Craigs Shield

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Hans
Administrator
Roadrunnere42 wrote
Hans
it's a bit involve but will give it a try, but do you have the bootloader version 1.4

Download bootloader v1.4 from share drive, put it in tftp folder
u-boot-octeon_rhino_itus7x.bin

I have been help Craig out but his uboot is dated 2014 where as i have 2015 and they seem to boot differently and the u-boot-octeon_rhino_itus7x.bin files seems to be name slightly different on Craigs Shield

roadrunnere42
The u-boot version link in my email (https://www.dropbox.com/s/rszzfb2kn5dfjzh/u-boot-octeon_rhino_itus7x.bin?dl=1) is from May 27 2015

This is what i have in my boot mount /dev/mmcblk0p1:
-rwxr-xr-x    1 root     root      35862152 Nov 26 03:04 ItusbridgeImage
-rwxr-xr-x    1 root     root      58078856 Nov 26 03:02 ItusgatewayImage
-rwxr-xr-x    1 root     root      40859016 Nov 27 13:08 ItusrestoreImage
-rwxr-xr-x    1 root     root      58144392 Nov 26 03:01 ItusrouterImage
-rwxr-xr-x    1 root     root        470976 Mar 27  2015 octboot2.bak
-rwxr-xr-x    1 root     root        470976 Mar 27  2015 octboot2.bin
-rwxr-xr-x    1 root     root       1138416 May 27  2015 u-boot-octeon_rhino_itus7x.bin
Using Shield Pro v1, Chaos Calmer, FW 1.51 SP1, Bridge Mode

2nd Shield as Sandbox, Chaos Calmer, FW 1.51 SP1 + hotfixes
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

user8446
Administrator
Did everyone get the corrupted bootloader the same way just by doing a power cycle?
Running in bridge mode, 1.51 SP1 fw
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Roadrunnere42
My shield got corrupted when taking part in the beta testing and Itus set a replacement unit but didn't collect broken unit, but when Itus stop trade i decided to see if i could do it my self. Have learnt a lot about uboot which is the code that starts shield going then hands control over to linux.

I got my shield back up and working fine.
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Hans
Administrator
interesting. 

My Shield is a beta, still has sd ard and even pcmcia slot inside. It would be nice to add wifi card to it at one point but that requires me to be able to build images for shield too.

now i am using my sandbox to test scripts, for the next hotfix pack.




On Sunday, February 21, 2016, Roadrunnere42 [via Itus Networks Owners Forum] <[hidden email]> wrote:
My shield got corrupted when taking part in the beta testing and Itus set a replacement unit but didn't collect broken unit, but when Itus stop trade i decided to see if i could do it my self. Have learnt a lot about uboot which is the code that starts shield going then hands control over to linux.

I got my shield back up and working fine.


If you reply to this email, your message will be added to the discussion below:
http://itus.accessinnov.com/How-do-I-completely-reset-tp131p143.html
To start a new topic under General Discussion, email [email protected]
To unsubscribe from General Discussion, click here.
NAML


--

Hans 

Using Shield Pro v1, Chaos Calmer, FW 1.51 SP1, Bridge Mode

2nd Shield as Sandbox, Chaos Calmer, FW 1.51 SP1 + hotfixes
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

seanmcne
Would be interested in how others got theirs up and running too.  

Hans/Roadrunnere42, mine spits this out using the Console Cable (it's a shipping/production version with the silk screen ITUS logo and an SD Card slot with the tri mode switch, etc).  Here is the info it dumps out on boot up with the CLI.


U-Boot 2013.07 (Development build, svnversion: u-boot:exported, exec:) (Build time: Dec 01 2014 - 16:34:53)
...
Cavium Inc. OCTEON SDK version 3.1.0_p4, build 534: $Revision: 101360 $
...
OCTEON CN7020-AAP pass 1.2, Core clock: 1000 MHz, IO clock: 600 MHz, DDR clock: 667 MHz (1334 Mhz DDR)
...
reading u-boot-octeon_sff7000.bin
Could not read u-boot-octeon_sff7000.bin, trying failsafe
Error: environment variable octeon_stage3_failsafe_bootloader is not set.
Octeon sff7000# help


@Roadrunnere42 - It would be great to connect up here sometime next week (I'm a bit tied up this coming week). Do you want me to just PM you via this board?

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

Re: How do I completely reset?

Hans
Administrator
This is exactly the error I had initially:

ITUS Daniel wrote
from the sff7000 prompt... (this is the stage 2 bootloader)
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 dump 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, and enter the following commands..

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
this could help you solve this issue.
Using Shield Pro v1, Chaos Calmer, FW 1.51 SP1, Bridge Mode

2nd Shield as Sandbox, Chaos Calmer, FW 1.51 SP1 + hotfixes
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Roadrunnere42
In reply to this post by seanmcne
Right here a quick low-down on what i have found about the shield booting

when you power on the Shield it loads

OCTEON eMMC stage 1 bootloader

this then give control over to

OCTBOOT2BIN

which is stage 2  the build time  that my two Shields display are  build time Mar 2015 and both are on 1.51 sp1

U-Boot 2013.07 (Development build, svnversion: u-boot:exported, exec:) (Build time: Mar 27 2015 - 10:49:38)

All the trouble people seem to have are with builds dates 2014, i think this could either be firmware version RC1 or the beta firmware

stage 3 loads

u-boot-octeon_rhino_itus7x.bin

U-Boot 2013.07 (Development build, svnversion: u-boot:exported, exec:) (Build time: May 04 2015 - 15:37:16)

two things here
1. the name of stage 3 files seemed to have been change from u-boot-octeon_sff7000.bin to u-boot-octeon_rhino_itus7x.bin

2. the build time for this file is now May 2015

the good new is that both these files can be copied to the Shield. The Shield seemed to have trouble loading either the stage 2 file or stage3 file from the memory. The only way to correct this is with a console cable  I prefer a usb console cable.

Here is my start up screen stop just after loading stage3


OCTEON eMMC stage 1 bootloader

Partition: 1, start: 0x0000000000000800, size: 0x0000000000200000
Reading 470976 bytes.
................................................................................................................... Done.
Loaded OCTBOOT2BIN, size: 0x0000000000072FC0
Branching to stage 2 at: 0xFFFFFFFF81004000
Board TLV descriptor Read - RHino continues ... 2 board 0x4e26 major 1 minor 0, DDR HERTZ 0 hz
Rhino: early board init, mem_clk 0x29b ..

U-Boot 2013.07 (Development build, svnversion: u-boot:exported, exec:) (Build time: Mar 27 2015 - 10:49:38)

Initializing DRAM
U-Boot is not RAM-resident
Rhino: lookup_ddr_config_structure: cpu_id 890370 board_type 20006 ...
Rhino: cpu_id 0xd9602 board_type 0x4e26 major 0x1 minor 0x0  mask 1 ...
Initializing DDR, clock = 667000000hz, reference = 50000000hz
LMC0_DCLK_CNT: 0xffffffffffffffff
Measured DDR clock 666666654 Hz
Mem size in MBYTES: 1024
RHino: new Ram size 1024MiB (0x40000000)
Ram size 1024MiB (0x40000000)
Clearing memory from 0 to 1048576
Done clearing memory
CUST_PRIVATE_RHINO_ITUS7X board revision major:1, minor:0, serial #:
OCTEON CN7020-AAP pass 1.2, Core clock: 1000 MHz, IO clock: 600 MHz, DDR clock: 667 MHz (1334 Mhz DDR)
Base DRAM address used by u-boot: 0x4f804000, size: 0x7fc000
DRAM: 1 GiB
Clearing DRAM.....Clearing base address: 0x100000, size: 0xff00000, ub_base: 0x4f804000, ub_size: 0x7fc000
Stack: 0xc03f5c60
Done clearing memory, ub_base: 0x4f804000
.Clearing base address: 0x20000000, size: 0x30000000, ub_base: 0x4f804000, ub_size: 0x7fc000
Stack: 0xc03f5c60
Done clearing memory, ub_base: 0x4f804000
 done
Using default environment

MMC:   Octeon MMC/SD0: 1
Hit any key to stop autoboot:  0
reading u-boot-octeon_rhino_itus7x.bin
early_board_init: Early board init .................
Importing environment from RAM address 0x1000
RAM environment is 33 bytes

U-Boot 2013.07 (Development build, svnversion: u-boot:exported, exec:) (Build time: May 04 2015 - 15:37:16)
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

seanmcne
Thanks everyone, so after a little more investigation I have found that I basically have nothing left on my emmc, here is an example:


Octeon sff7000# fatls mmc 1
            updates/
            restore/

0 file(s), 2 dir(s)

Octeon sff7000# fatls mmc 1 updates/
            ./
            ../

0 file(s), 2 dir(s)

Octeon sff7000# fatls mmc 1 restore/
            ./
            ../
 35862152   bridge.elf
 58144392   router.elf
 58078856   gateway.elf

3 file(s), 2 dir(s)

Octeon sff7000#


I suspect I'll need to copy over the files (Unless they're contained with the elf's?).  It's a little nutty that a simple reboot/powercycle seems to have rendered the device empty/useless (unless maybe one of the final itus updates wound up in a bad state and some post install script wiped it out?).  Anyhow, would love to remediate this and I do have team viewer installed - but would be happy to run commands if someone can aid in throwing me a bone on how to copy the file and go from there.  Appreciate the help here folks - thx!
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Roadrunnere42
Hi seanmcne

What version were you running  RC or 1.51sp1?

I have just fixed orl1pcc Shield after many hours of work and learning, but this sounds the same , all files missing or deleted, i'm thinking that may be the Shield is trying to do a firmware upgrade  or some how the system restore script is being called which deletes all files except itusrestoreimage. I have found that if the restore script is run and a restart is done then the Shield has not files, but if the restore script is run and when it asks for a restart  you do a factory restore instead (power down , hold pin in for 30 seconds whilst powering back up ) the Shield boots up with files in the right place. The trouble is once files are missing you have to copy over the overlay folder and run  the restore script. I'm still learning what the Shield is doing on start-up, but there is a fail safe mode which is read only but is only available during loading bootstage3. if you need help sorting just ask but i'm away for 4 day as from today.

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

user8446
Administrator
Could this be related to doing a factory reset via the GUI instead of hardware via the reset button?

There's a bug mentioned here in #6:

http://itus.accessinnov.com/Hotfix-160210-td8.html




Running in bridge mode, 1.51 SP1 fw
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

Hans
Administrator
This post was updated on .
The current factory_reset secript has a major problem:

it DELETES the boot images without any check if the new updated 1.51SP1 actually exists

if [[ `df | grep -c overlay` == "1" ]]; then
        umount /overlay
fi
sleep 1
mkdir -p /factory_reset
sleep 1
mount /dev/mmcblk0p1 /factory_reset
sleep 1
cd /factory_reset
sleep 1
rm ItusrouterImage
sleep 5
rm ItusbridgeImage
sleep 5
rm ItusgatewayImage
sleep 5
cp ItusrestoreImage ItusrouterImage
sleep 10
cp ItusrestoreImage ItusgatewayImage
sleep 10
cp ItusrestoreImage ItusbridgeImage
sleep 10
cd /
sleep 1
umount /factory_reset
sleep 1
umount -a
sleep 1
reboot -f

So I made an update:
First of all if /tmp/ItusrestoreImage does not exist, this script will simply exit (stop) to run.
Second if it does exist (checked twice) then it will make a backup of the existing images before any update.
Third I am using hard folder references instead of relative. This prevents issues in case of starting this script outside the root.


# Script asumes that the ItusrestoreImage is located in the /tmp folder

# mounting folder for the boot device
factory_reset_folder='/tmp/factory_reset'


make_Imagebackup () {
#
#	function to create a backup of the current boot image to a sub-folder
#	does not run in case th
#
if [ -r '$factory_reset_folder/$ImageName']; then
	{
	echo "Creating backup of the $ImageName"
	mv '$factory_reset_folder/$ImageName' '$factory_reset_folder/backup'
	}
	else
	{
	echo "Unable to find $ImageName in $factory_reset_folder"	
	}
	sleep 5
}

update_Image () {
#
#	Updates boot image ONLY in case the ItusrouterImage exists in /tmp
#	ABORTS this script in case ItusrouterImage check fails.
#
if [ -r /tmp/ItusrouterImage ]; then
	{
	echo "Creating backup of the $ImageName"
	cp /tmp/ItusrouterImage '$factory_reset_folder/$ImageName'
	}
	else
	{
	echo "Replacement ItusrestoreImage does not exist in /tmp - ABORDING"
	exit 1
	}
	sleep 5
}

# check for the ItusrestoreImage
if [ ! -r '/tmp/ItusrouterImage' ]; then
	{
	echo "Replacement ItusrestoreImage does not exist in /tmp - ABORDING"
	exit 1
	}
	
#  Remove old mounts
if [[ `df | grep -c overlay` == "1" ]]; then
        umount /overlay
fi
sleep 1

mount /dev/mmcblk0p1 $factory_reset_folder

# Check for the backuip folder in the mounted partition
if [ ! -d '$factory_reset_folder/backup' ]; then
	{
	mkdir '$factory_reset_folder/backup'
	}

sleep 1
cd $factory_reset_folder
sleep 1

# Backup and updates the router image
ImageName='ItusrouterImage'
make_Imagebackup()
update_Image ()

# Backup and updates the bridge image
ImageName='ItusbridgeImage'
make_Imagebackup()
update_Image ()

# Backup and updates the gateway image
ImageName='ItusgatewayImage'
make_Imagebackup()
update_Image ()

# Backup and updates the restore image
ImageName='ItusrestoreImage'
make_Imagebackup()
update_Image ()

sleep 1
umount 'factory_reset_folder'
sleep 1
umount -a
sleep 1
reboot -f

Using Shield Pro v1, Chaos Calmer, FW 1.51 SP1, Bridge Mode

2nd Shield as Sandbox, Chaos Calmer, FW 1.51 SP1 + hotfixes
Reply | Threaded
Open this post in threaded view
|

Re: How do I completely reset?

seanmcne
In reply to this post by Roadrunnere42
@Roadrunnere42 - glad to hear you made progress!  I was on 1.51

Have you got some tips on how to:
a) source the overlay folder
b) copy the overlay folder using the console cable
c) source for the restore script
d) any more special tips or instructions?

@Hans - thanks for the script, Thanks!
12