mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-25 12:14:33 +00:00
mkpatch documentation, both as a separate /doc file and in the
script itself. And a minor typo fix in Config.in git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@549 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
93f2bda300
commit
a6af016090
4 files changed
+98
-2
No files matched your search
+60
@@ -0,0 +1,60 @@
|
||||
This file tries to document how the `mkpatch' program works.
|
||||
The file in copyright (c) 1999 by Frodo Looijaard
|
||||
|
||||
mkpatch compares the newest lm_sensors sources with what is found in a kernel,
|
||||
and generates a set of diffs. These diffs can be amplied to that kernel,
|
||||
after which the kernel is synchronised with the current lm_sensors sources.
|
||||
|
||||
You should always run mkpatch against a kernel tree that has been patched
|
||||
for the newest I2C sources.
|
||||
|
||||
mkpatch needs two arguments. The first is the root of the lm_sensors package,
|
||||
the second is the root of Linux kernel tree. For example:
|
||||
cd /tmp/lm_sensors-2.4.0
|
||||
mkpatch/mkpatch . /usr/src/linux
|
||||
The patch file is written to stdout; any errors are written to stderr.
|
||||
So you will want to capture the output:
|
||||
mkpatch/mkpatch . /usr/src/linux > /tmp/lm_sensors-diffs
|
||||
Later on, you will want to apply the diffs:
|
||||
cd /usr/src/linuc
|
||||
patch -p1 -E < /tmp/lm_sensors-diffs
|
||||
Of course, this can be combined:
|
||||
mkpatch/mkpatch . /usr/src/linux | patch -d /usr/src/linux -p1 -E
|
||||
|
||||
mkpatch uses several files in the mkpatch subdirectory. The location of
|
||||
these files is hardcoded in the program, but all other files used are
|
||||
specified in these files, and can easily be changed. Used files are:
|
||||
FILES
|
||||
a list of files that will be considered by mkpatch. Each line contains
|
||||
two filenames, separated by whitespace. The first is the name and
|
||||
location (relative to the lm_sensors package root) of the lm_sensors
|
||||
file, the second is the name and location (relative to the kernel root) of
|
||||
the kernel file. A diff will be created between these two files.
|
||||
INCLUDES
|
||||
A list of include file changes. Each line contains two strings that
|
||||
can be found after a `#include' statement. All occurences of the
|
||||
first string will be changed to the second, for all lm_sensors files in
|
||||
FILES, before the normal diff is generated. This allow us to use
|
||||
`#include "sensors.h"' when compiling in the package tree, and
|
||||
`#include <linux/sensors.h>' in the kernel tree.
|
||||
Makefile, Config.in
|
||||
These files are new and will be copied to the appropriate place as
|
||||
specified in FILES.
|
||||
|
||||
mkpatch does several things:
|
||||
* For each file pair as specified in FILES, it creates a diff between
|
||||
them, but before that is done, it changes `#include' lines in the
|
||||
lm_sensors file as specified in INCLUDES
|
||||
* It handles several special files, that have to be scanned explicitely
|
||||
to generate diffs to for them
|
||||
|
||||
The generated diffs have specific headers. It will seem as if the old
|
||||
kernel was contained in the `linux-old' directory, and the new patched
|
||||
kernel in the `linux' directory, regardless of where the kernel was
|
||||
actually located.
|
||||
|
||||
Most intricate are the special files that are handled. These special
|
||||
files were already present in the kernel, but had to be patched. Because
|
||||
they can change between kernel versions, I had to scan them by hand to
|
||||
find where the new code should be inserted. Each file has documented
|
||||
what actually happens.
|
||||
Reference in new issue
Block a user