Message ID | 1378974633-31638-1-git-send-email-kengyu@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 09/12/2013 04:30 PM, Keng-Yu Lin wrote: > Using `uname -r` in the Makefile, the compiled .ko has the vermagic of the > current running kernel, rather than the upgrading one. > > The correct way is to use the $kernelver variable provided by DKMS. > > Signed-off-by: Keng-Yu Lin <kengyu@canonical.com> > --- > debian/fwts-efi-runtime-dkms.dkms | 2 +- > efi_runtime/Makefile | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/debian/fwts-efi-runtime-dkms.dkms b/debian/fwts-efi-runtime-dkms.dkms > index 685b189..94b3415 100644 > --- a/debian/fwts-efi-runtime-dkms.dkms > +++ b/debian/fwts-efi-runtime-dkms.dkms > @@ -1,6 +1,6 @@ > PACKAGE_NAME="fwts-efi-runtime-dkms" > PACKAGE_VERSION="#MODULE_VERSION#" > -MAKE[0]="make" > +MAKE[0]="KVER=$kernelver make" > BUILT_MODULE_NAME[0]="efi_runtime" > DEST_MODULE_LOCATION[0]="/updates" > AUTOINSTALL="yes" > diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile > index ea0cac2..a9c0ea7 100644 > --- a/efi_runtime/Makefile > +++ b/efi_runtime/Makefile > @@ -1,9 +1,9 @@ > obj-m += efi_runtime.o > all: > - make -C /lib/modules/`uname -r`/build M=`pwd` modules > + make -C /lib/modules/$(KVER)/build M=`pwd` modules > > install: > - make -C /lib/modules/`uname -r`/build M=`pwd` modules_install > + make -C /lib/modules/$(KVER)/build M=`pwd` modules_install > > clean: > - make -C /lib/modules/`uname -r`/build M=`pwd` clean > + make -C /lib/modules/$(KVER)/build M=`pwd` clean > Acked-by: Alex Hung <alex.hung@canonical.com>
On 12/09/13 09:30, Keng-Yu Lin wrote: > Using `uname -r` in the Makefile, the compiled .ko has the vermagic of the > current running kernel, rather than the upgrading one. > > The correct way is to use the $kernelver variable provided by DKMS. > > Signed-off-by: Keng-Yu Lin <kengyu@canonical.com> > --- > debian/fwts-efi-runtime-dkms.dkms | 2 +- > efi_runtime/Makefile | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/debian/fwts-efi-runtime-dkms.dkms b/debian/fwts-efi-runtime-dkms.dkms > index 685b189..94b3415 100644 > --- a/debian/fwts-efi-runtime-dkms.dkms > +++ b/debian/fwts-efi-runtime-dkms.dkms > @@ -1,6 +1,6 @@ > PACKAGE_NAME="fwts-efi-runtime-dkms" > PACKAGE_VERSION="#MODULE_VERSION#" > -MAKE[0]="make" > +MAKE[0]="KVER=$kernelver make" > BUILT_MODULE_NAME[0]="efi_runtime" > DEST_MODULE_LOCATION[0]="/updates" > AUTOINSTALL="yes" > diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile > index ea0cac2..a9c0ea7 100644 > --- a/efi_runtime/Makefile > +++ b/efi_runtime/Makefile > @@ -1,9 +1,9 @@ > obj-m += efi_runtime.o > all: > - make -C /lib/modules/`uname -r`/build M=`pwd` modules > + make -C /lib/modules/$(KVER)/build M=`pwd` modules > > install: > - make -C /lib/modules/`uname -r`/build M=`pwd` modules_install > + make -C /lib/modules/$(KVER)/build M=`pwd` modules_install > > clean: > - make -C /lib/modules/`uname -r`/build M=`pwd` clean > + make -C /lib/modules/$(KVER)/build M=`pwd` clean > Acked-by: Colin Ian King <colin.king@canonical.com>
diff --git a/debian/fwts-efi-runtime-dkms.dkms b/debian/fwts-efi-runtime-dkms.dkms index 685b189..94b3415 100644 --- a/debian/fwts-efi-runtime-dkms.dkms +++ b/debian/fwts-efi-runtime-dkms.dkms @@ -1,6 +1,6 @@ PACKAGE_NAME="fwts-efi-runtime-dkms" PACKAGE_VERSION="#MODULE_VERSION#" -MAKE[0]="make" +MAKE[0]="KVER=$kernelver make" BUILT_MODULE_NAME[0]="efi_runtime" DEST_MODULE_LOCATION[0]="/updates" AUTOINSTALL="yes" diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile index ea0cac2..a9c0ea7 100644 --- a/efi_runtime/Makefile +++ b/efi_runtime/Makefile @@ -1,9 +1,9 @@ obj-m += efi_runtime.o all: - make -C /lib/modules/`uname -r`/build M=`pwd` modules + make -C /lib/modules/$(KVER)/build M=`pwd` modules install: - make -C /lib/modules/`uname -r`/build M=`pwd` modules_install + make -C /lib/modules/$(KVER)/build M=`pwd` modules_install clean: - make -C /lib/modules/`uname -r`/build M=`pwd` clean + make -C /lib/modules/$(KVER)/build M=`pwd` clean
Using `uname -r` in the Makefile, the compiled .ko has the vermagic of the current running kernel, rather than the upgrading one. The correct way is to use the $kernelver variable provided by DKMS. Signed-off-by: Keng-Yu Lin <kengyu@canonical.com> --- debian/fwts-efi-runtime-dkms.dkms | 2 +- efi_runtime/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)