Welcome! Log In Create A New Profile

Advanced

revive Medion oxnas stg-212

Posted by alexinc 
Re: revive Medion oxnas stg-212
April 05, 2023 07:55PM
I'll try from scratch tomorrow again. It's almost 3am over here, need to catch some sleep. Thanks again for your patience! If you've got any other ideas or hints i can try tomorrow, let me know. It seems very promising, if that data gets written correctly. I could try recreating that rescue disk once again, without erasing the files that gets created by build.sh during the process to get written on the specific sectors of the disk and then i could try to write those files to NAND!?
Re: revive Medion oxnas stg-212
April 05, 2023 07:56PM
bodhi Wrote:
-------------------------------------------------------
> I begin to think perhaps we are seeing a faulty
> RAM.

Any chance to check that on the box?

On the one hand it would be pretty annoying, but on the other it would mean I'm not that stupid at all understanding all those different options to boot Debian/OpenWRT from hdd, usb or NAND and still failing at some point (mostly decompressing Linux to RAM then)... :-/



Edited 2 time(s). Last edit at 04/05/2023 08:04PM by alexinc.
Re: revive Medion oxnas stg-212
April 05, 2023 08:21PM
> Any chance to check that on the box?

Boot back to stock u-boot on HDD. At serial console prompt,

memtest

This box is not the Pogo V3 Pro/Classic. So there might be peculiar things I do not know about.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 06, 2023 10:03AM
time for some really good news! as always you've brought me on the right track and are a big help and inspiration, solving this puzzle. starting your ways and getting the right adresses and information from build.sh script i'm on stock u-boot and environment again... lets keep the pace! i'm trying to flash the other stock mtds now too:
OX820> nand erase.part 0

NAND erase.part: device 0 whole chip
Skipping bad block at  0x07b20000
Erasing at 0x7fe0000 -- 100% complete.
OK
OX820> ext2load ide 0:2 61000000 /flash-recovery-hdd/MedionNAS/mtd1.backup
262144 bytes read in 50 ms (5 MiB/s)
OX820> nand write 61000000 0 40000

NAND write: device 0 offset 0x0, size 0x40000
 262144 bytes written: OK
OX820> ext2load ide 0:2 61000000 /flash-recovery-hdd/MedionNAS/mtd2.backup
3670016 bytes read in 482 ms (7.3 MiB/s)
OX820> nand write 61000000 40000 380000

NAND write: device 0 offset 0x40000, size 0x380000
 3670016 bytes written: OK
OX820> ext2load ide 0:2 61000000 /flash-recovery-hdd/MedionNAS/mtd3.data
131094 bytes read in 19 ms (6.6 MiB/s)
OX820> nand write 61000000 3C0000 80000

NAND write: device 0 offset 0x3c0000, size 0x80000
 524288 bytes written: OK
OX820> ext2load ide 0:2 61000000 /flash-recovery-hdd/MedionNAS/mtd4.backup
10485760 bytes read in 1349 ms (7.4 MiB/s)
OX820> nand write 61000000 440000 a00000

NAND write: device 0 offset 0x440000, size 0xa00000
 10485760 bytes written: OK
OX820> ext2load ide 0:2 61000000 /flash-recovery-hdd/MedionNAS/mtd6.backup
10485760 bytes read in 1349 ms (7.4 MiB/s)
OX820> nand write 61000000 1840000 a00000

NAND write: device 0 offset 0x1840000, size 0xa00000
 10485760 bytes written: OK
one restore fails (sysdisk)
OX820> ext2load ide 0:2 61000000 /flash-recovery-hdd/MedionNAS/mtd7.backup
98304000 bytes read in 12499 ms (7.5 MiB/s)
OX820> nand write 61000000 2240000 5dc0000

NAND write: device 0 offset 0x2240000, size 0x5dc0000
Attempt to write outside the flash area
 0 bytes written: ERROR
and then results in well known
Stage-1 Bootloader Tue Aug  9 16:44:00 CST 2011
Attempting to set PLLA to 750MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000F0000
  plla_ctrl2 : 0x001D01A0
  plla_ctrl3 : 0x00000017
PLLA Set

Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001A94C
  Hdr CRC: 0xF0019DAC
 OK


U-Boot 1.1.2 (Jun 24 2011 - 09:41:57)

U-Boot code: 60D00000 -> 60D1A94C  BSS: -> 60D1F004
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0
with stock env again
$ printenv
bootcmd=run boot_nand
bootdelay=2
baudrate=115200
ethaddr=00:30:e0:00:00:01
ipaddr=192.168.50.100
serverip=192.168.50.59
autoload=n
netmask=255.255.0.0
bootfile="uImage"
load_nand=nboot 61000000 0 440000
boot=bootm 61000000
boot_nand=run load_nand boot
MODEL_ID=AB03
PRODUCT_NAME=STG-212
VENDOR_NAME=MitraStar Technology Corp.
stdin=serial
stdout=serial
stderr=serial
bootargs= console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes

Environment size: 475/131068 bytes
but still with
Stage-1 Bootloader Tue Aug  9 16:44:00 CST 2011
Attempting to set PLLA to 750MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000F0000
  plla_ctrl2 : 0x001D01A0
  plla_ctrl3 : 0x00000017
PLLA Set

Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001A94C
  Hdr CRC: 0xF0019DAC
 OK


U-Boot 1.1.2 (Jun 24 2011 - 09:41:57)

U-Boot code: 60D00000 -> 60D1A94C  BSS: -> 60D1F004
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0

Loading from device 0: 128MiB 3,3V 8-bit (offset 0x440000)
   Image Name:   Linux-2.6.31.14_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5241420 Bytes =  5 MB
   Load Address: 60008000
   Entry Point:  60008000
## Booting image at 61000000 ...
   Image Name:   Linux-2.6.31.14_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5241420 Bytes =  5 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux..........................................................................................................................................................................................................................................................

crc error

 -- System halted
some kind of AAAAAAAHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!! still ideas?



Edited 2 time(s). Last edit at 04/06/2023 10:27AM by alexinc.
Re: revive Medion oxnas stg-212
April 06, 2023 11:10AM
The flash is 128MB in Hex 7FFFFFF

The flashing command adds up 2240000+5dc0000-1=7FFFFFF (128MB) and -1 because the first byte is written to 2240000

What if you try to write 5dbffff bytes. Do you get the same error?

Schnee
Re: revive Medion oxnas stg-212
April 06, 2023 11:17AM
hey schnee, thanks for getting back! unfortunately seems so:
OX820> ext2load ide 0:2 61000000 /flash-recovery-hdd/MedionNAS/mtd7.backup
98304000 bytes read in 12499 ms (7.5 MiB/s)
OX820> nand write 61000000 2240000 5dbffff

NAND write: device 0 offset 0x2240000, size 0x5dbffff
Attempt to write outside the flash area
 0 bytes written: ERROR
Re: revive Medion oxnas stg-212
April 06, 2023 11:36AM
I am not an expert, but looking at your logs, the flash has a bad block, so your total size is 128mb-bad flash block size.

I would try to reduce last write with 1 block size and see if that helps. Hopefully nothing important is stored at the end of the flash.

As I remember the typical block sizes are 512, 2,048 or 4,096 bytes. Reduce the data size with these values and see what happens. Start with 512.

Schnee
Re: revive Medion oxnas stg-212
April 06, 2023 01:14PM
ok, it took a while of thinking about it, but at least it's writing now...

sektor to start writing from in hex is 2240000 and complete ram is 7FE0000 that means there is just space left for writing filesize of 5DA0000 (not sure if there is a typo in build.sh which wants to write 5DC0000, but all documentations n the net say size of mtd7 is 5DC0000).
OX820> nand write 61000000 2240000 5da0000

NAND write: device 0 offset 0x2240000, size 0x5da0000
Skip bad block 0x07b20000
 98172928 bytes written: OK
it doesn't help in running into
Stage-1 Bootloader Tue Aug  9 16:44:00 CST 2011
Attempting to set PLLA to 750MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000F0000
  plla_ctrl2 : 0x001D01A0
  plla_ctrl3 : 0x00000017
PLLA Set

Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001A94C
  Hdr CRC: 0xF0019DAC
 OK


U-Boot 1.1.2 (Jun 24 2011 - 09:41:57)

U-Boot code: 60D00000 -> 60D1A94C  BSS: -> 60D1F004
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0

Loading from device 0: 128MiB 3,3V 8-bit (offset 0x440000)
   Image Name:   Linux-2.6.31.14_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5241420 Bytes =  5 MB
   Load Address: 60008000
   Entry Point:  60008000
## Booting image at 61000000 ...
   Image Name:   Linux-2.6.31.14_SMP_820
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5241420 Bytes =  5 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux..........................................................................................................................................................................................................................................................

crc error

 -- System halted
