LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2008, 01:16 AM   #1
asitha _nanayakkara
LQ Newbie
 
Registered: Dec 2008
Location: Sri Lanka
Posts: 4

Rep: Reputation: 0
how 2 compile a kernel ?


Hey I'm a Newbie for Linux. And I want to know how to compile a kernel. In fact I don't even know whats a kernel is to begin with???
So if someone can help me with these things I'll really appreciate it.

thanks........

Last edited by asitha _nanayakkara; 01-01-2009 at 12:38 PM.
 
Old 12-19-2008, 01:36 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
http://en.wikipedia.org/wiki/Linux_kernel

http://www.cyberciti.biz/tips/compil...kernel-26.html
 
Old 12-19-2008, 01:53 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
If you don't know what a kernel is, then it is doubtful that you want to compile one. What is it you are trying to acheive?
 
Old 12-20-2008, 11:24 AM   #4
asitha _nanayakkara
LQ Newbie
 
Registered: Dec 2008
Location: Sri Lanka
Posts: 4

Original Poster
Rep: Reputation: 0
To install my H9601 modem

Actually, I've got a H9601 ADSL modem and I cant install it on my Ubuntu.in fact I don't know where 2 type those commands in 2 buildup a kernel & all that. And I'm really hoping to learn how 2 work in a Linux based system.....

I'm really thankful 2 U people if U could HELP ME with this.
 
Old 12-20-2008, 11:26 AM   #5
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Why would you want 2 compile a kernel? Why not 1 compile a kernel? Or 3 compile a kernel?

Now, I can see why you might want to compile a kernel, but that isn't what you asked.

Actually, if 2 compile a kernel, then what is 1?

Perhaps:

1 obtain distro
2 compile a kernel
3 compile everything else?

That might work.

Last edited by jiml8; 12-20-2008 at 11:27 AM.
 
Old 12-20-2008, 03:11 PM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
So your question really is: "How do I use a prolink h9601 with linux?"
Quote:
I've got a H9601 ADSL modem and I cant install it on my Ubuntu
http://www.linuxquestions.org/questi...-modem-578151/
... The prolink h9601 comes with drivers for linux does it not?

http://www.linuxforums.org/forum/red...edora-8-a.html
... a better description.

This modem does not need you to recompile the kernel, just the drivers.
 
Old 12-21-2008, 10:38 PM   #7
asitha _nanayakkara
LQ Newbie
 
Registered: Dec 2008
Location: Sri Lanka
Posts: 4

Original Poster
Rep: Reputation: 0
modem installation

Ok!!! So how am I supposed to install that modem driver.
In those instructions (in the CD) there are few commands, and I don't know where to type them.(I'm using Ubuntu)

Last edited by asitha _nanayakkara; 12-21-2008 at 10:41 PM.
 
Old 12-21-2008, 11:08 PM   #8
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
1. Read the links in my previous post.
2. Provide the instructions you are given - don't make us guess.
 
Old 12-21-2008, 11:13 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by asitha _nanayakkara View Post
hey I'm a Newbie for Linux. And want to know how 2 compile a kernel. In fact I don't even know whats a kernel is 2 begin with???
So if someone can help me with these things I'll really appreciate it.

thanks........
Just a comment. I think Jim is ragging you because you're using "netspeak". In general, 1337sp34k or netspeak or any set of nonstandard abbreviations make our jobs harder and are sorely frowned upon. If you want to say "to", say it, don't substitute "2".
 
Old 12-21-2008, 11:22 PM   #10
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by Quakeboy02 View Post
Just a comment. I think Jim is ragging you because you're using "netspeak". In general, 1337sp34k or netspeak or any set of nonstandard abbreviations make our jobs harder and are sorely frowned upon. If you want to say "to", say it, don't substitute "2".
I think the message must have got through, since subsequent posts have dropped the leet.

I'll add this though: 2 for to just saves one keypress ... so it makes the writer look lazy as well as inconsiderate. If the writer is too lazy to type an extra character, then they are probably too lazy to impliment any solution we suggest. So why help them?

Just as in exams you try to make it easy for the examiner to give you good marks, in LQ you make it easy for people to answer your questions. There are leet threads in LQ, they can be fun reading but they seldom get anywhere.

Last edited by Simon Bridge; 12-21-2008 at 11:25 PM.
 
Old 01-01-2009, 12:57 PM   #11
asitha _nanayakkara
LQ Newbie
 
Registered: Dec 2008
Location: Sri Lanka
Posts: 4

Original Poster
Rep: Reputation: 0
Instructions given by the manufacturer

Quote:
Originally Posted by Simon Bridge View Post
1. Read the links in my previous post.
2. Provide the instructions you are given - don't make us guess.
OK. These are the instructions given by them
(I'm using Ubuntu 8.10 )

*******************

5.3 Linux Installation

This chapter describes the Linux LAN/WAN driver for this USB ADSL modem.
This driver supports Linux-2.6 kernels. The Linux kernel sources can be downloaded from:
http://www.kernel.org/pub/linux/kernel/v2.6/.
The installed system should already have the kernel sources installed in the /usr/src/linux or /lib/modules directory. If they are not there, try to get them off the installation disks for your
distribution, or download the latest Linux-2.6 kernel, and configure and build that. One common problem while compiling modules on a new kernel is not to create link /usr/src/linux which should point to the relevant kernel source directory. On a freshly installed system this
link might not be present and needs to be created before the kernel or any driver module can be compiled. There are lots of books and documents available describing how to extract,
configure and build the kernel from it's sources...

The driver is compiled and tested for:

- Fedora Core 3 : kernel 2.6.9-1.667 using gcc 3.4.2
- SuseLinux 9.2 : kernel 2.6.8.8-24.10 using gcc 3.3.4
- Mandrake 10.1 : kernel 2.6.8.1-12mdk using gcc 3.4.1


5.3.1 Directory Structure
The directory Structure is as follows.

monaco_linux
|
|---ModemDrv
|
|---gpatm
|
|---Gti
|
|---cpl

5.3.2 Compiling the Driver

Step 1: Run make in the folder monaco_linux/ModemDrv/src to compile the driver.
Step 2: The Makefile contains following important options:
DEBUG - Output driver debug messages [n]
LAN - Create LAN interface [y]
WAN - Create WAN interfaces [y]
Step 3: Compiling the Control Panel Application. The Makefile understands following
target(s).
% make - This is to create the Control panel application.
(Command to be executed from directory monaco_linux/cpl.)

5.3.3 Loading Modem Driver

The module accepts several parameters that can be set when the module is loaded.
[Syntax]
insmod ./GUModem.ko {Module Options}
(Command to be executed from directory monaco_linux/ModemDrv/src)
[Module Options]

Rfc1483Mode default: 0 (Bridged LLC)
Rfc1483VciX default: 85+X (X would be 1,2,3,4)
Rfc1483VpiX default: X (X would be 1,2,3,4)
Rfc2364Mode default: 0 (VC)

Rfc2364VciX default: X (X would be 1,2,3,4)
Rfc2364VpiX default: 116+X (X would be 1,2,3,4)
PVCCount default: 4 (Maximum Ethernet interfaces)
PPPOACount default: 4 (Maximum PPPOA Interfaces)

VPI and VCI settings to be used according to what's configured.

For example to load the module and to create 4 interfaces using different set of VCI/VPI
the command would be as follows:

% insmod ./GUModem.ko Rfc1483Mode=0 Rfc1483Vci1=35 Rfc1483Vpi1=0
Rfc1483Vci2=36 Rfc1483Vpi2=1 Rfc1483Vci3=37 Rfc1483Vpi3=2 Rfc1483Vci4=38
Rfc1483Vpi4=3 PVCCount=4 Rfc2364Mode=2 Rfc2364Vpi1=0 Rfc2364Vci1=116
Rfc2364Vpi2=0 Rfc2364Vci2=117

Issuing this command will create 4 ethernet interfaces and 2 PVC for PPPOA
interfaces. ( Combination of Rfc1483Vpi1 and Rfc1483Vci1 will be the first interface, Rfc1483Vpi2 and Rfc1483Vci2 will be 2nd interface and so on.)

The details of various options used in command above is as below

1). PVCCount - This indicates the number of PVCs user wants to configure for ethernet
interfaces. Maximum value for this variable in this release is 4 and hence can have any
walue between 1 and 4, any value above 4 and below 1 is invalid and driver loading will
fail.
2). PPPOACount - This indicates the number of PVCs user wants to configure for
PPPOA interfaces. Maximum value for this variable in this release is 4 and hence can
have any walue between 1 and 4, any value above 4 and below 1 is invalid and driver
loading will fail.
3). Rfc1483Vpi1, Rfc1483Vpi2, Rfc1483Vpi3, Rfc1483Vpi4 -- These are 4 different
values of the VPIs that user wants to configure.
4). Rfc1483Vci1, Rfc1483Vci2, Rfc1483Vci3, Rfc1483Vci4 -- These are 4 different
values of the VCIs that user wants to configure.
5). Rfc1483Mode defines the mode for which the PVC is operating. In this release this
value of Rfc1483Mode remains same for all the PVCs which are being created. Thus all
VCs using rfc1483 encapsulation will be created using same encapsulation type.
6). Rfc2364Vpi1, Rfc2364Vpi2 -- These are different values of the VPIs that user wants
to configure for PPP interfaces.
7). Rfc2364Vci1, Rfc2364Vci2 -- These are different values of the VCIs that user wants
to configure for PPP interfaces corresponding to above mentioned VPIs.
Note: Please note that the VPIs/VCIs of the PVCs should not be conflicting with each other

else the driver loading will fail.

5.3.4 Verification of driver loading successfully

To determine if the driver has loaded:
% dmesg (or file /var/log/messages)
gp: USB Modem Driver Build
To determine if driver is in data mode.
% dmesg (or file /var/log/messages)
gp: Link established (8000/892)
^^^^ ^^^
^ ^
^ Upstream rate
Downstream rate
Alternatively the control panel application can also be used to get Modem Status as given
below.
% gsi_cfg eth2 –s
( The ethernet device depends on what has been configured on the system )
(Command to be executed from monaco_linux/cpl)

*********************************

If you people have some time to read this and tell me how to install this modem I will be more than greatfull.

to get a much better idea I've posted the link to that user manual below....(page 23 to 26 )

http://www.prolink2u.com/downloads/p...nual_H9601.pdf


thanks for spending your much valuable time on this...............

thank you

Last edited by asitha _nanayakkara; 01-01-2009 at 01:04 PM.
 
Old 01-01-2009, 07:46 PM   #12
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Have you read the links in post #6?
... information in there suggests that you may not need to compile the driver, you just need to get the one in the kernel to recognize the card. The links discuss this.

You need to be aware that, unlike certain proprietary operating systems, gnu/linux provides a great deal of software out of the box or pre-packaged in an easy to retrieve, secure, form. The old: get card, hunt for latest drivers, download and install drivers, pray, pattern is not usually needed. Compiling drivers only happens if you are very unlucky.


If you are determined to compile a driver anyway, you can find a terminal in Ubuntu in:

Applications > Accessories > Terminal

This will provide a command prompt. This is where commands get typed.
http://www.hbclinux.net.nz/HBCLUG/osc-tut/oscnotes.pdf
... this is a pdf document which provides a crash-course in using Ubuntu - with an emphasis on basic commandline use.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[Compile kernel] How to compile/install the modules ? frenchn00b Linux - General 1 09-06-2009 04:18 PM
Why can't I compile this kernel module? (kernel: 2.6.8-powerpc Debian sarge) Lannix Linux - Hardware 5 05-01-2007 01:29 PM
How to restore out-of-box kernel settings if my kernel compile fails? brgr88 Slackware 8 04-18-2006 07:51 AM
upgraded kernel, won't let me compile kernel once Suspend2 patches are applied microsoft/linux Linux - Laptop and Netbook 3 10-02-2005 03:37 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 02:40 PM


All times are GMT -5. The time now is 04:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration