Welcome! Log In Create A New Profile

Advanced

Factory restore Dockstar - Help needed

Posted by Zasshi 
Factory restore Dockstar - Help needed
September 03, 2024 12:18PM
Hello,
I own a couple of Dockstars that have been running linux for a few years, thanks to this forum tutorials and useful tools.


Now one of the Dockstars is bricked, and I'd like to restore it to the factory software (pogo...?) but I don't know how...
Moreover I can't find a guide with the needed software anymore.

So, could someone help me to restore the original firmware, please?

Thanks!
Re: Factory restore Dockstar - Help needed
September 07, 2024 09:53AM
Please help me... (╥﹏╥)



Edited 1 time(s). Last edit at 09/07/2024 09:54AM by Zasshi.
Re: Factory restore Dockstar - Help needed
September 08, 2024 03:15AM
The factory firmware is extremely obsolete and contains multiple vulnerabilities. If you desire something that can operate entirely from the NAND flash like the original firmware then I would recommend OpenWrt. You can find information about loading that firmware and links to the firmware at OpenWrt for Dockstar
Re: Factory restore Dockstar - Help needed
September 08, 2024 05:54AM
Thanks for the info!
I didn't know that OpenWrt was available on the Dockstar, maybe I'll convert my 2nd unit.

However I need the original software: Obsolescence and vulnerabilities aren't a problem, but software can't be Linux or Openwrt.
Re: Factory restore Dockstar - Help needed
September 08, 2024 11:24PM
Zasshi,

How "bricked" is your Dockstar? do you have serial console, and if you do when you power up do you see u-boot booting activities? Post the boot log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Factory restore Dockstar - Help needed
September 09, 2024 12:00PM
Hi,
I don't really know what happened, it wouldn't boot from the USB drive nor show any led activity.

But Un-bricking it is not a problem, it's just that I need to give this unit to a person that can't(won't) use Linux,
and so I'd like to restore the original software.

According to the tutorials I found, I should flash a file called "oob_softecc_kw", but I can't find it.

I have these files:

Env.cfg 856
rootfs-mtd2.img 28966912
uboot.mtd0.dockstar.original.kwb 524288
uImage-mtd1.img 3670016

can these be used to restore the original software?
Re: Factory restore Dockstar - Help needed
September 09, 2024 04:19PM
if there's no led activity at all during booting, you might need to use jtag to revive it first, then you can do anything, including flash it back to original.
Re: Factory restore Dockstar - Help needed
September 10, 2024 12:28AM
Zasshi Wrote:
> But Un-bricking it is not a problem, it's just
> that I need to give this unit to a person that
> can't(won't) use Linux,
> and so I'd like to restore the original
> software.

Do you realize the original firmware is Linux based also?

Ray
Re: Factory restore Dockstar - Help needed
September 10, 2024 12:29AM
There are 4 possible unbrick steps (1 is easiest).

1. Take your USB rootfs to another Linux and run e2fsck to check for errors and fix it. Bring it back to the dockstar and try booting it.

2. If you remmember what u-boot was installed, and what Debian rootfs is on the USB, (or what procedure you used to install), then we could try booting a rootfs that matches what this u-boot expects.

3. Connect serial console. Easy because the dockstar has serial header already populated (no soldering needed). Boot up and see how far it will get. If serial console show any booting activity then it can be unbricked easily.

4. When all 3 above failed. As David mentioned above, the last resort is: solder a JTAG header and use the rescue procedure in this Dockstar instruction or this Pogo E02 instruction.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Factory restore Dockstar - Help needed
September 10, 2024 02:07AM
Cont.

5. And then after logging to Debian, flash stock Dockstar firmware. It is also possible to do the flashing while in serial console, and at u-boot prompt.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/10/2024 02:21AM by bodhi.
Re: Factory restore Dockstar - Help needed
September 10, 2024 03:09PM
> 5. And then after logging to Debian, flash stock
> Dockstar firmware. It is also possible to do the
> flashing while in serial console, and at u-boot
> prompt.

But where do I get the stock Dockstar firmware? Is it one of the files I listed above?
Re: Factory restore Dockstar - Help needed
September 10, 2024 04:20PM
You have all the files already. Get a serial cable and you can start...
Re: Factory restore Dockstar - Help needed
September 14, 2024 10:20AM
Hi,
I managed to recover the "dead unit" bootloader and now I can boot to Linux.
How should I proceed to re-install the original firmware?

I found these steps on the Goflexnet Openwrt wiki:
#set goflex net ip
setenv ipaddr '192.168.1.1'
#set tftp-server ip
setenv serverip '192.168.1.2'

#original uImage (backuped before)
tftpboot 0x800000 uImage-mtd1-dump
nand erase 0x100000 0x400000
nand write.e 0x800000 0x100000 0x400000

#original rootfs (backuped before)
tftpboot 0x800000 rootfs-mtd2-dump
nand erase 0x500000 0x2000000
nand write.e 0x800000 0x500000 0x2000000

resetenv
reset

Hit any key to stop autoboot:  0

setenv bootcmd 'nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000'

#change value to your device
setenv ethaddr '00:10:75:26:3D:9F'
setenv cesvcid '5RFAJDGYNLPLDUHN4BWUWC3EKJ'
setenv ceserialno 'NA1Y0EG1'
setenv ceboardver 'DISCOVERY:0.1'
saveenv

reset

Is the above procedure correct?
What about the possibility to flash from Debian mentioned above?
Re: Factory restore Dockstar - Help needed
September 14, 2024 11:51AM
Zasshi,

> I managed to recover the "dead unit" bootloader
> and now I can boot to Linux.
> How should I proceed to re-install the original
> firmware?

You reinstall the original firmware in the steps below. The boot loader is apparently fine if you can do these steps.

>
> I found these steps on the Goflexnet Openwrt
> wiki:
>
> #set goflex net ip
> setenv ipaddr '192.168.1.1'
> #set tftp-server ip
> setenv serverip '192.168.1.2'
> 
> #original uImage (backuped before)
> tftpboot 0x800000 uImage-mtd1-dump
> nand erase 0x100000 0x400000
> nand write.e 0x800000 0x100000 0x400000
> 
> #original rootfs (backuped before)
> tftpboot 0x800000 rootfs-mtd2-dump
> nand erase 0x500000 0x2000000
> nand write.e 0x800000 0x500000 0x2000000
> 
> resetenv
> reset
> 
> Hit any key to stop autoboot:  0
> 
> setenv bootcmd 'nand read.e 0x800000 0x100000
> 0x300000; setenv bootargs $(console)
> $(bootargs_root); bootm 0x800000'
> 
> #change value to your device
> setenv ethaddr '00:10:75:26:3D:9F'
> setenv cesvcid '5RFAJDGYNLPLDUHN4BWUWC3EKJ'
> setenv ceserialno 'NA1Y0EG1'
> setenv ceboardver 'DISCOVERY:0.1'
> saveenv
> 
> reset
>
>
> Is the above procedure correct?

Yes.

Now after restoring FW as above, you should let it boot automatically into stock firmare. Just power up and observed serial console log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/14/2024 11:53AM by bodhi.
Re: Factory restore Dockstar - Help needed
September 14, 2024 02:20PM
Ok thanks!

But what should I put into these two strings?

>setenv cesvcid '5RFAJDGYNLPLDUHN4BWUWC3EKJ'
>setenv ceboardver 'DISCOVERY:0.1'

Edit:
The bootloader won't accept the 'resetenv' command.

I followed the steps up to the "setenv ethaddr", where I got a warning that the address in rom
was different than the address I was trying to write (label).

Anyway, after restarting the device all I am getting is a blinking led and these messages:

NAND read: device 0 offset 0x100000, size 0xff00000
size adjusted to 0xfd00000 (16 bad blocks)
Skipping bad block 0x00360000
Skipping bad block 0x009e0000
Skipping bad block 0x024c0000
Skipping bad block 0x02720000
Skipping bad block 0x04660000
Skipping bad block 0x046a0000
Skipping bad block 0x06580000
Skipping bad block 0x06d40000

Edit2:

Maybe the commands in these 3 lines should be put in one line:
> setenv bootcmd 'nand read.e 0x800000 0x100000
> 0x300000; setenv bootargs $(console)
> $(bootargs_root); bootm 0x800000'

After writing it like this:
setenv bootcmd 'nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000'

I'm getting this:
Uncompressing Linux.................. done, booting the kernel.

Then the unit freezes. No network no serial activity.



Edited 2 time(s). Last edit at 09/14/2024 03:50PM by Zasshi.
Re: Factory restore Dockstar - Help needed
September 16, 2024 12:18AM
Zasshi,

With serial console connected, power up and interrupt the count down. At u-boot prompt,
printenv
If you have saved the envs previously then go ahead, boot. If not, repeat what you done to prepare the envs for booting, and then boot.
boot

Post the entire serial console log here. Don't post excerpt, I need to see the whole log (what you entered at u-boot prompt, and the log should start from u-boot banner until the box stop booting).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Factory restore Dockstar - Help needed
September 16, 2024 12:01PM
Thanks for your help!
I don't have a saved copy of the original env, the one actually installed was used to boot Linux and it has a lot of stuff.
I would like to clear it, but the command 'resetenv' is not recognized.

I added (as per instructions) the line with the bootcmd and the network address, the rest I didn't touch:
Environment size: 2995/131068 bytes
DockStar> printenv bootcmd
bootcmd=nand read.e 0x800000 0x100000 0x300000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
DockStar> printenv bootargs
bootargs=$(console) $(bootargs_root)
DockStar> printenv ethaddr
ethaddr=00:xx:xx:xx:xx:xx
DockStar> printenv cesvcid
## Error: "cesvcid" not defined
DockStar> printenv ceserialno
## Error: "ceserialno" not defined
DockStar> printenv ceboardver
## Error: "ceboardver" not defined

I've tried to let the unit boot, but now it doesn't seem to boot anymore, this is the actual output:
SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x300000
Skipping bad block 0x00360000
 3145728 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.32.18-dockstar
   Created:      2011-02-17   8:10:10 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3236180 Bytes = 3.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
DockStar>
Re: Factory restore Dockstar - Help needed
September 16, 2024 10:48PM
Please do exactly what I asked above

Quote

With serial console connected, power up and interrupt the count down. At u-boot prompt,
printenv
If you have saved the envs previously then go ahead, boot. If not, repeat what you done to prepare the envs for booting, and then boot.
boot

Post the entire serial console log here. Don't post excerpt, I need to see the whole log (what you entered at u-boot prompt, and the log should start from u-boot banner until the box stop booting).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/16/2024 10:50PM by bodhi.
Re: Factory restore Dockstar - Help needed
September 17, 2024 11:53AM
Sorry,
You wrote that I should post the log "from u-boot banner until the box stop booting", and that's what I posted.

If you want me to re-do all the steps starting from the beginning, and then post the log, then I tried that, but...

It seems the nand is damaged, when I write to it I'm getting an error:


DockStar> setenv ipaddr '192.168.0.222'
DockStar> setenv serverip '192.168.0.1'
DockStar> tftpboot 0x800000 uImage-mtd1-dump
Using egiga0 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.222
Filename 'uImage-mtd1-dump'.
Load address: 0x800000
Loading: #################################################################
         #################################################################
         #################################################################
         ########################################################
         10.1 MiB/s
done
Bytes transferred = 3670016 (380000 hex)
DockStar> nand erase 0x100000 0x400000

NAND erase: device 0 offset 0x100000, size 0x400000
Skipping bad block at  0x00360000
Erasing at 0x4e0000 -- 100% complete.
OK
DockStar> nand write.e 0x800000 0x100000 0x400000

NAND write: device 0 offset 0x100000, size 0x400000
Skip bad block 0x00360000
NAND write to offset 520000 failed -5
 4063232 bytes written: ERROR
DockStar>

Is there any way around the write error?
Re: Factory restore Dockstar - Help needed
September 18, 2024 05:51PM
Zasshi,

Your NAND is not damaged.

> You wrote that I should post the log "from u-boot
> banner until the box stop booting", and that's
> what I posted.

I'm very precise. I've asked to see the complete log after you loaded the image from tftp, and run 2 commands:
printenv
boot
The list of all current envs (output of printenv) is what I'm looking for, and you did not provide that. Even if there is no envs listed because of some corruption, it is still a relevant information to see.

And the complete log would show all commands you have entered before it booted to

Uncompressing Linux.................. done, booting the kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Factory restore Dockstar - Help needed
September 19, 2024 03:30PM
Will the attached file do?
I've done the sequence from the start, and issued a printev command after the 2nd tftp/erase/write.
Attachments:
open | download - putty-serial.log (14.1 KB)
Re: Factory restore Dockstar - Help needed
September 20, 2024 02:36PM
Zasshi,

> Will the attached file do?

I assume the log was the boot log from the bricked unit. And you have installed the new u-boot on NAND and can boot USB Debian rootfs with it.

The problem now is: the new u-boot cannot boot the old stock FW. So to go back to factory, you also need to flash back stock u-boot.

If you had waited for my instruction, you could have saved a lot of headache.

Summary of the works:

1) Boot the good Dockstar into stock OS.
2) Dump the NAND mtd partitions. And copy them to the USB Debian rootfs.
3) Boot the bricked Doskstar with this USB rootfs. And do the flashing to restore the saved NAND mtd partitions.

The first thing to do is to get information for number 1. Connect serial console, boot into stock OS, and
cat /proc/mtd
And then post the entire serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Factory restore Dockstar - Help needed
September 23, 2024 01:57PM
Hello,
I already have the 'old' u-boot installed. I did it a few days ago, after my last post.

I'm thinking the nand is flaky or there's some other hardware issue because I still have problems; For example using JTAG most of the times I get an "unknown NAND flash device found, manufacturer id: 0x00 device id: 0x00" error.

When I try to write to nand using the serial console I get either a write error (90% of the times) or a successful write followed by a bad crc at boot time.
In a few rare occasions I was able to successfully complete the boot, but then the unit wouldn't get an IP address (green led blinking).
And unfortunately, after a few resets, I haven't been able to get this anymore.


bodhi Wrote:

> 1) Boot the good Dockstar into stock OS.
> 2) Dump the NAND mtd partitions. And copy them to
> the USB Debian rootfs.
> 3) Boot the bricked Doskstar with this USB rootfs.
> And do the flashing to restore the saved NAND mtd
> partitions.
>

But the good Dockstar hasn't got the original firmware anymore, so it wont help.

Maybe it would be easier to 'downgrade' the good unit and install Linux on this one.
Re: Factory restore Dockstar - Help needed
September 23, 2024 02:23PM
> I'm thinking the nand is flaky or there's some
> other hardware issue because I still have
> problems; For example using JTAG most of the times
> I get an "unknown NAND flash device found,
> manufacturer id: 0x00 device id: 0x00" error.

OK. I'm convinced that this box's NAND is bad.

> But the good Dockstar hasn't got the original firmware anymore, so it wont help.

If that's the case, then you need to find the Dockstar NAND backup from somewhere. Because you will need to restore everything (stock u-boot, kernel, and rootfs).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: