kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Need help: Generating patch using git
@ 2012-01-30 17:21 amit mehta
  2012-01-30 17:27 ` Subramaniam Appadodharana
  2012-01-30 17:32 ` Srivatsa Bhat
  0 siblings, 2 replies; 13+ messages in thread
From: amit mehta @ 2012-01-30 17:21 UTC (permalink / raw)
  To: kernelnewbies

Hi,

kernel janitors group seem like a good place to start learning linux kernel and
after reading some of the information available on kernel newbies website, i
tried to generate a dummy patch and need your help for moving in correct
direction of learning and contributing to linux kernel. So these are
the steps that i've followed to generate this dummy patch.

1: Download the latest linux kernel sources using git
# mkdir linux-next
# cd linux-next
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
linux-2.6

2: Do some modifications.
# pwd
/root/linux-next/linux-2.6

# git diff
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 6e412a6..9858701 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -441,7 +441,7 @@ static int __init ic_defaults(void)
                                &ic_myaddr);
                        return -1;
                }
-               printk("IP-Config: Guessing netmask %pI4\n", &ic_netmask);
+               printk(KERN_INFO "IP-Config: Guessing netmask %pI4\n",
&ic_netmask);
        }

        return 0;

3: Generate a patch
# pwd
/root/linux-next/linux-2.6
# mkdir ../patches
# git diff >../patches/ipconfigPatch.txt

4: Test your patch
4a: Clear the local changes from the tree
# git checkout -f

4b: Apply the patch
# git apply ../patches/ipconfigPatch.txt


The above step(4b) did not returned any git error so it seems to me that the
steps to generate this patch was correct.

5: Check your mailer
5a: I just copied the contents of ../patches/ipconfigPatch.txt and pasted in
the compose area and sent that mail to myself. After receiving this mail i
copied and pasted the mail contents in a file under
/root/linux-next/patches/dummyPatch.txt and tried to apply this patch
using git but it gave me an error as below:
# git apply ../patches/dummy.txt
fatal: corrupt patch at line 11

Hence it seems i'm missing something here. Please note that this is just for my
understanding purpose of generating and submitting patches.

-Amit

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-01-30 17:21 Need help: Generating patch using git amit mehta
@ 2012-01-30 17:27 ` Subramaniam Appadodharana
  2012-01-30 17:32 ` Srivatsa Bhat
  1 sibling, 0 replies; 13+ messages in thread
From: Subramaniam Appadodharana @ 2012-01-30 17:27 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Jan 30, 2012 at 11:21 AM, amit mehta <gmate.amit@gmail.com> wrote:
>
> Hi,
>
> kernel janitors group seem like a good place to start learning linux kernel and
> after reading some of the information available on kernel newbies website, i
> tried to generate a dummy patch and need your help for moving in correct
> direction of learning and contributing to linux kernel. So these are
> the steps that i've followed to generate this dummy patch.
>
> 1: Download the latest linux kernel sources using git
> # mkdir linux-next
> # cd linux-next
> # git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> linux-2.6
>
> 2: Do some modifications.
> # pwd
> /root/linux-next/linux-2.6
>
> # git diff
> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
> index 6e412a6..9858701 100644
> --- a/net/ipv4/ipconfig.c
> +++ b/net/ipv4/ipconfig.c
> @@ -441,7 +441,7 @@ static int __init ic_defaults(void)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?&ic_myaddr);
> ? ? ? ? ? ? ? ? ? ? ? ?return -1;
> ? ? ? ? ? ? ? ?}
> - ? ? ? ? ? ? ? printk("IP-Config: Guessing netmask %pI4\n", &ic_netmask);
> + ? ? ? ? ? ? ? printk(KERN_INFO "IP-Config: Guessing netmask %pI4\n",
> &ic_netmask);
> ? ? ? ?}
>
> ? ? ? ?return 0;
>
> 3: Generate a patch
You can do :
3a.
git add <file1> <file2> <file3>

3b.
git commit
This will give you an editor to enter the patch info and Signed-off-by:
Save and exit will create the patch and apply it on your branch.

> # pwd
> /root/linux-next/linux-2.6
> # mkdir ../patches
> # git diff >../patches/ipconfigPatch.txt

git format-patch -1
Will give you the patch as 0001-<desc>.patch

Hope this helps.
>
> 4: Test your patch
> 4a: Clear the local changes from the tree
> # git checkout -f
>
> 4b: Apply the patch
> # git apply ../patches/ipconfigPatch.txt
>
>
> The above step(4b) did not returned any git error so it seems to me that the
> steps to generate this patch was correct.
>
> 5: Check your mailer
> 5a: I just copied the contents of ../patches/ipconfigPatch.txt and pasted in
> the compose area and sent that mail to myself. After receiving this mail i
> copied and pasted the mail contents in a file under
> /root/linux-next/patches/dummyPatch.txt and tried to apply this patch
> using git but it gave me an error as below:
> # git apply ../patches/dummy.txt
> fatal: corrupt patch at line 11
>
> Hence it seems i'm missing something here. Please note that this is just for my
> understanding purpose of generating and submitting patches.
>
> -Amit
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-01-30 17:21 Need help: Generating patch using git amit mehta
  2012-01-30 17:27 ` Subramaniam Appadodharana
@ 2012-01-30 17:32 ` Srivatsa Bhat
  2012-01-30 18:33   ` amit mehta
  1 sibling, 1 reply; 13+ messages in thread
From: Srivatsa Bhat @ 2012-01-30 17:32 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Jan 30, 2012 at 10:51 PM, amit mehta <gmate.amit@gmail.com> wrote:

> Hi,
>
> kernel janitors group seem like a good place to start learning linux
> kernel and
> after reading some of the information available on kernel newbies website,
> i
> tried to generate a dummy patch and need your help for moving in correct
> direction of learning and contributing to linux kernel. So these are
> the steps that i've followed to generate this dummy patch.
>
> 1: Download the latest linux kernel sources using git
> # mkdir linux-next
> # cd linux-next
> # git clone git://
> git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> linux-2.6
>
> 2: Do some modifications.
> # pwd
> /root/linux-next/linux-2.6
>
> # git diff
> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
> index 6e412a6..9858701 100644
> --- a/net/ipv4/ipconfig.c
> +++ b/net/ipv4/ipconfig.c
> @@ -441,7 +441,7 @@ static int __init ic_defaults(void)
>                                &ic_myaddr);
>                        return -1;
>                }
> -               printk("IP-Config: Guessing netmask %pI4\n", &ic_netmask);
> +               printk(KERN_INFO "IP-Config: Guessing netmask %pI4\n",
> &ic_netmask);
>        }
>
>        return 0;
>
> 3: Generate a patch
> # pwd
> /root/linux-next/linux-2.6
> # mkdir ../patches
> # git diff >../patches/ipconfigPatch.txt
>
>
Strictly speaking,  a complete patch has many more things, like
a commit message, Signed-off-by line etc. Of course, if you are just
playing around with patches just for fun, you need not worry about this.
But if you want to contribute to the linux kernel, you would need to take
care of all that.

So, for that, instead of git diff, use:

# git commit -a
Type an appropriate commit message and add your Signed-off-by.
(Your git configurations can help you automate stuff like Signed-off-by).

# git format-patch -1 HEAD
This will generate the patch for you. You can mail this using git send-email
or by copy pasting it in your email client.

You can refer to the video by Greg about submitting patches.
http://www.youtube.com/watch?v=LLBrBBImJt4

4: Test your patch
> 4a: Clear the local changes from the tree
> # git checkout -f
>
> 4b: Apply the patch
> # git apply ../patches/ipconfigPatch.txt
>
>
> The above step(4b) did not returned any git error so it seems to me that
> the
> steps to generate this patch was correct.
>
> 5: Check your mailer
> 5a: I just copied the contents of ../patches/ipconfigPatch.txt and pasted
> in
> the compose area and sent that mail to myself. After receiving this mail i
> copied and pasted the mail contents in a file under
> /root/linux-next/patches/dummyPatch.txt and tried to apply this patch
> using git but it gave me an error as below:
> # git apply ../patches/dummy.txt
> fatal: corrupt patch at line 11
>
>
Ah, I think your email client corrupted it! (white-space damage perhaps)
Check out Documentation/email-clients.txt for more info on how to make your
email clients behave :-)

Regards,
Srivatsa S. Bhat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120130/286f3b59/attachment.html 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-01-30 17:32 ` Srivatsa Bhat
@ 2012-01-30 18:33   ` amit mehta
  2012-01-31 21:39     ` Julie Sullivan
  0 siblings, 1 reply; 13+ messages in thread
From: amit mehta @ 2012-01-30 18:33 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Jan 30, 2012 at 11:02 PM, Srivatsa Bhat <bhat.srivatsa@gmail.com> wrote:
>
>
> On Mon, Jan 30, 2012 at 10:51 PM, amit mehta <gmate.amit@gmail.com> wrote:
>>
>> Hi,
>>
>> kernel janitors group seem like a good place to start learning linux
>> kernel and
>> after reading some of the information available on kernel newbies website,
>> i
>> tried to generate a dummy patch and need your help for moving in correct
>> direction of learning and contributing to linux kernel. So these are
>> the steps that i've followed to generate this dummy patch.
>>
>> 1: Download the latest linux kernel sources using git
>> # mkdir linux-next
>> # cd linux-next
>> # git clone
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>> linux-2.6
>>
>> 2: Do some modifications.
>> # pwd
>> /root/linux-next/linux-2.6
>>
>> # git diff
>> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
>> index 6e412a6..9858701 100644
>> --- a/net/ipv4/ipconfig.c
>> +++ b/net/ipv4/ipconfig.c
>> @@ -441,7 +441,7 @@ static int __init ic_defaults(void)
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?&ic_myaddr);
>> ? ? ? ? ? ? ? ? ? ? ? ?return -1;
>> ? ? ? ? ? ? ? ?}
>> - ? ? ? ? ? ? ? printk("IP-Config: Guessing netmask %pI4\n", &ic_netmask);
>> + ? ? ? ? ? ? ? printk(KERN_INFO "IP-Config: Guessing netmask %pI4\n",
>> &ic_netmask);
>> ? ? ? ?}
>>
>> ? ? ? ?return 0;
>>
>> 3: Generate a patch
>> # pwd
>> /root/linux-next/linux-2.6
>> # mkdir ../patches
>> # git diff >../patches/ipconfigPatch.txt
>>
>
> Strictly speaking, ?a complete patch has many more things, like
> a commit message, Signed-off-by line etc. Of course, if you are just
> playing around with patches just for fun, you need not worry about this.
> But if you want to contribute to the linux kernel, you would need to take
> care of all that.
>
> So, for that, instead of git diff, use:
>
> # git commit -a
> Type an appropriate commit message and add your Signed-off-by.
> (Your git configurations can help you automate stuff like Signed-off-by).
>
> # git format-patch -1 HEAD
> This will generate the patch for you. You can mail this using git send-email
> or by copy pasting it in your email client.
>
> You can refer to the video by Greg about submitting patches.
> http://www.youtube.com/watch?v=LLBrBBImJt4
>
>> 4: Test your patch
>> 4a: Clear the local changes from the tree
>> # git checkout -f
>>
>> 4b: Apply the patch
>> # git apply ../patches/ipconfigPatch.txt
>>
>>
>> The above step(4b) did not returned any git error so it seems to me that
>> the
>> steps to generate this patch was correct.
>>
>> 5: Check your mailer
>> 5a: I just copied the contents of ../patches/ipconfigPatch.txt and pasted
>> in
>> the compose area and sent that mail to myself. After receiving this mail i
>> copied and pasted the mail contents in a file under
>> /root/linux-next/patches/dummyPatch.txt and tried to apply this patch
>> using git but it gave me an error as below:
>> # git apply ../patches/dummy.txt
>> fatal: corrupt patch at line 11
>>
>
> Ah, I think your email client corrupted it! (white-space damage perhaps)
> Check out Documentation/email-clients.txt for more info on how to make your
> email clients behave :-)
>

Thank you so much. I'll check the links that you've suggested.

-Amit

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-01-30 18:33   ` amit mehta
@ 2012-01-31 21:39     ` Julie Sullivan
  2012-02-01  5:21       ` amit mehta
  0 siblings, 1 reply; 13+ messages in thread
From: Julie Sullivan @ 2012-01-31 21:39 UTC (permalink / raw)
  To: kernelnewbies

> 1: Download the latest linux kernel sources using git
> # mkdir linux-next
> # cd linux-next
> # git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> linux-2.6
>
> 2: Do some modifications.
> # pwd
> /root/linux-next/linux-2.6


Just a couple of thoughts, Amit - you seem to have your kernel tree in
/root and be doing everything as root, are you sure you want to do it
this way rather than in $HOME as your normal user account?
Also the kernel tree you are using seems to be Linus's mainline, is
that what you wanted or did you want to be making the patch against a
linux-next kernel?

Cheers,
Julie

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-01-31 21:39     ` Julie Sullivan
@ 2012-02-01  5:21       ` amit mehta
  2012-02-01 21:01         ` Julie Sullivan
  2012-02-01 21:17         ` Srivatsa Bhat
  0 siblings, 2 replies; 13+ messages in thread
From: amit mehta @ 2012-02-01  5:21 UTC (permalink / raw)
  To: kernelnewbies

> Just a couple of thoughts, Amit - you seem to have your kernel tree in
> /root and be doing everything as root, are you sure you want to do it
> this way rather than in $HOME as your normal user account?

I've access to this machine as root also but as you've suggested I can use my
user login account as well.

> Also the kernel tree you are using seems to be Linus's mainline, is
> that what you wanted or did you want to be making the patch against a
> linux-next kernel?

My current goal is to send some patches to kernel janitor group though I'm not
sure if this group is still active or not.
you mean to say that this is not the tree which i should be synced to? If not
then can you please send me the link to the relevant git repository ?

-Amit

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-02-01  5:21       ` amit mehta
@ 2012-02-01 21:01         ` Julie Sullivan
  2012-03-05 20:48           ` Amit Mehta
  2012-02-01 21:17         ` Srivatsa Bhat
  1 sibling, 1 reply; 13+ messages in thread
From: Julie Sullivan @ 2012-02-01 21:01 UTC (permalink / raw)
  To: kernelnewbies

Hi Amit,

> I've access to this machine as root also but as you've suggested I can use my
> user login account as well.

Well, it's up to you...it's just that being root all the time makes me
nervous :-)

> My current goal is to send some patches to kernel janitor group though I'm not
> sure if this group is still active or not.
> you mean to say that this is not the tree which i should be synced to? If not
> then can you please send me the link to the relevant git repository ?
>
> -Amit

Kernel-janitors is still very much active, it's a good list to follow
as it is quite low volume (typically between maybe 5 - 10 emails a
day? although it varies) and it's a great way of getting a feel for
how things are done and getting ideas for patches.

What tree you want to be testing against I think really depends on the
patch you are doing, linux-next is supposed to be the official 'tree'
but I think some maintainers have their own they sometimes prefer
developers to use. It's trivial with git to follow these if you need
to though.

I'd recommend following (and looking into doing) some work on drivers
in staging too, if you are trying to find a starting point (the
mailing list for this is devel.linuxdriverproject.org). I _think_ Greg
KH asks people to use linux-next (although staging has its own tree,
to be sure, email before sending the patches).

You can remote track linux-next from your existing repo. (this is how
I do it.) cd into your linux-2.6/ and do this;

$ git remote add linux-next
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
$ git fetch linux-next
$ git fetch --tags linux-next

You will then be all set up to track linux-next.

Then, in the future, do 'git remote update' to update the linux-next
branch so you get all the latest tags each time (this will also update
any other remote branches you have set up to track).

Note that as I understand it linux-next isn't an 'evolving' tree like
mainline, it's best to see it as being a list of individual kernels
released as tags, i.e. you shouldn't be merging one into another.

Stephen Rothwell's notification on the linux-kernel mailing list about
the latest release explains this and is probably worth a read:
https://lkml.org/lkml/2012/2/1/20


To list the tags, do:

$ git tag -l next-*

and the bottom one will be the latest linux-next version.

So in my repo, having just done a remote update, the last few tags
look like this:

$ git tag -l next-*

<...>

next-20111215
next-20111216
next-20111221
next-20111228
next-20120113
next-20120118
next-20120201

The bottom one is the latest release so I can check out this tag, like
so, (with accompanying message below:)



$ git checkout next-20120201
Checking out files: 100% (2741/2741), done.
Note: checking out 'next-20120201'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

?git checkout -b new_branch_name

HEAD is now at bc7f599... Add linux-next specific files for 20120201



Then I can create a new branch from here, e.g.

$ git checkout -b 1st-feb-2012-next

Now I have my own branch to build a linux-next kernel, or work on, etc.



HTH.
Cheers
Julie

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-02-01  5:21       ` amit mehta
  2012-02-01 21:01         ` Julie Sullivan
@ 2012-02-01 21:17         ` Srivatsa Bhat
  2012-02-01 22:05           ` Greg KH
  1 sibling, 1 reply; 13+ messages in thread
From: Srivatsa Bhat @ 2012-02-01 21:17 UTC (permalink / raw)
  To: kernelnewbies

Hi,

On Wed, Feb 1, 2012 at 10:51 AM, amit mehta <gmate.amit@gmail.com> wrote:

>
> > Also the kernel tree you are using seems to be Linus's mainline, is
> > that what you wanted or did you want to be making the patch against a
> > linux-next kernel?
>
> My current goal is to send some patches to kernel janitor group though I'm
> not
> sure if this group is still active or not.
> you mean to say that this is not the tree which i should be synced to? If
> not
> then can you please send me the link to the relevant git repository ?
>
>
Please note that linux-next is just a tree used for integration-testing. I
strongly suggest
that you don't base your patches on linux-next. Basing it on current
mainline
is generally a good idea. But if you are doing some significant development,
you should target the individual trees that the subsystem maintainers
maintain.

To put it in simple terms, base your patch on current mainline and send it
to
the appropriate people (use get_maintainer.pl in the scripts directory to
find
whom to send it to). Then if the maintainer specifically asks you to rebase
your
patch on some particular tree that he maintains, then do it. Then you know
what
to do with patches related to that subsystem from next time onwards :-)

Some background about linux-next: It is a tree used for integration testing.
In other words, development trees maintained for different subsystems by the
respective maintainers will be pulled into the linux-next tree
automatically from
time to time. Then the resulting merging of code from different trees are
tested
mainly for build failures (caused due to conflicts etc.). Also, another
important
test carried out is testing the code with various configs, to ensure that
it builds
and boots on all relevant config combinations.

So, to summarize, linux-next is not a development tree. It is only an
integration
testing tree which is used to ensure that during a merge window, when Linus
pulls from different maintainers, the code doesn't end up in conflicts and
that
it builds and boots fine in many different configs.

Development trees are separate (if any) for different subsystems and that is
usually the best target for heavy code changes. Otherwise, mainline is your
best bet.

Hope this helps!

Regards,
Srivatsa S. Bhat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120202/e4ebda2d/attachment.html 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-02-01 21:17         ` Srivatsa Bhat
@ 2012-02-01 22:05           ` Greg KH
  2012-02-01 22:12             ` Srivatsa Bhat
  0 siblings, 1 reply; 13+ messages in thread
From: Greg KH @ 2012-02-01 22:05 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Feb 02, 2012 at 02:47:49AM +0530, Srivatsa Bhat wrote:
> Hi,
> 
> On Wed, Feb 1, 2012 at 10:51 AM, amit mehta <gmate.amit@gmail.com> wrote:
> 
> 
>     > Also the kernel tree you are using seems to be Linus's mainline, is
>     > that what you wanted or did you want to be making the patch against a
>     > linux-next kernel?
> 
>     My current goal is to send some patches to kernel janitor group though I'm
>     not
>     sure if this group is still active or not.
>     you mean to say that this is not the tree which i should be synced to? If
>     not
>     then can you please send me the link to the relevant git repository ?
> 
> 
> 
> Please note that linux-next is just a tree used for integration-testing. I
> strongly suggest
> that you don't base your patches on linux-next. Basing it on current mainline
> is generally a good idea. But if you are doing some significant development,
> you should target the individual trees that the subsystem maintainers maintain.
> 
> To put it in simple terms, base your patch on current mainline and send it to
> the appropriate people (use get_maintainer.pl in the scripts directory to find
> whom to send it to). Then if the maintainer specifically asks you to rebase
> your
> patch on some particular tree that he maintains, then do it. Then you know what
> to do with patches related to that subsystem from next time onwards :-)

As a subsystem maintainer, I strongly disagree with this.

Do your work against linux-next, as that contains the different
subsystems already.  You don't want to do something only to find out you
need to totally redo it, or just throw it away as someone else has
already done it (which is quite common for janitorial and other "simple"
tasks).

So please, either work against linux-next, or the subsystem-specific
tree, linux-next is usually easier, the odds of cross-subsystem merges
causing problems with your change, for the subsystem maintainer, are
very low, much lower than the fact that major changes might have already
happened.

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-02-01 22:05           ` Greg KH
@ 2012-02-01 22:12             ` Srivatsa Bhat
  0 siblings, 0 replies; 13+ messages in thread
From: Srivatsa Bhat @ 2012-02-01 22:12 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Feb 2, 2012 at 3:35 AM, Greg KH <greg@kroah.com> wrote:

> On Thu, Feb 02, 2012 at 02:47:49AM +0530, Srivatsa Bhat wrote:
> > Hi,
> >
> > On Wed, Feb 1, 2012 at 10:51 AM, amit mehta <gmate.amit@gmail.com>
> wrote:
> >
> >
> >     > Also the kernel tree you are using seems to be Linus's mainline, is
> >     > that what you wanted or did you want to be making the patch
> against a
> >     > linux-next kernel?
> >
> >     My current goal is to send some patches to kernel janitor group
> though I'm
> >     not
> >     sure if this group is still active or not.
> >     you mean to say that this is not the tree which i should be synced
> to? If
> >     not
> >     then can you please send me the link to the relevant git repository ?
> >
> >
> >
> > Please note that linux-next is just a tree used for integration-testing.
> I
> > strongly suggest
> > that you don't base your patches on linux-next. Basing it on current
> mainline
> > is generally a good idea. But if you are doing some significant
> development,
> > you should target the individual trees that the subsystem maintainers
> maintain.
> >
> > To put it in simple terms, base your patch on current mainline and send
> it to
> > the appropriate people (use get_maintainer.pl in the scripts directory
> to find
> > whom to send it to). Then if the maintainer specifically asks you to
> rebase
> > your
> > patch on some particular tree that he maintains, then do it. Then you
> know what
> > to do with patches related to that subsystem from next time onwards :-)
>
> As a subsystem maintainer, I strongly disagree with this.
>
> Do your work against linux-next, as that contains the different
> subsystems already.  You don't want to do something only to find out you
> need to totally redo it, or just throw it away as someone else has
> already done it (which is quite common for janitorial and other "simple"
> tasks).
>
>
Ok, that makes sense.


> So please, either work against linux-next, or the subsystem-specific
> tree, linux-next is usually easier, the odds of cross-subsystem merges
> causing problems with your change, for the subsystem maintainer, are
> very low, much lower than the fact that major changes might have already
> happened.
>

I see your point, and I agree with you now.
Thanks a lot Greg, for showing the right path!

Regards,
Srivatsa S. Bhat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120202/8b986e61/attachment.html 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-02-01 21:01         ` Julie Sullivan
@ 2012-03-05 20:48           ` Amit Mehta
  2012-03-07 21:58             ` Julie Sullivan
  0 siblings, 1 reply; 13+ messages in thread
From: Amit Mehta @ 2012-03-05 20:48 UTC (permalink / raw)
  To: kernelnewbies


> 
> You can remote track linux-next from your existing repo. (this is how
> I do it.) cd into your linux-2.6/ and do this;
> 
> $ git remote add linux-next
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> $ git fetch linux-next
> $ git fetch --tags linux-next
> 
> You will then be all set up to track linux-next.
> 
> Then, in the future, do 'git remote update' to update the linux-next
> branch so you get all the latest tags each time (this will also update
> any other remote branches you have set up to track).
> 
> Note that as I understand it linux-next isn't an 'evolving' tree like
> mainline, it's best to see it as being a list of individual kernels
> released as tags, i.e. you shouldn't be merging one into another.
> 
> Stephen Rothwell's notification on the linux-kernel mailing list about
> the latest release explains this and is probably worth a read:
> https://lkml.org/lkml/2012/2/1/20
> 
> 
> To list the tags, do:
> 
> $ git tag -l next-*
> 
> and the bottom one will be the latest linux-next version.
> 
> So in my repo, having just done a remote update, the last few tags
> look like this:
> 
> $ git tag -l next-*
> 
> <...>
> 
> next-20111215
> next-20111216
> next-20111221
> next-20111228
> next-20120113
> next-20120118
> next-20120201
> 
> The bottom one is the latest release so I can check out this tag, like
> so, (with accompanying message below:)
> 
> 
> 
> $ git checkout next-20120201
> Checking out files: 100% (2741/2741), done.
> Note: checking out 'next-20120201'.
> 
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
> 
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
> 
>  git checkout -b new_branch_name
> 
> HEAD is now at bc7f599... Add linux-next specific files for 20120201
> 
> 
> 
> Then I can create a new branch from here, e.g.
> 
> $ git checkout -b 1st-feb-2012-next
> 
> Now I have my own branch to build a linux-next kernel, or work on, etc.
> 

I have followed the steps as mentioned above and I have created a new branch
which has some trivial changes. After this I ran "checkpatch.pl" script against
my patch, which reported no warning or error messages. I sent this patch to
myself and was able to apply this patch successfully(In past It didn't worked as
I was using gmail GUI client which does not work for sending patches, refer
Documentation/email-clients.txt). As this patch does nothing more than just
adding some missing loglevels for printks', hence I was wondering if I need to
go through the entire kernel build process and boot from the modified kernel and
do some tests before sending this patch to kernel-janitor mailing list and the
relevant maintainers. To be specific, my changes are under linux-next/net/ipv4
I've read SubmittingPatches but still I wish to know the general steps that one
should follow for "janitorial" related changes.

-Amit

P.S.
What i think is trivial can very much be substantial as well as I may not
perceive the effects as of now.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-03-05 20:48           ` Amit Mehta
@ 2012-03-07 21:58             ` Julie Sullivan
  2012-03-08  7:46               ` amit mehta
  0 siblings, 1 reply; 13+ messages in thread
From: Julie Sullivan @ 2012-03-07 21:58 UTC (permalink / raw)
  To: kernelnewbies

>
> I was wondering if I need to
> go through the entire kernel build process and boot from the modified kernel and
> do some tests before sending this patch to kernel-janitor mailing list and the
> relevant maintainers.

Hi Amit
If it were me I would compile and boot test this anyway (especially if
it's your first patch). But then I am a bit paranoid and
ultra-cautious ;-)

If you haven't done a make distclean or the like (ie all your files
and .config are still there from your last kernel build) it shouldn't
take as long, because you won't need to build the _whole_ kernel from
scratch, from a clean tree.

Cheers
Julie

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Need help: Generating patch using git
  2012-03-07 21:58             ` Julie Sullivan
@ 2012-03-08  7:46               ` amit mehta
  0 siblings, 0 replies; 13+ messages in thread
From: amit mehta @ 2012-03-08  7:46 UTC (permalink / raw)
  To: kernelnewbies

>> I was wondering if I need to
>> go through the entire kernel build process and boot from the modified kernel and
>> do some tests before sending this patch to kernel-janitor mailing list and the
>> relevant maintainers.
>
> Hi Amit
> If it were me I would compile and boot test this anyway (especially if
> it's your first patch). But then I am a bit paranoid and
> ultra-cautious ;-)
>
> If you haven't done a make distclean or the like (ie all your files
> and .config are still there from your last kernel build) it shouldn't
> take as long, because you won't need to build the _whole_ kernel from
> scratch, from a clean tree.
>
> Cheers
> Julie

Yeah, you are right. As this was my first clone of linux-next, hence I've to
spend sometime in configuration and then the whole kernel compilation. But later
I'd like to be able to just build that particular subsystem or the module.
Looking at the top level Makefile, it seems that I should be able to do so.

# cd linux-next
# make mm < --- should work, right ?

-Amit

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-03-08  7:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 17:21 Need help: Generating patch using git amit mehta
2012-01-30 17:27 ` Subramaniam Appadodharana
2012-01-30 17:32 ` Srivatsa Bhat
2012-01-30 18:33   ` amit mehta
2012-01-31 21:39     ` Julie Sullivan
2012-02-01  5:21       ` amit mehta
2012-02-01 21:01         ` Julie Sullivan
2012-03-05 20:48           ` Amit Mehta
2012-03-07 21:58             ` Julie Sullivan
2012-03-08  7:46               ` amit mehta
2012-02-01 21:17         ` Srivatsa Bhat
2012-02-01 22:05           ` Greg KH
2012-02-01 22:12             ` Srivatsa Bhat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).