Slashdot Mirror


Breaking Into The World Of Kernel Hacking?

crow_t_robot asks: "In the past couple of months I have become increasingly interested in kernel programming and have finally decided to take the leap and 'get my hands dirty.' I have searched around the web and read a few docs and FAQs on getting started with the kernel but I was wondering what kind of personal experiences those in the Slashdot crowd have had that are so bold as to start goofing with the kernel code. For those that have become competent kernel programmers, how did you 'break in' and what advice would you give beginners?"

202 comments

  1. Haven't tried it myself, but... by FatRatBastard · · Score: 4, Informative

    ...www.kernelnewbies.org is supposed to have a lot for the aspiring kernel hacker.

    1. Re:Haven't tried it myself, but... by Admiral+Lazzurs · · Score: 3, Insightful

      Ok, lets be honest, half way through the question I thought of posting the above, but then I read the whole question, unlike the person above, and decided that would be the totally wrong thing to do.

      Think about it dude, he has spent time reading the FAQ's and such, he wants personal stories, so that is what he should get, sadly though, I don't have that many, well not of the type he wants.

      I wish people would read the Ask /. before posting, mods, please mod the above (and this if you really want to.

      Take care - RL

    2. Re:Haven't tried it myself, but... by minusthink · · Score: 2

      the page and irc channel are great resources.

      I especially liked the 0.01 kernel walkthrough

      --
      "when life gets complicated, I like to take a nap in a tree and wait for dinner" - Hobbes.
    3. Re:Haven't tried it myself, but... by sg_oneill · · Score: 2

      Why is that post redundant? It's a rather interesting bit of info actually and it's spot on target.

      Mod tip #666 "Never smoke crack when using them five points"

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
  2. In honor of all the linux newsgroups... by FortKnox · · Score: 4, Insightful

    ...RTFM! ;-)

    Seriously, though. Try and find FRIENDLY help. Once you have that, you should be good to go. A lot of kernel hackers are very elitest, and don't take too kindly to newbies, so find yourself a good support group and go from there.

    --
    Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    1. Re:In honor of all the linux newsgroups... by ChozSun · · Score: 0, Flamebait

      Could someone please tell me what does RTFM stand for?!?!

      --
      ChozSun
      ChozSun.com
    2. Re:In honor of all the linux newsgroups... by Dman33 · · Score: 5, Funny

      Could someone please tell me what does RTFM stand for?!?!

      RTFM!!!

      Thanks for the set-up! :)

    3. Re:In honor of all the linux newsgroups... by spectral · · Score: 1

      acronymfinder.com's answer to your question. Though it doesn't contain the most often said version of the acronym, I'm sure you can figure it out from the given examples. Enjoy.

    4. Re:In honor of all the linux newsgroups... by lateral · · Score: 2, Insightful

      Read The Fucking Manual

    5. Re:In honor of all the linux newsgroups... by jsprat · · Score: 4, Funny

      Could someone please tell me what does RTFM stand for?!?!

      Yeah, Microsoft can. Great knowledge base article.

    6. Re:In honor of all the linux newsgroups... by Tet · · Score: 2
      what does RTFM stand for?!?!

      Despite what you may read anywhere else, RTFM always stood for "Read The Manual" in the past. The F was always implied, never given explicitly. It's only recently that people have started spelling it out for the hard of perceiving (or worse, trying to substitute politically correct alternatives such as "fine"). Sigh. Such is the price of progress :-(

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    7. Re:In honor of all the linux newsgroups... by gmack · · Score: 1

      Actually that's not really true.. I've found linux-kernel to be an easy place to ask questions in the past and get good answers. What they don't respond well to are installation(though somone will answer them usually) or worse yet things not kernel.

    8. Re:In honor of all the linux newsgroups... by FortKnox · · Score: 1

      Maybe it was just me, then.
      I guess when I called it the linux "kernal" on my first question (I got *railed* for that!), I was marked for life...

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    9. Re:In honor of all the linux newsgroups... by dup_account · · Score: 1

      I'd guess that about 5 minutes after the term "Read The Manual" was used, "Read The Fucking Manual" was used.

      how do I do this thing that you have clearly wasted you time documenting
      "Read The Manual"

      5 minutes later
      how do I do this thing that you have clearly wasted you time documenting
      "Read The Fucking Manual"

    10. Re:In honor of all the linux newsgroups... by chrispycreeme · · Score: 1

      RTFM= Read The Friendly (or Fucking) Manual... CACTUS!! CACTUS!!!!

    11. Re:In honor of all the linux newsgroups... by Anonymous Coward · · Score: 0

      Ha, ha, 'informative'. Anyone who knows how to change their comment settings from the default rating of 1 up to 2 already knows what rtfm means, I should think. Gawd this site is stupid.

    12. Re:In honor of all the linux newsgroups... by isorox · · Score: 2

      you made beer come out of my nose!

    13. Re:In honor of all the linux newsgroups... by Anonymous Coward · · Score: 0

      read the f&*%ing manual! hehehe

    14. Re:In honor of all the linux newsgroups... by buckeyeguy · · Score: 1
      RTFM = Read the Friendly Manual.

      At least that's what I told Dad when he asked. ;)

      --
      I'd have a personalized plate on my car, but "toxic bachelor" won't fit into 7 letters.
    15. Re:In honor of all the linux newsgroups... by Seri · · Score: 1

      Seem to remember reading somewhere that can up with the theory, that "Read The Manual" was originally used, but most places that use an acronym like that, already use RTM to stand for "Release To Manufacturing" so the more common RTFM came about.

      Just as an side, for gods sake, it's an acronym, it's not solidly defined, as long as you get the jist of what's implied by it, then that's all that's important!

      --

    16. Re:In honor of all the linux newsgroups... by Anonymous Coward · · Score: 0

      Actually, it means "Read The Fine Manual".
      But people (at least the MPlayer developers) usually use it as "Read The Fucking Manual".

  3. That's easy by adlam.bor · · Score: 4, Funny
    Just start putting together your own VM system. If recent events are any indication, no experience is required.

    (Now taking bets on whether this first hits -1 Troll or +5 Funny).

    1. Re:That's easy by JordoCrouse · · Score: 3, Funny

      Not exactly right. You do need experience in being convinced that the code you write is superior to all others, despite any indications to the contrary.

      --
      Do you have Linux and a DotPal? Click here now!
    2. Re:That's easy by Fillup · · Score: 2, Funny

      Well in that case, I'm perfect!

      Oh wait ... i should probably learn C properly first ...

      --
      "I think there is a world market for, maybe, five computers." __ IBM Chairman, 1943 __
    3. Re:That's easy by fishebulb · · Score: 1

      im gonna take a guess that you in no way contribute to the kernel development, if you do my apologies.

      I love how people will criticize others work, but never contribute.
      Quite bitching and do something about it

    4. Re:That's easy by zaffir · · Score: 1

      All you need to know how to do is #include .

      --
      "Upon attaching the waterblock to my penis, I began to notice that I know nothing about computers." -- JRockway
    5. Re:That's easy by zaffir · · Score: 1

      gat dang it. Stupid HTML posting. Had my previous post been in plain text...

      All you need to know how to do is #include

      --
      "Upon attaching the waterblock to my penis, I began to notice that I know nothing about computers." -- JRockway
    6. Re:That's easy by Anonymous Coward · · Score: 0

      Oh .. you mean like ESR?

    7. Re:That's easy by Anonymous Coward · · Score: 0

      Try using entities. < = <, > = >

    8. Re:That's easy by Dwonis · · Score: 2
      I love how people will criticize others work, but never contribute. Quite bitching and do something about it

      I love how arrogant programmers tell their users to do things themselves. Yes, I know those programmers are volounteers. No, that doesn't change anything.

    9. Re:That's easy by BJH · · Score: 1

      Thanks for a good laugh ;)

    10. Re:That's easy by fishebulb · · Score: 1

      im not a real programmer, still in training i suppose. I am just saying i get sick of the attitude of people. They are getting something that someone else put their hard work into, and in the case of linux, for free (generally).

      I dont expect people to do it themselves, but i definately do not expect them to criticize me without taking step one. If you dont like something, help in anyway you can, and no that doesnt mean writing code. Make suggestions, do something instead of the standard "oh that code is really bad, that application is shitty" blah blah blah

    11. Re:That's easy by Dwonis · · Score: 2
      True, but as a tactful programmer with your own goals (I assume here that you want to make Linux the best OS for everyone), you should take ALL the input you can get, even from jerks, for your own benefit and the benefit of those who aren't jerks to you.

      If somebody yelled, "LINUS! 2.4.15 CAUSES FILE CORRUPTION!!! YOUR IDIOT WAYS F***ED UP MY FILESYSTEM!!!" on the lkml, Linus *should* take the knowledge gained and apply it, rather than griping about how the person reported a major kernel flaw.

      The other think is that when you are using public forums (mailing lists, etc), your attitude will scare away other people who could have been very helpful.

      Summary: I'm not justifying these people's attitudes, but their crappy attitude doesn't justify yours.

  4. kernel docs? by Squeezer · · Score: 5, Informative

    I think the kernel docs would be a good starting point.

    cd /usr/src
    wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2 .4.17.tar.bz2
    tar -jxvf linux-2.4.17.tar.bz2
    cd linux/Documentation
    ls |more

    and start reading all the documentation in there. It would probably make a good starting point.

    Plus you should read Kernel Traffic and get on the Linux Kernel Mailling List.

    --
    Does the name Pavlov ring a bell?
    1. Re:kernel docs? by joib · · Score: 3, Informative

      Actually, according to the the README provided with the kernels, /usr/src/linux is _not recommended_, as (depending on distro) you may mess up the header files used by the C library. Another point is that I think /usr/src/linux should be owned by root.src or something like that. So put your tree somewhere else where it doesn't mess up the C library nor your package management system and where you don't need root access. /usr/local, your home directory and with some reservation /opt are good choices (I have my kernel related stuff under /opt/kernel).

    2. Re:kernel docs? by kilrogg · · Score: 1

      Redhat (and Mandrake too, I think) now place the kernel-headers in /usr/include/linux/, which makes sense since these are just headers, not source code. So, for many people, /usr/src/linux is safe.

    3. Re:kernel docs? by Seri · · Score: 1

      Hate to say this, but....
      you can put the kernel where the hell you want, as the official recomendation is that you copy the kernel headers and not symlink them, that way you maintain headers consistent with the programs that were compiled against them.

      --

  5. Linux Device Drivers by AutumnLeaf · · Score: 5, Informative


    One of the best sources of information is the O'Reilly book on Linux Device Drivers. It contains a lot of good information to get a kernel hacker up and running.

    1. Re:Linux Device Drivers by YetAnotherLogin · · Score: 5, Informative

      And you didn't link to it? Shame on you!

    2. Re:Linux Device Drivers by AutumnLeaf · · Score: 1

      No, I didn't. thank you for that. :-)

    3. Re:Linux Device Drivers by Anonymous Coward · · Score: 0

      Extreme Ditto. Rubini's book is great. It's really accessible if you have a very solid C background. It covers so much more than what many people think of as "drivers". AND it's not a 1000 page glorified, annotated copy of the kernel source. For example, I learned a lot about how the VM really works by wading through his example that implements a page-fault handler.

      That said. Get the source, tweak it, break it, fix it, repeat sequence. It's open source so open the source and look around. Find an interesting bit and try to really grok it, then find a related bit and so on.

  6. Hacking the Kernel. One man's epic. by Anonymous Coward · · Score: 0

    Three-thirty AM
    I - tears! - grok. Now, reimage,
    (7th time) -- ditch my drive.

    oh, wait, did you mean the Linux kernel?

  7. Index of Documentation for People Interested... by ekrout · · Score: 5, Informative

    Index of Documentation for People Interested in Writing and/or Understanding the Linux Kernel >>
    http://jungla.dit.upm.es/~jmseyas/linux/kernel/hac kers-docs.html

    The info was compiled by Juan-Mariano de Goyeneche after folks on the kernel list asked the same questions time & time again.

    --

    If you celebrate Xmas, befriend me (538
  8. Sorry dude, but ... by Anonymous Coward · · Score: 0, Insightful

    what are your credentials. Just feeling like doing it is not enough. What is your programming experience, education, work experience etc concerning system programming?

    If you don't have that much of experience, I would start making a device driver for a relatively simple device. That way you'll learn what it's about and whether you're ready for it.

    I would think that anyone really going into kernel programming would have interests/ideas developed on his own on which to work.

    1. Re:Sorry dude, but ... by kippy · · Score: 4, Funny

      If you don't have that much of experience, I would start making a device driver for a relatively simple device.

      dude, don't take the bait! he's just trying to get someone to write a driver for his mp3 player.

    2. Re:Sorry dude, but ... by VFVTHUNTER · · Score: 4, Funny

      I recall a certain Finnish nerd, who sat around in his bathrobe in his mom's apartment all the way thru college. Apparently with those credentials he managed to write a pretty decent OS...

    3. Re:Sorry dude, but ... by Anonymous Coward · · Score: 0

      Man, I have no credentials,
      I am not a programmer nor any similar still
      I was able to contribute a few pieces to Linux kernel. All you need is some persistence
      in catching bugs and understanding how to fix them.
      Ability to debug and report clear errors and
      sometimes read some documentation is all you need
      to start contributing small things. Fix here,
      fix there.

    4. Re:Sorry dude, but ... by Anonymous Coward · · Score: 0

      What the fuck does that have to do with anything?

    5. Re:Sorry dude, but ... by erc · · Score: 1

      Yup ... and, hysterically enough, Andy Tannenbaum said that he would've flunked him out of Andy's Minix OS class!

      --
      -- Ed Carp, N7EKG erc@pobox.com PGP KeyID: 0x0BD32C9B What I'm up to: http://intuitives.mine.nu
    6. Re:Sorry dude, but ... by Anonymous Coward · · Score: 0

      HERE FRIGGIN HERE!!! Credentials. Yeah, take my credentials and smoke 'em. My credentials mean jack but that doesn't mean I can't program well ya friggin plum smuggler... gah..

      Angrek

    7. Re:Sorry dude, but ... by Anonymous Coward · · Score: 0

      Looking at all the reactions in this thread, I'm beginning to understand why Linux is what it is. A bunch of arrogant know-nothings who think they know it all built it! Hell, Torvalds once said he thought he is the best programmer in the world! What can you expect from someone that modest (apart from naming his OS after himself)?

      Knowledge IS important. The kernel is NOT just a piece of code. This is not some mp3 player skin you're programming. Alan Cox might say it's just a big program, but he is in a league where you could say that, being on that level. Some John "I want to do kernel programming" Doe doesn't have to necessarilly on that level.

      Just hacking around in C without actually knowing OS theory is going to help. Or perhaps in the Linux world where everything is different and any cowboy with a gun can be something, it is. Yeah, right..

    8. Re:Sorry dude, but ... by Anonymous Coward · · Score: 0

      Not so surprising, since in the Minix course you learn OS theory with a micro-kernel based OS. If you write an OS for your studies, it should at least be on that level and preferable bring something new. Making another rendition of the good old monolithic kernel is a step BACK, no matter how popular it becomes, and is NOT enough to show you've learned something. MacDonalds is big too, but that doesn't make it French cuisine.

      I getting tired of Linux people shouting: look at us, we're rebels! We have something new!

      Guys, Linux is NOTHING NEW. It's old, just popular. If you find that any idiot may hack that kernel, than this only speaks about the quality of it.

  9. Take it straight from the man... Just Do It by FauxPasIII · · Score: 5, Insightful

    From Alan Cox's interview posted to slashdot a couple days ago:

    "Ignore everyone who tells you kernel hacking is hard, special or different. It's a large program, and bug fixing or driver tweaking can be a best starting point. It is however not magic, nor written in a secret language that only deep initiates with beards can read.

    Play with it, try things, break it horribly and enjoy yourself. I started on the networking code because it didn't work very well. Everything I knew about TCP/IP I had downloaded the same day I started hacking the net code. My first attempts were not pretty but it was *fun*."

    --
    25% Funny, 25% Insightful, 25% Informative, 25% Troll
    1. Re:Take it straight from the man... Just Do It by kin_korn_karn · · Score: 3, Insightful


      Ignore everyone who tells you kernel hacking is hard, special or different. It's a large program, and bug fixing or driver tweaking can be a best starting point. It is however not magic, nor written in a secret language that only deep initiates with beards can read.

      That's great advice for everything in the world, actually. There's nothing so difficult that people can't figure it out, unless you listen to guys in Rome with pointy hats.

    2. Re:Take it straight from the man... Just Do It by Jeremy+Erwin · · Score: 5, Insightful

      Hacking the kernel can seem like a daunting task, but nothing focuses the imagination like broken hardware.

      Two cases in point: (the first one isn't a linux story). Someone gave me a joystick for a macintosh. I already possessed a flight simulator for the machine, but much to my chagrin, the joystick didn't have the right drivers. So, I spent the next few weeks writing a device driver (modifying Apple produced code, mostly.)

      Second: I owned a DVD drive with broken firmware-- the capacity wasn't reported correctly, and so oms would stop in the middle of the movie. With the (very) extensive help of "Andrew Ebling" (of kernelhacking.org, I was able to solve my problems.

      Moral of the story: it helps to have good developer documentation, and example code (provided, for the most part, by the kernel source itself) It also helps to have a reason to code.

    3. Re:Take it straight from the man... Just Do It by nwanua · · Score: 5, Informative

      I was glad to see Alan Cox say so, and here's a little personal experience:

      For the past two and a half years, I've been putting some logging code into various parts of the filesystem (ext2, vfs and block device driver.

      This has involved creating new syscalls and user level code to transmit logged data to a remote machine via UDP so we won't adversly affect the FS by logging _and_ writing log data to the same FS. Really trivial stuff in retrospect: the hard part was figuring out where to put what and how to do it without crashing (I worked via ssh and if I hosed something, I was out of luck until I could physically return to campus - which could be as long as a week).

      My favourite book for this has got to be "Linux Kernel Internals": consice, precise with decent examples (IMHO).

      Funny, I worked on module device drivers for a VHDL class _after_ I worked with the kernel directly, so I won't say to you: play with device drivers first to get your feet wet (although, load/unload kernel sure beats the hell out of rebooting). Try doing something simple like changing the messages (printk) within the kernel as a way to gain a small understandinig of what's happening under the hood. And another thing... the source tree I played with was owned by me (so I could cvs, nfs, coda it to my laptop without fear while playing with code (on an OSX PB) on the road :-) You need only drop into root to lilo/reboot

      Cheers.

  10. Tools for breaking in by KingPrad · · Score: 1, Funny
    I always carry a small set of lockpicks. Gloves and a mask are a must.

    To protect against modern DNA evidence collection, wrap youself completely in saran wrap except for breathing holes also.

    If you get desperate, cut yourself with something sharp lying around the house and sue the owners. Works every time. Good luck on your new career!

    --KingPrad

    Two fish are in a tank. One says to the other, "I'll drive. You man the guns."

    --
    Stop the Slashdot Effect! Don't read the articles!
  11. My understanding of Kernel hacking. by darthaya · · Score: 1

    There isn't much tricky stuff in terms of programming. (Write good, efficient C code for example)

    1: You need to have a clear goal of what you want to accomplish,

    2: Understand the important concept of Operating Systems,

    3: Know a bit of basic algorithms.

    Then you are good to go.

    1. Re:My understanding of Kernel hacking. by BeneDux · · Score: 0, Redundant

      3: Know a bit of basic algorithms.
      Basic??!! They wrote the kernel in Basic? Hell, a monkey could write Basic code.

      --
      In the land of the blind the one-eyed man is king.
  12. Alan Cox's Columns by pthisis · · Score: 5, Informative

    Linux Magazine's Gearheads Only is a great column to read for this, especially the mouse driver and Alan Cox's articles.

    Their web site should have archives.

    Sumner

    --
    rage, rage against the dying of the light
  13. very easy... 10 steps to kernel coding: by Cheetahfeathers · · Score: 5, Interesting

    1. Learn to code.
    2. Learn to code in C.
    3. Figure out what YOU want to add to the source.
    4. Read the kernel source.
    5. Understand what you read.
    6. Make changes/additions to the source, per step #3.
    7. Test out the changes/additions on your own system.
    8. Make it work for you.
    9. Send in your contribution.
    10. Have it accepted/rejected.

    1. Re:very easy... 10 steps to kernel coding: by tofus · · Score: 4, Funny

      "4. Read the kernel source." Yeah. Well, i stopped after the first 300 pages. I found the plot a bit too thin. Maybe it gets better along the way, i dunno. I liked the photo version of the kernel a lot better ;p

    2. Re:very easy... 10 steps to kernel coding: by Phork · · Score: 3, Funny

      I think the audio version is even better.(dd if=linux-2.4.17.tar.bz2 of=/dev/dsp)

      --
      -- free as in swatantryam - not soujanyam.
    3. Re:very easy... 10 steps to kernel coding: by biglig2 · · Score: 3, Funny

      SPOILER ALERT:

      The butler does it, in the library with the scheduler code.

      --
      ~~~~~ BigLig2? You mean there's another one of me?
  14. Use a kernel debugger by Anonymous Coward · · Score: 1, Funny

    Connect remotely to a debug build of the OS on a seperate machine than your host machine and step through the code. Set breakpoints at places that look interesting, and just skip over things that don't do much. Watch the registers and keep an eye out for error codes, these will tell you what's going on with the OS.

    Oh wait, you need a kernel debugger...

    Nevermind.

    1. Re:Use a kernel debugger by OeLeWaPpErKe · · Score: 1

      look this up now :

      kdb

      this is the sort of thing only open source can do

    2. Re:Use a kernel debugger by Anonymous Coward · · Score: 0

      Where is the nifty debugger? Sure you've got client-side runtime components, but where's the host debugger?

  15. start with something simple by Anonymous Coward · · Score: 1, Funny

    Take a knife and start hacking a cherry kernel. When you become good it at, you can try hacking a peach kernel with an axe, then a mango kernel with a chainsaw, and so on...

  16. VMware? by larien · · Score: 5, Informative
    It's probably a good idea to run your 'hacked' linux under a virtual system such as VMware or user mode linux; that way you can do quick reboots without losing your MP3 player, email client, web browser, IDE (VIM+gcc, right?).

    It also means that when you screw things up (if you don't, I'd be surprised; I bet even Alan Cox screws up now and again), you won't lose anything. And don't give me anything about ext3; if you screw up enough in the wrong place, your filesystem is hosed.

    1. Re:VMware? by Anonymous+DWord · · Score: 2

      I agree wholeheartedly, but just to emphasize the point - "now and again" ?! Our most respected kernel hackers screw up all the time! Just try not to submit it if it's b0rked on your system. Kernel 2.4.11 anyone?

      --
      "If he thinks he can hide and run from the United States and our allies, he's sorely mistaken." Bush on bin Laden
    2. Re:VMware? by Anonymous Coward · · Score: 0

      Geez, if you had read 4 more words after he said "VMWare" you would have noticed your link is already included in that parent post!!!

  17. Kernel Janitors by auto112456 · · Score: 5, Informative

    Have a look at the Kernel Janitors Project and perhaps KernelNewbies.org .

  18. Device Drivers by Eagle7 · · Score: 5, Interesting

    Buy the O'Reilly book on device drivers mentioned above, and pick a driver you use. Try to understand it, and then tweak it a bit. Since they can be loaded and unloaded, device drivers are a little easier/quicker to play with. And there is a good book on them. ;)

    Working on it during part of an 8 hour work day, in about 1 month I was able to hack tab support into the s390 vm console driver with nothing more than reading code, searching the net, and using that book. And that was probably a little on the slow side. (see here http://www.eagle7.org/ibmlinux.html

    And like Alan Cox said in the interview posted to /. a bit ago - Have Fun!

    --
    _sig_ is away
    1. Re:Device Drivers by LordNimon · · Score: 3, Interesting
      I agree with Eagle7. Start with a very simple driver, one that doesn't actually talk to hardware. Perhaps one that displays some krenel data whenever called.

      From there, you can decide to either move into the kernel itself, or stick with device drivers. If you want to practice on a device driver, stick with a simple ISA device. If you can find the hardware, a driver that displays some text on a Monochrome Display Adapter (MDA) is an easy one.

      --
      And the men who hold high places must be the ones who start
      To mold a new reality... closer to the heart
  19. Try this by DrStrange · · Score: 2, Redundant

    Read this: http://www.xml.com/ldd/chapter/book/index.html

    Lurk on this for a little while (be prepared for 200+ messages per day):
    http://www.tux.org/lkml/

    Watch for to do lists or bug reports to go flying by on the list and start there. Its probably best if you don't try to implement something from scratch your first time out. Start slow and learn the inner workings first.

  20. Re:Which kernel? by Cheetahfeathers · · Score: 0, Flamebait

    If you want to get yelled at because you suck, try OpenBSD? At least you won't be a communist, then. ;)

  21. different kinds of "nerds" by eclectric · · Score: 2, Offtopic

    just because it says "news for nerds" doesn't mean "news for l33t kernel hackers only." It also doesn't even say "news for hackers." Each of us lays his or her own claim to nerdishness... programming, fantasies about sci-fi characters, melting down Pentiums, or putting $4000 worth of computer equipment into a $200 car to make it "state-of-the-art."

    I think slashdot is particularly well suited to "shepherding naive kernel-hacker wannabees," simply for the fact that each of us brings unique viewpoints to each subject. (For instance, I've never even seen the kernel code for Linux, and yet I'm responding to this post. :)

    1. Re:different kinds of "nerds" by benfoldsfan · · Score: 1

      hear hear. i hate programming. a lot. but that doesn't mean that i don't know anything about computers, or about how they work, or even how to program for them. i bet that guy can hack a kernel but can't figure out how to change his oil or replace an alternator or something like that.

    2. Re:different kinds of "nerds" by JordoCrouse · · Score: 5, Funny

      i bet that guy can hack a kernel but can't figure out how to change his oil or replace an alternator or something like that

      That is true, but in the spirit of open source, we just borrow somebody else's car.

      --
      Do you have Linux and a DotPal? Click here now!
    3. Re:different kinds of "nerds" by edrugtrader · · Score: 1

      wouldn't you actually borrow someone elses methodology for chaging the oil or replacing the alternator, and then just blindly assume it is the right way, and then demand free support when you forget to put the oil plug back in - even though the damn readme told you too!!!

      now that is "open source"

      --
      MARIJUANA, SHROOMS, X: ONLINE?! - E
  22. Writing Kernel Modules by PlazMatiC · · Score: 4, Interesting

    This Linux Journal article gives a really quick introduction into writing kernel modules.

    It doesn't go into all that much detail, but I found it a good starting point for messing around on my linux machine at home.

    Hth =)

  23. Re:Is /. becoming the champion fighter of the newb by XRayX · · Score: 1

    Okay, the question had been asked million times before and could probably be answered with a bit serious RTFM and googleing, but I wouldn't call it a newbie question.

    --
    Boycot? Blackout? Subscriptions?
    I don't care!
  24. Have an special motivation... by jorisumu · · Score: 2, Informative

    Well I think you just dont go into the kernel to be wandering and looking for inspiration. Think about something specific you want to do and get in to it, you'll allways find you have to mess around with several modules or at least get to know 'Where the hell iz thiz thing going??' ;-).

    There are some books at amazon which can helps, I like 'Linux Kernel Internals' by Michael Beck

    --
    "May the force be with you" Jorge Ivan Suarez Murillo Medellin, Colombia
    1. Re:Have an special motivation... by dkresge · · Score: 1

      I've not read 'Linux Kernel Internals', but for a wonderful, detailed, discussion of the Unix architecture I strongly recommend Unix Internals by Uresh Vahalia. I've recommended this book to everyone who wants a better understanding of what happens "under the covers". Not only is it Chock Full of Good Stuff, it's extremely readable (i.e. you'll have a hard time choosing between it and Maxim for Porcelain Bound Literary Enlightenment)

  25. Buy crappy hardware.... by (H)elix1 · · Score: 5, Informative

    Nothing taught me more about kernel modding than spending a few dollars less on the hardware I used on a linux box - and then try to get it to work.

    You become very familiar with code that might be close, get to pour over specs that may or may not help, and find a small comunity of others who saved a buck or two.

    The best part - when it breaks, you get to keep both peices. When if finally works, ahhhh....

    1. Re:Buy crappy hardware.... by JWhiton · · Score: 2

      Exactly! There's no better teacher than adversity. When your computer works flawlessly, you never learn anything.

      But when you've completely hosed your system after getting a new piece of hardware or tinkering an obscure file, you learn a lot about how your system used to work. A recent example of this happening to me what when I tried to install Mandrake over my old installation. I soon learned of the wide world of bootloaders, and why you should never install LILO twice. :P

  26. Make your own system call by BetaJim · · Score: 4, Interesting
    I think about the most easy kernel hack is to create is your own system call. Last year in OS this is what we did.

    The assignment was to add a system call that would return the number of processes created and killed up to that point. The only difficult thing was to grok the system call table. Please look at this option as a good introduction to the kernel.

    --

    "Drug related crime" is a misnomer, "prohibition related crime" is the more accurate and correct phrase.

  27. Just Do IT.... by CDWert · · Score: 4, Interesting

    Its not like youre going to break anything, real, or permanent, this is all hocus pocus digital alchemy anyhow. If you kernel flies or not, it information, either on what you did right or did wrong. Have fun break some shit. Its no fun it works right all the time anyhow.

    I also highly suggest the IRC channel
    #kernelnewbies
    I went there today for the first time looking for Rik van Riel I had some qustions about the rmap 11b patch and Guess what he was there and told me the 11c is coming today , REAL time info from people that really know their stuff.....

    Kernel hacking can be fun if youre not in a rush IMHO, doing it against a dealine can be ....uncomfortable to say the least.

    Im assuming you know huw to extract the source tree and apply a patch , if not start there. Im also assuming you know C if you dont ....what are you going to hack, or just patch and compile, Look through the tree for stuff you know, see how they do it , see if you think you can do better and try it, start small....... Me, ive never personally done anything that need make it into the tree on a permanent basis. but hey its been 8 years of all kinds of fun.....

    One last point DO IT OFTEN !, Dont let yourself get rusty, Set a goal, a kernel hack a month, or at least a patch and compile a week if youre not cutting code....

    --
    Sig went tro...aahemmm.....fishing........
    1. Re:Just Do IT.... by anaticula · · Score: 1

      I cannot help but wondering what IRC network that channel is on? openprojects?

  28. Back when I first wanted to start by Anonymous Coward · · Score: 0

    Back when I first wanted to start, I had no idea what to expect. I just dove in (not on the Linux kernel, but other Unix kernels).

    Know what? It's just code. It's not that big of a mystery.

  29. First Rule by Renraku · · Score: 1

    You're going to screw shit up. Have a crash machine to hack/test the kernel on before you hack your main system.

    --
    Job? I don't have time to get a job! Who will sit around and bitch about being broke and unemployed then?
  30. Best advice by jimbis · · Score: 1, Informative

    First stop for a total newbie is download an early kernel (try 0.01!): _much_ less intimidating than the current monster. This should help start you in the right direction. KernelNewbies channel and site are both useful

  31. Linux Internals, by Moshe Bar.. by studboy · · Score: 5, Informative

    .. is recommended. It's a medium-low level view of the entire kernel, following the source code but making it more readable. If you've taken an Operating Systems or Unix class you should be fine.

    Linux Journal reviewed it.

    - j

  32. Something simple by xer.xes · · Score: 2, Informative

    Try to do something simple, like finally adding module parameters to the framebuffer (sorry, personal irritation, but still haven't had the time to do it myself). Then keep enhancing and bug fixing small things, and move on from there to bigger changes... Post your patches on the LKML, and listen to their comments (and 'flame' them if you disagree)...

    That's how I rolled into the business..

    (And if you get me those module parameters, I'll big you the best hug you've ever had :))

    --
    xer.xes -- 4181
  33. crow t robot?!? by theblackdeer · · Score: 0, Offtopic

    did the mads put you up to this?

  34. Re:Is /. becoming the champion fighter of the newb by eXtro · · Score: 1

    What are your credentials? Or you just some doofus calling somebody else a doofus? From his post he's above the average slashdot reader, he's actually interested in hacking code. This doesn't mean he'll be successful hacking the kernel, but even the attempt puts him above "the average". I'll worry about slashdot and the "respect" it gives the average slasdhot reader when they start posting Ask Slashdots about crochet.

  35. Re:Is /. becoming the champion fighter of the newb by aaronvegh · · Score: 1, Insightful

    I'm a little offended by the notion that "nerds" represent only those who program in Linux. I'm a Mac user (now an OS X user), and I can write PHP code to interact with MySQL...and I'm proud of myself! Set against the entire gamut of the North American population, I'm on the extreme end of nerdiness. But sure, if for some sick reason I was interested in Kernel programming, I would be a "newbie", and I would expect /. to be a powerful resource for getting started. I support this topic and the goals of the poster.

    --
    You can have my one-button mouse when you pry it from my cold, dead fingers.
  36. Hacking is wrong and illegal by Anonymous Coward · · Score: 0

    Dear Mr. _robot:

    Hacking is illegal, and unethical. Only terrorists hack computers. If you are caught hacking computers, be it Lunix Red Hat or Microsoft Windows XP Professional 2001 NT, you will go to jail.

    Remember, hackers are no better than those who seek to harm America through terrorist activities.

    Signed,

    Attny. General John Ashcroft

  37. Re:Is /. becoming the champion fighter of the newb by Otter · · Score: 1
    As it says, its news for nerds. Some might call me elitist, but we ain't heading anywhere if some doofus wants to know how to hack kernels...Surely, you ought to treat the average /. reader with more respect

    Umm, the "average /. reader" uses Windows. Of the Linux users, I'd guess 1-2% make any contribution to the free software codebase. There probably aren't more than 10 or 20 "kernel hackers" among the posters.

    C'mon -- at this writing there are 33 comments at or above zero, not one of which is offering any personal experience with kernel hacking. At least it's not yet another qquestion that would do better as an Ask Google.

  38. Kernel Projects for Linux by LordNimon · · Score: 2

    Kernel Projects for Linux by Gary Nutt. It walks you through several areas of the Linux kernel. It's a great book. You'll especially learn a lot from discovering all the editing errors in it. :-)

    --
    And the men who hold high places must be the ones who start
    To mold a new reality... closer to the heart
  39. Consider VSTa... by cduffy · · Score: 2

    ...or another experimental OS. VSTa in particular needs drivers (and lots of other stuff) so you can easily find something to do, and has many novel design features (being a proper microkernel design -- with almost all work, including traditionally "driver"-style code, done in userspace -- yet faster than Linux) that make it fun to learn about.

    If you're decided to go with Linux, though, just pick something and do it. My first kernel driver was a network driver for a NIC (don't remember the model, it was quite a while ago; Don Becker ended up writing a better driver that was accepted into the official kernel, but it was an interesting experience anyhow). If you have access to any interesting hardware that isn't supported (which may be hard to find on x86), writing drivers or porting to new hardware (not whole new architectures, mind you -- that's a bit much) is a good starting place.

  40. Find a small kernel project and tinker by Stiletto · · Score: 2

    Find some small part of the kernel (like a serial port driver or something) and start fooling with it. Disect it and see how it works, maybe fix a bug or two.

    If you're a Windows kernel guy wanting to break into the Linux kernel, thats even easier. Get a job doing a Windows driver for some device, then write a Linux driver for it in your spare time. That's what I did.

    1. Re:Find a small kernel project and tinker by Anonymous Coward · · Score: 0

      dood.. windows totally fucking sucks ass. what the fuck are you fucking thinking.. get a fucking life.. and why the fuck do i have to wait fucking 20 seconds to fucking submit this to this piece of garbage fucking website.. FUCK YOU

  41. RTFM means by pyrrho · · Score: 1

    Please read the (free?) manual for information (if you don't mind).

    Yes, I know I can say "fucking" on slashdot, but I prefer not to.

    --

    -pyrrho

    1. Re:RTFM means by kin_korn_karn · · Score: 2


      Yes, I know I can say "fucking" on slashdot, but I prefer not to.

      Good, because we don't need that shit around here, goddamn it :)

    2. Re:RTFM means by Anonymous Coward · · Score: 0

      Jesus H. Christ, can you watch your fucking language? Shit, I hate all the goddamned son-of-a-bitches who come in here and swear their motherfucking heads off. What the fuck is the matter with you, anyway?

      ;) -- for the humor impaired!

    3. Re:RTFM means by sg_oneill · · Score: 2

      Indeed good sir!

      Perhaps "Read the friendly manual"
      or "Read the full manual" or maybe even
      "Really tasty fruit mix?!"

      It's best to avoid swearing like a fucking trooper.

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    4. Re:RTFM means by Anonymous Coward · · Score: 0

      I know!! It's fucking outragerous!!!

  42. Get prepared first by Anonymous Coward · · Score: 0

    1. Invest in a coffee urn. Not a pot, but one of those big chrome things that looks like a baptismal fount. Get a really big cup to go along with it.

    2. Sell your Rolex. You're not going to need it anymore. Time doesn't mean a thing to a diehard kernel coder.

    3. Learn to call home before you leave work, so your wife can hustle the boyfriend out the door before your arrival at two-thirty in the morning.

  43. I can't think of a worse place... by signal+ll · · Score: 0

    ...to ask that question. This is slashdot - not a technical forum. You are not likely to run into any technical people here.

  44. another starting point by mandria · · Score: 1

    take a look at the linux from scratch side.
    http://www.linuxfromscratch.org

    i think it helps understand how the whole system works together.
    good luck!

    1. Re:another starting point by Vajramukti · · Score: 1

      I've spent hours following the instructions on that site over and over again. One might learn a lot about how the whole system is put together, but not much emphasis is put on actually reading code or looking at the kernel.

  45. Kernel trashing :) by jd · · Score: 5, Interesting
    I've found that the kernel source code varies in quality between Ultra Brilliant to Infra Crud. (Sadly, a lot of the networking code seems to fall in the latter category.)


    Probably the best place to start is to find some definite itch you want to scratch, and so badly that you won't stop until it's done. For me, that was getting use[ful|less] features into the kernel. As many as I could cram in, without the hard disk exploding. And then fixing all the incompatibilities, as best I could. (Phew!! There are generally a lot!! That's why many of the FOLK patches I produce are unstable.)


    What you do next depends on the "itch":

    • Fixing broken/cruddy code: Generally, it's better to rip it out and start again. Find out what goes in, what comes out, and what is supposed to happen. Software Engineers tend to talk of "black boxes", where one piece of code doesn't need to know anything about other pieces of code. It just needs to know what gets put where. You can use this to test your code outside the kernel. Simply use the kernel headers for the structures, rig up some mock values, and see if your code does what it's supposed to. If it does, then all that's left is cutting & pasting the code into the kernel. Oh, and producing a diff file for the rest of us.
    • Adding new drivers: There should be skeleton drivers in the kernel. Simply fill out one of those. If there aren't, find a driver that's similar to what you want and replace the stuff you don't need, as above.
    • Adding new features: Ignore the rest of the kernel, completely, at the start. Since it's a new feature, rather than an extension of something already there, you're going to be mostly writing new code and working on new structures. The only time the kernel matters is when you want to get data in or out of something thats already there, or when you want to link into some existing capability (such as kernel modules). Then, only pay attention to the API in the headers. The implementation is likely to be replaced three times before the weekend, so spending too much time on it is stupid.
    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:Kernel trashing :) by Anonymous Coward · · Score: 0

      Yes, always reinvent the wheel whenever possible. Starting over insures complete freedom from so-called "bug fixes" and "workarounds."

  46. Oh well. by rice_burners_suck · · Score: 1, Redundant

    The best way to get your hands dirty with any programming project is to get the code, study it for a while, and try to change and improve things. The kernel contains a little bit (or a lot) of everything. Try to fix bugs, improve performance or lower memory usage, if you're skilled at that kind of stuff.

    The most important thing to remember is: Don't be intimidated by the kernel. Think of it as a really big program, because that's what it is. The only difference is that it doesn't get loaded by the operating system... it is the operating system!

  47. source code + a couple of books by Anonymous Coward · · Score: 0

    Ive done some OpenBSD kernel programming. "The Design and Implementation of the 4.4 BSD Unix Operating System" gave me an understanding of the operation of the BSD kernel (specifically addressing in the kernel, interrupts, virtual memory (although the book details a VM system not in use by obsd)). Aside from this book the only thing that will show you how the kernel works and how to write kernel code is the source code itself.

  48. XINU is golden for learning about internals of OSs by edrugtrader · · Score: 3, Interesting

    XINU = XINU is not unix.

    it is a very simple OS with multithreading and a bunch of other stuff.

    the full source is available and only like 8000 lines or something. it steps you through it in the book, and it is EXTREMELY easy to read.

    this was what was used to teach my OS classes in college. you can actually get in and hack the thing away and know what you are changing right from the start.

    --
    MARIJUANA, SHROOMS, X: ONLINE?! - E
  49. Find a need.... by aiken_d · · Score: 5, Funny

    Rather than just hacking in general, you should identify a particular area where kernal development has lagged. That way, you can make incremental improvements in long-neglected code rather than trying to one-up the preeminent kernel hackers.

    For instance, I've noticed that there is a sad lack of resources devoted to incorporating practical jokes into the kernel. Everything is so "write to disk, read from disk, move bytes around, manage processes" boring.

    I've got some ideas you might want to consider for your first project. Implement these babies, and I'm sure you'll garner a great deal of attention.

    - Fake "blue screen" crashes: When "root" is logged on locally, intermittently go to a blue screen with memory dump info for a few seconds, then switch back to console mode as if nothing happened.

    - "Ha! Just Kidding!" memory manager: when an app requests a memory allocation, periodically claim that it has failed for no reason at all. That'll keep 'em laughing forever!

    - Unionized thread scheduling: implement the concepts of lunch breas, smoke breaks, and overtime into thread scheduling. Union threads should refuse to work with non-union threads. Periodic strikes for better working conditions, and so on.

    Do a good job with this stuff, and I'd be shocked if it wasn't included in the main tree!

    Cheers
    -b

    --
    If I wanted a sig I would have filled in that stupid box.
    1. Re:Find a need.... by morbid · · Score: 0

      Dude,
      Where can I get some of the beer you're drinking?
      :-)
      Ozzy says : Smoke 'em, get high. But I've got a bad chest.

      --
      I'm out of my tree just now but please feel free to leave a banana.
    2. Re:Find a need.... by Troed · · Score: 2
      - "Ha! Just Kidding!" memory manager: when an app requests a memory allocation, periodically claim that it has failed for no reason at all. That'll keep 'em laughing forever!


      This is built in in debug-mode in the Symbian operating system - if you want. It helps in checking where you've written sloppy code that doesn't handle out-of-memory correctly (about 100% of all code written for desktop-systems actually, but since the Symbian platform is targeting smartphones and communicators it's a lot more important there)

  50. BSD by grendel's+mom · · Score: 2, Informative

    Give the FreeBSD or OpenBSD kernel a try. I jumped right in with these. They have tons of documentation, are friendly and relatively forgiving (if you can call a kernel 'forgiving'). My first attempts involved a simple "undelete" feature. This is a nice starting point as it requires not only knowledge of the kernel, but of the file system as well. A great learning tool. But BEWARE: you first attempts shouldn't be on a machine with your PhD thesis or 36 GB mp3 collection. Set up a new, raw machine and start hacking away. Have fun!

  51. Kernelnewbies.org by HairyBN · · Score: 2, Redundant

    Here's a good place to start, the web page and the irc channel on irc.openprojects.org #kernelnewbies.

    Happy Hacking!

  52. Starter projects... by stripes · · Score: 3, Interesting

    A good starter project is a device driver for something simple. Even easier is if you find a device Net/Free/OpenBSD supports and Linux doesn't, port the driver, that way there is somewhat less code to write.

    That could be harder for you then me since Linux has so many drivers now (I started with 386BSD 0.0, so there were maybe 15 supported devices...my friend and I ported the MACH SoundBlaster driver). If all else fails, write a driver for something that already has a driver.

    After that you can wonder off into the kernel proper and do some "real" stuff. I did IP traffic shaping, but someone seems to have done that to Linux already...

    1. Re:Starter projects... by Lord+Omlette · · Score: 2

      Maybe something like grab a serial cable, hook up one end to the comp and the other end to a set of LEDs and then write a device driver that lights up the LEDs based on whether the webserver is server or the mail server is getting mail or something. Maybe collaborate with an EE at your school or something.

      In any case, I would think it'd be easier the other way, that Linux has more drivers than BSD. Maybe he should try your suggestion in the opposite direction?

      --
      [o]_O
    2. Re:Starter projects... by stripes · · Score: 2
      Maybe something like grab a serial cable, hook up one end to the comp and the other end to a set of LEDs and then write a device driver that lights up the LEDs based on whether the webserver is server or the mail server is getting mail or something.

      Simpler with a parallel port (and a bunch of LEDs, like a volume meter)...still there is a problem with debugging both a new driver and new hardware at the same time....

      In any case, I would think it'd be easier the other way, that Linux has more drivers than BSD. Maybe he should try your suggestion in the opposite direction?

      Well, if he wants to be a Linux kernel hacker starting with the BSD kernel isn't going to be the most helpful thing in the world...of corse BSD could use more kernel hackers, and it might be easier to make it "big time" in the less competitave BSD world (except some of the BSD hackers have been doing this for a very long time and are very good at it...like since the early 80s...which is why they can do so much with so many fewer people...)

      If he really wants to be a Linux kernel hacker, he'll be better off taking a driver from *BSD, even if it is for a device Linux already has, and porting it. He will learn more about Linux that way then the other way around (I use BSD machines more frequently, so it would benifit me more for him to become a BSD kernel hacker, but...)

  53. Linux Core Kernel Commentary by ScottMaxwell · · Score: 3, Insightful
    I'd recommend Linux Core Kernel Commentary, whose first edition was favorably reviewed right here on Slashdot. It's unlike other kernel books in that it examines much of the core of the Linux kernel code line by line; it's a good way to pick up a lot of the code's idioms and to learn to think like a kernel programmer, but this approach necessarily narrows its coverage. Depending on your specific interests, this might be the perfect book for you, or it might serve well as a companion volume to a book with broader/different focus.

    The publisher has a sample chapter online (though their HTML looks weird to me; I hope it looks better in your browser). Also, you can read a little more about the book, find links to online reviews, get errata listings, and so on, at its support site.

    Oh, and I, er, happen to know the author. :-)

    --

    ``Life results from the non-random survival of randomly varying replicators.'' -- Richard Dawkins
  54. The Academic Answer by DCowern · · Score: 2, Informative

    This might not be the sort of answer you're looking for because it's expensive and will take a few months (at least) but if you haven't already, look at taking a formal course in operating systems. At my university it's a 300 level course and has some heavy pre-reqs but I've seen it offered at other universities with only the requirement of prior programming experience.

    The course I took in opiples that make an operating system "go" -- scheduling, physical and virtual memory management, we touched on sockets and pipes (it was a *nix-centric course but we discussed other operating systems including Windows, as well).

    If you dont want to spend the time or money on a formal course, I'd at least reccomend the dinosaur book. While lacking in code examples (it doesn't try to show you how to write a *nix-like OS in C, it tries to explain concepts that can be applied to any platform, any language, etc.), it is extremely thorough and makes hard concepts easier to learn.

    While I haven't actually read it (yet), I hear Tanenbaum's Modern Operating Systems is also excellent.

  55. I was forced to do it by BurpingWeezer · · Score: 3, Interesting
    Well, I wasn't forced to do it, but we had a class on it at my school, the University of Alberta. The class was officially called system and network management but was unofficially called "kernel hacking". Why? Well, the goal of the class was to put to practical use all of the OS concepts we had learned in previous years. Kernel hacking is perfect for that.


    We were given a problem to solve: build a kernel patch to any version of the linux kernel that allowed a third party who is writing is driver to have the driver interact with a software emulator instead of real hardware. The end goal was to enable people to write drivers based only on the hardware specs and an emulator. The emulator would instruct the kernel to route certain hardware calls to it. After the driver was written the real hardware could be dropped in place and the driver would not have to be re-written, it could be used out of the box. Essentially it was hardware abstraction without knowing what hardware to abstract before hand.


    Personally, if you are just looking at getting into it just find yourself a problem and solve it. It doesn't matter what problem it is, any problem, useful to the world or not. Remember that the end result of this step is to learn, not solve 2.4 VM problems, or to build a better SMP design. (That's the next step!)

    1. Re:I was forced to do it by Anonymous Coward · · Score: 0

      Cool course... I took it the first year that it was offered at the U of A. We worked with kernel 1.3.19, iirc. We had 3 assignments:

      - add a system call to the kernel
      - tunneling encrypted TCP/IP within normal TCP/IP
      - building a raw socket device

  56. Testing... by Refried+Beans · · Score: 3, Informative

    If you like to see how things work, the best way is usually to write some code that tries it out. With a little extra work, you can create a small test case. Then submit the test program to the Linux Test Project.

    Linux desperately needs more serious testers.

    LTP - http://ltp.sf.net/

  57. From the really bored nitpick dept. by Dog+and+Pony · · Score: 1

    ...A lot of kernel hackers are very elitest...

    Shouldn't that be "most elite", or simply "best"?

    And no, I couldn't hack a kernel if it "grokked" me in the ass, so I'm not one of them either way... :)

    (Ok, sorry, I was bored).

    1. Re:From the really bored nitpick dept. by xZAQx · · Score: 1

      It might be a good idea not to nitpick unless you have the slightest clue what you're talking about.
      Elitest means "to be elite" not "most elite."

      My favorite troll: 12 yr old boys that nitpick 30 yr old men about their correct grammar practices.

      --

      We dance to all the wrong songs.
      --Refused.
    2. Re:From the really bored nitpick dept. by KewlPC · · Score: 1

      Actually, the correct spelling is "elitist". Note the "ist" at the end. "Elitest" means "the most elite."

    3. Re:From the really bored nitpick dept. by Anonymous Coward · · Score: 0

      I think I'm gonna bust a rib...

  58. how I got my start by sludg-o · · Score: 1

    I had an algorithms class in college and we rewrote parts of the kernel using various algorithms and benchmarked the results. Of course, we usually made things slower, but I learned a lot.

  59. Coinky-Dinks by ironfroggy · · Score: 1

    I was just about to get into some kernal hacking, and I've only ever glanced at some source. Probably a bit daunting, but I'm looking for fun!

    My first project? Finish my compression and use that for a virtual compressed drive module. Of course, I'll do others before hand as practice, tweaking little things.

  60. Assembly Language by Anonymous Coward · · Score: 0

    Learn x86 assembly language and you will rule.

  61. Re:Corn by Anonymous Coward · · Score: 0

    well, I guess no one can accuse you of being off topic, nice work...

  62. Finding help on this subject is hard... by kko · · Score: 2, Informative

    because of two reasons:
    a)The elitist attitude of some, who will tell you to go RTFM. And unless you are willing to write code for a really old kernel, you won't find much documentation. And even so, the little free documentation you will find, is not that helpful for newbie kernel hackers (and I don't mean to piss on the efforts of those who have written docs, but they're complex to digest for real newbies).

    b)The recipe-minded newbie. Let's face it, you won't find a connect-a-b-and-c-shake-bake-and-wham!-You-have-a- module guide or howto. You have to be armed with good C knowledge, and some idea of how a computer _really_ works (understand interrupts? memory addresses?). If you want to write for a current kernel (say, 2.4.17), you _will_ have to look at the source code, and actually try to understand what is happening (told you you'd need to know C). You will also need to know, or at least have some idea of how the peripheral you're writing code for (say, if you're writing a driver module) works.

    My experience: I was an absolute newbie to kernel programming, so I started reading the code for the tty driver on kernel 2.4.0, which seems to me is one of the simpler parts. After a lot of reading, I wrote my own module (it was just for fun, so don't think it was anything useful...) as a simple device you could write data to, then read it back. Try it on a machine you don't mind screwing up, though, because you will have tons of oopses and kernel panics.

    --
    No, seriously, I just come here for the articles.
  63. Isn't this backwards? by Anonymous Coward · · Score: 0

    I can only imagine what happens when people decide first to start hacking and only second what they're going to hack on.

    Dissatisfaction -- not optimism -- is the basis of hacking.

  64. Fix an app that talks to a buggy driver by wagadog · · Score: 1

    Then fix the driver to get the app to work properly/faster/more reliably/to spec. You'll soon find yourself in kernel space, and start to wonder what all the fuss was about. Often there's several levels of drivers to contend with, e.g. PCMCIA, CardBus, 1394 -- to get, say, a progressive scan camera to talk to a laptop.

  65. Re:Is /. becoming the champion fighter of the newb by drik00 · · Score: 1
    "news for nerds"

    programming = nerd, in most people's minds, hell, i consider myself a nerd, proud of it, in fact.

    and the way i see it, kernel hacking would be the pinnacle of programming expertise, so, yeah, dont tell me this kind of stuff doesnt belong on /.

    --
    Beer, now there's a temporary solution -- Homer Jay S.
  66. Kernel API books by awptic · · Score: 1

    There's a few good kernel API books here which might be a good read for anyone wanting to learn, including one specifically for anyone wanting to get into kernel hacking.

  67. x86 Emulators, etc. by alexalexis · · Score: 2, Informative

    If you don't have a spare PC laying around, VMWare is a pretty spectacular way to get your hands dirty without having to worry about completely hosing your development machine on accident. The only thing you really can't do with VMWare is hardware level drivers, for obvious reasons.

    If you really want to get gritty on the emulation level, I highly recommend Bochs. It's a fully functional x86 emulator, and since it's open source, it comes with some nifty options, and the source code is on hand if you really need to get tricky.

    I think the key to working efficiently with an x86 emulator/virtualizer is having a significant amount of RAM, and a RAM disk to mount your virtual drives on. Since RAM is so cheap these days, there's no excuse not to have at least a gig of it in a development box. It makes rebooting the virtual machine (which happens a lot) a bearable process.

    If you need to work with hardware, you can build yourself a test platform for around $300 now, including a cheap monitor - unless you need exotic hardware.

    My experience kernel hacking is in on the VFS level, inserting and modifying a few core routines to report through a /proc interface ... and it was pretty easy to get into. I started with a basic understanding of how things work (inodes, etc.), and it came pretty easily. If you're going to be working on file systems, make periodic copies (backups) of your virtual drive image (if you're using VMWare/Bochs) ... it's a life saver for the first few weeks. :)

    The kernel is complex, but so is any major piece of software. Thankfully, lots of bits in the kernel are well engineered and compartmentalized, so chances are you won't have to worry about screwing up the TCP stack if you're in the midst of inode.c ...

    have fun!

  68. Do as I did by ajv · · Score: 4, Insightful

    Get down and dirty with a kernel project. I chose Reiserfs on alpha.

    This taught me a lot about lkml politics, which is probably the first skill (and some larrikins would say, the only skill you need) you must master to be a successful long term kernel hacker. First lkml hint: don't slag off anyone. Don't piss off a few people in the know until you get to know them, and then...

    Then, don't talk - do. Respect is directly based upon your skills with patches, and their acceptance rate.

    Patch submission. Follow the standard guidelines (found elsewhere), but know now that Linus sucks at code control. The mainline kernel development process is slow, prone to serious lossage, allows regression, and is irreparably harmed by Linus' refusal to adopt modern code control practices. So when you submit a patch, don't worry if it's not accepted. Every time the kernel is revved, re-do your patch and re-submit. It'll eventually be accepted, particularly if it helps the kernel boot. For example, it took nearly a month of my submitting a two line patch to allow the alpha to boot before it was accepted into mainline 2.4.0pre development. That's why I ditched Linux for a while - dickheads in charge. All the *BSDs have better kernel development practices, and their bleeding edge kernels are far more stable than any stable Linux kernel. However, for various reasons, I get attracted back to Linux on a regular basis, like a fly to a pus-filled boil.

    Anyway, the things that need desperate attention are:

    the kernel janitor project (clean out the cruft!)
    the linux kernel testing project

    These are far more important than any single feature you might want to add, and in particular the kernel janitor project will help you get familiarized with the kernel the quickest.

    http://sourceforge.net/projects/ltp/
    http://sourceforge.net/projects/kernel-janitor/

    --
    Andrew van der Stock
  69. Major stumbling block: debugging by drix · · Score: 3, Informative
    About two years ago I was in the same place you are. I wanted sound on my notebook, and, while a driver did exist for my chipset, it was extremely buggy with my particular setup and resulted in an instantaneous hard freeze. It didn't appear to be under any further development, and, to make matters worse, the specs for the chip hadn't been released and the author, having "divined" them out of thin air, did not wish to be contacted. So I undertook to debug it myself.

    Let me say that, at least for me, this was not like debugging any of the userspace programs that I had done before. If you're like me, when your program crashes, you first up gdb, load the core, and backtrace/step from there. First of all, there's no core dump. In this case I didn't even have the luxury of an oops readout; as I would find out later this particular bug was locking the computer even before the kernel could flush its output buffers and print to the screen.

    So I had to start meticulously reconstructing the function call stack using printk(). It took me awhile before I figured out why none of these were getting printed (for the reason I just mentioned.) So that didn't work either.

    I searched high and low but never did find a way to debug the kernel that was as easy as using gdb to debug a userspace program, and that's not saying much. No stepping, no backtraces, nada. The "bug" in my particular driver consisted of a single offending line which wrote an 8-bit register and was not to spec. I would have never ferreted it out if I hadn't "stumbled" across the NDA'd specs myself.

    Anyways, moral of the story: kernel debugging sucks for really hard bugs. If anyone knows of better tools to use kindly inform me of them.

    --

    I think there is a world market for maybe five personal web logs.
  70. Pick hardware with a VERY good spec... by unclei · · Score: 1

    ...and try to understand the driver, or write your own.

    It is essential to have a good spec. For comodity microcontrollers, the manufacturer will usually make the spec available. Read the spec. Understand the spec. Then think about your driver, or read through the existing driver and figure out how what the code does twiddles the control lines just right.

    There's a kind of art to understanding these hardware specs, and it takes a bit of practice. Try starting with something like a serial bus controller, or something else that's well understood.

    And get yourself a copy of the Linux Device Drivers book, it's worth the cost. Or read it online from oreilley.com. For many devices, you can find information about that device in linux/Documentation about how the driver works and/or how to write clients for the driver.

    As you come to understand the driver, comment the bits that drove you nuts. Submit the commented driver to the driver's maintainer. If you watch on the lkml, you'll ocassionally see somebody submit a comments-only patch. YOU COULD BE THAT SOMEBODY!

    --
    Andrew
  71. It's like riding a bicycle by popocatapetl · · Score: 1

    Working in the Linux kernel is like riding a bicycle. You can read about it till the cows come home, but you just have to dig in and do it. You'll fall off , pick yourself up, dust yourself off and climb that saddle again. Do it a few times, and you're on! Practice configuring and building kernels first without making changes till you get the hang of it. I had to dig in when the driver for my network card, which used to work in 2.2 stopped working in 2.4, and I had to go fix it -- it would have been faster to buy another network card I suppose, but I was born stubborn. (I still have to patch every kernel with that fix, because no one seems interested in applying the fix permanently to the source code tree...)

  72. HOWTO at http://www.kernelhacking.org by kernelhacker32 · · Score: 3, Informative

    You can find a half baked kernelhacking-HOWTO at http://www.kernelhacking.org

  73. Start with the MBR... by jquirke · · Score: 2, Informative

    Start reading the MBR, then follow the chain of execution until you are deep into the kernel...

    That's how I started on the FreeBSD kernel and the Linux kernel.

    Sure at the first there's some dependencies - and you are sent on a journey through about 20 H files just to find one #define ition, and to know A you need to know B, which requires C, but it worked for me.

    --jq

  74. Book suggestion by alphabet26 · · Score: 1

    A book I found good is the Linux Core Kernal Commentary. It's by Scott Maxwell and published by CoriolisOpen Press. It comes with in-depth code annotation and a CD full of useful tools.

    If you're interested the ISBN is 1-57610-469-9

    --
    -AlPhAbEt
  75. Already done by scorcherer · · Score: 2, Funny

    It's called XP

    --

    --
    The Cap is nigh. Time to get a fresh new account.

    1. Re:Already done by TheAwfulTruth · · Score: 1, Troll

      Ha. funny. Tell that to the Linux kernel. It gets BSODs too! Only the B stands for Black. No need to code in any MORE kernel panics please...

      --
      Contrary to popular belief, coding is not all free blow-jobs and beer. Those things cost MONEY!
  76. Embedded Systems and Linux... on a Sega Dreamcast by Cryptnotic · · Score: 2
    Getting started with embedded systems has never been easier. Go buy a Sega Dreamcast for $50 (Try to get one with a manufacture date of November 2000 or earlier). Then, go read this article.

    You'll have linux up and running on the thing in no time, and you'll be able to play around with writing device drivers and fixing kernel scheduler bugs and stuff. All on the SH4 processor, which is much simpler than the x86 you're probably using.

    Cryptnotic

    --
    My other first post is car post.
  77. Before you dive in, read this!!!! by 2Bits · · Score: 5, Funny
    Oh so, you want to hack kernel? Well, let me tell ya, before you get in this, you need to do the following prelim works:

    • Divorce if you are married, unless your other half also wants to hack kernel. Even that, make sure you two don't hack the same module.
    • Say goodbye to your bf/gf, unless your significant other also wants to hack kernel. Even that, make sure you two don't hack the same module.
    • Get rid of redundant furnitures. You'll have a lot more computers, so you need space.
    • Get a good air conditioner. Oh yeah, all those computers you have, it's going to be hot.
    • Get a good and large freezer. Read next items to see why.
    • Stack up a lot of beer, coke, moutain dew.
    • Get a good coffee maker, with a big pot, preferably with vacuum insulation.
    • Stack up a lot of coffee
    • Stack up a lot of frozen pizzas and frozen food.
    • Get rid of your lamps. You don't need that. You'll glow anyway.
    • Get rid of all your light color clothes. Get some black clothes. Any kernel hacker worth two cans of beer will wear black clothes.
    • Get rid of your razors. Any kernel hacker worth two cans of beer will have beard. Linus is an exception, his skin is too thick, so it doesn't even grow.
    • Save money on soap and detergent. Any kernel hacker worth two cans of beer is smelly.


    Ok, now you can go back to read all these good advices that other /.ers gave.

  78. Dual keyboards with seperate keyboard mappings! by karlm · · Score: 5, Interesting
    I did my first real kernel programming (besides a little "hello, woeld!! This is the kernel speaking" module). Last week. My keyboard died a few months ago and I didn't have time to mess with it, so I went out and baught and IBM USB/PS2 keyboard (Rapid Acess Pro) and hooked it upto my machine as a PS/2 keyboard.

    When I had time, I went and fixed the old keyboard, and rearranged the keys as a Devorak keyboard while I was at it. Unfortunately, the USB-PS/2 dongle that came with my IBM keyboard doesn't work with my Dell PS2 keyboard. However, I currently have the IBM keyboard hooked up to my USB port and my old Dell keyboard (with rearranged keys) as my PS/2 keyboard.
    Luckily, keybdev.c (both the one in drivers/input and the one in drivers/usb) is astonishingly short. There's all of about 5 functions in there and most of the complexity is hidden in other modules.
    The USB keyboard driver interfaces the PS/2 subsystem IIRC (don't know where I read this, maybe the hid.c documentation on linux-usb) so you can't have seperate keyboard mappings, unless you munge the keycodes inside the USBdriver. As long as you don't lock up your USB keyboard driver or have a buffer overun, you should always be able to restart.
    I have LILO (GRUB, actually) setup to boot me into either a 2.2.20 kernel or a 2.4.17 kernel. That way, I can ensure that my hacked module won't be loaded by hotplug if I screw it up.

    The Steps I took
    Downloads I downloaded the 2.4.17 source code and used apt-get to install kernel-package (makes Debian kernel packages, so your nightly apt-get upgrades won't destroy your work).
    Renaming I went into /usr/src/linux (after untarring the 2.4.17 source) and changed the line near the to from "EXTRAVERSION = " to "EXTRAVERSION = -maxmodular" this changes the name of the kernel from vmlinuz-2.4.17 to vmlinuz-2.4.17-maxmodular and makesa seperate directory in /lib/modules for your hacked modules. (I called it maxmodular because I even made the "misc binary support", "a.out binary support" and "floppy drive support" as modules.) Potential Gottcha: IDE support is no enabled by default, and comes after the IDE-parport questions in the config menu, so I must have recompiled 10 times trying to figure out why it couldn't mount the root partition.
    Snooping arroundI poked around the drivers/usb/ kernel source and documentation some to try and figure out what needed to be hacked. I incorreclty identified drivers/usb/keybdev.c and after none of my printk's worked, I tried drivers/input/keybdev.c (this does not affect the PS/2 keyboard).
    Printk() is your friend. Add printk()s (printk() works just like printf(). Make sure to do your kernel module insertion from a non-X virtual terminal to minimize the time it takes prints to get to you in the case of an impending crash.) to the beginning of every function in the driver, letting you know that it's being called (and optionally the arguments). Then recompile and load your module. This gives you a feel for how the driver works and confirms that you have the right driver.
    Trim prink()s to only print out the information you need. In my case, I got rid of the printks from everything but the keyboard event handling function and the emulate_raw function kalled by the event handler. I printed out every keycode that was pressed (but not it's release) so that I could write down the keycode for each key I needed to remap. (And some of the neat colorful buttons IBM added above the funtion keys. I later used these to turn on and off the devorak remapping and turn on and off the printks in my module.

    After that, what you do is pretty specific to your module. For keyboards, they send a 16-number, called a scancode that is one of the arguments to the keyboard event hadler function. All of the normal keys have scancodes less than 256, so I just made an unsigned char[256] usb_key_remap_table and did something like
    if (code < 256 && code >= 0) {code = usb_key_remap_table[code];}
    The more astute amoung you will remeber that I'm only remapping the USB keyboard, which is my good keyboard and therefore unmodified. Oh well, I figure having the incorrect letters written on the keys discourages me from looking down.

    Anyway, the USB subsystem seems very readable for the higher level drvers and USB keeps getting more and more devices, so I'd recomed starting with a USB subsystem... too bad RadioShack is out of USB cue:cats :-D

    --
    Copyright Violation:"theft, piracy"::Anti-Trust Violation:"thermonuclear price terrorism"<-Overly dramatic language.
  79. Article on this in online Linux Journal by lrc · · Score: 2, Informative

    I actually wrote something up that was recently posted online at the linux journal site: http://www.linuxjournal.com/article.php?sid=4715 Since I wrote it over a year ago, some of the links are a bit out of date, but the general principles are still good.

  80. Against better knowing, a reply: by Dog+and+Pony · · Score: 1

    So, since I'm closing in on 30, you be the 12-year old then? ;)

    "Elitest" is not a word at all. But it could be a bad grammar form of "most elite" (as if that would be good grammar heh).

    What the poster meants was "Elitist" which would mean that they are "on high horses", so to speak, and only speaks to other "elite" people. It was a bad joke man. Like I said, I was bored.

    If I would really try to nitpick someone about grammar, I would choose my mother-tongue, which is not English. I suggest you do too. Thanks.

    And no, no comment about my favourite trolls. Have a nice flaming. :)

  81. The Linux Kernel is not the only kenerl by Anonymous Coward · · Score: 0

    I do not think it is right that whenever someone says kernel, that it automatically means the Linux kernel. Linux users are very unix ignorent and they do not know that there are many other free operating system with kenerl source code avialable. When I first saw this i thougt what kenerl they might be talking about then I rembered that when you see the world "kernel" you automatically associate it with the Linux kernel. People, please start calling it (whatever os) Kernel. Don't take this the wrong way, I have used Linux in the past but have now since moved on to the *BSDs.

  82. "Mac OS X.i is what Linux-on-desktop People Crave" by Dr.+Pantzo · · Score: 1

    An article by Michael J. DeMaria over at networkcomputing.com.

  83. I can't believe nobody mentioned MINIX! by pkj · · Score: 2

    For those who don't remember their history, MINIX was a complete UNIX kernel (and environment) developed by Andrew S. Tanenbaum SPECIFICALLY to teach UNIX kernel internals. It was documented in his book Operating Systems: Design and Implementation, which includes the ENTIRE source code listing for the kernel.

    MINUX was never designed as a real-world system, although it did inspire at least one person, namely Linus Torvalds, to write one...

    -p.

  84. Be adventurous by Anonymous Coward · · Score: 2, Insightful


    I started programming in the linux kernel many years ago. I think the thing that helped me the most is that at first I just stuck to one thing. I didn't try to get it all at once. Kernels are very large, and there are a few tricks to kernel programming that aren't as intuitive as applications programming. After playing around in the TCP/IP stack I just branched out a bit. After a while whenever I encountered some new routines or structure, I tried to read every bit of code involved with it.

    Some years later I decided to switch to *BSD. I have found their source to be much cleaner and their debugging tools are far more useful for me. After I felt comfortable enough with BSD I started contributing code back. At first small things, and then gradually larger projects. Now I do custom FreeBSD kernel code for a living. I do everything from new file systems to device drivers and custom TCP/IP code. I enjoy it much more than user space programming.. I always joke that I did it all to get away from getopt(3) though. :-)

    There are a variety of books you can read on the topic. Don't restrict yourself to linux books, please. Learn that there is more than one way to solve a problem. I'll list some of my favorite kernel books here:

    "The Design and Implementation of the 4.4BSD Operating System"
    "UNIX Internals: New Frontiers"
    "Solaris Internals"
    "UNIX Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers"

    After you get a rough idea of how the kernel works, the only way to really learn it is to read code and research papers.

    Good luck. :-)

  85. which kernel? by bcrowell · · Score: 2

    Were you thinking of doing some work on Darwin? That would be a much better choice than Linux, of course. Darwin is based on a free-as-in-speech license, unlike Linux. Linux is licensed under the GPL, which places all kinds of restrictions on your freedom to use the code; for instance, you can only link it to other GPL'd code. Also, Darwin is a microkernel design, so unlike Linux, it actually has a future on the desktop -- you can actually install a new device driver without recompiling the kernel.

  86. Re:Is /. becoming the champion fighter of the newb by buckeyeguy · · Score: 1

    The odds are better that a Linux kernel hacker would show up (and be found) here, versus a 'Windows'... eh,... ring zero hacker? Ya know, the kind that Doonesbury once labeled as having a 'minty green' complexion? ;)

    --
    I'd have a personalized plate on my car, but "toxic bachelor" won't fit into 7 letters.
  87. What is needed? by Anonymous Coward · · Score: 0

    So assuming you know what you need to know to start hacking away at the kernel, there is no sense re-inventing the wheel. What are the important features that the kernel is still lacking?

    It is kind of hard to start coding without a goal.

  88. My first fumbling steps... by TightByte · · Score: 1

    ... was mostly very small, very simple stuff. There's the old "disable the kernel's ability to use the kernel speaker" by making the first statement in linux/drivers/char/vt.c function _kd_mksound a simple return().

    The next thing I did was to make a /proc/pcspeaker entry to which I could echo 1 in order to enable the speaker and 0 to disable it.

    Allright, so it's very banal and easy, but the key is that it was my first delving into the kernel and it was all possible to figure out by simply watching the existing code in there and duplicating what existed elsewhere.

    I think that's the best approach if you just want to start getting your hands dirty; dive in there and look at the small bits you can easily affect while still knowing what you're doing. Then, as you grow bolder, you'll probably want to reach for those FAQs and manuals - but at least you'll have outgrown the initial fear of even touching the kernel source, and from that only good can come.

  89. step one: learn why linux sucks by ahl0003 · · Score: 1

    Seriously. Talk to anyone who's worked on a operating system in a serious way. From an architectural standpoint, linux is pretty primitive and pretty much wed to that architecture.

    If you want to work in the kernel (and I assume that you're talking about linux's kernel), you have to remember that debugging's a hell of a lot harder. You'll do well to spend twice as long as normal making sure that it's right b/c you can easily spend 10 times as long figuring out what you screwed up.

    If you want to seriously get involved with the linux kernel, my suggestion would be to try to bring some of the better architectural features from an industrial strength OS (e.g. Solaris) to linux. Personally, I'm interested in observability, and debugging. Adding something like Solaris's agent LWP would be a pretty isolated project and highly worthwhile.

  90. Why the kernel? by thorsen · · Score: 1

    If there's one thing I agree with Rik Van Riel about, it's that further kernel hacking won't help Linux be adobted further.

    The real problems for Linux exist in the middle layers, all the things between the kernel and KDE/GNOME. In here there is vast amounts of work that needs to be done, and way too few people doing it.

    I have difficulty understanding why it is that people focus so much on kernel development, when at this point in development gcc and glibc hacking is incredibly more important. This is the bottom of the system, controlling the performance of everything. And this layer is not good enough yet.

    Now, if you really want to hack on the kernel, by all means do so. Don't let anyone tell you that it's not necessary or won't do any good. Because that's not what I'm saying here. But I am saying that you would do Linux a whole lot of good by choosing a different area than the kernel.

    I know; it's difficult to choose another project when sites like Slashdot only gives any attention to Kernel hackers and KDE/GNOME releases. It's difficult to live in a meritocracy when people are not giving equal merits to the different parts of the system.

    Last: Whatever you choose, stick with it. The one thing Linux really needs is a bunch of people who knows a *lot* about their topic. People like me who knows something of everything are not equally valuable.

    Happy hacking,

    Bo Thorsen,
    SuSE Labs.

  91. Minix & Lions' Commentary helps by avishal · · Score: 1

    I know I might get a lot of flames for this, but to really understand how a big source code is fitted together (headers, dependencies etc) - trying out things on minix could prove very useful. Reasons:
    1. It's small
    2. You can test your changes (thus gain confidence in building a bigger system)
    3. Your OS fundamentals get stronger

    If you are new to unix, you may want to look at the lions' commentary on unix.
    The book by Alessandro Rubini (Linux Device Drivers) is also very good.

    It goes without saying that you need to dig into the code and get familiar with it... there is _NO_ alternative.

    If someone has linux kernel documentation (like lions' commentary), _KINDLY_ mail!

    --
    v==hal if /wal/; #if (Perl) = agar (Hindi)
  92. Here is my very simple advice by spacey · · Score: 1

    As someone who has taken on the job of adding to a small, not often used, but personally very interesting driver, here's the advice I have:

    1) Get used to rebooting a lot. You're better off if you can do this on a system that's not your main workstation, so you can, you know, still get work done.

    2) Appreciate and treat very well anyone, I mean anyone, who gives you any useful advice at all. Because every little bit counts.

    -Peter

    --
    == Just my opinion(s)
  93. Re:9th poster AND I have a sexy beard! by screwtheNSA · · Score: 0

    Didn't Al Gore also "invent" computers as well?
    I mean, is there not an Al-Gore-ythm in YOUR code?

    Damn irony!

    Politicians now take credit for the products of others.....How old was Al G. when "the" I-net was created? Damn, he WAS good, wasn't he?

    --
    206.39.38.2, DDN-BLK-36, DOD NET INFO CENTER. 800.365.3642 206.36.0.0-206.39.255.255 NET RANGE.
  94. MINIX by Anonymous Coward · · Score: 0

    Uhh I cant believe no one has said Minix.

    Minix is a Unix style operating system for educational purposes.

    minix.org will get you started

  95. Which Kernel ??? by llzackll · · Score: 1

    Which kernel are you talking about? You just think we assume you mean Linux? Somehow anything with the word 'kernel' in it, means Linux ????

  96. Gearheads section of Linux Mag by Etyenne · · Score: 2

    The "Gearheads Only" section of Linux Magazine have a few interesting article :

    http://www.linux-mag.com/depts/gear.html

    --
    :wq
  97. I'm a kernel hacker... by BlueTT · · Score: 1

    AND I listen to guys in Rome with pointy hats, religiously you might say. ;-)

  98. Re:Before you dive in, read this!!!! FUNNY by avishal · · Score: 1

    your suggestions are humourous and perhaps at some places _do_ reflect the evolved hacker state. But I figure that you are _preaching_ about a certain dress/lifestyle code which in my opinion is not a necessary condition to know your kernel and not sufficient either (I have a beard, but don't know the kmod details). You don't decide to get rid of all your razors or your bf/gf, sometimes they get rid of you.

    You don't have to look weird, to be wired.

    Linus is an example, not an exception.

    --
    v==hal if /wal/; #if (Perl) = agar (Hindi)