Hello.

I just created 'kpatch.sh'.
This bash shell apply automatically multiple kernel patches.

script/patch-kernel already exists in current kernels,
but it has some limit, which I would eliminate.

WARNING: It is in early beta stage: I made very
few tests.

My scripts:
- support all official kernel releases
  (x.y.z plain releases, -pre and -rc releases)
  support means: it can start from any official kernel
  and it can stop to any other official kernel (with
  the restrictions: only upgrade, and only within the same
  kernel serie or from 2.4 to 2.5, and only if patches exists),
  using normal patches and/or the testing patches and/or
  incremental teesting patches. It knows also the
  suffix 'dont-use'.

- the patches can be in multiple directories
- the sources can be in multiple directories
- destination directory can be a different (and empty new)
  directory

The last features, used with the kbuild-2.5 allow
to have the plain source and some pre releases (or
also other release) sharing the most of sources.
[Maybe this will incraese the testing people]

TODO:
- Better serie crossing (not really necessary,
  the infrastructure in already done, but AFAIK Linus
  will change the transitions name every new stable
  release) (easy)
- The 'kbuild-2.5' patch I uncompress and read the patches
  twice. It is possible to read and feed to patch line per
  line. (easy? bash engeenering)
- Support of -ac, -dj and other -xx patches.
  (infrastructure already done, also for ev. incremental
  patches) (very easy)
- Reading the sources and destination dirs from the
  kbuild-2.5 environment variable (easy)
- downloading from net latest patches (downloading
  is not std unix operation, anyway quite easy with wget)
- Creating needed incremental patches with interdiff
  (e.g. I have X.16, X.17-pre5, X.17, and I'm in X.17-pre5)
  (easy)
- The above problem can be solved using reversed patch.
  But in this case can happend that I should reverse
  several incremental patches. (medium: rewrite of
  some functions for downgrading)

Usage: (Read also the bottom of the script)

--source=dir
  Add the <dir> to the list of sources dirs
--patch=dir
  Add the <dir> to the list of patches dirs
--dest=dir
  set the destination directory.
  this option set the 'kbuild-2.5 patch mode'
--testing
  Go to the last testing version (instead of last full version)
--dry-run
  Print only the patches to be applied, but don't patch
--until=ver
  Apply patch until the <ver>. Default: the last possible
  release within the same serie
  <var> can be also the serie kernel name(2.4/2.5). This means:
  the last possible release of the serie <ver>
Other arguments:
  If it is a dir and have Makefile or A_version:
    alias of --source=
  else if it is a dir:
    alias of --patch=
  else
    alias of --last=

The script is in: people.debian.org/~cate/files/misc/kbuild.sh


        giacomo

_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to