can't install driver of ethernet card

Asked by ABay on 2010-02-16

My NB, TOSHIBA M800, has a ethernet card(marvell 88E8040T). After I installed the UBUNTU 9.10, the system can't find my card. So I downloaded the driver from the marvell website, and followed the readme step. When I type: sudo sh install.sh or ./install.sh, it showed:./install.sh: 44: Syntax error: "(" unexpected. I can't solve this problem. Could you help me please? Thank you very much~

<email address hidden>

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
ABay
Solved:
2010-02-21
Last query:
2010-02-21
Last reply:
2010-02-21
Matthew (mangusmatthew) said : #2

It's not the full answer but I think it's a kernel problem.

ABay (abay1983) said : #4

But I failed.... This is my situation:
root@Dr:~# rmmod sky2

root@Dr:~# cd /lib/modules/`uname -r`/kernel/drivers/net

root@Dr:/lib/modules/2.6.31-14-generic/kernel/drivers/net# cp -p sky2.ko{,.orig}

root@Dr:/lib/modules/2.6.31-14-generic/kernel/drivers/net# perl -pe 's/\0\0\x6c\x43/\0\0\x55\x43/g' sky2.ko.orig > sky2.ko
root@Dr:/lib/modules/2.6.31-14-generic/kernel/drivers/net# echo sky2 >> /etc/modules

root@Dr:/lib/modules/2.6.31-14-generic/kernel/drivers/net# modprobe sky2

root@Dr:/lib/modules/2.6.31-14-generic/kernel/drivers/net# dmesg | grep sky2

[ 2.902874] sky2 driver version 1.23

[ 2.902908] sky2 0000:07:00.0: enabling device (0000 -> 0003)

[ 2.902917] sky2 0000:07:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

[ 2.902933] sky2 0000:07:00.0: setting latency timer to 64

[ 2.902948] sky2 0000:07:00.0: unsupported chip type 0xff

[ 2.902958] sky2 0000:07:00.0: PCI INT A disabled

[ 2.902964] sky2: probe of 0000:07:00.0 failed with error -95

[ 406.195597] sky2 driver version 1.23

[ 406.195646] sky2 0000:07:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

[ 406.195667] sky2 0000:07:00.0: setting latency timer to 64

[ 406.195810] sky2 0000:07:00.0: unsupported chip type 0xff

[ 406.195827] sky2 0000:07:00.0: PCI INT A disabled

[ 406.195837] sky2: probe of 0000:07:00.0 failed with error -95

When you ran that script an error happened?
Try this: sudo sh ./install.sh
If that doesn't work then try this: sudo bash ./install.sh
If that doesn't work, could you give us the first 50 lines of that file?

Hopefully that gets us somewhere and I'm not just completely confused.

ABay (abay1983) said : #6

Thank you! First, it did not work.
So I use the methods in the internet and use :sudo ln -sf bash sh
Then sudo bash ./install.sh worked.
But I have another problem in the 3rd step: remove the driver.

This is my situation(I only showed the last paragraph):

diff: /tmp/Sk98IWnJOqcPnIGmEfLcIhMrW/config-bk2: No such file or directory
diff: /lib/modules/2.6.31-14-generic/source/.config: No such file or directory
Check modpost availability (not available) [ warn ]

The kernel's modpost utility is not available. Addtionally we did not
even find the source code for the utility. For this situation it exists
only one reason: your kernel source tree is corrupted.

You may continue to check for the modpost.c file below the directory
/usr/src/linux/scripts/mod. Normally you should find here also a binary
called modpost. Both seem to be missing.

Please contact your distribution vendor or download a kernel from
kernel.org to build your own kernel manually. It then will contain the
missing utility.

Sorry, this is my first time installing UBUNTU.
Could you explain what this mean for me?

Seth Arnold (seth-arnold) said : #7

First, I'd like to suggest that the 'ln -sf bash sh' line wasn't necessary; you can run any interpreted file with the interpreter of your choice as Michael Lustfield suggested, with "bash <file>" or "sh <file>" or "dash <file>" or "tcsh <file>" or whatever is necessary. /bin/sh is specified to in POSIX to have very specific behaviors, and replacing /bin/sh with bash may or may not lead to problems in the future. (For example, what happens if your ncurses installation is broken in the future? bash is linked against libncurses.)

Second, I think the modpost utility is missing because you are missing the linux-headers-* package to match your kernel. Try this:
apt-get install linux-headers-`uname -r`
and then try your driver build again.

I think, though, because there are error messages before modpost, that modpost isn't the last of your problems. Try finding the _first_ error message produced by your script...

Is this issue solved or are you still having problems?

ABay (abay1983) said : #9

Actually, I tried many ways, and finally I can install the driver successfully. But I can't find the sk98lin....and the card still doesn't work. I only solved the driver problem, and I am afraid of that I wouldn't have enough time to solve the sk98lin problems.

Fortunately, my friend give me another suggestion, to install the Fedora. The system could find my card. So, I am using my NB with Win 7 and Fedora 12. Thank you for your great help.

I will install UBUNTU in my PC after my test in Friday~