diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index 5ecc1a048..21a92280e 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -32,7 +32,9 @@ function add_patch { exit 1 fi - sed -e "s:^--- [^ ]*:--- orig/$2:" -e "s:^+++ [^ ]*:+++ $2:" < "$1" + sed -e "s:^--- [^ ]*:--- orig/linux-${kernel_version}/$2:" \ + -e "s:^+++ [^ ]*:+++ linux-${kernel_version}/$2:" \ + < "$1" } # Generate a patch for a file to be added to the kernel source tree, and strip @@ -48,21 +50,20 @@ function add_file { exit 1 fi - # Skip any files generated by the kernel build process (*.mod.c). - if [ "${1%.mod.c}" != "$1" ]; then - return 0; - fi - - cat <