Welcome! Log In Create A New Profile

Advanced

How to restore factory firmware for POGO-B02 Oxnas device

Posted by lijianch 
How to restore factory firmware for POGO-B02 Oxnas device
September 14, 2016 06:38PM
I am using the pogo through SATA boot which bypasses the NAND. I want to use a usb drive to host debian system rather than booting from SATA.

I know that Bodhi has an instruction to flash the new u-boot. However, my

# cat /proc/mtd
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00e00000 00020000 "boot"
mtd2: 07200000 00020000 "rootfs"

This is not the same as Pogo V3. I tried to use mtd1 in the place of mtd0. Still no boot. Please advise.
Re: How to restore factory firmware for POGO-B02 Oxnas device
September 15, 2016 01:17AM
lijianch Wrote:
-------------------------------------------------------
> I am using the pogo through SATA boot which
> bypasses the NAND. I want to use a usb drive to
> host debian system rather than booting from SATA.
>
>
> I know that Bodhi has an instruction to flash the
> new u-boot. However, my
>
> # cat /proc/mtd
> mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
> mtd1: 00e00000 00020000 "boot"
> mtd2: 07200000 00020000 "rootfs"
>

> This is not the same as Pogo V3. I tried to use
> mtd1 in the place of mtd0. Still no boot. Please
> advise.

That should be OK, Yours is the same as the Pogo V3, if you have flashed u-boot and spl to to mtd1. In stock, mtd1 is the same location as mtd0.

If you post the log of what you did (flashing, creating rootfs), may be I can help.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to restore factory firmware for POGO-B02 Oxnas device
September 15, 2016 09:45PM
I follow your instruction at
http://forum.doozan.com/read.php?3,16017

I replace /etc/mtd0 to /etc/mtd1 from step 6 to step 10. I am not sure what should I do from step 11 to setp 16. The rootfs usb drive is built by fdisk with one single ext3 partition labled "rootfs". The system is extracted from your image. I change the /etc/network/interfaces with the right MAC address.

When booting, the green light turns solid in no time. However, there is no reading activity to the usb drive.

Here is my log:

root@downloader:~# /usr/sbin/flash_erase /dev/mtd1 0x00100000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0x100000 done

root@downloader:~# /usr/sbin/flash_erase /dev/mtd1 0x0 6
Erase Total 6 Units
Performing Flash Erase of length 131072 at offset 0xa0000 done

root@downloader:~# /usr/sbin/nandwrite /dev/mtd1 uboot.spl.2013.10.ox820.850mhz.mtd0.img
Writing data to block 0 at offset 0x0

root@downloader:~# /usr/sbin/nandwrite -s 262144 /dev/mtd1 uboot.2015.10-tld-1.ox820.mtd0.img
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 4 at offset 0x80000
Writing data to block 5 at offset 0xa0000

root@downloader:~# /usr/sbin/flash_erase /dev/mtd1 0x00100000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0x100000 done

root@downloader:~# /usr/sbin/nandwrite -s 1048576 /dev/mtd1 uboot.2013.10-tld-5.ox820.environment.img
Writing data to block 8 at offset 0x100000

----
Mod edit: use code tags and make it readable



Edited 2 time(s). Last edit at 09/16/2016 12:47AM by bodhi.
Re: How to restore factory firmware for POGO-B02 Oxnas device
September 16, 2016 12:59AM
lijianch,

> I follow your instruction at
> http://forum.doozan.com/read.php?3,16017
>
> I replace /etc/mtd0 to /etc/mtd1 from step 6 to
> step 10.

Correct.

> I am not sure what should I do from step
> 11 to setp 16.
> The rootfs usb drive is built by
> fdisk with one single ext3 partition labled
> "rootfs". The system is extracted from your image.

Were you root user while extracting? or did you use sudo?

> I change the /etc/network/interfaces with the
> right MAC address.
>
> When booting, the green light turns solid in no
> time. However, there is no reading activity to the
> usb drive.

This might indicate that you boot command did not read from USB, or the flash was unsuccessful (not likely). Were the green LED blinking during boot? for how long?

Finally, can you connect serial console?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to restore factory firmware for POGO-B02 Oxnas device
September 16, 2016 07:41AM
I am root when extracting files.

The light blink for one second at most then turn solid. Then, it may take 10 seconds, it blinks again. Eventually, it turns solid. During this period of time, the USB drive's light (this is a usb drive which has an indicator light) is blinking indicating some sort of access. However, it turns off when the pogo light becomes solid light.

I do have the serial console. I just do not know what to do.

I also want to know more detail about "This might indicate that you boot command did not read from USB". During the entire process, I do not input any boot command by myself. Did I do something wrong?
Re: How to restore factory firmware for POGO-B02 Oxnas device
September 16, 2016 01:43PM
lijianch,

> The light blink for one second at most then turn
> solid. Then, it may take 10 seconds, it blinks
> again. Eventually, it turns solid.

This indicated u-boot has booted up successfully.

> During this
> period of time, the USB drive's light (this is a
> usb drive which has an indicator light) is
> blinking indicating some sort of access. However,
> it turns off when the pogo light becomes solid
> light.

This indicated the kernel has been loaded from USB. At this point, we don't know yet if the USB rootfs has been mounted successfully by the kernel.

> I also want to know more detail about "This might
> indicate that you boot command did not read from
> USB". During the entire process, I do not input
> any boot command by myself. Did I do something
> wrong?

No, the bootcmd executes several commands that load from USB automatically. When you said there was no activity on USB LED, I thought it did not even blink at all the entire time. But it apparently did during the bootup like you described above.

>
> I do have the serial console. I just do not know
> what to do.
>

With serial console everything is easier. With serial console connected, and the only drive plugged in is the USB rootfs. Power up and interrupt serial console when you see the countdown,

printenv
boot

And post the entire serial console log here (everything on the terminal session). We will be able to see where and why it stopped booting.

-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: