Kernel patch - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Kernel patch

Description:

Patch is a file describing differences between two files. ... sure your changed kernel does not include unneccery files (objects, backups, etc) ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 8
Provided by: ofer5
Category:

less

Transcript and Presenter's Notes

Title: Kernel patch


1
Kernel patch
  • 8.1.06

2
  • Patch creation
  • Many sources on the web.
  • One example
  • http//www.linuxchix.org/content/courses/kernel_ha
    cking/lesson9

3
  • Patch is a file describing differences between
    two files.
  • diff command is used to create the patch file
  • patch command is used to apply patch files
    changes on old file.
  • See
  • info diff
  • man diff(1)
  • man patch(1)

4
  • Example
  • File 1 ./new/file.txt
  • File 2 ./old/file.txt
  • diff uNr old new gtpatchfile
  • cd ./old
  • patch p1 lt ../patchfile
  • old/file.txt is now the same as new/file.txt

5
Creating kernel patch
  • Changed kernel and original vanilla kernel must
    reside in same directory before diffing.
  • Do not ever create a patch with uneven
    directories
  • Make sure your changed kernel does not include
    unneccery files (objects, backups, etc)
  • make mrproper will remove most of these files but
    forces you to recompile all kernel
  • diff -uNr linux.vanilla linux.new gt patchfile

6
  • You think you've got it right?
  • Apply it to a a copy of original source tree
  • don't ruin your only copy of the original source
    tree.
  • If it doesn't apply without any errors, redo the
    patch.

7
Remember !!!
  • before submission try and apply the patch to a
    clean kernel - verify that it works. !!!
Write a Comment
User Comments (0)
About PowerShow.com