LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux kernel programming (http://www.linuxquestions.org/questions/linux-newbie-8/linux-kernel-programming-769833/)

hydroweaver 11-17-2009 10:43 PM

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 !

bsat 11-18-2009 12:06 AM

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.

Suresh Maniyath 11-18-2009 03:52 AM

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:cool:

WISH YOU ALL THE BEST

Best regards,
Suresh Maniyath

hydroweaver 11-19-2009 06:49 AM

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 ..!!

hydroweaver 11-19-2009 06:50 AM

Quote:

Originally Posted by bsat (Post 3760881)
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 !

JohnGraham 11-19-2009 07:41 AM

Quote:

Originally Posted by hydroweaver (Post 3762582)
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

hydroweaver 11-19-2009 11:46 AM

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 !!

Suresh Maniyath 11-23-2009 05:23 AM

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

hydroweaver 11-24-2009 08:14 AM

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 !

Suresh Maniyath 11-25-2009 05:07 AM

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

hydroweaver 11-30-2009 07:18 AM

Just another question here, how can i delve into embedded devices developement, on an x86 machine, using the same linux base ?

JohnGraham 12-01-2009 03:27 AM

Quote:

Originally Posted by hydroweaver (Post 3774306)
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.).

hydroweaver 12-01-2009 08:32 AM

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!)

hydroweaver 12-07-2009 09:50 AM

Please reply !!...it would be really helpful !!!

hydroweaver 12-20-2009 03:41 AM

Someone ????


All times are GMT -5. The time now is 05:02 PM.