Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 05, 2017 10:11AM
Hi guys,

this is my first post to this forum. So excuse me if i am asking "noob stuff" :P
I have rudimentary to basic Linux knowledge (keeping SLES server alive @work)

Data:
  • NAS: Medion MD86783 - It's based on Marvell Feroceon CPU (If i done my reading right it should be a kirkwood flavor) which seems to be supported by bodhis rootfs and kernel. (jochar in this Thread has the same board.
  • I am running stock u-boot. - I didnt update uboot, because kwboot is not working for me and so i can't test any of the provided kwboot files against my NAS. The risk of bricking the hardware was too damn high. If i got all information correct, there is no way of unbricking via uart IF kwboot is NOT working. Pls correct me if i am wrong :)
  • Attachted to this post is a full serial log from booting the board till default linux login promt.
  • Also attacchted to this post is the output of default printenv
  • Medion provided its GPL source

Now if i try to load latest bodhi kernel via tftpboot, my NAS just freezes.

Marvell>> tftpboot 0x800000 uImage.bodhi
Using egiga0 device
TFTP from server 10.0.0.38; our IP address is 10.0.0.30
Filename 'uImage.bodhi'.
Load address: 0x800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##################################
done
Bytes transferred = 3168351 (30585f hex)
Marvell>> setenv bootargs console=ttyS0,115200
Marvell>> bootm 0x800000
## Booting image at 00800000 ...
   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Created:      2017-03-05  14:39:41 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3168287 Bytes =  3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...
Thats a try with bodhis kernel and integrated N320s dtb as desrcibed here in 4b



I don't even know, if i am just noob and missing some bootargs to propably boot, or the kernel is missing its initramfs to do more, or ther kernel does not fit my hardware (i have seen bad magic number errors if i play around with my uImage files)
And even after "dumping/learning" for 2 weekends now i have not the slightest hint what i could do to get one step further.

Maybe u can give me a push in the right direction :)
Do you need further information?

regards and greetings from germany
helge



Edited 3 time(s). Last edit at 03/05/2017 12:22PM by helge.
Attachments:
open | download - bootlog_Medion_Nas.log (55.4 KB)
open | download - printenv.txt (1.4 KB)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 05, 2017 03:46PM
Hi helge,

Welcome to the forum!

You've not a noob in any sense :) you're very close to making it work!

> it should be a kirkwood flavor)
> which seems to be supported by bodhis rootfs and k
> ernel

Yes it is.

> because kwboot is not working for me and so i
> can't test any of the provided kwboot files agains
> t my NAS. The risk of bricking the hardware was to
> o damn high.

Yes, risk is high if you can't run kwboot. Did you try with my NSA310s u-boot image? and how? please describe or attach log.

> Marvell>> tftpboot 0x800000 uImage.bodhi
> Marvell>> bootm 0x800000

You also need to load uInitrd.

> (i have seen bad magic numbe
> r errors if i play around with my uImage files)

This bad magic number is to be expected.

Let me take a look at the log and see what needs to be done. It's a Kirkwood so our hope is high that it will work :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 05, 2017 04:03PM
I'm going to gradually fill in some info here in this post as you try.

1. With stock u-boot, the USB drive needs to be power up manually in serial console so it can load the kernel (later we will add this to the boot commands to make it permanent):
mw.l f1010100 1361c000                                                
usb reset

2. The box is identical to the NSA310s and NSA320s. So if this bos has 2 SATA drives then use NSA320S DTB, if 1 SATA drive then use NSA310S DTB. Later, once you figured out if there is any difference, a new DTS can be created for this box specifically, using the NSA310S as a base.

3. Assuming you've already create a USB rootfs using the instruction in the kernel/rootfs thread. With that, the rootfs is on the Ext3 parttion, and labeled rootfs.

4. The commands you've set up has some syntax error. So they should be

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $(mtdparts)'
setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
setenv usb_boot 'run set_bootargs; run usb_load_uimage; run usb_load_uinitrd'


and then

run usb_boot

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



Edited 4 time(s). Last edit at 03/05/2017 04:17PM by bodhi.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 05, 2017 05:13PM
Hi bodhi, thanks for your ongoing support and for your reply (must have been ~5years now? - I saw postings from 2013)

My device has 2x2TB Disks inside. So NSA 320S it should be.

> Yes, risk is high if you can't run kwboot. Did you try with my NSA310s u-boot image? and how? please describe or attach log.

No i haven't tried yet, because the nandbackups, which i did a year ago, should be corrupt. I am coming back to this, after i've got a new kernel working with debian working.I want to have some fun first, before we make it a brick :)

> You also need to load uInitrd.
So it is required ;) My guess was: If i just load the new kernel, he would use rootfs from nand. I even tried to load your kernel, read out the rootfs via "nand read.e" to memory and boot with that...

>This bad magic number is to be expected.
Let me take a look at the log and see what needs to be done. It's a Kirkwood so our hope is high that it will work :)

My hope is high too :) I'll play around with the images tomorrow , cause i dont know which images i used (its near midnight here - and i tried a lot of images and lost track)

>mw.l f1010100 1361c000
>usb reset

i probably have woken up my neighbours :D the internal speaker gone crazy in a permanent noise. and one of the leds changed from blue to red. He was scanning the USB-bus though
Marvel>>mw.l f1010100 1361c000
#noise begins
usb reset
USB: scanning for devices... 2USB Devices found
Waiting for storagedevices  to settle before scanning...
#i waited for 10s and then pulled the plug. The noise.. I think i will solder this out tommorrow, since it makes a noise on every cold boot too..

>3. Assuming you've already create a USB rootfs using the instruction in the kernel/rootfs thread. With that, the rootfs is on the Ext3 parttion, and >labeled rootfs.

Yes i followed your guide and extracted your latest rootfs.tar.gz to an usb stick. I thought my device should be able to load your /boot/uImage and /boot/uinitrd over tftpboot before i even think about an usb stick.(more errors could happen) Was i wrong?
zImage shouldn't work, because my uboot doesnt have bootz command.



Edited 1 time(s). Last edit at 03/05/2017 05:16PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 05, 2017 06:03PM
helge,

> Hi bodhi, thanks for your ongoing support and for
> your reply (must have been ~5years now? - I saw po
> stings from 2013)

Time flies when you're having fun :)

> So it is required ;) My guess was: If i just load
> the new kernel, he would use rootfs from nand. I e
> ven tried to load your kernel, read out the rootfs
> via "nand read.e" to memory and boot with that...

Rootfs in NAND will not work. It is probably too old.

> i probably have woken up my neighbours :D the inte
> rnal speaker gone crazy in a permanent noise. and
> one of the leds changed from blue to red. He was s
> canning the USB-bus though

OK :) so there is some GPIO controls difference in USB related aspect. Some investigation might be needed turn off the speaker, if you can't disconnect it. And this GPIO poke might not be for USB in thix box, until you see a storage device found. Assume this is only an expirement. Generally, poking GPIO in this correct address f1010100 will not harm the box.

But as usual, you would do it at your own risk. Therefore, kwboot is very important to get working first.


> Yes i followed your guide and extracted your lates
> t rootfs.tar.gz to an usb stick. I thought my devi
> ce should be able to load your /boot/uImage and /b
> oot/uinitrd over tftpboot before i even think abou
> t an usb stick.(more errors could happen) Was i wr
> ong?

You are right. tftp should load and then u-boot should run the kernel. But rootfs needs to be on USB (or HDD). So if you want to test it that way first, then it is all good. Let's postpone loading kernel from USB. Just rootfs from USB (therefore there is no need to try to activate it in u-boot).

I'll take a look at the GPL to see where the USB and speaker GPIOs really are.

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



Edited 2 time(s). Last edit at 03/05/2017 06:13PM by bodhi.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 05, 2017 08:27PM
bodhi,

just i lil note before i go to sleep.

>I'll take a look at the GPL to see where the USB and speaker GPIOs really are.
Thanks. Feel free to tell me (or what to google) where i find the information. This knowledge could be of use for further projects :)

After some more testing i get bad magic number errors on tftpbooting. I tried with and without dtb included in uImage. both produced this error. I didnt set mainlineLinux and arcNumber

>But as usual, you would do it at your own risk. Therefore, kwboot is very important to get working first.

i know what i did by breaking the "warranty void" seal ;) Now that we assume that my NAS is a NSA320S, i could try NSA320 kwb uboot image. At first i tried a uboot image for a different hardware.

>You are right. tftp should load and then u-boot should run the kernel. But rootfs needs to be on USB (or HDD). So if you want to test it that way >first, then it is all good. Let's postpone loading kernel from USB. Just rootfs from USB (therefore there is no need to try to activate it in u-boot).

So usb support is required first

Maybe i should mention, that the Medion NAS has an USB3 Port and 2 USB2 Ports



Edited 1 time(s). Last edit at 03/05/2017 10:34PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 06, 2017 12:56AM
helge,

> I tried with and without dtb i
> ncluded in uImage. both produced this error. I did
> nt set mainlineLinux and arcNumber

Set mainlineLinux to yes. archNumber is not needed when you use the DTB.

>
> So usb support is required first
>
> Maybe i should mention, that the Medion NAS has an
> USB3 Port and 2 USB2 Ports

If you load the kernel using tftp then there is no need for USB during u-boot running. When the kernel starts (using the images from tftp load), it has USB support so it will mount the rootfs from USB by itself (the rootfs can be on USB 3.0, too). u-boot is irrelevant after the kernel has started.

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



Edited 1 time(s). Last edit at 03/06/2017 12:59AM by bodhi.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 06, 2017 01:05AM
helge,

That GPL download link gave me an .exe file. Does not seem right! hope I can extract it as a tarball.

... Nope. I can't extract this GPL source file. Linux does not recognize it.

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



Edited 1 time(s). Last edit at 03/06/2017 01:09AM by bodhi.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 06, 2017 09:55AM
Hi bodhi,

the exe file is a self extracting Archive made with speedarchiver for windows platform. That's fine and no sketchy malware.

I'll upload a decrompressed version (medion-lifecloud-opensource-20131128.tar.bz2) right now. HERE it is :)

>If you load the kernel using tftp then there is no need for USB during u-boot running. When the kernel starts (using the images from tftp load), it has USB support so it will mount the rootfs from USB by itself (the rootfs can be on USB 3.0, too). u-boot is irrelevant after the kernel has started.

so loading uinit and uimage via tftp AND with usb stick attachted (for rootfs) should bood a valid system.

regarding kwboot.
- I am using mysmartusb in usb to uart (cp210x) mode which is detected as ttyusb0
- my laptop is my debian linux machine. it has u-boot-utils installed, which ships with kwboot.

I tried the following:
kwboot /home/helge/Medion_NAS/uboot.2016.05-tld-1.nsa310s.mtd0.kwb -p -t -B115200 /dev/ttyUSB0
kwboot /home/helge/Medion_NAS/uboot.2016.05-tld-1.nsa320.mtd0.kwb -p -t -B115200 /dev/ttyUSB0
kwboot /home/helge/Medion_NAS/uboot.2016.05-tld-1.nsa325.mtd0.kwb -p -t -B115200 /dev/ttyUSB0
But all i get is
Sending boot message. Pls reboot target
If i connect with putty while kwboot is running, i see him pushing the magic numbers to get the board to boot in bootrom. But instead the "garbage" brings just uboot to halt. Do i have to compile my own kwboot?

USB in uboot:
-USB stick is plugged into USB2-port before boot
-usb stick ist ext3 formated
-interrupt uboot process
- running usb reset

Marvell>> usb reset
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
T Device NOT ready
   Request Sense returned 00 00 00
1 Storage Device(s) found
Marvell>> help usb
usb usb start - start the usb interface, including scan of the bus. Must be
       executed prior to using the USB, and should be executed only once.
usb tree  - show USB device tree
usb info [dev] - show available USB devices
usb storage  - show details of USB storage devices
usb dev [dev] - show or set current USB storage device
usb part [dev] - print partition table of one or all USB storage devices
usb read addr blk# cnt - read `cnt' blocks starting at block `blk#'
       to memory address `addr'

Marvell>> usb storage
  Device 0: Vendor: USB      Prod.: DISK             Rev: DL07
            Type: Removable Hard Disk
            Capacity: not available
But looks like he thinks, that the stick is empty
Marvell>> usb part 0
print_part of 0
## Unknown partition table

print_part of 1
## Unknown partition table

print_part of 2
## Unknown partition table

print_part of 3
## Unknown partition table

print_part of 4
## Unknown partition table
But the stick seems to be recognized
Marvell>> usb info
1: Hub,  USB Revision 2.0
 - Marvell EHCI 
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Settings 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Mass Storage,  USB Revision 2.0
 - USB DISK 7FC30100578B51D4
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Bus Powered 200mA
     Interface: 0
     - Alternate Settings 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 1 In Bulk MaxPacket 512
     - Endpoint 2 Out Bulk MaxPacket 512
So this output was expected
Marvell>> run usb_boot

** Bad partition 1 **
** Bad partition 1 **

This is how my stick looks like in debian. Seems all fine
root@x200t-debian:/home/helge/Medion_NAS# lsblk -o name,mountpoint,label,size,uuid
NAME   MOUNTPOINT          LABEL               SIZE UUID
sda                                          119,2G 
├─sda1                     System-reserviert   500M C2088F11088F041F
└─sda2                                       118,8G 7EBE90CBBE907D79
sdb                                           14,5G 
├─sdb1 /                   SD                 13,8G ca1b9106-b041-48c8-913e-c9ad907b2551
├─sdb2                                           1K 
└─sdb5 [SWAP]                                  649M 5f940995-fdf1-4996-80a0-7992e32f8989
sdc                                            3,8G 9d0fa9fb-a23d-45e9-8ae4-b5f2e7393324
└─sdc1 /media/helge/rootfs rootfs              3,8G a9bae450-404f-4651-9f49-2cb99297a8ce

I tried booting via tftp several more times:
tftpboot 0x800000 uImage.include (same results with your uImage [which has no dtb inside] )
tftpboot 0x1100000 uInitrd.bodhi
usb reset
..1 usb found
setenv bootargs console=ttyS0,115200  root=LABEL=rootfs rootdealy=10
setenv mainlineLinux yes
bootm 0x800000 0x110000
## Booting image at 00800000 ...
   Image Name:   Linux-4.10.0-kirkwood-tld-helge
   Created:      2017-03-06   1:12:14 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3168283 Bytes =  3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00100000 ...
Bad Magic Number^@
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: DB6702A-GMtech LE

U-Boot 1.1.4 (Jun  5 2013 - 10:49:39) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz



Edited 15 time(s). Last edit at 03/06/2017 01:00PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 06, 2017 01:50PM
helge,


> regarding kwboot.

> Sending boot message. Pls reboot target

> If i connect with putty while kwboot is running, i
> see him pushing the magic numbers to get the board
> to boot in bootrom. But instead the "garbage" brin
> gs just uboot to halt. Do i have to compile my own
> kwboot?

No need. The standard kwboot from Debian repo is good.

This means either:

1. This box does not support UART booting. In serial console, check the BootROM version:

md ff00003c

2. It has a quirk. You can try Control-C to abort, and then recall kwboot the command, execute it again. Repeat this several times (up to 20). See its bootROM will catch the handshake.

> This is how my stick looks like in debian. Seems a
> ll fine
> I tried booting via tftp several more times:

What type of drive, brand/model?

Could you wipe it out with fdisk, and follow the instruction in the kernel/rootfs thread, create only 1 Ext3 partition,.... extract the rootfs tarball again (reminder: being root). The bad magic number error could be that the uImage is either corrupted, or not in the right format.

Check the commands that you used to append the DTB to see if those were correct (exactly as in the instruction?).

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



Edited 2 time(s). Last edit at 03/06/2017 01:55PM by bodhi.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 06, 2017 02:06PM
Hi bodhi,

>md ff00003c

is full of 0s
Marvell>> md ff00003c

ff00003c: 00000000 00000000 00000000 00000000    ................
ff00004c: 00000000 00000000 00000000 00000000    ................
ff00005c: 00000000 00000000 00000000 00000000    ................
ff00006c: 00000000 00000000 00000000 00000000    ................
ff00007c: 00000000 00000000 00000000 00000000    ................
ff00008c: 00000000 00000000 00000000 00000000    ................
ff00009c: 00000000 00000000 00000000 00000000    ................
ff0000ac: 00000000 00000000 00000000 00000000    ................
ff0000bc: 00000000 00000000 00000000 00000000    ................
ff0000cc: 00000000 00000000 00000000 00000000    ................
ff0000dc: 00000000 00000000 00000000 00000000    ................
ff0000ec: 00000000 00000000 00000000 00000000    ................
ff0000fc: 00000000 00000000 00000000 00000000    ................
ff00010c: 00000000 00000000 00000000 00000000    ................
ff00011c: 00000000 00000000 00000000 00000000    ................
ff00012c: 00000000 00000000 00000000 00000000    ................

>What type of drive, brand/model?

Could you wipe it out with fdisk, and follow the instruction in the kernel/rootfs thread, create only 1 Ext3 partition,.... extract the rootfs tarball again (reminder: being root). The bad magic number error could be that the uImage is either corrupted, or not in the right format.

Check the commands that you used to append the DTB to see if those were correct (exactly as in the instruction?).

Yeah already did this after the first tries didn't work. My usb stick is a no-brand type if you mean that with "drive, brand/model". I'll change it with an 8GB Patriot XT USB-Stick and build new kernel and rootfs. Will append putty.log

This is what i done for rootfs on usb
1. Deleted all partitions on my Patriot 8GB stick
2. with gparted i put an ext3 partiotion on it.
mount /dev/sdc1 /media/rootfs
cd /media/rootfs
tar -xjf Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
cd boot
cp -a zImage-4.4.0-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-goflexnet.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.4.0-kirkwood-tld-1 -d zImage.fdt  uImage
cd /; umount /media/root

Results remain the same. Ill post logs tommorow



Edited 6 time(s). Last edit at 03/07/2017 03:19PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 06, 2017 07:10PM
helge,

1. The USB for rootfs should be a good quality one such as Sandisk, Kingston,... the Patriot drives are notoriously bad for booting (numerous postings in this forum about it).
2. When in doubt, do a sync, umount, and fsck, before unplug.
3. There is typo on the 1st line: /media/rootfs ?
4. There is an error in DTB name ( not the cause of the current problem). The DTB name should be kirkwood_nsa320s.dtb.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 07, 2017 04:10PM
Hi bodhi,

thanks for your endurance with me.

I got one of my other sticks working (Intenso). run_usb start loads the files from usb stick. after that i try running
bootm 0x800000 0x1100000
The system freezes one more time though and sets
arcnumber=14

$(mtdparts)
is not set. I haven't found a hint what should be in there.

The errors you mentioned above, was me beeing tired :) I hope you noticed the GPL medion source is uploaded in my previous post



Edited 4 time(s). Last edit at 03/07/2017 04:56PM by helge.
Attachments:
open | download - putty (4.5 KB)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 07, 2017 05:59PM
helge,

The putty log either was not a very good capture, or this was a real error!

Marvell>> bootm 0x800000 0x11000   00000 0x400000

Let's do this.

- Interrupt serial console and

setenv arcNumber 4931
setenv mainlineLinux yes
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial $(mtdparts)'
setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
setenv usb_boot 'usb start; run set_bootargs; run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000'

Note that arcNumber is really not imprtant booting with DTB, just including it here for completeness.

And then

printenv
run usb_boot

And post the entire serial console log here. You can post it in code tags inside the post, no need to attach it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 07, 2017 06:28PM
Hi bodhi,

step by step we get it working :)
Here is the log. This time without errors in format :P
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.03.08 01:23:36 =~=~=~=~=~=~=~=~=~=~=~=

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: DB6702A-GMtech LE 

U-Boot 1.1.4 (Jun  5 2013 - 10:49:39) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz 

DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> printenv
baudrate=115200
loads_echo=0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
console=console=ttyS0,115200
bootargs_root=ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
bootcmd=nand read.e 0x800000 0x100000 0x400000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
rootpath=/tftpboot_tokyo/marvell_nfs
image_name=uImage.medion
ethaddr=00:11:41:3C:30:07
PK=MEPN-MDBQ-PTZT-AWZE
fileaddr=800000
bootfile=uImage.include
gatewayip=10.0.0.1
netmask=255.255.255.0
ipaddr=10.0.0.30
dnsip=10.0.0.1
serverip=10.0.0.38
usb_load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial
filesize=6D8E9F
arcNumber=4931
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial $(mtdparts)
usb_boot=usb start; run set_bootargs; run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 1726/131068 bytes
Marvell>> run usb_boot 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
.......................................................................................................

3154896 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
..............................................................................................................................................................................................................................................................................................

7179935 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   5:55:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3154832 Bytes =  3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   7:33:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes =  6.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

With 4.10 included dtb kernel

Marvell>> run usb_boot
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
.......................................................................................................................

3315732 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
..............................................................................................................................................................................................................................................................................................

7179935 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.10.nsa320s
   Created:      2017-03-08   0:48:54 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3315668 Bytes =  3.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   7:33:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes =  6.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...
After some time (kernl 4.10 with dtb included) all LED turn from blue to red. Not so with version 4.4.0 kernel and dtb included. The log is exactly the same, but the led dont change color.

this is how i created kernel images
root@x200t-debian:/# mount /dev/sdc1  /media/root/
root@x200t-debian:/# cd /media/root/boot/
root@x200t-debian:/media/root/boot# rm uImage
root@x200t-debian:/media/root/boot# rm zImage.fdt 
root@x200t-debian:/media/root/boot# cp -a zImage-4.4.0-kirkwood-tld-1 zImage.fdt
root@x200t-debian:/media/root/boot# cat dts/kirkwood-nsa320s.dtb >> zImage.fdt 
root@x200t-debian:/media/root/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.4.0-nsa320s -d zImage.fdt uImage
Image Name:   Linux-4.4.0-nsa320s
Created:      Wed Mar  8 02:42:56 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3168283 Bytes = 3094.03 kB = 3.02 MB
Load Address: 00008000
Entry Point:  00008000
root@x200t-debian:/media/root/boot# sync
root@x200t-debian:/media/root/boot# cd /
root@x200t-debian:/# umount /media/root
for version 4.10 kernel i exchanged dts folder and zImage to version 4.10.
i never touched initramfs cause i don't have vmlinuz-4.10 and i think 4.4.0 was your latest version. thanks again btw for your work :)
I also tried ext2 and ext3
Since mtdparts is empty i tried:
setenv mtdparts ubi.mtd=2,2048
but it didn't work either.



Edited 9 time(s). Last edit at 03/07/2017 07:57PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 07, 2017 08:51PM
helge,

You can't change the kernel to 4.10. It has to be kernel 4.4 that come with the rootfs. So redo the DTB-appended uImage and try again.

Earlyprintk hopefully will print out some info if the kernel can't start.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 08, 2017 12:27PM
Hi bodhi,

nope i tried it yesterday with:

kernel 4.4.0 stock
kernel 4.4.0 with dts
and
kernel 4.10.0 stock
kernel 4.10.0 with dts

but will post 4.4.0 from clean usb stick with full log

Let's create clean stick - so we don't mess up the file versions
helge@x200t-debian:~/Medion_NAS$ su -
Passwort: 
root@x200t-debian:~# cd /home/helge/Medion_NAS/
root@x200t-debian:/home/helge/Medion_NAS# ls
boot						  uboot.2016.05-tld-1.nsa310s.bodhi.tar
Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2  uboot.2016.05-tld-1.nsa310s.mtd0.kwb
kwboot						  uboot.2016.05-tld-1.nsa320.bodhi.tar
linux-4.10.0-kirkwood-tld-1-bodhi		  uboot.2016.05-tld-1.nsa320.mtd0.kwb
linux-4.10.0-kirkwood-tld-1-bodhi.tar.bz2	  uboot.2016.05-tld-1.nsa325.bodhi.tar
putty.log					  uboot.2016.05-tld-1.nsa325.mtd0.kwb
root@x200t-debian:/home/helge/Medion_NAS# md5sum Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 
9f957e1dc5a36f90a285ab4615cb02fd  Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
root@x200t-debian:/home/helge/Medion_NAS# fdisk -l /dev/sdc 

Disk /dev/sdc: 7,5 GiB, 8022654976 bytes, 15669248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf7ab30d8

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1  *     2048 15669247 15667200  7,5G 83 Linux
    
root@x200t-debian:/home/helge/Medion_NAS# mkfs.ext3 -Lrootfs /dev/sdc1
mke2fs 1.42.12 (29-Aug-2014)
/dev/sdc1 hat ein ext3-Dateisystem
	auf Wed Mar  8 19:44:02 2017
 erzeugtTrotzdem fortfahren? (j,n) j
Ein Dateisystems mit 1958400 (4k) Blöcken und 489600 Inodes wird erzeugt.
UUID des Dateisystems: 60774960-32b9-4d5a-9ffc-3cfd41e7d76c
Superblock-Sicherungskopien gespeichert in den Blöcken: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

beim Anfordern von Speicher für die Gruppentabellen: erledigt                        
Inode-Tabellen werden geschrieben: erledigt                        
Das Journal (32768 Blöcke) wird angelegt: erledgt
Die Superblöcke und die Informationen über die Dateisystemnutzung werden
geschrieben: erledigt
#finished without errors

root@x200t-debian:/home/helge/Medion_NAS# 
root@x200t-debian:/home/helge/Medion_NAS# lsblk /dev/sdc1 -o label
LABEL
rootfs
root@x200t-debian:/home/helge/Medion_NAS# mount /dev/sdc1 /media/root/
root@x200t-debian:/home/helge/Medion_NAS# cd /media/root/
root@x200t-debian:/media/root# ls -ahl
insgesamt 24K
drwxr-xr-x 3 root root 4,0K Mär  8 19:47 .
drwxr-xr-x 5 root root 4,0K Mär  5 16:05 ..
drwx------ 2 root root  16K Mär  8 19:47 lost+found
root@x200t-debian:/media/root# tar -xfj /home/helge/Medion_NAS/
boot/                                             uboot.2016.05-tld-1.nsa310s.bodhi.tar
Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2  uboot.2016.05-tld-1.nsa310s.mtd0.kwb
kwboot/                                           uboot.2016.05-tld-1.nsa320.bodhi.tar
linux-4.10.0-kirkwood-tld-1-bodhi/                uboot.2016.05-tld-1.nsa320.mtd0.kwb
linux-4.10.0-kirkwood-tld-1-bodhi.tar.bz2         uboot.2016.05-tld-1.nsa325.bodhi.tar
putty.log                                         uboot.2016.05-tld-1.nsa325.mtd0.kwb
root@x200t-debian:/media/root# tar -xjf /home/helge/Medion_NAS/Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 
root@x200t-debian:/media/root# ls -ahl
insgesamt 96K
drwxr-xr-x 21 root root 4,0K Feb 17  2015 .
drwxr-xr-x  5 root root 4,0K Mär  5 16:05 ..
drwxr-xr-x  2 root root 4,0K Feb 19  2016 bin
drwxr-xr-x  3 root root 4,0K Feb 19  2016 boot
drwxr-xr-x  5 root root 4,0K Feb 24  2012 dev
drwxr-xr-x 56 root root 4,0K Feb 20  2016 etc
drwxr-xr-x  2 root root 4,0K Jan 22  2012 home
drwxr-xr-x 14 root root 4,0K Feb 19  2016 lib
drwx------  2 root root  16K Feb 24  2012 lost+found
drwxr-xr-x  2 root root 4,0K Feb 24  2012 media
drwxr-xr-x  2 root root 4,0K Feb 10  2015 mnt
drwxr-xr-x  2 root root 4,0K Feb 24  2012 opt
drwxr-xr-x  2 root root 4,0K Jan 22  2012 proc
drwx------  4 root root 4,0K Feb 20  2016 root
drwxr-xr-x  2 root root 4,0K Feb  8  2013 run
drwxr-xr-x  2 root root 4,0K Feb 19  2016 sbin
drwxr-xr-x  2 root root 4,0K Feb 24  2012 srv
drwxr-xr-x  2 root root 4,0K Jan  1  2011 sys
drwxrwxrwt  2 root root 4,0K Jan  1  1970 tmp
drwxr-xr-x 10 root root 4,0K Feb 24  2012 usr
drwxr-xr-x 11 root root 4,0K Jan  1  1970 var
root@x200t-debian:/media/root# cd boot/
root@x200t-debian:/media/root/boot# nano ../etc/fstab 
root@x200t-debian:/media/root/boot# 
root@x200t-debian:/media/root/boot# cat ../etc/fstab 
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/root      /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0
root@x200t-debian:/media/root/boot# ls -ahl
insgesamt 33M
drwxr-xr-x  3 root root 4,0K Feb 19  2016 .
drwxr-xr-x 21 root root 4,0K Feb 17  2015 ..
-rw-r--r--  1 root root 138K Jan 26  2016 config-4.4.0-kirkwood-tld-1
drwxr-xr-x  2 root root 4,0K Jan 26  2016 dts
-rw-r--r--  1 root root 6,9M Feb 19  2016 initrd.img-4.4.0-kirkwood-tld-1
-rw-r--r--  1 root root 7,2M Jan 26  2016 linux-headers-4.4.0-kirkwood-tld-1_1.0_armel.deb
-rw-------  1 root root 2,2M Jan 26  2016 System.map-4.4.0-kirkwood-tld-1
-rw-r--r--  1 root root 3,1M Feb 19  2016 uImage
-rw-r--r--  1 root root 6,9M Feb 19  2016 uInitrd
-rw-------  1 root root 3,1M Jan 26  2016 vmlinuz-4.4.0-kirkwood-tld-1
-rwxr-xr-x  1 root root 3,1M Jan 26  2016 zImage-4.4.0-kirkwood-tld-1
root@x200t-debian:/media/root/boot# cp -a zImage-4.4.0-kirkwood-tld-1 zImage.fdt
root@x200t-debian:/media/root/boot# cat dts/kirkwood-nsa320s.dtb >> zImage.fdt 
root@x200t-debian:/media/root/boot# mv uImage uImage.orig
root@x200t-debian:/media/root/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.4.0-320s -d zImage.fdt uImage
Image Name:   Linux-4.4.0-320s
Created:      Wed Mar  8 19:55:15 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3168283 Bytes = 3094.03 kB = 3.02 MB
Load Address: 00008000
Entry Point:  00008000
root@x200t-debian:/media/root/boot# ls -ahl
insgesamt 39M
drwxr-xr-x  3 root root 4,0K Mär  8 19:55 .
drwxr-xr-x 21 root root 4,0K Feb 17  2015 ..
-rw-r--r--  1 root root 138K Jan 26  2016 config-4.4.0-kirkwood-tld-1
drwxr-xr-x  2 root root 4,0K Jan 26  2016 dts
-rw-r--r--  1 root root 6,9M Feb 19  2016 initrd.img-4.4.0-kirkwood-tld-1
-rw-r--r--  1 root root 7,2M Jan 26  2016 linux-headers-4.4.0-kirkwood-tld-1_1.0_armel.deb
-rw-------  1 root root 2,2M Jan 26  2016 System.map-4.4.0-kirkwood-tld-1
-rw-r--r--  1 root root 3,1M Mär  8 19:56 uImage
-rw-r--r--  1 root root 3,1M Feb 19  2016 uImage.orig
-rw-r--r--  1 root root 6,9M Feb 19  2016 uInitrd
-rw-------  1 root root 3,1M Jan 26  2016 vmlinuz-4.4.0-kirkwood-tld-1
-rwxr-xr-x  1 root root 3,1M Jan 26  2016 zImage-4.4.0-kirkwood-tld-1
-rwxr-xr-x  1 root root 3,1M Mär  8 19:54 zImage.fdt
root@x200t-debian:/media/root/boot# sync
root@x200t-debian:/media/root/boot# sync
root@x200t-debian:/media/root/boot# sync
root@x200t-debian:/media/root/boot# cd /
root@x200t-debian:/# umount /media/root 
root@x200t-debian:/#

trying to boot with it
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.03.08 20:03:38 =~=~=~=~=~=~=~=~=~=~=~=
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: DB6702A-GMtech LE 

U-Boot 1.1.4 (Jun  5 2013 - 10:49:39) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz 

DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> 
Marvell>> 
Marvell>> printenv
baudrate=115200
loads_echo=0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
console=console=ttyS0,115200
bootargs_root=ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
bootcmd=nand read.e 0x800000 0x100000 0x400000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
rootpath=/tftpboot_tokyo/marvell_nfs
image_name=uImage.medion
ethaddr=00:11:41:3C:30:07
PK=MEPN-MDBQ-PTZT-AWZE
fileaddr=800000
bootfile=uImage.include
gatewayip=10.0.0.1
netmask=255.255.255.0
ipaddr=10.0.0.30
dnsip=10.0.0.1
serverip=10.0.0.38
usb_load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10
filesize=6D8E9F
arcNumber=4931
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial $(mtdparts)
usb_boot=usb start; run set_bootargs; run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no

Environment size: 1726/131068 bytes

Marvell>> 
Marvell>> run usb_boot 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
........................................................................................................

3168347 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
..............................................................................................................................................................................................................................................................................................

7179935 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.4.0-320s
   Created:      2017-03-08  18:55:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3168283 Bytes =  3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   7:33:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes =  6.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...
#waiting for 10min to respond...nothin'

Does it matter, that the memory addresses of the original differ?
bootcmd=nand read.e 0x800000 0x100000 0x400000
Should we try another dts file?



Edited 7 time(s). Last edit at 03/08/2017 02:24PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 08, 2017 05:03PM
helge,

I double-checked your steps and everything looks good!

So now the problem is potentially, like you suspected, that the stock u-boot could have been hard coded to run the kernel at stock address. So let's try that.

Our load address
bootm 0x800000 0x1100000
But stock is:
bootcmd=nand read.e 0x800000 0x100000 0x400000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
So it is the same address!

However, there is another stock load address:
loadaddr=0x02000000

So let's use that.

setenv initrd_addr 0x2900000
setenv usb_load_uimage 'ext2load usb 0:1 $(loadaddr)  /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb 0:1 $(initrd_addr) /boot/uInitrd'
setenv usb_boot 'usb start; run set_bootargs; run usb_load_uimage; run usb_load_uinitrd; bootm $(loadaddr)  $(initrd_addr)'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 08, 2017 06:23PM
hi bodhi,

thank you for your time. I think you mean
start usb_boot
because if i just run
boot
bootcmd kicks in

Marvell>> printenv
baudrate=115200
loads_echo=0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
console=console=ttyS0,115200
bootargs_root=ubi.mtd=2,2048 root=ubi0:rootfs rootfstype=ubifs init=/linuxrc
bootcmd=nand read.e 0x800000 0x100000 0x400000; setenv bootargs $(console) $(bootargs_root); bootm 0x800000
rootpath=/tftpboot_tokyo/marvell_nfs
image_name=uImage.medion
ethaddr=00:11:41:3C:30:07
PK=MEPN-MDBQ-PTZT-AWZE
fileaddr=800000
bootfile=uImage.include
gatewayip=10.0.0.1
netmask=255.255.255.0
ipaddr=10.0.0.30
dnsip=10.0.0.1
serverip=10.0.0.38
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10
filesize=6D8E9F
arcNumber=4931
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial $(mtdparts)
initrd_addr=0x2900000
usb_load_uimage=ext2load usb 0:1 $(loadaddr) /boot/uImage
usb_load_uinitrd=ext2load usb 0:1 $(initrd_addr) /boot/uInitrd
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
usb_boot=usb start; run set_bootargs; run usb_load_uimage; run usb_load_uinitrd; bootm $(loadaddr) $(initrd_addr)

Environment size: 1764/131068 bytes
Marvell>> saveenv 
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> run usb_
  usb_load_uimage usb_load_uinitrd usb_boot
Marvell>> run usb_boot 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
........................................................................................................

3168347 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
..............................................................................................................................................................................................................................................................................................

7179935 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux-4.4.0-320s
   Created:      2017-03-08  18:55:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3168283 Bytes =  3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02900000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   7:33:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes =  6.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...
#freeze
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 08, 2017 08:19PM
helge,

Yes, run usb_boot. And I am stumped :) we did everything right.

I think it's time for me to take a closer look at the envs again. And also start reading the GPL!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 10, 2017 03:09AM
helge,

The GPL tarball is not helpful. I didn't see any README file in this. No u-boot tarball?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 10, 2017 09:22AM
HI bodhi,

i know its just a bunch of rpm's. But atleast theyr source packages. packages with 'oe' in the name seem to be modified.
The interesting files should be in kernel-2.6.31.8.tar.bz2
It contains instructions on how to build kernel and ubifs rootfs. But there is no Image included. Seems like medion hide it somewhere :/

General LSP information
=================================================

Contents:
---------
  1.  Default kernel configuration
  2.  Marvell LSP File locations
  3.  Procedure for Porting a new Customer Board (KW)
  4.  MTD (Memory Technology Devices) Support
  5.  Network
    5.1 mv_gateway driver 
    5.2 eth-tool
  6. TDM
  7.  SATA
    7.1 SCSI scattered spin-up support 
  8.  USB in HOST mode
  9.  USB in Device mode
  10. Real Time Clock
  11. CESA
  12. SD\MMC\SDIO
  13. Audio
  14. Kernel configuration
    14.1 General Configuration
    14.2 Run-Time Configuration
    14.3 Compile-Time Configuration 
  15. Debugging  Tools
  16. CPUFREQ
  17. UBIFS
  18. Dual CPU Support for MV78200 SoC
  19. LCD

But you're propably looking for something like this
root@x200t-debian:/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8# grep -Rnw '/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/' -e'medion'
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfs/sbin/report_status:10:http://recovery.medion.hipserv.com/downloads/recovery/report_status.php\
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfs/sbin/report_failure:14:http://recovery.medion.hipserv.com/downloads/recovery/get_bootfail_script.php\
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfs/sbin/get_recovery_script:11:http://recovery.medion.hipserv.com/downloads/recovery/get_recovery_script.php\
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/kernel/sys.c:49://Adding reg and string .h from 3rd party trunk medion lifesycyle set led status 
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfullfs/init:100:echo "checking for uImage.medion and uImage.medion.md5"
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfullfs/init:101:#check and see both uImage.medion and uImage.medion.md5 files exist
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfullfs/init:103:if [ -f /mnt/usb/uImage.medion -a -f /mnt/usb/uImage.medion.md5 ];then
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfullfs/init:104:	echo "USB contain both uImage.medion and uImage.medion.md5"
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfullfs/init:105:	MEDION5SUM=`md5sum /mnt/usb/uImage.medion | cut -d" " -f1`
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfullfs/init:106:	MEDIONMD5SUM=`cat /mnt/usb/uImage.medion.md5 | cut -d" " -f1`
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/recoveryfullfs/init:110:		nandwrite /dev/mtd1 /mnt/usb/uImage.medion
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/Documentation/sound/alsa/HD-Audio-Models.txt:24:  medion	Medion Rim 2150
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/Documentation/sound/alsa/HD-Audio-Models.txt:144:  medion	Medion Laptops
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/Documentation/sound/alsa/HD-Audio-Models.txt:145:  medion-md2	Medion MD2
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/sound/pci/hda/patch_realtek.c:3777:	[ALC880_MEDION_RIM]	= "medion",
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/sound/pci/hda/patch_realtek.c:7969:        /* eanable EAPD on medion laptop */
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/sound/pci/hda/patch_realtek.c:8820:        /* eanable EAPD on medion laptop */
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/sound/pci/hda/patch_realtek.c:9063:	[ALC883_MEDION]		= "medion",
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/sound/pci/hda/patch_realtek.c:9064:	[ALC883_MEDION_MD2]	= "medion-md2",
/home/helge/Medion_NAS/kernelball.medion/kernel-2.6.31.8/arch/arm/mach-feroceon-kw/btns_dev.h:31:/* medion nas buttons */

Would it help, if i provide a backup of my flashmemory? i am trying to mount them with nandsim, but i am getting kernel panics :P



Edited 7 time(s). Last edit at 03/10/2017 03:54PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 10, 2017 04:48PM
helge,

> The interesting files should be in kernel-2.6.31.8
> .tar.bz2

I've looked at this to find out if their kernel was compiled with hardcoded bootargs. But it showed that stockkernel accepts the tag structure from u-boot (the typical old mechanism for older u-boot and kernel 2.6.xx).

> It contains instructions on how to build kernel an
> d ubifs rootfs. But there is no Image included. Se
> ems like medion hide it somewhere :/

This is an incompleted GPL tarball. There should be u-boot source code in it.

> Would it help, if i provide a backup of my flashme
> mory? i am trying to mount them with nandsim, but
> i am getting kernel panics :P

I don't think it will be useful! since I am looking for u-boot info. We already have kernel source in the tarball.

The fact that earlyprintk did not output anything indicated that the kernel has not started at all. And that might be either:

- wrong load address
- wrong bootargs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 11, 2017 02:33PM
>This is an incompleted GPL tarball. There should be u-boot source code in it.
That's not that good, because i posted all source medion released. :(

>- wrong load address
>- wrong bootargs.

So resetenv maybe provided new info

Marvell>> printenv 
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0xff00000@0x100000(root)
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
bootcmd=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig) video=dovefb:lcd0:$(lcd0_params) clcd.lcd0_enable=$(lcd0_enable);  bootm 0x2000000; 
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
bootdelay=3
disaMvPnp=no
ethaddr=00:50:43:00:02:02
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
enaAutoRecovery=yes
pcieTune=no
ethact=egiga0

Environment size: 1367/131068 bytes

Resulting in this enviroment
Marvell>> printen
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0xff00000@0x100000(root)
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
bootcmd=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig) video=dovefb:lcd0:$(lcd0_params) clcd.lcd0_enable=$(lcd0_enable);  bootm 0x2000000; 
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethaddr=00:50:43:00:02:02
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
mtdparts=nand_mtd:0xc0000@0(uboot)ro,0xff00000@0x100000(root)
arcNumber=4931
usb_load_uImage=ext2load usb 0:1 $(addr_uImage) /boot/uImage
usb_load_uInitrd=ext2load usb 0:1 $(addr_uInitrd) /boot/uInitrd
usb_bootargs=setenv bootargs $(console) root=LABEL=rootfs rootdelay=10 earlyprintk=serial
usb_cmd=usb start; run usb_bootargs; run usb_load_uImage; run usb_load_uInitrd; bootm $(addr_uImage) $(addr_uInitrd)
addr_uImage=0x2000000
addr_uInitrd=0x1100000
serverip=10.0.0.38
ipaddr=10.0.0.30
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0xff00000@0x100000(root) root=LABEL=rootfs rootdelay=10 earlyprintk=serial

Environment size: 1962/131068 bytes
#IT crashed with 0x2000000 so i changed it to our well known 0x800000
Marvell>> setenv addr_uImage 0x800000
Marvell>> run usb_cmd 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
........................................................................................................

3168347 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
..............................................................................................................................................................................................................................................................................................

7179935 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-4.4.0-320s
   Created:      2017-03-08  18:55:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3168283 Bytes =  3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   7:33:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes =  6.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...



Edited 3 time(s). Last edit at 03/11/2017 03:39PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 11, 2017 02:49PM
helge,

Does this box have an LCD?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 11, 2017 03:46PM
hi bodhi,

no it has no Display connected.
On the bottomside of the pcb is a connector for the 2 SATA Ports. Thats it
And to be complete, here is a pic of the back



Edited 5 time(s). Last edit at 03/11/2017 03:59PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 11, 2017 04:49PM
helge,

>
> Starting kernel ...

Did you look to find it in the network after this point? sometime it seems stuck, but it is possible that serial console output has stopped (I asked about the LCD above because that would be one of the possibilities).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 11, 2017 04:58PM
helge,

By the way,

#IT crashed with 0x2000000 so i changed it to our well known 0x800000
Marvell>> setenv addr_uImage 0x800000

Most likely the reason it crashed was becauseyou did not use the corresponding uInitrd load address. They need to be changed in pair.

loadaddr=0x02000000
initrd_addr=0x2900000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 11, 2017 06:00PM
bodhi,

>Did you look to find it in the network after this point? sometime it seems stuck, but it is possible that serial console output >has stopped (I asked about the LCD above because that would be one of the possibilities).

tried to ping the ip address, which i set in $(ippaddr) => 10.0.0.30 it wasn't pingable, nor could i connect with ssh or telnet.
but it was able to
tftpload
an uImage. the nas was also visible in my router. So networking did work in uboot

>loadaddr=0x02000000
<initrd_addr=0x2900000

Your assumption was correct :P But i tried it now. The resulsts were as usal. It hungs after booting kernel and initram



Edited 1 time(s). Last edit at 03/11/2017 06:01PM by helge.
Re: Deb on Medion MD86783 (Soc: 88F6702 Marvell Feroceon 88FR131)
March 11, 2017 06:09PM
helge Wrote:

> tried to ping the ip address, which i set in $(ip
> paddr) => 10.0.0.30 it wasn't pingable, nor could
> i connect with ssh or telnet.

It's no longer 10.0.0.30 :) The basic rootfs uses dhcp, unless you have changed it after you extracted to USB. So look to see if any new IP appear in the network.

However, there's a very slim chance that the kernel has been running.

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



Edited 1 time(s). Last edit at 03/11/2017 06:11PM by bodhi.
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: