DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-07-24 09:14:12

baarney
Member
From: Sydney
Registered: 2008-02-05
Posts: 29

Kernel config for second USB port

Hi,

I've got a Rev B2 board (Soc: MV88F5182 Rev 2), but after installing custom firmware it only picks up one of the USB ports.

The original, v1.04 fw picked up both:

ehci_platform ehci_platform.20865: EHCI Host Controller
ehci_platform ehci_platform.20865: new USB bus registered, assigned bus number 1
ehci_platform ehci_platform.20865: irq 17, io mem 0x00000000
ehci_platform ehci_platform.20865: park 0
ehci_platform ehci_platform.20865: USB 0.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.86401: EHCI Host Controller
ehci_platform ehci_platform.86401: new USB bus registered, assigned bus number 2
ehci_platform ehci_platform.86401: irq 12, io mem 0x00000000
ehci_platform ehci_platform.86401: park 0
ehci_platform ehci_platform.86401: USB 0.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected

But my custom, 2.6.30 based kernel only finds one:

# modprobe ehci-hcd
[   89.695990] usbcore: registered new interface driver usbfs
[   89.707207] usbcore: registered new interface driver hub
[   89.718389] usbcore: registered new device driver usb
[   89.816209] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   89.822937] orion-ehci orion-ehci.0: Marvell Orion EHCI
[   89.828196] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   89.860186] orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
[   89.880177] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   89.887514] usb usb1: configuration #1 chosen from 1 choice
[   89.899461] hub 1-0:1.0: USB hub found
[   89.903383] hub 1-0:1.0: 1 port detected

I have configured USB as a module rather than built in, but I don't see how that should make a difference, so I'm guessing it's a kernel configuration issue. Does anyone have a kernel config they're willing to share for a 2.6.30 or later kernel that picks up both USB ports?

Cheers,

Barney

Offline

 

#2 2009-07-25 20:01:30

jcard
Member
From: Portugal
Registered: 2008-09-21
Posts: 289

Re: Kernel config for second USB port

You need to patch the kernel, the dns323 initialization is missing the second controller:

Code:

--- arch/arm/mach-orion5x/dns323-setup.c~       2009-06-25 04:29:23.000000000 +0100
+++ arch/arm/mach-orion5x/dns323-setup.c        2009-07-25 17:11:46.000000000 +0100
@@ -414,6 +414,7 @@
                printk("DNS323: Failed to read MAC address\n");

        orion5x_ehci0_init();
+       orion5x_ehci1_init(); //jc:
        orion5x_eth_init(&dns323_eth_data);
        orion5x_i2c_init();
        orion5x_uart0_init();

After that, the boot log shows:

Code:

Linux version 2.6.30 (jcard@silver) (gcc version 4.3.3 (GCC) ) #10 Sat Jul 25 17:22:59 WEST 2009
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
...
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
orion-ehci orion-ehci.1: Marvell Orion EHCI
orion-ehci orion-ehci.1: new USB bus registered, assigned bus number 2
orion-ehci orion-ehci.1: irq 12, io mem 0xf10a0000
orion-ehci orion-ehci.1: USB 2.0 started, EHCI 1.00
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected

But I didn't test it in the "bare metal".

BTW, can you software-poweroff your box with 2.6.30? Anybody can? I can't.

Last edited by jcard (2009-07-25 20:03:16)


Please consider discussing Alt-F at http://groups.google.com/group/alt-f/topics
Please consider filling Alt-F bugs at http://code.google.com/p/alt-f/issues/list

Offline

 

#3 2009-07-27 13:10:22

rasto
Member
Registered: 2009-07-17
Posts: 17
Website

Re: Kernel config for second USB port

This sux. I just updated my kernel to version:
uname -a
Linux nas 2.6.30-1-orion5x #1 Sun Jul 19 01:26:48 UTC 2009 armv5tel GNU/Linux

and I can only see 1 Marvell Orion EHCI there.

grep -i Product /proc/bus/usb/devices
S:  Product=Marvell Orion EHCI
S:  Product=USB2.0 Hub
S:  Product=JUMPDRIVE
S:  Product=Flash Disk
S:  Product=DataTraveler 2.0
S:  Product=HP LaserJet P1006

Offline

 

#4 2009-07-27 22:21:00

jcard
Member
From: Portugal
Registered: 2008-09-21
Posts: 289

Re: Kernel config for second USB port

rasto wrote:

This sux. I just updated my kernel to version:
uname -a
Linux nas 2.6.30-1-orion5x #1 Sun Jul 19 01:26:48 UTC 2009 armv5tel GNU/Linux

and I can only see 1 Marvell Orion EHCI there.

grep -i Product /proc/bus/usb/devices
S:  Product=Marvell Orion EHCI
S:  Product=USB2.0 Hub
S:  Product=JUMPDRIVE
S:  Product=Flash Disk
S:  Product=DataTraveler 2.0
S:  Product=HP LaserJet P1006

What do you mean? Have you applied the patch? Do you have a Rev-A or Rev-B1 board? According to Marvell's datasheet, the 88F5182 has "Two USB 2.0 ports with PHY", while the 88F5281 has "Single USB2.0 peripheral or host port with integrated PHY".

Edited: if you dont known which one you have, search in the boot log for "Orion ID:". My Rev-B1 box has a MV88F5182-A2

On my box, after apllying the "patch":

# uname -r
2.6.30
# cat /proc/bus/usb/devices
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 2.06
S:  Manufacturer=Linux 2.6.30 ehci_hcd
S:  Product=Marvell Orion EHCI
S:  SerialNumber=orion-ehci.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 2.06
S:  Manufacturer=Linux 2.6.30 ehci_hcd
S:  Product=Marvell Orion EHCI
S:  SerialNumber=orion-ehci.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

PS-The "patch" does not takes into account this difference between Rev-A and B boards, which is trivial to do, just *look* at the top of arch/arm/mach-orion5x/dns323-setup.c:dns323_init()

Last edited by jcard (2009-07-28 01:20:51)


Please consider discussing Alt-F at http://groups.google.com/group/alt-f/topics
Please consider filling Alt-F bugs at http://code.google.com/p/alt-f/issues/list

Offline

 

#5 2009-07-28 12:47:24

rasto
Member
Registered: 2009-07-17
Posts: 17
Website

Re: Kernel config for second USB port

I meant to say,
According instructions from here:
http://www.cyrius.com/journal/debian/or … an-control

I've used kernel from this repository:
http://people.debian.org/~tbm/orion

Apparently inicialization procedure for second port is not there.
I cannot see /proc/config.gz as well to safely build my own kernel.

Do You have repository I can add for Your kernel?
Or kernel .deb package?
Can I have Your .config file to build kernel?

After looking at picture of my DNS-323 it is rev B1
http://picasaweb.google.com/rastislav.d … 7685897554

dmesg reveals:
[    0.230000] Orion ID: MV88F5182-A2. TCLK=166666667.

Offline

 

#6 2009-07-28 22:45:08

jcard
Member
From: Portugal
Registered: 2008-09-21
Posts: 289

Re: Kernel config for second USB port

rasto wrote:

I meant to say,
According instructions from here:
http://www.cyrius.com/journal/debian/or … an-control

I've used kernel from this repository:
http://people.debian.org/~tbm/orion

Apparently inicialization procedure for second port is not there.
I cannot see /proc/config.gz as well to safely build my own kernel.

Do You have repository I can add for Your kernel?
Or kernel .deb package?
Can I have Your .config file to build kernel?

After looking at picture of my DNS-323 it is rev B1
http://picasaweb.google.com/rastislav.d … 7685897554

dmesg reveals:
[    0.230000] Orion ID: MV88F5182-A2. TCLK=166666667.

ah, ok, you could start by saying that.

You can extract the kernel config file from the file you donwloaded, a .deb package, which is just an archive of several files. In linux, you can:

Code:

silver:~ # ar t /tmp/linux-image-2.6.30-1-orion5x_2.6.30-3_armel.deb # lists archive
debian-binary
control.tar.gz
data.tar.gz
silver:~ # ar vx /tmp/linux-image-2.6.30-1-orion5x_2.6.30-3_armel.deb data.tar.gz # extract only data.tar.gz component
x - data.tar.gz
silver:~ # tar xvzf data.tar.gz ./boot/config-2.6.30-1-orion5x # extract just kernel config
./boot/config-2.6.30-1-orion5x

Or you could just open and explore the archive with, e.g. gnome "file roller".

Be warned, the debian kernel is a "fat" one (34MB of modules), and has several patches applied, so you must also download the debian kernel source, or apply the patches to a vanilla kernel.
Luck.


Please consider discussing Alt-F at http://groups.google.com/group/alt-f/topics
Please consider filling Alt-F bugs at http://code.google.com/p/alt-f/issues/list

Offline

 

#7 2009-07-31 09:57:47

rasto
Member
Registered: 2009-07-17
Posts: 17
Website

Re: Kernel config for second USB port

I've build kernel, and I'm trying to create .deb package but I getthis when I'm trying to do that:

  CC      init/main.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  CHK     include/linux/compile.h
  CC      init/version.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  CC      init/do_mounts.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  CC      init/do_mounts_rd.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  CC      init/do_mounts_initrd.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  LD      init/mounts.o
/bin/sh: arm-linux-gnueabi-ld: command not found
make[2]: *** [init/mounts.o] Error 127
make[1]: *** [init] Error 2
make[1]: Leaving directory `/mnt/root/linux-source-2.6.30'
make: *** [debian/stamp/build/kernel] Error 2

I'm unable to find package which provides arm-linux-gnueabi-objdump and arm-linux-gnueabi-ld

Offline

 

#8 2009-09-06 09:34:50

baarney
Member
From: Sydney
Registered: 2008-02-05
Posts: 29

Re: Kernel config for second USB port

Hi, sorry - I missed this the first time...

jcard wrote:

BTW, can you software-poweroff your box with 2.6.30? Anybody can? I can't.

Yes, using Erik Benada's patch from here: http://lists.arm.linux.org.uk/lurker/me … 4a.en.html with the appropriate user space actions as he describes. Halt, restart and poweroff all do exactly what they say!

This also allows you to control the blinking of the main led via gpio. Haven't checked if this has made it into 2.6.31 or not.

Cheers,

Barney

Last edited by baarney (2009-09-06 09:35:25)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB