回复: git download

2014-06-11 Thread jinz...@wingtech.com
And use "top" command, show the memory has used 90%+, but the CPU just 1%+.  
 



jinz...@wingtech.com

发件人: jinz...@wingtech.com
发送时间: 2014-06-12 14:32
收件人: kernelnewbies
主题: git download
Hi,
Now we install git on servers, when we use "git clone" to download the code, 
the rate is too slow, how to speed the rate?
Thanks!


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 9932 (20140612) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


git download

2014-06-11 Thread jinz...@wingtech.com
Hi,
Now we install git on servers, when we use "git clone" to download the code, 
the rate is too slow, how to speed the rate?
Thanks!___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Problem using git

2014-06-11 Thread Andev
On Thu, Jun 12, 2014 at 12:58 AM, Aruna Hewapathirane
 wrote:
>>>The kernel tar file from "www.kernel.org" is around 70MB.
>>>but when i want to download the kernel using git it seems it's really
>>> huge.
>>>git shows 1% for 25MB. Is it how it should be or am i missing something?
>
> This will download a local copy of the entire revision history (back to
> 2.6.12-rc2), which takes a couple hundred megabytes.
>
> So what your experiencing is quite normal :)
>
> It extracts the most recent version of all the files into your linux-git
> directory, but that's just a snapshot (generally referred to by git people
> as your "working copy").
>
> The history is actually stored in the subdirectory "linux-git/.git", and the
> snapshot can be recreated from that (or changed to match any historical
> version) via various git commands.
>
> You start with an up-to-the-minute copy of the linux kernel source, which
> you can use just like an extracted tarball (ignoring the extra files in the
> ".git" directory).
>

You can limit the amount of history you download using the --depth
option of git.

http://git-scm.com/docs/git-clone

So for a very small download, you would do something like:

$ git clone --depth 1
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: git merge issues

2014-06-11 Thread Andreas Platschek

http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging#Basic-Merge-Conflicts

andi

On 06/12/2014 07:16 AM, Raghavendra wrote:
> Hello everyone,
>
> Assume that i have two branches in my repository: master and devel.
>
> -- I've updated the master branch from the remote repository (using git 
> pull).
> Assume that the file name 'file.txt' has gone through an update.
>
> -- Now the same file has also gone through a modification in the devel 
> branch (manual editing)
>
> -- Now when I do a 'git merge master' from my devel branch, I am facing 
> a conflict issue something like this :
>
> Auto-merging file.txt
> CONFLICT (content): Merge conflict in file.txt
> Automatic merge failed; fix conflicts and then commit the result.
>
> Now my question is that do I need to solve the merging issue manually or 
> is there any way to solve this using git?
>
> Thank you.
> Raghavendra
>
> ---
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> ---
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: git merge issues

2014-06-11 Thread Vignesh Radhakrishnan
Hi Raghavendra ,

AFAIK , you need to solve it manually and do git commit after this.
This happens when git tries to resolve it but does know how to solve
the same. Git will record the conflict resolution that you have done
and in case the same kind of conflict occurs, it will resolve the
conflict automatically based on your previous resolution.

Thanks,
--Vignesh

On Thu, Jun 12, 2014 at 10:46 AM, Raghavendra  wrote:
> Hello everyone,
>
> Assume that i have two branches in my repository: master and devel.
>
> -- I've updated the master branch from the remote repository (using git
> pull).
> Assume that the file name 'file.txt' has gone through an update.
>
> -- Now the same file has also gone through a modification in the devel
> branch (manual editing)
>
> -- Now when I do a 'git merge master' from my devel branch, I am facing
> a conflict issue something like this :
>
> Auto-merging file.txt
> CONFLICT (content): Merge conflict in file.txt
> Automatic merge failed; fix conflicts and then commit the result.
>
> Now my question is that do I need to solve the merging issue manually or
> is there any way to solve this using git?
>
> Thank you.
> Raghavendra
>
> ---
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> ---
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
http://vigneshradhakrishnan.blogspot.com/

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: git merge issues

2014-06-11 Thread Mandeep Sandhu
> Now my question is that do I need to solve the merging issue manually or
> is there any way to solve this using git?

This is in no way related to the Linux kernel. You should be asking
this on the git mailing list.

Short answer - you will have to manually fix the conflict. Git could
not do it automatically and hence it's asking you to fix it. After
fixing the conflict, do 'git add ' and then 'git commit'.

HTH,
-mandeep


>
> Thank you.
> Raghavendra
>
> ---
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> ---
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


git merge issues

2014-06-11 Thread Raghavendra
Hello everyone,

Assume that i have two branches in my repository: master and devel.

-- I've updated the master branch from the remote repository (using git 
pull).
Assume that the file name 'file.txt' has gone through an update.

-- Now the same file has also gone through a modification in the devel 
branch (manual editing)

-- Now when I do a 'git merge master' from my devel branch, I am facing 
a conflict issue something like this :

Auto-merging file.txt
CONFLICT (content): Merge conflict in file.txt
Automatic merge failed; fix conflicts and then commit the result.

Now my question is that do I need to solve the merging issue manually or 
is there any way to solve this using git?

Thank you.
Raghavendra

---
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
---


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Problem using git

2014-06-11 Thread Aruna Hewapathirane
>>The kernel tar file from "www.kernel.org" is around 70MB.
>>but when i want to download the kernel using git it seems it's really
huge.
>>git shows 1% for 25MB. Is it how it should be or am i missing something?

This will download a local copy of the *entire* revision history (back to
2.6.12-rc2), which takes a couple hundred megabytes.

So what your experiencing is quite normal :)

It extracts the most recent version of all the files into your linux-git
directory, but that's just a snapshot (generally referred to by git people
as your "working copy").

The history is actually stored in the subdirectory "linux-git/.git", and
the snapshot can be recreated from that (or changed to match any historical
version) via various git commands.

You start with an up-to-the-minute copy of the linux kernel source, which
you can use just like an extracted tarball (ignoring the extra files in the
".git" directory).

If you're interested in history from the bitkeeper days (before
2.6.12-rc2), that's stored in a seperate repository,
"*git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
*".

Reference : http://landley.net/writing/git-bisect-howto.html
Aruna
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Problem using git

2014-06-11 Thread Ali Aminian
Hello
The kernel tar file from "www.kernel.org" is around 70MB.
but when i want to download the kernel using git it seems it's really huge.
git shows 1% for 25MB. Is it how it should be or am i missing something?
the git command i used is this: "git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: EudyptulaChallenge in github??

2014-06-11 Thread karthik

On Wednesday 11 June 2014 01:40 PM, Laurent Navet wrote:
> You can use Bitbucket which offers free private repositories,
>
> have fun,
>
Or use git locally like most of us :)

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Putting a thread to sleep using schedule() is foolproof?

2014-06-11 Thread Jeff Haran


From: kernelnewbies-boun...@kernelnewbies.org 
[mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Joshi
Sent: Wednesday, June 11, 2014 11:33 AM
To: valdis.kletni...@vt.edu
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Putting a thread to sleep using schedule() is foolproof?

Is not changing the state to TASK_INTERRUPTIBLE before calling schedule() 
renders it not-schedulable? I thought task would be removed off run-queue by 
schedule() because it is in TASK_INTERRUPTIBLE state.

I was making a sort of task queue. Threads puts themselves into this queue when 
a resource(say memory-space) is not available. And other thread, post releasing 
the memory space, will wake the first thread in queue.
There are other means to achieve that, but I wondered why the above mentioned 
method did not succeed in making thread sleep.

I think TASK_INTERRUPTIBLE has to do with whether or not a task can be 
“interrupted” by a signal, as in wait_event_interruptible().

Jeff Haran

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Putting a thread to sleep using schedule() is foolproof?

2014-06-11 Thread Joshi
Is not changing the state to TASK_INTERRUPTIBLE before calling schedule()
renders it not-schedulable? I thought task would be removed off run-queue
by schedule() because it is in TASK_INTERRUPTIBLE state.

I was making a sort of task queue. Threads puts themselves into this queue
when a resource(say memory-space) is not available. And other thread, post
releasing the memory space, will wake the first thread in queue.
There are other means to achieve that, but I wondered why the above
mentioned method did not succeed in making thread sleep.



On Wed, Jun 11, 2014 at 11:21 PM,  wrote:

> On Wed, 11 Jun 2014 23:09:05 +0530, Joshi said:
>
> > set_current_state (TASK_INTERRUPTIBLE);
> > schedule ();
> >
> > Is this a sure-shot way of putting a thread to sleep, or are there
> > conditions when this may not put the calling thread into sleep?
>
> This will only succeed in guaranteeing the thread sleep if the thread has
> done
> something *else* to render it not schedulable.  schedule() will
> return right back to that thread if it's the highest-priority thing
> that's runnable.
>
> What problem are you trying to solve?  Usually, you do that sort of
> schedule() when you're doing something that will take a relatively long
> chunk of time, and want other things to have a *chance* of running.  But
> usually, you're perfectly happy with continuing to run if nobody else
> wants to run.
>
> Why did you want a guaranteed sleep?  If it's because you've started an
> I/O and you *know* it will be 125 milliseconds before you can make further
> progress, there's mdelay() and similar APIs... and so on for other reasons
> for wanting to sleep (for instance, blocking on a lock has an API, etc)
>



-- 
Joshi
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Beginner guide

2014-06-11 Thread Robert P. J. Day
On Wed, 11 Jun 2014, valdis.kletni...@vt.edu wrote:

> On Wed, 11 Jun 2014 11:58:02 +0530, Prudhvee Narasimha Sadha said:
>
> >  I just want to know what I should learn and any suggested books to
> > learn kernel programming.
>
> Learn C.  Learn C *really* well.  Especially the way the Linux
> kernel implements object-oriented concepts using callbacks through
> structures of function pointers (struct file_ops, etc...)

  particularly gcc extensions that are used extensively in the kernel:

https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Beginner guide

2014-06-11 Thread Valdis . Kletnieks
On Wed, 11 Jun 2014 11:58:02 +0530, Prudhvee Narasimha Sadha said:

>  I just want to know what I should learn and any suggested books to
> learn kernel programming.

Learn C.  Learn C *really* well.  Especially the way the Linux kernel
implements object-oriented concepts using callbacks through structures
of function pointers (struct file_ops, etc...)

Learn about race conditions and locking.

Come to grips with the fact that the Linux kernel of 2014 isn't the kernel
from 2004 - most of the code has already been looked over by lots of
professional programmers, and a lot of the low-hanging fruit has been
cleared out already.  So be prepared to accept that these days, not
everybody can be a productive kernel hacker.

However, Greg KH is *always* willing to accept any coding love you want
to give to anything in drivers/staging :)

Two very helpful book, even though they are *not* about Linux:

Maurice Bach - The Design of the Unix Operating System

McKusick - The Design and Implementation of the FreeBSD Operating System

Why? It's useful to understand different solutions for how to represent things
like processes, files, and devices.  And both books are an excellent way to
learn about locking in the context of OS design, as they spend a *lot* of time
on "We need to lock this data structure from this point in time until this
other thing finishes, because otherwise something else could run here and do
this other perfectly reasonable thing at just the wrong time, which would
unfortunately end up turning your entire filesystem into a steaming pile of
dingo kidneys because such-and-such will get trashed..."

And if you're bored, Elliot Organick's "The Multics System: An Examination of
its Structure" (ISBN 0-262-15012-3) has insights to be understood, 40 years
after it came out



pgp9hHGqgb02f.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Putting a thread to sleep using schedule() is foolproof?

2014-06-11 Thread Valdis . Kletnieks
On Wed, 11 Jun 2014 23:09:05 +0530, Joshi said:

> set_current_state (TASK_INTERRUPTIBLE);
> schedule ();
>
> Is this a sure-shot way of putting a thread to sleep, or are there
> conditions when this may not put the calling thread into sleep?

This will only succeed in guaranteeing the thread sleep if the thread has done
something *else* to render it not schedulable.  schedule() will
return right back to that thread if it's the highest-priority thing
that's runnable.

What problem are you trying to solve?  Usually, you do that sort of
schedule() when you're doing something that will take a relatively long
chunk of time, and want other things to have a *chance* of running.  But
usually, you're perfectly happy with continuing to run if nobody else
wants to run.

Why did you want a guaranteed sleep?  If it's because you've started an
I/O and you *know* it will be 125 milliseconds before you can make further
progress, there's mdelay() and similar APIs... and so on for other reasons
for wanting to sleep (for instance, blocking on a lock has an API, etc)


pgp2EP9tcNYQn.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Putting a thread to sleep using schedule() is foolproof?

2014-06-11 Thread Joshi
Yes, there are other ways, but I have a doubt on one of the basic method of
sleeping -

set_current_state (TASK_INTERRUPTIBLE);
schedule ();

Is this a sure-shot way of putting a thread to sleep, or are there
conditions when this may not put the calling thread into sleep?

Almost always I see that the thread goes to sleep, until explicitly woken
up by another thread. But, once it a blue moon, I find that thread executes
the above instructions and does not go to sleep!

-- 
Joshi
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Beginner guide

2014-06-11 Thread Saurabh Jain
http://wiki.osdev.org/Tutorials
http://kernelnewbies.org/

these links might help u .


On Wed, Jun 11, 2014 at 8:25 PM, Pranay Srivastava 
wrote:

>
> On Jun 11, 2014 7:19 PM, "Ben"  wrote:
> >
> > While on the subject of books, is Understanding the Linux Kernel - 3rd
> edition worth reading (it covers 2.6)?
>
> yes. if you've hardcopy then open the code and browse through it.
> otherwise use two monitors. :-p.
>
> switching back n forth through windows makes me loose concentration...
>
> without reading and understand the code along with the book wont be as
> helpful as it can be.
>
> >
> >
> > On 06/11/2014 02:28 AM, Prudhvee Narasimha Sadha wrote:
> >>
> >> Hi,
> >>   My name is Prudhvee and I'm purusing my undergraduate second
> year. I'm intrested in kernel development but I'm unable to understand how
> to get into it.
> >> Can you please help me to become a kernel developer.
> >>
> >>  I just want to know what I should learn and any suggested books to
> learn kernel programming.
> >>
> >>  Thank you,
> >>  Prudhvee.
> >>
> >>
> >> ___
> >> Kernelnewbies mailing list
> >> Kernelnewbies@kernelnewbies.org
> >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
> >
> >
> > ___
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 

*Saurabh Jain *

*B.Tech Student*

*Computer Science & Engineering *


*Malaviaya  National Institute of Technology , Jaipur*
*"*
*To the question of your life you are the answer, and to the problems of
your life you are the solution.” *
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Beginner guide

2014-06-11 Thread Pranay Srivastava
On Jun 11, 2014 7:19 PM, "Ben"  wrote:
>
> While on the subject of books, is Understanding the Linux Kernel - 3rd
edition worth reading (it covers 2.6)?

yes. if you've hardcopy then open the code and browse through it. otherwise
use two monitors. :-p.

switching back n forth through windows makes me loose concentration...

without reading and understand the code along with the book wont be as
helpful as it can be.

>
>
> On 06/11/2014 02:28 AM, Prudhvee Narasimha Sadha wrote:
>>
>> Hi,
>>   My name is Prudhvee and I'm purusing my undergraduate second year.
I'm intrested in kernel development but I'm unable to understand how to get
into it.
>> Can you please help me to become a kernel developer.
>>
>>  I just want to know what I should learn and any suggested books to
learn kernel programming.
>>
>>  Thank you,
>>  Prudhvee.
>>
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Beginner guide

2014-06-11 Thread Ben
While on the subject of books, is Understanding the Linux Kernel - 3rd
edition worth reading (it covers 2.6)?

On 06/11/2014 02:28 AM, Prudhvee Narasimha Sadha wrote:
> Hi,
>   My name is Prudhvee and I'm purusing my undergraduate second
> year. I'm intrested in kernel development but I'm unable to understand
> how to get into it.
> Can you please help me to become a kernel developer.
>
>  I just want to know what I should learn and any suggested books
> to learn kernel programming.
>  
>  Thank you,
>  Prudhvee.
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: non-static init in a basic kernel module

2014-06-11 Thread Greg KH
On Mon, Jun 09, 2014 at 12:28:13AM -0700, Warren Turkal wrote:
> Hey,
> 
> I was writing a basic hello world module. I am using Ubuntu, so I 
> installed linux-headers package that corresponded to my kernel. It's 
> strange because all of the examples that I saw (including from modules 
> in the kernel itself) show things like the following for the init function:
> 
> static int netcat_init(void)
> {
>  ...
>  return 0;
> }
> 
> module_init(netcat_init);
> 
> However, I was not able to get it to work with "static". My 
> hello_world_init function looks like the following:
> 
> int __init hello_world_init(void)
> {
>  ...
>  return 0;
> }
> 
> module_init(hello_world_init);
> 
> The command that is used to make the kernel module is the one suggested 
> in Documentation/kbuild/modules.txt. It looks like this:
> make -C /lib/modules/`uname -r`/build M=$PWD
> 
> Does anyone know why the "static" version would not work?

What exactly were the errors you got?

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Patch submission issue

2014-06-11 Thread Scott Lovenberg
On Tue, Jun 10, 2014 at 10:29 PM, Greg KH  wrote:
> On Wed, Jun 11, 2014 at 07:23:08AM +0530, Raghavendra wrote:
>> Hello,
>>
>> I am new to the kernel development community and I started off by fixing
>> small coding style errors in the drivers/staging directory. I've created
>> a patch for the same and sent it to the maintainer. The maintainer
>> replied to me something like this :
>>
>> "
>> Please don't do multiple things in the same patch, a single patch should
>> only do 1 thing.  So break this up into multiple patches.
>> "
>>
>> And my patch looks something like this :
>>
>>  From 7effd3d61c6ce08cd44df0a5ba3d1e9ac9ab5a98 Mon Sep 17 00:00:00 2001
>>
>> From: Raghavendra 
>>
>> Date: Tue, 10 Jun 2014 22:04:52 +0530
>>
>> Subject: [PATCH] Staging: rtl8192e: dot11d: Fixed coding style issues
>>
>> Replaced 'printk' with 'netdev_info' and 'netdev_err' wherever necessary.
>>
>> Also fixed the coding issue cooresponding to line gap after the declarations.
>
> You said "also", so that means you did 2 different things.  Split this
> up into two different patches, one doing the first thing, and the second
> the second thing.
>
> See the documentation for how to do multiple patches in an email series.

To follow up on what Greg KH said, once you learn the git-send-email
workflow, you'll love it.  That being said, I still do a dry run and
only send to myself first (I have a gmail filter for this that tags my
own stuff) for larger sets of patches.  Make everyone's life easier by
testing your workflow once or twice before sending multi-patch sets.
It's embarrassing to have to send a series of patches three times
because you set the incorrect flag or forgot to add a signed-off-by
when you git-format-patch (and then forget to add it when using
git-send-email).  Please learn from my mistakes, I know I haven't. :)

-Scott.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


non-static init in a basic kernel module

2014-06-11 Thread Warren Turkal
Hey,

I was writing a basic hello world module. I am using Ubuntu, so I 
installed linux-headers package that corresponded to my kernel. It's 
strange because all of the examples that I saw (including from modules 
in the kernel itself) show things like the following for the init function:

static int netcat_init(void)
{
 ...
 return 0;
}

module_init(netcat_init);

However, I was not able to get it to work with "static". My 
hello_world_init function looks like the following:

int __init hello_world_init(void)
{
 ...
 return 0;
}

module_init(hello_world_init);

The command that is used to make the kernel module is the one suggested 
in Documentation/kbuild/modules.txt. It looks like this:
make -C /lib/modules/`uname -r`/build M=$PWD

Does anyone know why the "static" version would not work?

Thanks,
wt

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Beginner guide

2014-06-11 Thread sanjeev sharma
Hello Prudhvee,

I would suggest first start with Kernel Basic and O.S Concept to understand
where Kernel really fits in O.;S and then gradually speed up to learn How
Kernel works by referring interesting books like Kernel Development by
Robert Love and also have source code handy to map the Kernel source code
with Book to understand the functionality.I Bet you that once you done
with  Kernel Development by Robert Love then you can start working in
community and then will let you know next step.

Regards
Sanjeev Sharma


On Wed, Jun 11, 2014 at 12:51 PM, Rohan Puri  wrote:

>
>
>
> On Wed, Jun 11, 2014 at 12:35 PM, Pranay Srivastava 
> wrote:
>
>> On Wed, Jun 11, 2014 at 11:58 AM, Prudhvee Narasimha Sadha
>>  wrote:
>> > Hi,
>> >   My name is Prudhvee and I'm purusing my undergraduate second
>> year. I'm
>> > intrested in kernel development but I'm unable to understand how to get
>> into
>> > it.
>> > Can you please help me to become a kernel developer.
>>
>> I would suggest get the foundations right first and let's hope you know
>> good C,
>> tricks are good to know but you should be able to understand code
>> written by others and be able to integrate the knowledge with what you
>> already know.
>>
>> Agree. Ways to do this : -
> 1. Read/write/understand K&R C language.
> 2. To understand code written by others you have to start doing that. (I
> mean practice it).
>
>
>> If you haven't used semaphores or mutexes in user space code then do
>> that first, understand why is the need. For example why you need to
>> have a sycall to get a semaphore
>> but when working with pthreads you probably don't need that.
>>
>> Understand compiler and make it your friend. Errors you get while
>> compiling, and things you can do for example why  ((struct
>> mystruct*)(0))->member fails when you run code but &(((struct
>> mystruct*)(0))->member) works.
>>
>>
>
>>
>> Basic idea is to get to understand how would you do it yourself, get
>> some ideas in your mind see if they should work or not. You may be
>> able to write code maybe without going through all that but in the
>> long run it would help.
>>
>> >
>> >  I just want to know what I should learn and any suggested books to
>> > learn kernel programming.
>> >
>>
>> Take an operating system course first. Get to know the basics then you
>> can try to understand kernel code. You can start with LDD, i think a
>> new version is available now, but take an OS course in parallel or
>> read yourself.
>>
> Agree. Ways to do this : -
> Get an OS course done, search for courses online, 2 of ones which I know
> are : -
> 1. http://www.cs.cmu.edu/~213/
> 2. CMUs OS course.
>
>>
>> >  Thank you,
>> >  Prudhvee.
>> >
>> > ___
>> > Kernelnewbies mailing list
>> > Kernelnewbies@kernelnewbies.org
>> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>> >
>>
>>
>>
>> --
>> ---P.K.S
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
> - Rohan
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: EudyptulaChallenge in github??

2014-06-11 Thread Laurent Navet
You can use Bitbucket which offers free private repositories,

have fun,

-- 
« On ne résout pas un problème avec les modes de pensée qui l’ont engendré. »
« You cannot solve current problems with current thinking. Current
problems are the result of current thinking »

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Beginner guide

2014-06-11 Thread Rohan Puri
On Wed, Jun 11, 2014 at 12:35 PM, Pranay Srivastava 
wrote:

> On Wed, Jun 11, 2014 at 11:58 AM, Prudhvee Narasimha Sadha
>  wrote:
> > Hi,
> >   My name is Prudhvee and I'm purusing my undergraduate second year.
> I'm
> > intrested in kernel development but I'm unable to understand how to get
> into
> > it.
> > Can you please help me to become a kernel developer.
>
> I would suggest get the foundations right first and let's hope you know
> good C,
> tricks are good to know but you should be able to understand code
> written by others and be able to integrate the knowledge with what you
> already know.
>
> Agree. Ways to do this : -
1. Read/write/understand K&R C language.
2. To understand code written by others you have to start doing that. (I
mean practice it).


> If you haven't used semaphores or mutexes in user space code then do
> that first, understand why is the need. For example why you need to
> have a sycall to get a semaphore
> but when working with pthreads you probably don't need that.
>
> Understand compiler and make it your friend. Errors you get while
> compiling, and things you can do for example why  ((struct
> mystruct*)(0))->member fails when you run code but &(((struct
> mystruct*)(0))->member) works.
>
>

>
> Basic idea is to get to understand how would you do it yourself, get
> some ideas in your mind see if they should work or not. You may be
> able to write code maybe without going through all that but in the
> long run it would help.
>
> >
> >  I just want to know what I should learn and any suggested books to
> > learn kernel programming.
> >
>
> Take an operating system course first. Get to know the basics then you
> can try to understand kernel code. You can start with LDD, i think a
> new version is available now, but take an OS course in parallel or
> read yourself.
>
Agree. Ways to do this : -
Get an OS course done, search for courses online, 2 of ones which I know
are : -
1. http://www.cs.cmu.edu/~213/
2. CMUs OS course.

>
> >  Thank you,
> >  Prudhvee.
> >
> > ___
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
>
>
> --
> ---P.K.S
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

- Rohan
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Beginner guide

2014-06-11 Thread Pranay Srivastava
On Wed, Jun 11, 2014 at 11:58 AM, Prudhvee Narasimha Sadha
 wrote:
> Hi,
>   My name is Prudhvee and I'm purusing my undergraduate second year. I'm
> intrested in kernel development but I'm unable to understand how to get into
> it.
> Can you please help me to become a kernel developer.

I would suggest get the foundations right first and let's hope you know good C,
tricks are good to know but you should be able to understand code
written by others and be able to integrate the knowledge with what you
already know.

If you haven't used semaphores or mutexes in user space code then do
that first, understand why is the need. For example why you need to
have a sycall to get a semaphore
but when working with pthreads you probably don't need that.

Understand compiler and make it your friend. Errors you get while
compiling, and things you can do for example why  ((struct
mystruct*)(0))->member fails when you run code but &(((struct
mystruct*)(0))->member) works.


Basic idea is to get to understand how would you do it yourself, get
some ideas in your mind see if they should work or not. You may be
able to write code maybe without going through all that but in the
long run it would help.

>
>  I just want to know what I should learn and any suggested books to
> learn kernel programming.
>

Take an operating system course first. Get to know the basics then you
can try to understand kernel code. You can start with LDD, i think a
new version is available now, but take an OS course in parallel or
read yourself.

>  Thank you,
>  Prudhvee.
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
---P.K.S

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies