ED,

Can you just tell how to use this script for searching efficiently. I tried
like :


script.sh task_struct.

Anything more if you want to add in this.


Krishna



On Wed, Sep 9, 2009 at 7:51 PM, Ed Cashin <[email protected]> wrote:

> Deven <[email protected]> writes:
>
> > Hi,
> >
> > On Tue, 2009-09-08 at 19:01 +0530, Chandrakant Kumar wrote:
> >> Hello
> >>
> >> I'm a computer science student . I am studying operating systems in the
> >> current semester , so i got a chance to study about linux. I want to
> >> learn kernel programming. may you people please tell me what materials
> >> and books i should go through. please provide me exact pointers to
> >> resources.
> >
> > I would recommend:
> >
> > "Linux Kernel Development" -Robert Love
> >
> > This is an excellent book to know how the Linux kernel works.
> >
> > Before you read it, you need some Linux System Programming background.
> > You need this to fully understand the concepts.
>
> There are two main areas of learning you can consider: the kernel's
> core functionality like its virtual memory subsystem, and its device
> drivers.
>
> For the former, a good resource is Mel Gorman's work:
>
>  http://is.gd/34W69
>
> ... which is probably still available online as well.
>
> For device drivers, there's the well known _Linux Device Drivers_,
> which is available in print and as PDFs.
>
> But whatever you read, make sure to refer to the kernel sources
> themselves as you read.  It will help you to relate what you learn to
> something concrete.  You can use your reading as a chance to get to
> know the layout of the kernel sources.
>
> It also helps to have a specific project in mind.  Without some goal
> in mind, I find it more difficult to retain new information.
>
> Finally, here's a script that you might like to use in searching for
> specific functions and macros in the kernel.  Often the best way to
> understand something is to look at how it is being used in the
> kernel.  There are alternatives like cscope.
>
> #! /bin/sh
> # kern-find-grep - find regex in kernel sources
> #
>
> test -z "$*" && exit 0
> nocase=
> if test "$1" = "-i"; then
>    nocase="-i"
>    shift
> fi
>
> extended=
> if test "$1" = "-e"; then
>    extended="e"
>    shift
> fi
>
> # set -x
> find . -type d -name .svn -prune -o \
>        -type d -name .git -prune -o \
>        -type f \
>        ! -name '*.o' \
>        ! -name 'vmlinu*' \
>        ! -name '.tmp_*' \
>        ! -name '*.ko' \
>        ! -name '*.ver' \
>        ! -name '.*.o.cmd' \
>        ! -name '.*.ko.cmd' \
>        ! -name '*~' \
>        ! -name '*.a' \
>        ! -name '*.so' \
>        -print0 | xargs -0 -e ${extended}grep --color=never $nocase -n -e
> "$*"
>
>
> --
>  Ed Cashin <[email protected]>
>  http://noserose.net/e/
>  http://www.coraid.com/
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [email protected]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

Reply via email to