New IT forum Follow us on Twitter
17 May 2012, 03:53:20 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: DreamPlug tutorial in Linux Format issue 145!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to "factory reset"  (Read 1946 times)
TempTest
Newbie
*
Posts: 6


« on: 11 February 2011, 11:30:40 pm »

I have acquired a used GuruPlug Plus. The plug appears to boot and I can ssh into it (only possible if I connect using eth0 which must be connected during the power cycle).

I have limited prior linux experience and wish to play with the GuruPlug Plus as it would come new (so I can learn by following the wiki, etc).

I am unaware what the previous owner has even done to the plug but a number of their configurations linger and I believe it is easier (and for me, preferable) if I "factory reset", or whatever the equivalent of a Windows format would be me.

My research so far has shown there to be three components: U-Boot, Kernel and RootFS. Therefore I assume if I reflash all of these with a "stock" GuruPlug Plus file this will be sufficient.

Can somebody please explain, step by step, how to do this? And please link to the relevant files so I know where to get them from. I would like to reflash all of these files. If newer (but 100% better, stable, compatible, etc) versions of any of these files exist please link to these instead, where appropriate. I would be placing my entire trust in the method you suggest resetting the plug to a default configuration, so I know it can be a pain but I'd appreciate instructions as explicit as possible... Once I've fixed it once I will not worry in experimenting in future but I'd like to know I can go back to square one when necessary.

I have temporary access to the JTAG board and necessary cables, for a short period. Assuming I manage to "factory reset" the device I will order my own JTAG board for future use.

I acknowledge I am asking for a lot here, but please any full complete instructions of the stages requires to go to how the plug would be new would be so incredibly useful.

Thanks.
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #1 on: 12 February 2011, 09:31:14 am »

I haven't reflashed a Guruplug, but here are the instructions:

http://plugcomputer.org/plugwiki/index.php/Reflashing_images_on_the_GuruPlug
Logged
TempTest
Newbie
*
Posts: 6


« Reply #2 on: 12 February 2011, 10:02:53 am »

Hi,

I've already found that page before. The thing is it, at least to me, seems to assume a certain amount of prior knowledge... Knowledge which I do not have.

Indeed, I've tried to flash the U-Boot using this method before. I was unsuccessful, getting a message that I've seen on here before, whilst researching a solution. That is:

Quote
$ sudo ./runme.sh ./uboot.bin
 ****     Preparing environment variables file ...
 ****   Burning uboot and environment variables ... This will take few minutes ...
Open On-Chip Debugger 0.2.0-in-development (2009-05-17-10:32) svn:1800M


BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS


$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
2000 kHz
dcc downloads are enabled
Info : JTAG tap: feroceon.cpu tap/device found: 0xfc0000e3 (Manufacturer: 0x071, Part: 0xc000, Version: 0xf)
Error: JTAG tap: feroceon.cpu             got: 0xfc0000e3 (mfg: 0x071, part: 0xc000, ver: 0xf)
Error: JTAG tap: feroceon.cpu expected 1 of 1: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Error: trying to validate configured JTAG chain anyway...
Error: unknown EmbeddedICE version (comms ctrl: 0x00000008)
Error: unexpected Feroceon EICE version signature
Warn : no telnet port specified, using default port 4444
Warn : no gdb port specified, using default port 3333
Warn : no tcl port specified, using default port 6666
Error: unexpected Feroceon EICE version signature
Error: invalid mode value encountered
Error: cpsr contains invalid mode value - communication failure
Error: invalid mode value encountered
Error: cpsr contains invalid mode value - communication failure
Runtime error, file "./openocd/./board/guruplug.cfg", line 24:
   
 ****   openocd FAILED
 ****   Is the mini USB cable connected?
 ****   Try powering down, then replugging the Sheevaplug

I was hoping a better/easier option may be available, considering the plug is not bricked and so I can access everything.

Also, are all of the images in that wiki the actual ones from a "new" GuruPlug? Or updated versions? I'd prefer to use original ones if at all possible.

Finally, at the UBoot stage, the download on the wiki requires me to link to a UBoot file. Can you confirm if that file is within that tar or do I need to find a UBoot image elsewhere? If so, which file is it? I wonder if that is the problem I was having (not specifiying the image correctly).

Despite this, any more thorough information you can describe would be great. I'd love it if I could find a simple way of reverting everything to default. I know it is time consuming but it really would be of benefit to me.

Thanks.
Logged
Confusticated
New IT customer
Hero Member
*
Posts: 510


« Reply #3 on: 12 February 2011, 02:19:34 pm »

The issue you are having with openocd is most likely that of timing (it has already been answered here in the forum).
You need to understand how Linux works to know how to configure uboot, you can't afford to regard it separately.

I recommend you don't flash anything you don't need to. Check which uboot & kernel versions you are using and leave them alone if you can (if they are the original versions), if you don't know how to identify the versions you have, google is your friend (actually its not but it is a very useful tool nonetheless). That just leaves the root filesystem and the uboot variables.

As long as uboot is working, anything can be easily flashed from a USB HDD\memory stick at the uboot prompt (also covered here in the forum), all you have to do is read it (yes all of it, if you want to understand).

Marcus, do New IT offer an unbricking service ?
Logged

Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!
TempTest
Newbie
*
Posts: 6


« Reply #4 on: 12 February 2011, 02:44:05 pm »

Thanks for your reply.

I've just tried to find the version of uboot and kernel.

For uboot: Typing "version" at the Marvel prompt says:

Quote
U-Boot 2009.11-rc1-00602-g28a9c09-dirty (Feb 09 2010 - 18:15:21)
Marvell-Plug2L

For kernel: Letting the plug boot and typing "uname -r" says:

Quote
2.6.32-00007-g56678ec

Or typing "cat /proc/version" or "dmesg | grep Linux" says:

Quote
Linux version 2.6.32-00007-g56678ec (root@msi-linux-build.marvell.com) (gcc version 4.1.2 20070925 (Red Hat 4.1.2-33.fa1)) #1 PREEMPT Thu Dec 24 03:15:48 PST 2009

Based upon this which would you say needs reflashing?

Some questions aside; Is it possible that "uboot" could have been modified by the previous owner; by this I mean even if the version is correct is it possible that any other settings/options of it could be different from a new GuruPlug? Likewise for the kernel; even if this version is the same as a new GuruPlug is it possible that it "includes" any settings/options which are not default?

Thanks very much for your help. I am happy to flash as little as possible but want to ensure everything is back to factory default state.

In summary: Based on the included version details, what action would you recommend I take to return the GuruPlug Plus to its default state? Thanks! Smiley

Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #5 on: 12 February 2011, 02:53:22 pm »

Marcus, do New IT offer an unbricking service ?

Yes, we do.
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #6 on: 12 February 2011, 02:55:46 pm »

Thanks very much for your help. I am happy to flash as little as possible but want to ensure everything is back to factory default state.

In summary: Based on the included version details, what action would you recommend I take to return the GuruPlug Plus to its default state? Thanks! Smiley

My advice to you is to play and learn now, before returning the plug to its original state.. If you reset it first, I am sure you will tinker and change things, and then decide you want to reset it again.

Since playing now will teach you much about ... everything, take the opportunity to learn now, before attempting something that you don't understand. You will understand it better if you play with the plug for a week or two.
Logged
Confusticated
New IT customer
Hero Member
*
Posts: 510


« Reply #7 on: 12 February 2011, 07:19:13 pm »

Searching the forum for "U-Boot 2009" led me to this
Quote
Which suggests your U-Boot has not been updated despite the variance in the git mark (typo ? g28a9c09-dirty <> g28a9c08-dirty).
This is also the source of information for checking\setting your u-boot variables which may have been changed.

Your kernel is also original, so the only other action required is to reflash the original UBIFS root filesystem.
Although UBIFS is safeish, I suggest you research using 'flash' memory as a 'root filesystem', it may be prudent to use a replaceable USB memory stick or uSD card for heavy use if you want your plug to last.

NB. I second Markus's opinion.
Logged

Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!
TempTest
Newbie
*
Posts: 6


« Reply #8 on: 12 February 2011, 09:53:33 pm »

NewIT_Marcus, Confusticated,

Thank you both for your replies. Let me first elaborate on my reasons to factory reset - I do not want to appear to be ignoring your advice:

The plug is currently in set as per the previous owner. This means all sorts of things like it trying to connect to a wireless network on start up (meaning it takes longer to boot). This also means a number of things like the wireless access point do not behave as expected.

With limited linux experience I'd prefer to start with a clean slate so that things such as wiki articles will not be conflicted by any possible settings that remain from the previous user.

In addition (as has always been my way) I find it much more comfortable to play/learn/experiment knowing that if I do bugger up I can rectify any problems. Indeed, learning to reflash the device, as far as I am concerned, is one of the first and most important things to learn. With this under my belt I will no longer be concerned by the risk of having to do it again (and will freely experiment).

So, onward with the questions:

Confusticated, I did type the uboot version by hand so it is certainly possible that I may have made a typing error. I will check this at the next available opportunity - I had access to a JTAG board this afternoon but have returned it for the moment (and thus cannot compare at the moment). As far as I am aware (though please tell me otherwise) I cannot find details of the uboot version without the JTAG board (to access the serial console, Marvell prompt, using UART).

Additionally, this may be a silly question but just to check: Is it possible to configure/modify the uboot and/or kernel whilst it remains the same version number? (For example if I looked at the version of the file system it may be the same as stock but has the users settings; is this possible with uboot and kernel?). I will check the env vars for uboot. Does an equivalency exist for kernel?

Finally, at this stage it would appear only a reflash of the RootFS is necessary. Can anybody confirm that RootFS image on the Plug Computer wiki (http://plugcomputer.org/plugwiki/index.php/Reflashing_images_on_the_GuruPlug) is the stock image? I have read that it is important that the kernel and RootFS match. From what you have suggested the kernel is stock, therefore I am keen to ensure that the RootFS I use is also so.

Finally, I'd like to thank you for your help so far. I am not simply using this forum as an alternative to Google, but in addition to it. Whilst I am new I appreciate comments relating to my specific situation, if only to corroborate the findings from a Google search if nothing else.

Thank you.

PS:

Marcus, do New IT offer an unbricking service ?

Yes, we do.


How much do you charge for this service? More specifically (for future reference) what are your charges for returning a plug to its defaults (when not bricked) if these differ in any way.
Logged
Confusticated
New IT customer
Hero Member
*
Posts: 510


« Reply #9 on: 12 February 2011, 10:42:16 pm »

Quote
do not behave as expected...
This is exactly the point, you need to learn how to resolve these issues (and to avoid creating them yourself), trying to fix a squiffed plug will teach you more than using a faultless one.
You cannot learn Linux from a Wiki, copying does not necessarily convey understanding.

Quote
though please tell me otherwise...
'egrep -ao "U-Boot [[:alnum:]].*" /dev/mtd0ro'

Quote
Is it possible to configure/modify the uboot...
With U-Boot you must always note the version compile time, there is known to be at least two variations that have the same version number.
Quote
and/or kernel...
Yes it is possible (to change the string with a hex editor and reflash it back), but unlikely anybody would go to such effort.

Quote
Can anybody confirm that RootFS image..
I leave that as an exercise for you to figure out yourself
Logged

Advocatus Diaboli - My agenda is not to give you the answer, but to guide your thoughts so you derive it for yourself!
TempTest
Newbie
*
Posts: 6


« Reply #10 on: 12 February 2011, 11:35:40 pm »

Quote
do not behave as expected...
This is exactly the point, you need to learn how to resolve these issues (and to avoid creating them yourself), trying to fix a squiffed plug will teach you more than using a faultless one.
You cannot learn Linux from a Wiki, copying does not necessarily convey understanding.

But I have no idea how the user managed to do such a thing. I am fully happy with fixing faults, but when I do not know anything it's best to start with a blank canvas and fix my own mistakes. I am aware Windows is a much lesser beast, but none-the-less when I got my first PC I'd be better with a "clean" machine. When it broke, I knew what I'd done to do such a thing and happily learnt my lesson by fixing it. Had I, at the time of my first PC with no previous computing knowledge, had to navigate the registry (one example of something that may not be "simple" or "obvious" to a beginner) I'd not know where to start and likely make it worse.

I appreciate what you're saying here but please understand that leaving it as it is, regardless of what I'm told to contrary, is not something I'm willing to do. Give me a working Plug, I'll screw it up - Sure. But I'll also fix it. Give me a non-working Plug and I do not know where to begin; not least because I've not seen how it *should* behave as a normal/working system.

I'm not sure how many different ways I can try to explain this, anymore. I want to learn to use the device. For me personally (and I can promise this to be the case) I'll learn much better having a clean plug to start with.

Quote
though please tell me otherwise...
'egrep -ao "U-Boot [[:alnum:]].*" /dev/mtd0ro'

Thank you. I will certainly try this! Smiley

Quote
Is it possible to configure/modify the uboot...
With U-Boot you must always note the version compile time, there is known to be at least two variations that have the same version number.

Can you advise what the difference between these variations are? And how the two differences are likely to affect me?

Quote
and/or kernel...
Yes it is possible (to change the string with a hex editor and reflash it back), but unlikely anybody would go to such effort.

That makes sense, thanks.

Quote
Can anybody confirm that RootFS image..
I leave that as an exercise for you to figure out yourself

I'd appreciate it if you could help on this one; it being the one of (if not the) main reason for this thread - to find configurations that will work together (namely the defaults). Essentially this thread has only changed from the original question in that you have (which I am thankful for) demonstrated that the uboot and kernel are already default. Therefore, I still wish to use the default RootFS to complete this process.

If you still wish to maintain your stance I'd appreciate it if you could give any ideas as to how one could go about "figuring this out", rather than just trying and hoping? Where would I need to look? And how would I know (in advance of actually flashing it) that it is default and/or compatible?
Logged
TempTest
Newbie
*
Posts: 6


« Reply #11 on: 14 February 2011, 06:06:28 pm »

Quote
though please tell me otherwise...
'egrep -ao "U-Boot [[:alnum:]].*" /dev/mtd0ro'

Thank you. I will certainly try this! Smiley

I've just tried the command you recommended and get the output:

Quote
U-Boot 2009.11-rc1-00602-g28a9c08-dirty (Feb 09 2010 - 18:15:21)

This is the same as you suggested (meaning I did get a typo previously). This also matches the link you posted and hence I think it is clearly the stock U-Boot. Smiley

So, otherwise - Can you advise if the image on the plug computer wiki is a "stock" RootFS that will work with this U-Boot/Kernel?

Thanks a lot! Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!