From time to time there is situation when you need to use kernel sent to you by vendor which you support (or use device which they made). The problem is that often all you can get is one big tarball with “our current code” which means Linux upstream + extra patch(es). How to get something usable from it?
First step is checking version of vendor kernel (if unknown). If you are lucky then main
Makefile contain informations such as “2.6.19-rc3” which is a sign what to get as clean base.
Then clean sources — simple
make mrproper will remove all results of compilation so
diff will have less work to do.
Third phase is taking first diff:
diff -Naurpw linux-original/ linux-vendor/ >vendor.diff
Result will be probably very big but often can be made slower by looking inside of it. Check for backup files, extra log files etc crap — here I usually use Midnight Commander due to it’s “patchfs” which allow to go inside of patch and work on “per-file” changes.
Next step can contain searching for popular kernel patchsets which can be in vendor kernel. This is hardest part as there are many of them and often only parts of them are applied.
Same rules apply to other code from vendors — toolchains, libraries and other forks.