i guess NAND is now as stock as possible, what leads me to conclusion of hardware fault - after all those years and countless hours investigating and learning from ground. will try another power supply at home again and of course i'm still up for any advices, tips and hints! :'-(



Edited 1 time(s). Last edit at 04/06/2023 02:21PM by alexinc.
Re: revive Medion oxnas stg-212
April 06, 2023 01:31PM
What happens between E40000 and 1840000 (mtd5)? Why there is no backup (needed)? Ok, it's /etc.

mtd
~ # cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit"
mtd1: 00040000 00020000 "stage1"
mtd2: 00380000 00020000 "uboot"
mtd3: 00080000 00020000 "uboot_env"
mtd4: 00a00000 00020000 "kernel"
mtd5: 00a00000 00020000 "etc"
mtd6: 00a00000 00020000 "info"
mtd7: 05dc0000 00020000 "sysdisk"
Medion-Kernel:
static struct mtd_partition partition_info[] =
{
  {
    .name = "stage1",
    .offset = 0,
    .size = 1024 * 128 * 2    /* 2 blocks; 2 stage1 */
  },
  {
    .name = "uboot",
    .offset = MTDPART_OFS_NXTBLK,
    .size = 1024 * 1024 * 3.5  /* 3.5 MB */
  },
  {
    .name = "uboot_env",
    .offset = MTDPART_OFS_NXTBLK,
    .size = 1024 * 128 * 4    /* 4 blocks */
  },
  {
    .name = "kernel",
    .offset = MTDPART_OFS_NXTBLK,
    .size = 1024 * 1024 * 10  /* 10 MB */
  },
  {
    .name = "etc",
    .offset = MTDPART_OFS_NXTBLK,
    .size = 1024 * 1024 * 10  /* 10 MB */
  },
  {
    .name = "info",
    .offset = MTDPART_OFS_NXTBLK,
    .size = 1024 * 1024 * 10  /* 10 MB */
  },
  {
    .name = "sysdisk",
    .offset = MTDPART_OFS_NXTBLK,
    .size = MTDPART_SIZ_FULL  /* Should be 93.75 MB */
  }
};
no matter how much i turn things around, file sizes simply don't match size of my NAND... :-?
Re: revive Medion oxnas stg-212
April 06, 2023 02:17PM
alexinc,

:))

> OX820> ext2load ide 0:2 61000000
> /flash-recovery-hdd/MedionNAS/mtd1.backup
> 262144 bytes read in 50 ms (5 MiB/s)
> OX820> nand write 61000000 0 40000

That was it. My bad, the instruction were written for Kirkwood SoC. This SoC memory start at 0x60000000. Glad you figure it out. Thumbs up!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 06, 2023 02:20PM
Don't bother with other part of NANDs. As long as u-boot is OK, it's partly done.

You can try to boot OpenWrt or Debian now.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 06, 2023 02:36PM
Quote

no matter how much i turn things around, file sizes simply don't match size of my NAND... :-?

The issue with the backup files don't match NAND could be that the backup file were dump with or without OOB or ECC. A typical nanddump to save u-boot is

nanddump --noecc --omitoob -f mtd0 /dev/mtd0

So it could be either those mtds were written with ecc and/or oob, and the files were saved without, or vice versa.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 06, 2023 02:51PM
Which way would you recommend? TFTP i have to try later at home... just tried starting schnee's rescue disk again, which leads to uncompression error once more. i fear, as stock linux from NAND doesn't uncompress either, i'm going to have the same results on everything i'll try again. at least with stock u-boot i only can TFTP images... we'll see later today.
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2013.10-ga72eb8f-dirty (Feb 19 2014 - 15:21:12) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK
  Device 0: Model: CT1000MX500SSD1  Firm: M3CR032  Ser#: 2037E4AF3A94
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
NAND:  128 MiB
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
## Error: "safeboot" not defined
Hit any key to stop autoboot:  0
4102704 bytes read in 549 ms (7.1 MiB/s)
7033 bytes read in 11 ms (624 KiB/s)
magic:                  0xd00dfeed
totalsize:              0x1b79 (7033)
off_dt_struct:          0x38
off_dt_strings:         0x18d4
off_mem_rsvmap:         0x28
version:                17
last_comp_version:      16
boot_cpuid_phys:        0x0
size_dt_strings:        0x2a5
size_dt_struct:         0x189c
number mem_rsv:         0x0

## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-3.17.0-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4102640 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 61000000
   Booting using the fdt blob at 0x61000000
   Loading Kernel Image ... OK
   Loading Device Tree to 67e26000, end 67e2ab78 ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted
Re: revive Medion oxnas stg-212
April 06, 2023 03:13PM
I would unplug the HDD, and boot with stock u-boot. And then boot Debian-4.14.180-oxnas-tld-1-rootfs-bodhi.tar.bz2 on USB. Remeber to do Step 4 and create new uImage with the STG-212 DTB embedded in it.

For now, ignore the problems with the other NAND partitions. When you install OpenWrt, those mtd partitions will be wiped out anywaty.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 06, 2023 03:16PM
but with stock u-boot i can't boot from usb...
Re: revive Medion oxnas stg-212
April 06, 2023 03:25PM
> but with stock u-boot i can't boot from usb...

Really? I ran the Pogo V3 with USB only. Perhaps this STG-212 u-boot intentionally removed that.

Then you can boot with an HDD/SSD rootfs, but not with this SSD. Because the magic sequence is still in the raw sector, which will bypass NAND booting and go straight to SATA (hence we always said it is unbrickable because SATA booting is the rescue path).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 06, 2023 08:02PM
just a short summary before heading to bed...

booting various openwrt initramfs from tftp always stuck at "Starting kernel..." - as i can't connect via browser or ssh to 192.168.1.1 nor 192.168.50.100 on subnet 255.255.255.0 or 255.255.0.0 then, i guess it's failing in uncompressing Linux again!?

USB boot isn't working with having one ext2 partition called rootfs, same with IDE boot. as there is no ext2load nor ide command included in original u-boot, i don't get how i should boot rootfs from hdd/ssd then. tried setting env on "ide 0:1" for /dts/oxnas820-stg212.dtb, /boot/uImage and so on, but without ext2load i don't know how to get rootfs from hdd/ssd started... maybe it's a bit too late for now. having to get some rest after the little success of writing stock mtds to NAND today, but honestly i still don't know how get around that uncompression error on all different openwrt or debian versions. :-(
Re: revive Medion oxnas stg-212
April 06, 2023 08:16PM
> USB boot isn't working with having one ext2
> partition called rootfs, same with IDE boot. as
> there is no ext2load nor ide command included in
> original u-boot, i don't get how i should boot
> rootfs from hdd/ssd then. tried setting env on
> "ide 0:1" for /dts/oxnas820-stg212.dtb,
> /boot/uImage and so on, but without ext2load i
> don't know how to get rootfs from hdd/ssd
> started.

In stock u-boot

help

> .. maybe it's a bit too late for now.
> having to get some rest after the little success
> of writing stock mtds to NAND today, but honestly
> i still don't know how get around that
> uncompression error on all different openwrt or
> debian versions. :-(

If there is no ext2load/ext4load then use fat command or use tftp to load the kernel files. And then boot with new envs (same as for USB rootfs). All it matter is root=LABEL=rootfs. And earlyprintk=serial. So that we can see if the decompression error still occurs.

I can write it out for you if you need help.

OpenWrt kernel does not help. So we can forget about that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 07, 2023 05:18AM
bodhi Wrote:
-------------------------------------------------------
> help

no matter how often i post it, it's still the same limited stock u-Boot without any load possibility, besides tftp... ;-)
$ help
?       - alias for 'help'
base    - print or set address offset
bdinfo  - print Board Info structure
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
echo    - echo args to console
exit    - exit script
go      - start application at address 'addr'
help    - print online help
iminfo  - print header information for application image
ledfail - Extinguish (0) or light (1) failure LED
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nm      - memory modify (constant address)
nwboot          - NAND Write boot information
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
version - print monitor version
> All it matter is root=LABEL=rootfs. And
> earlyprintk=serial. So that we can see if the
> decompression error still occurs.

USB always times out, so only solution is IDE with ext2, labeled 'rootfs', including extracted Debian-4.14.180-oxnas-tld-1-rootfs-bodhi.tar.bz2 and having /boot/dts/oxnas820-stg212.dtb + new uImage with the STG-212 DTB embedded in it.

Just to make sure, which files should i tftp now and what envs to set for them? I would go for
setenv tftp_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv load_uimage 'tftp 0x800000 uImage'
setenv load_uinitrd 'tftp 0x2100000 uInitrd'
setenv tftp_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
setenv tftp_bootcmd 'run tftp_set_bootargs; run tftp_boot'
setenv bootcmd 'run tftp_bootcmd'



Edited 6 time(s). Last edit at 04/07/2023 06:25AM by alexinc.
Re: revive Medion oxnas stg-212
April 07, 2023 07:04AM
no success for now
Stage-1 Bootloader Tue Aug  9 16:44:00 CST 2011
Attempting to set PLLA to 750MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000F0000
  plla_ctrl2 : 0x001D01A0
  plla_ctrl3 : 0x00000017
PLLA Set
  
Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001A94C
  Hdr CRC: 0xF0019DAC
 OK
  
  
U-Boot 1.1.2 (Jun 24 2011 - 09:41:57)
  
U-Boot code: 60D00000 -> 60D1A94C  BSS: -> 60D1F004
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0

$ setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'

$ printenv
bootcmd=run boot_nand
bootdelay=2
baudrate=115200
ipaddr=192.168.50.100
serverip=192.168.50.59
autoload=n
netmask=255.255.0.0
bootfile="uImage"
load_nand=nboot 61000000 0 440000
boot=bootm 61000000
boot_nand=run load_nand boot
MODEL_ID=AB03
PRODUCT_NAME=STG-212
VENDOR_NAME=MitraStar Technology Corp.
ethaddr=00:11:41:30:3A:12
stdin=serial
stdout=serial
stderr=serial
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial

Environment size: 448/131068 bytes

$ mw 0x800000 0 1

$ tftp 0x800000 uImage
Wait GMAC to reset
Wait for PHY reset.
PHY is Realtek RTL8211E
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uImage'.
Load address: 0x800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################################
done
Bytes transferred = 4609927 (465787 hex)

$ tftp 0x2100000 uInitrd
Wait GMAC to reset
Wait for PHY reset.
PHY is Realtek RTL8211E
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uInitrd'.
Load address: 0x2100000
Loading: #################################################################
         #################################################################
         #################################################################
         ##########data abort
pc : [<60d10034>]    lr : [<60d02894>]
sp : 60cbf554  ip : 00000000  fp : 60cbffb8
r10: 60ce2512  r9 : 00000fff  r8 : 60cbffdc
r7 : 00000202  r6 : 0000e458  r5 : 00100200  r4 : 00000200
r3 : 0000003f  r2 : 000001ff  r1 : 60ce2540  r0 : 02200000
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...
crashing while loading Debian-4.14.180-oxnas-tld-1-rootfs-bodhi/boot/uInitrd.



Edited 1 time(s). Last edit at 04/07/2023 07:07AM by alexinc.
Re: revive Medion oxnas stg-212
April 07, 2023 08:34AM
another way failing:
Stage-1 Bootloader Tue Aug  9 16:44:00 CST 2011
Attempting to set PLLA to 750MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000F0000
  plla_ctrl2 : 0x001D01A0
  plla_ctrl3 : 0x00000017
PLLA Set

Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001A94C
  Hdr CRC: 0xF0019DAC
 OK


U-Boot 1.1.2 (Jun 24 2011 - 09:41:57)

U-Boot code: 60D00000 -> 60D1A94C  BSS: -> 60D1F004
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0
$ setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
$ tftp 0x60000000 uImage
Wait GMAC to reset
Wait for PHY reset.
PHY is Realtek RTL8211E
Wait for link to come up...........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uImage'.
Load address: 0x60000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################################
done
Bytes transferred = 4609927 (465787 hex)
$ tftp 0x61000000 uInitrd
Wait GMAC to reset
Wait for PHY reset.
PHY is Realtek RTL8211E
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uInitrd'.
Load address: 0x61000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################
done
Bytes transferred = 6464907 (62a58b hex)
$ bootm 0x60000000 0x61000000
## Booting image at 60000000 ...
   Image Name:   Linux-4.14.180-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4609863 Bytes =  4.4 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 61000000 ...
   Image Name:   initramfs-4.14.180-oxnas-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6464843 Bytes =  6.2 MB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted

Re: revive Medion oxnas stg-212
April 07, 2023 02:47PM
alexinc,

Those load addresses are too close. Since you are running my kernel, load it like for the Pogo Pro.

load_initrd=echo loading uInitrd ...; load $bootdev $device 0x60e00000 /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device 0x60500000 /boot/uImage

If that does not work, load only the uImage at 0x60500000. uInitrd is not important at this moment.

tftp 0x60500000 uImage
bootm 0x60500000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 07, 2023 03:06PM
Stage-1 Bootloader Tue Aug  9 16:44:00 CST 2011
Attempting to set PLLA to 750MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000F0000
  plla_ctrl2 : 0x001D01A0
  plla_ctrl3 : 0x00000017
PLLA Set

Setup memory, testing
Reading NAND, Image 0
  Hdr len: 0x0001A94C
  Hdr CRC: 0xF0019DAC
 OK


U-Boot 1.1.2 (Jun 24 2011 - 09:41:57)

U-Boot code: 60D00000 -> 60D1A94C  BSS: -> 60D1F004
RAM Configuration:
        Bank #0: 60000000 128 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0
$ setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
$ printenv
bootcmd=run boot_nand
bootdelay=2
baudrate=115200
ipaddr=192.168.50.100
serverip=192.168.50.59
autoload=n
netmask=255.255.0.0
bootfile="uImage"
load_nand=nboot 61000000 0 440000
boot=bootm 61000000
boot_nand=run load_nand boot
MODEL_ID=AB03
PRODUCT_NAME=STG-212
VENDOR_NAME=MitraStar Technology Corp.
ethaddr=00:11:41:30:3A:12
stdin=serial
stdout=serial
stderr=serial
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial

Environment size: 448/131068 bytes
$ tftp 0x60500000 uImage
Wait GMAC to reset
Wait for PHY reset.
PHY is Realtek RTL8211E
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uImage'.
Load address: 0x60500000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################################
done
Bytes transferred = 4609927 (465787 hex)
$ tftp 0x60e00000 uInitrd
Wait GMAC to reset
Wait for PHY reset.
PHY is Realtek RTL8211E
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uInitrd'.
Load address: 0x60e00000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################
done
Bytes transferred = 6464907 (62a58b hex)
$ bootm 0x60500000
## Booting image at 60500000 ...
   Image Name:   Linux-4.14.180-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4609863 Bytes =  4.4 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted



Edited 2 time(s). Last edit at 04/07/2023 03:08PM by alexinc.
Re: revive Medion oxnas stg-212
April 07, 2023 03:30PM
Interesting that I think I don't understand this stock u-boot.

load_nand=nboot 61000000 0 440000
boot=bootm 61000000

That's 16MB location.

So you could try
tftp 0x61000000 uImage
bootm 61000000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 07, 2023 03:45PM
$ tftp 0x61000000 uImage
Wait GMAC to reset
Wait for PHY reset.
PHY is Realtek RTL8211E
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 192.168.50.59; our IP address is 192.168.50.100
Filename 'uImage'.
Load address: 0x61000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########################################################
done
Bytes transferred = 4609927 (465787 hex)
$ bootm 61000000 
## Booting image at 61000000 ...
   Image Name:   Linux-4.14.180-oxnas-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4609863 Bytes =  4.4 MB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...

uncompression error

 -- System halted
:-(
Re: revive Medion oxnas stg-212
April 07, 2023 03:54PM
OK. Did you run a memtest?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: revive Medion oxnas stg-212
April 07, 2023 03:56PM
Or put a heavy item on the ram / cpu and try to boot it again. :P
Re: revive Medion oxnas stg-212
April 07, 2023 04:01PM
Yes, i tried

"mtest" without any given values is stuck at "Pattern 0000000". When running
mtest 60000000 7FE0000
it is reading and writing circulation pattern non stop until i ^C. I didn't find anything explaining on the net, how it should work - which behaviour to expect, when it's finished and so on. So not very helpful to me to this point.
I then tried mtest 60000000 1388 (for just 5mb), but it was writing those different pattern circulation again and again until i stopped it. How often will it write? How long may it take for just 5mb... questions about questions. ;-) btw. after all this mess i'm still thinking it's a hardware issue now.



Edited 1 time(s). Last edit at 04/07/2023 04:03PM by alexinc.
Re: revive Medion oxnas stg-212
April 07, 2023 04:12PM
daviddyer Wrote:
-------------------------------------------------------
> Or put a heavy item on the ram / cpu and try to
> boot it again. :P

last of all options, just before being on my way to the window... ;-) guess it's not me jumping!



Edited 1 time(s). Last edit at 04/07/2023 04:13PM by alexinc.
Re: revive Medion oxnas stg-212
April 07, 2023 04:41PM
> Or put a heavy item on the ram / cpu and try to
> boot it again. :P

That will help in decompression I guess :))

OK so last attempt should be reflashing the rest of the stock mtds from backups. Pay attention to OOB and ECC. If the backup files were nanddump with OOB and ECC, those files will look weird, i.e. the size is bigger than what you'd expect.

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