how to determine whether the source code is same between two kernels

Valdis Kl=?utf-8?Q?=c4=93?=tnieks valdis.kletnieks at vt.edu
Fri May 10 23:58:49 EDT 2019


On Fri, 10 May 2019 22:11:31 -0400, Aruna Hewapathirane said:

> > Suppose I have two kernels, one is A.B.C build by people Tom. And
> > the other is A.B.C build by Jerry. The source code have been deleted

> Run diff vmlinuz-Tom vmlinuz-Jerry and see if they differ. Then just  to

Don't even bother.  If Tom and Jerry both did builds, the binaries *will* differ, because...

% dmesg | grep 'Linux vers'
[    0.000000] Linux version 5.1.0-rc5-next-20190416-dirty (source at turing-police) (gcc version 9.0.1 20190328 (Red Hat 9.0.1-0.12) (GCC)) #664 SMP PREEMPT Wed Apr 17 12:31:51 EDT 2019

There's a datestamp, a build number, and a compiler version in there.

Also, since vmlinuz is a binary file, /bin/cmp is a better choice than diff.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20190510/171f4b53/attachment.sig>


More information about the Kernelnewbies mailing list