Linux kernel

From campisano.org
Jump to navigation Jump to search

Kernek patch


# esempio di utilizzo di una patch



	cd /usr/src
	patch -p 1 -d linux-2.6.6/ < patch-2.6.7

# oppure se avete una versione di linux con il 4^ numero come linux-2.6.15.6
# dovete prima tornare alla versione linux-2.6.15
# scaricando la patch-2.6.15.3 ed eseguendo

        patch -p 1 -d linux-2.6.15.3/ -R < patch-2.6.15.3
	mv linux-2.6.15.3 linux-2.6.15	#opzionale ma utile a chiarire cosa si sta facendo



# e poi applicare la patch-2.6.15.6 alla versione linux-2.6.15

	patch -p 1 -d linux-2.6.15/ < patch-2.6.15.6
	mv linux-2.6.15 linux-2.6.15.6



#questo e' il significato delle opzioni usate
#   -s  or  --silent  or  --quiet
#          Work silently, unless an error occurs.

#   -pnum  or  --strip=num
#          Strip the smallest prefix containing num leading slashes from each file name found in the patch file.  A sequence of one or more adjacent
#          slashes is counted as a single slash.  This controls how file names found in the patch file are treated, in case you keep your files in a
#          different directory than the person who sent out the patch.  For example, supposing the file name in the patch file was#
#
#             /u/howard/src/blurfl/blurfl.c
#
#          setting -p0 gives the entire file name unmodified, -p1 gives
#
#             u/howard/src/blurfl/blurfl.c
#
#          without the leading slash, -p4 gives
#
#             blurfl/blurfl.c

#   -d dir  or  --directory=dir
#          Change to the directory dir immediately, before doing anything else.