public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Comparing linux kernel trees.
@ 2013-01-20 11:20 James Courtier-Dutton
  2013-01-20 13:27 ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: James Courtier-Dutton @ 2013-01-20 11:20 UTC (permalink / raw)
  To: LKML Mailing List

Hi,

I have been given a linux kernel sources tar file.
It contains a modified version of the linux kernel.
It is just source files, without any "git" history.
What I would like to do is compare this with the mainline linux kernel
git tree, and find the tag from the kernel git tree that this source
code is most similar to.
E.g. Finding the source code is really kernel 3.2.1 with some minor changes.
My plan at the moment is just to automate a checkout of every git tag,
then run diff -ur on it, and then choose the smallest diff file
output.
But, has anyone got a better method?

Kind Regards

James

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

* Re: Comparing linux kernel trees.
  2013-01-20 11:20 Comparing linux kernel trees James Courtier-Dutton
@ 2013-01-20 13:27 ` Clemens Ladisch
  2013-01-20 16:06   ` James Courtier-Dutton
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2013-01-20 13:27 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: LKML Mailing List

James Courtier-Dutton wrote:
> I have been given a linux kernel sources tar file.
> It contains a modified version of the linux kernel.
> It is just source files, without any "git" history.
> What I would like to do is compare this with the mainline linux kernel
> git tree, and find the tag from the kernel git tree that this source
> code is most similar to.

The kernel *knows* which version it is.

> My plan at the moment is just to automate a checkout of every git tag,
> then run diff -ur on it, and then choose the smallest diff file
> output.
> But, has anyone got a better method?

head -5 Makefile


Regards,
Clemens

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

* Re: Comparing linux kernel trees.
  2013-01-20 13:27 ` Clemens Ladisch
@ 2013-01-20 16:06   ` James Courtier-Dutton
  0 siblings, 0 replies; 3+ messages in thread
From: James Courtier-Dutton @ 2013-01-20 16:06 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: LKML Mailing List

On 20 January 2013 13:27, Clemens Ladisch <clemens@ladisch.de> wrote:
> James Courtier-Dutton wrote:
>> I have been given a linux kernel sources tar file.
>> It contains a modified version of the linux kernel.
>> It is just source files, without any "git" history.
>> What I would like to do is compare this with the mainline linux kernel
>> git tree, and find the tag from the kernel git tree that this source
>> code is most similar to.
>
> The kernel *knows* which version it is.
>
>> My plan at the moment is just to automate a checkout of every git tag,
>> then run diff -ur on it, and then choose the smallest diff files
>> output.n
>> But, has anyone got a better method?
>
> head -5 Makefile
>
I forgot to mention that in this particular situation, use of the
Makefile does not help.
The linux tree is a tar file to tar over the top of an existing
mainline tree. e.g. Kernel 3.2
It includes the following directories:
drivers
firmware
include
sound

I was wanting to somehow take the include directory, and find out
which kernel version best matches the include in the tar file.
The do the same for the other directories.
I guess I am looking for a sort of git bisect, but instead of finding
a bug, finding a version that best matches some source files.

In the mean time, I have done the diff -ur method on various tags, and
found that kernel 3.2.5 is the best match.
I now have a much smaller patch file, that I can start to get working
with the latest git tree.

Kind Regards

James

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

end of thread, other threads:[~2013-01-20 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-20 11:20 Comparing linux kernel trees James Courtier-Dutton
2013-01-20 13:27 ` Clemens Ladisch
2013-01-20 16:06   ` James Courtier-Dutton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox