Patchwork [v2] uefi: Add fwts-efi-runtime-dkms package

login
register
mail settings
Submitter Keng-Yu Lin
Date Aug. 23, 2012, 12:33 p.m.
Message ID <1345725210-7622-1-git-send-email-kengyu@canonical.com>
Download mbox | patch
Permalink /patch/179621/
State Accepted
Headers show

Comments

Keng-Yu Lin - Aug. 23, 2012, 12:33 p.m.
The patch adds the DKMS package for holding the FWTS UEFI runtime
service kernel driver.

Thanks to Chris for the pacakge description.

Thanks-to: Chris Van Hoof <vanhoof@canonical.com>
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 debian/control                    |   10 +++++++++-
 debian/fwts-efi-runtime-dkms.dkms |    6 ++++++
 debian/rules                      |   17 ++++++++++++++++-
 3 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 debian/fwts-efi-runtime-dkms.dkms
 create mode 100644 efi_runtime/Makefile

diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
new file mode 100644
index 0000000..e69de29
Colin King - Aug. 23, 2012, 1:36 p.m.
On 23/08/12 13:33, Keng-Yu Lin wrote:
> The patch adds the DKMS package for holding the FWTS UEFI runtime
> service kernel driver.
>
> Thanks to Chris for the pacakge description.
>
> Thanks-to: Chris Van Hoof <vanhoof@canonical.com>
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>   debian/control                    |   10 +++++++++-
>   debian/fwts-efi-runtime-dkms.dkms |    6 ++++++
>   debian/rules                      |   17 ++++++++++++++++-
>   3 files changed, 31 insertions(+), 2 deletions(-)
>   create mode 100644 debian/fwts-efi-runtime-dkms.dkms
>   create mode 100644 efi_runtime/Makefile
>
> diff --git a/debian/control b/debian/control
> index 1f93c6a..afe0ef1 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -4,7 +4,7 @@ Priority: optional
>   Maintainer: Firmware Testing Team <firmware-testing-team@lists.launchpad.net>
>   Uploaders: Colin King <colin.king@ubuntu.com>, Keng-Yu Lin <kengyu@ubuntu.com>, Alex Hung <alex.hung@canonical.com>, Chris Van Hoof <vanhoof@canonical.com>, Ivan Hu <ivan.hu@canonical.com>
>   Standards-Version: 3.9.3
> -Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper
> +Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper, dkms
>
>   Package: fwts
>   Architecture: any
> @@ -52,3 +52,11 @@ Description: Firmware Test Suite frontend interface
>    This is a dialog based interface designed to provide an easy to use method
>    to execute tests via Firmware Test Suite and is also used as the primary
>    interface within Firmware Test Suit live images.
> +
> +Package: fwts-efi-runtime-dkms
> +Architecture: amd64
> +Priority: optional
> +Depends: ${shlibs:Depends}, ${misc:Depends}, dkms, linux-headers-generic | linux-headers
> +Description: Firmware Test Suite UEFI Runtime Service kernel driver
> + This package provides the efi_runtime kernel driver in DKMS format,
> + which is required for accessing UEFI Runtime Services.
> diff --git a/debian/fwts-efi-runtime-dkms.dkms b/debian/fwts-efi-runtime-dkms.dkms
> new file mode 100644
> index 0000000..685b189
> --- /dev/null
> +++ b/debian/fwts-efi-runtime-dkms.dkms
> @@ -0,0 +1,6 @@
> +PACKAGE_NAME="fwts-efi-runtime-dkms"
> +PACKAGE_VERSION="#MODULE_VERSION#"
> +MAKE[0]="make"
> +BUILT_MODULE_NAME[0]="efi_runtime"
> +DEST_MODULE_LOCATION[0]="/updates"
> +AUTOINSTALL="yes"
> diff --git a/debian/rules b/debian/rules
> index 4af7a4f..bee26be 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -2,9 +2,24 @@
>
>   export DEB_BUILD_HARDENING=1
>
> +DEBVERS := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
> +		| cut -d- -f1)
> +
> +VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
> +
> +DKMS_SRC_DIR := $(CURDIR)/debian/fwts-efi-runtime-dkms/usr/src/fwts-efi-runtime-dkms-$(VERSION)
> +
> +override_dh_auto_install:
> +	install -d $(DKMS_SRC_DIR)
> +	cp -a efi_runtime/* $(DKMS_SRC_DIR)
> +	dh_auto_install
> +
>   override_dh_auto_configure:
>   	autoreconf -ivf
>   	dh_auto_configure
>
> +override_dh_dkms:
> +	dh_dkms -V $(VERSION)
> +
>   %:
> -	dh $@
> +	dh $@ --with dkms
> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
> new file mode 100644
> index 0000000..e69de29
>
Acked-by: Colin Ian King <colin.king@canonical.com>
Chris Van Hoof - Aug. 29, 2012, 3:55 p.m.
On 08/23/2012 08:33 AM, Keng-Yu Lin wrote:
> The patch adds the DKMS package for holding the FWTS UEFI runtime
> service kernel driver.
> 
> Thanks to Chris for the pacakge description.
> 
> Thanks-to: Chris Van Hoof <vanhoof@canonical.com>
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>  debian/control                    |   10 +++++++++-
>  debian/fwts-efi-runtime-dkms.dkms |    6 ++++++
>  debian/rules                      |   17 ++++++++++++++++-
>  3 files changed, 31 insertions(+), 2 deletions(-)
>  create mode 100644 debian/fwts-efi-runtime-dkms.dkms
>  create mode 100644 efi_runtime/Makefile
> 
> diff --git a/debian/control b/debian/control
> index 1f93c6a..afe0ef1 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -4,7 +4,7 @@ Priority: optional
>  Maintainer: Firmware Testing Team <firmware-testing-team@lists.launchpad.net>
>  Uploaders: Colin King <colin.king@ubuntu.com>, Keng-Yu Lin <kengyu@ubuntu.com>, Alex Hung <alex.hung@canonical.com>, Chris Van Hoof <vanhoof@canonical.com>, Ivan Hu <ivan.hu@canonical.com>
>  Standards-Version: 3.9.3
> -Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper
> +Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper, dkms
>  
>  Package: fwts
>  Architecture: any
> @@ -52,3 +52,11 @@ Description: Firmware Test Suite frontend interface
>   This is a dialog based interface designed to provide an easy to use method
>   to execute tests via Firmware Test Suite and is also used as the primary 
>   interface within Firmware Test Suit live images.
> +
> +Package: fwts-efi-runtime-dkms
> +Architecture: amd64
> +Priority: optional
> +Depends: ${shlibs:Depends}, ${misc:Depends}, dkms, linux-headers-generic | linux-headers
> +Description: Firmware Test Suite UEFI Runtime Service kernel driver
> + This package provides the efi_runtime kernel driver in DKMS format,
> + which is required for accessing UEFI Runtime Services.
> diff --git a/debian/fwts-efi-runtime-dkms.dkms b/debian/fwts-efi-runtime-dkms.dkms
> new file mode 100644
> index 0000000..685b189
> --- /dev/null
> +++ b/debian/fwts-efi-runtime-dkms.dkms
> @@ -0,0 +1,6 @@
> +PACKAGE_NAME="fwts-efi-runtime-dkms"
> +PACKAGE_VERSION="#MODULE_VERSION#"
> +MAKE[0]="make"
> +BUILT_MODULE_NAME[0]="efi_runtime"
> +DEST_MODULE_LOCATION[0]="/updates"
> +AUTOINSTALL="yes"
> diff --git a/debian/rules b/debian/rules
> index 4af7a4f..bee26be 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -2,9 +2,24 @@
>  
>  export DEB_BUILD_HARDENING=1
>  
> +DEBVERS := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
> +		| cut -d- -f1)
> +
> +VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
> +
> +DKMS_SRC_DIR := $(CURDIR)/debian/fwts-efi-runtime-dkms/usr/src/fwts-efi-runtime-dkms-$(VERSION)
> +
> +override_dh_auto_install:
> +	install -d $(DKMS_SRC_DIR)
> +	cp -a efi_runtime/* $(DKMS_SRC_DIR)
> +	dh_auto_install
> +
>  override_dh_auto_configure:
>  	autoreconf -ivf
>  	dh_auto_configure
>  
> +override_dh_dkms:
> +	dh_dkms -V $(VERSION)
> +
>  %:
> -	dh $@
> +	dh $@ --with dkms
> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
> new file mode 100644
> index 0000000..e69de29
> 

Put together a test build:
 * Applied this patch
 * Cloned efi_runtime from Ivan's git repo on kernel.ubuntu.com
 * Ran mkdir efi_runtime at the top-level of fwts
 * Copied in Ivan's sources to fwts/efi_runtime

= DKMS build results =
"""
[...]
Setting up fwts-efi-runtime-dkms (0.25.06vanhoof1) ...
Loading new fwts-efi-runtime-dkms-0.25.06vanhoof1 DKMS files...
First Installation: checking all kernels...
Building only for 3.2.0-29-generic
Building initial module for 3.2.0-29-generic
Done.
[...]
efi_runtime:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.2.0-29-generic/updates/dkms/
depmod....
DKMS: install completed.
"""
$ dkms status
fwts-efi-runtime-dkms, 0.25.06vanhoof1, 3.2.0-29-generic, x86_64: installed

I've uploaded my test packages here:

http://kernel.ubuntu.com/~vanhoof/fwts_0.25.06vanhoof1

... you can clone rt_testapp and efi_runtime here:

 * git://kernel.ubuntu.com/ivanhu/efi_runtime.git
 * git://kernel.ubuntu.com/ivanhu/rt_testapp.git

From a packaging perspective +1 from me

--chris

Acked-by: Chris Van Hoof <vanhoof@canonical.com>

Patch

diff --git a/debian/control b/debian/control
index 1f93c6a..afe0ef1 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@  Priority: optional
 Maintainer: Firmware Testing Team <firmware-testing-team@lists.launchpad.net>
 Uploaders: Colin King <colin.king@ubuntu.com>, Keng-Yu Lin <kengyu@ubuntu.com>, Alex Hung <alex.hung@canonical.com>, Chris Van Hoof <vanhoof@canonical.com>, Ivan Hu <ivan.hu@canonical.com>
 Standards-Version: 3.9.3
-Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper
+Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper, dkms
 
 Package: fwts
 Architecture: any
@@ -52,3 +52,11 @@  Description: Firmware Test Suite frontend interface
  This is a dialog based interface designed to provide an easy to use method
  to execute tests via Firmware Test Suite and is also used as the primary 
  interface within Firmware Test Suit live images.
+
+Package: fwts-efi-runtime-dkms
+Architecture: amd64
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}, dkms, linux-headers-generic | linux-headers
+Description: Firmware Test Suite UEFI Runtime Service kernel driver
+ This package provides the efi_runtime kernel driver in DKMS format,
+ which is required for accessing UEFI Runtime Services.
diff --git a/debian/fwts-efi-runtime-dkms.dkms b/debian/fwts-efi-runtime-dkms.dkms
new file mode 100644
index 0000000..685b189
--- /dev/null
+++ b/debian/fwts-efi-runtime-dkms.dkms
@@ -0,0 +1,6 @@ 
+PACKAGE_NAME="fwts-efi-runtime-dkms"
+PACKAGE_VERSION="#MODULE_VERSION#"
+MAKE[0]="make"
+BUILT_MODULE_NAME[0]="efi_runtime"
+DEST_MODULE_LOCATION[0]="/updates"
+AUTOINSTALL="yes"
diff --git a/debian/rules b/debian/rules
index 4af7a4f..bee26be 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,9 +2,24 @@ 
 
 export DEB_BUILD_HARDENING=1
 
+DEBVERS := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
+		| cut -d- -f1)
+
+VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
+
+DKMS_SRC_DIR := $(CURDIR)/debian/fwts-efi-runtime-dkms/usr/src/fwts-efi-runtime-dkms-$(VERSION)
+
+override_dh_auto_install:
+	install -d $(DKMS_SRC_DIR)
+	cp -a efi_runtime/* $(DKMS_SRC_DIR)
+	dh_auto_install
+
 override_dh_auto_configure:
 	autoreconf -ivf
 	dh_auto_configure
 
+override_dh_dkms:
+	dh_dkms -V $(VERSION)
+
 %:
-	dh $@
+	dh $@ --with dkms