LinuxQuestions.org
Register a domain and help support LQ
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 11-17-2009, 10:43 PM   #1
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Rep: Reputation: 0
Linux kernel programming


Hello,
I've been using linux as a home user for the last one year, however a need to start kernel hacking has arised several times, but i failed to start it somehow.

i have bought a few books like, linux kernel programming by R.LOVE, kernel internals, LDD etc , and have read several articles online, from kernelnewbies, kernel trap and numerous ppts, pdf's, docs etc, however i have failed to grasp WHERE DO I REALLY START !!

i want to do the core programming, i am FINE in c programming,stil need to learn quite much.
I would be highly oblidged if you guys could point me in the right direction, without which i wud be standing on the same point wasting time...!!

Thanking You for considering a helpless plea !
 
Old 11-18-2009, 12:06 AM   #2
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
I am not sure what exactly you want to do , but may be you can start from looking into device drivers.
http://www.xml.com/ldd/chapter/book/

could be useful.

Hope it helps.
 
1 members found this post helpful.
Old 11-18-2009, 03:52 AM   #3
Suresh Maniyath
Member
 
Registered: Feb 2009
Location: India
Distribution: Fedora, Ubuntu
Posts: 37

Rep: Reputation: 19
Talking Kernel source code

Hi Hydroweaver,
Welcome to the Open Source community.
Good to know that you have all the reference materials with you. Now all you need is kernel source code. You can find it from kernel.org.
Download and begin hacking the source, try understanding the flow of kernel and couple of existing drivers. Use the LDD and other materials as references. It will be also good to have an embedded platform (if you can afford one) where you can boot Linux and try out more experiments with it.
It will be challenging for first few weeks, later you will be teaching other's about Linux

WISH YOU ALL THE BEST

Best regards,
Suresh Maniyath

Last edited by Suresh Maniyath; 11-18-2009 at 03:55 AM.
 
1 members found this post helpful.
Old 11-19-2009, 06:49 AM   #4
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Original Poster
Rep: Reputation: 0
Thank u for replying

I am sorry for the late reply, but what did you exactly mean by EMBEDDED, i have a linux box, basically a pulled up old pc...with 128 mb ram, 666mhz proc, i have installed ubuntu 6.06 on it !!...only its TOOO slow !!

about the source code, i have it..infact the latest...however, i think i will have to install it first....which is quite a pain...when i do it on 128mb ..!!
 
Old 11-19-2009, 06:50 AM   #5
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bsat View Post
I am not sure what exactly you want to do , but may be you can start from looking into device drivers.
http://www.xml.com/ldd/chapter/book/

could be useful.

Hope it helps.
hi...i have this one...but even these guyz assume i that the reader is a pro in building the drivers...they dont really go to the scratch !
 
Old 11-19-2009, 07:41 AM   #6
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by hydroweaver View Post
hi...i have this one...but even these guyz assume i that the reader is a pro in building the drivers...they dont really go to the scratch !
Have you ever built a kernel before? If not, find out how "from the web" (there are lots of good tutorials) and make sure you're comfortable with that before you go any further. Best way is to get the same kernel version from kernel.org as your current system uses, then copy the configuration file (which should be in the /boot/ directory) and do a 'make oldconfig' instead of doing a custom configuration.

You have LDD (as was linked above) - start working through it from the start. Make sure you write out and compile all the examples. This book does assume that you know how to build a working kernel, and will take you though how to build modules from the ground up. After you've been through that, Linux is your oyster.

John G
 
1 members found this post helpful.
Old 11-19-2009, 11:46 AM   #7
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Original Poster
Rep: Reputation: 0
thnk you !

OK , i will do that...i thought the new kernel could replace it...i was wrong i can see that !!...

i hope ldd can lend me a way to get into the kernel !!

thank you again !!
 
Old 11-23-2009, 05:23 AM   #8
Suresh Maniyath
Member
 
Registered: Feb 2009
Location: India
Distribution: Fedora, Ubuntu
Posts: 37

Rep: Reputation: 19
Embedded platforms

Hi

"""what did you exactly mean by EMBEDDED, i have a Linux box"""

I meant about some development board with basic ports like serial, Ethernet etc. There are some ARM based low cost boards available in the market. One such board is "Beagle" using Texas Instruments OMAP3530 processor. It is possible to experiment and write Linux device drivers etc using such board.

Regards,
Suresh Maniyath
 
1 members found this post helpful.
Old 11-24-2009, 08:14 AM   #9
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Original Poster
Rep: Reputation: 0
OH ! ok....thank u for clearing that !..what kind of testing box do you have ?...i have started LDD as all u guyz told me !! hope it helps !
 
Old 11-25-2009, 05:07 AM   #10
Suresh Maniyath
Member
 
Registered: Feb 2009
Location: India
Distribution: Fedora, Ubuntu
Posts: 37

Rep: Reputation: 19
Device driver

I use OMAP and other ARM based development platform's.

Also sometimes I use "Virtual Machines" like QEMU, VirtualPC etc to experiment with new kernel's.

Regards,
Suresh Maniyath
 
1 members found this post helpful.
Old 11-30-2009, 07:18 AM   #11
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Original Poster
Rep: Reputation: 0
Just another question here, how can i delve into embedded devices developement, on an x86 machine, using the same linux base ?
 
Old 12-01-2009, 03:27 AM   #12
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by hydroweaver View Post
Just another question here, how can i delve into embedded devices developement, on an x86 machine, using the same linux base ?
You could have a look into emulators - I don't know if there are any good ones out there.

Even better, you could get yourself a not-too-expensive embedded device and actively poke at it. Look for Arduino modules or the Make Controller Kit, which is more expensive but has more features (networking, ready-make RTOS, etc.).
 
1 members found this post helpful.
Old 12-01-2009, 08:32 AM   #13
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Original Poster
Rep: Reputation: 0
How about beagle board, as stated above ?, what is the difference ?

I am having a little problem , putting the facts together...that is like, if i want to develop applications for, or port linux to beagle board, or controller kits as mentioned above or embedded systems, do i need a running system embedded system for such purpose, or all the cross-compiling toolchain on my x86 ?

Also, i am a confused about beagle boards and arduino...i know BB is a computer, but how are they different, what can be done with one which can't be done with the other, and how can they help me individually ? and can both be used for making embedded apps for (say mobile phones ?) (sorry for asking so many questions!)

Last edited by hydroweaver; 12-04-2009 at 12:34 PM. Reason: need to add something !
 
Old 12-07-2009, 09:50 AM   #14
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Original Poster
Rep: Reputation: 0
Please reply !!...it would be really helpful !!!
 
Old 12-20-2009, 03:41 AM   #15
hydroweaver
LQ Newbie
 
Registered: May 2008
Location: India
Distribution: Opensuse10.3
Posts: 9

Original Poster
Rep: Reputation: 0
Someone ????
 
  


Reply

Tags
hacking, kernel, ldd, programming


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
C or C++ for Linux kernel Programming Guptarulz Programming 9 10-03-2009 05:23 AM
linux kernel programming hoshangi Programming 1 08-31-2008 10:20 AM
Linux kernel debugging and Linux kernel module programming Igor007 Programming 2 08-13-2005 05:12 AM
Linux kernel debugging and Linux kernel module programming Igor007 Linux - Enterprise 3 08-12-2005 02:47 PM
linux kernel programming poojavarshneya Red Hat 2 09-19-2004 10:54 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration