Understanding hardware support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 On Tue, Apr 27, 2004 at
 09:38:04AM -0700, Debee Norling wrote:
 > Well the more I read, it seems the less I know.
Debee,

Maybe the thing to do is to master the new territory one
neighborhood at a time. Here is my understanding of a "patch":

There are two related utilities in Linux called "diff" and
"patch". They are closely related and are inverse functions of
each other.

Suppose you have a source program called oldprog.c and you
improve it, turning it into another source program called
newprog.c. When you want to share your changes with the original
author, you do not send him your newprog.c. Instead you run the
"diff" utility something like this:

prompt # diff oldprog.c newprog.c > differences

The file "differences" is interesting. It tells how newprog.c
gets to be created from oldprog.c, and it is just what the
original author wants. The file "differences" is called a
"patch".

The "patch" utility applies the patch created earlier and stored
in the file "differences" to "oldprog.c", and you then have
yourself a "newprog.c" which you can compile and do whatever you
want with.

A kernel patch is a "differences" file which you apply to a set
of kernel source programs (a source "tree") so the standard
kernel now becomes a new, nonstandard, modified, hopefully
improved, kernel. You then compile it, install it, run "lilo",
and hold your breath.

You can obtain patches that upgrade a kernel from one version to
the next. For instance, kernel 2.4.25, which I am using, could be
upgraded to 2.4.26 by obtaining and applying the proper patch
with the "patch" utility. I could upgrade from 2.4.20 all the way
to 2.4.26 also, but it would have to be incrementally, without
skipping any of the middle steps.

Speakup is not a program in the usual sense. It is a kernel
patch. It is a set of modifications to a standard kernel, which
when applied with the patch utility, give you a "speakup modified
kernel" that needs to be compiled, installed, etc.

Diff creates a patch by extracting the differences between two
source files. Patch applies those differences to produce the new
version from the old one.

Quiz next class.

Chuck






- -- 
The Moon is Waxing Gibbous (52% of Full)
My home page is now at http://www.mhcable.com/~chuckh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQCVAwUBQI7i6jVdG8M9x9tGAQJkvAQA0dBn2dYo7bVKKJcLVd4NpeJj+g+akvug
iEkMIW2+MbAh7pNl2kkhW0f3+8LkGBCkRLdVEIOE99YZCb+6UU9TeJAfJ7vlwvGu
TsUuKbKKpq9CbKrx4BfqFiFdgCA61eI3kgPbMnZsCZo53TcrJvBd1EVx0pFtcMoO
663h1wpR41M=
=sCBD
-----END PGP SIGNATURE-----





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux