LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-16-2011, 02:48 PM   #1
MagicSpark
LQ Newbie
 
Registered: Sep 2010
Posts: 20

Rep: Reputation: 0
Question Problem with compiling Ubuntu module


I need to port some network driver module from other distribution to Ubuntu 10.04.

I've downloaded Ubuntu kernel with git and rebuilt it. Then I've added sources
of module to ubuntu-lucid-src/drivers/net/my_gbe folder.

I've added the following entry to ubuntu-lucid-src/drivers/net/Kconfig file:

config MY_GBE
tristate "My Gigabit Ethernet"
select MII
---help---
This is an gigabit ethernet driver for xxx.


I've added the following line to ubuntu-lucid-src/drivers/net/Makefile file:

obj-$(CONFIG_MY_GBE) += my_gbe/

I also configured to build it as separate module via make xconfig command.

Now when I rebuild kernel with "make j 2 bzImage" command, the object files
(.o) are created for all .c file as well as new built-in.o file.
However no my_gbe.ko kernel object file is created as I expected.

Can anyone explain what I did wrong?

Thanks.
 
Old 03-16-2011, 11:51 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
What card is it a driver for?

Does it rely on a firmware file?

Post the my_gbe.c file.
 
Old 03-17-2011, 08:15 AM   #3
MagicSpark
LQ Newbie
 
Registered: Sep 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by andrewthomas View Post
What card is it a driver for?

Does it rely on a firmware file?

Post the my_gbe.c file.
Thank you for response.

What do you exactly mean "rely on a firmware file"? Could you clarify?
 
Old 03-17-2011, 09:32 AM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by andrewthomas View Post
What card is it a driver for?

Does it rely on a firmware file?

Post the my_gbe.c file.
If you would post the c file and answer the first question, I will.
 
Old 03-17-2011, 09:48 AM   #5
MagicSpark
LQ Newbie
 
Registered: Sep 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by andrewthomas View Post
If you would post the c file and answer the first question, I will.
1. This driver is for the card which is under development and doesn't have any name yet. The driver based on the Realtek driver sources.

2. I can't post any code here.
 
Old 03-17-2011, 10:12 AM   #6
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by MagicSpark View Post
I need to port some network driver module from other distribution to Ubuntu 10.04.
What distribution?

Quote:
Originally Posted by MagicSpark View Post
2. I can't post any code here.
Why?
 
Old 03-17-2011, 10:25 AM   #7
MagicSpark
LQ Newbie
 
Registered: Sep 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by andrewthomas View Post
What distribution?


Why?
From Fedora 11.

I can't post this code here, because I got it from other company and sign agreement and so on ....
 
Old 03-17-2011, 01:14 PM   #8
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by MagicSpark View Post

Can anyone explain what I did wrong?

Thanks.
Kind of hard without looking at the code.
 
Old 03-18-2011, 01:43 PM   #9
MagicSpark
LQ Newbie
 
Registered: Sep 2010
Posts: 20

Original Poster
Rep: Reputation: 0
I also notice today that if I run the following command, then ko file is created:

make drivers/net/my_gbe/my_gbe.ko

The above command also triggered rebuilding all other modules and this is strange.

I probably did some mistake while adding the module sources to kernel.

Any advice?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in compiling linux kernel module in ubuntu BlueSkull Programming 3 02-29-2016 06:40 AM
compiling vmware module in ubuntu feisty fakie_flip Linux - Software 5 05-04-2007 06:12 PM
Problem of compiling ipw3845 module pdaeng Debian 3 09-24-2006 09:34 PM
problem compiling kernel module fbarsoba Linux - Software 2 04-20-2006 10:55 AM
Problem compiling demonstration module using 2.4.18 johnvoisey Linux - Software 1 06-14-2002 03:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration