diff mbox series

[5/5,G,L-R-M,oracle] UBUNTU: [packaging] add signed modules for the nvidia 455 driver

Message ID 20201021190939.515507-6-alberto.milone@canonical.com
State New
Headers show
Series Add packages for the NVIDIA 455 driver | expand

Commit Message

Alberto Milone Oct. 21, 2020, 7:09 p.m. UTC
Build the drivers for amd64.

BugLink: https://bugs.launchpad.net/bugs/1897751

Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
---
 debian/control.d/meta-nvidia | 13 +++++++++++++
 debian/control.d/nvidia      | 19 +++++++++++++++++++
 debian/dkms-versions         |  1 +
 debian/rules                 |  9 +++++++++
 4 files changed, 42 insertions(+)

--
2.25.1
diff mbox series

Patch

diff --git a/debian/control.d/meta-nvidia b/debian/control.d/meta-nvidia
index dc56b59..4e93a32 100644
--- a/debian/control.d/meta-nvidia
+++ b/debian/control.d/meta-nvidia
@@ -37,6 +37,19 @@  Description: Extra drivers for nvidia-450 for oracle${variant:suffix}
  Install extra signed nvidia-450 modules compatible with
  oracle${variant:suffix}

+Package: linux-modules-nvidia-455-oracle${variant:suffix}
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Provides: ${dkms:nvidia-455-modules}
+Depends:
+ ${misc:Depends},
+ linux-modules-nvidia-455-@ABI@-oracle (= ${binary:Version}),
+ ${nvk:nvidia-455}
+Description: Extra drivers for nvidia-455 for oracle${variant:suffix}
+ Install extra signed nvidia-455 modules compatible with
+ oracle${variant:suffix}
+
 Package: linux-modules-nvidia-418-server-oracle${variant:suffix}
 Build-Profiles: <!stage1>
 Architecture: amd64
diff --git a/debian/control.d/nvidia b/debian/control.d/nvidia
index 9334c33..63800c4 100644
--- a/debian/control.d/nvidia
+++ b/debian/control.d/nvidia
@@ -55,6 +55,25 @@  Description: Linux kernel nvidia modules for version @ABI@
  which will ensure that upgrades work correctly, and that supporting packages are
  also installed.

+Package: linux-modules-nvidia-455-@ABI@-oracle
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Priority: optional
+Built-Using: ${linux:BuiltUsing}
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ binutils,
+ linux-image-@ABI@-oracle | linux-image-unsigned-@ABI@-oracle,
+Description: Linux kernel nvidia modules for version @ABI@
+ This package contains the Linux kernel nvidia modules for version @ABI@.
+ .
+ You likely do not want to install this package directly. Instead, install the
+ one of the linux-modules-nvidia-455-oracle* meta-packages,
+ which will ensure that upgrades work correctly, and that supporting packages are
+ also installed.
+
 Package: linux-modules-nvidia-418-server-@ABI@-oracle
 Build-Profiles: <!stage1>
 Architecture: amd64
diff --git a/debian/dkms-versions b/debian/dkms-versions
index cc4a4ca..bfca516 100644
--- a/debian/dkms-versions
+++ b/debian/dkms-versions
@@ -2,6 +2,7 @@  zfs-linux 0.8.4-1ubuntu11
 nvidia-graphics-drivers-390 390.138-0ubuntu2
 nvidia-graphics-drivers-435 435.21-0ubuntu8
 nvidia-graphics-drivers-450 450.80.02-0ubuntu1
+nvidia-graphics-drivers-455 0
 nvidia-graphics-drivers-418-server 418.152.00-0ubuntu2
 nvidia-graphics-drivers-440-server 440.95.01-0ubuntu2
 nvidia-graphics-drivers-450-server 450.80.02-0ubuntu3
diff --git a/debian/rules b/debian/rules
index 91dcab6..08cb3b2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,7 @@  src_kernel = $(shell echo "$(src_package)" | sed -e 's/restricted-modules-//')
 dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390 / { print $$2; }' debian/dkms-versions)
 dkms_nvidia_435_version=$(shell gawk '/^nvidia-graphics-drivers-435 / { print $$2; }' debian/dkms-versions)
 dkms_nvidia_450_version=$(shell gawk '/^nvidia-graphics-drivers-450 / { print $$2; }' debian/dkms-versions)
+dkms_nvidia_455_version=$(shell gawk '/^nvidia-graphics-drivers-455 / { print $$2; }' debian/dkms-versions)
 dkms_nvidia_418_server_version=$(shell gawk '/^nvidia-graphics-drivers-418-server / { print $$2; }' debian/dkms-versions)
 dkms_nvidia_440_server_version=$(shell gawk '/^nvidia-graphics-drivers-440-server / { print $$2; }' debian/dkms-versions)
 dkms_nvidia_450_server_version=$(shell gawk '/^nvidia-graphics-drivers-450-server / { print $$2; }' debian/dkms-versions)
@@ -23,6 +24,7 @@  dkms_nvidia_450_server_version=$(shell gawk '/^nvidia-graphics-drivers-450-serve
 nvidia_390_upstream_version=$(shell echo "$(dkms_nvidia_390_version)" | cut -d '-' -f 1)
 nvidia_435_upstream_version=$(shell echo "$(dkms_nvidia_435_version)" | cut -d '-' -f 1)
 nvidia_450_upstream_version=$(shell echo "$(dkms_nvidia_450_version)" | cut -d '-' -f 1)
+nvidia_455_upstream_version=$(shell echo "$(dkms_nvidia_455_version)" | cut -d '-' -f 1)
 nvidia_418_server_upstream_version=$(shell echo "$(dkms_nvidia_418_server_version)" | cut -d '-' -f 1)
 nvidia_440_server_upstream_version=$(shell echo "$(dkms_nvidia_440_server_version)" | cut -d '-' -f 1)
 nvidia_450_server_upstream_version=$(shell echo "$(dkms_nvidia_450_server_version)" | cut -d '-' -f 1)
@@ -150,6 +152,11 @@  nvidia-%:
 	$(call build_dkms, $(src_abi)-$*, linux-modules-nvidia-450-$(src_abi)-$*, $(CURDIR)/debian/linux-modules-nvidia-450-$(src_abi)-$*/lib/modules/$(src_abi)-$*/kernel, "", nvidia-450, pool/restricted/n/nvidia-graphics-drivers-450/nvidia-kernel-source-450_$(dkms_nvidia_450_version)_$(arch).deb pool/restricted/n/nvidia-graphics-drivers-450/nvidia-dkms-450_$(dkms_nvidia_450_version)_$(arch).deb)
 	$(call install_control,linux-modules-nvidia-450-$(src_abi)-$*,$*,nvidia,450,postinst postrm prerm config templates)

+	install -d debian/linux-modules-nvidia-455-$(src_abi)-$*
+	install -d debian/linux-modules-nvidia-455-$(src_abi)-$*/usr/lib/linux/triggers
+	$(call build_dkms, $(src_abi)-$*, linux-modules-nvidia-455-$(src_abi)-$*, $(CURDIR)/debian/linux-modules-nvidia-455-$(src_abi)-$*/lib/modules/$(src_abi)-$*/kernel, "", nvidia-455, pool/restricted/n/nvidia-graphics-drivers-455/nvidia-kernel-source-455_$(dkms_nvidia_455_version)_$(arch).deb pool/restricted/n/nvidia-graphics-drivers-455/nvidia-dkms-455_$(dkms_nvidia_455_version)_$(arch).deb)
+	$(call install_control,linux-modules-nvidia-455-$(src_abi)-$*,$*,nvidia,455,postinst postrm prerm config templates)
+
 	install -d debian/linux-modules-nvidia-418-server-$(src_abi)-$*
 	install -d debian/linux-modules-nvidia-418-server-$(src_abi)-$*/usr/lib/linux/triggers
 	$(call build_dkms, $(src_abi)-$*, linux-modules-nvidia-418-server-$(src_abi)-$*, $(CURDIR)/debian/linux-modules-nvidia-418-server-$(src_abi)-$*/lib/modules/$(src_abi)-$*/kernel, "", nvidia-418srv, pool/restricted/n/nvidia-graphics-drivers-418-server/nvidia-kernel-source-418-server_$(dkms_nvidia_418_server_version)_$(arch).deb pool/restricted/n/nvidia-graphics-drivers-418-server/nvidia-dkms-418-server_$(dkms_nvidia_418_server_version)_$(arch).deb)
@@ -179,6 +186,7 @@  gencontrol_flags :=
 gencontrol_flags += -Vdkms:nvidia-390-modules="nvidia-dkms-390 (= $(dkms_nvidia_390_version))"
 gencontrol_flags += -Vdkms:nvidia-435-modules="nvidia-dkms-435 (= $(dkms_nvidia_435_version))"
 gencontrol_flags += -Vdkms:nvidia-450-modules="nvidia-dkms-450 (= $(dkms_nvidia_450_version))"
+gencontrol_flags += -Vdkms:nvidia-455-modules="nvidia-dkms-455 (= $(dkms_nvidia_455_version))"
 gencontrol_flags += -Vdkms:nvidia-418-server-modules="nvidia-dkms-418-server (= $(dkms_nvidia_418_server_version))"
 gencontrol_flags += -Vdkms:nvidia-440-server-modules="nvidia-dkms-440-server (= $(dkms_nvidia_440_server_version))"
 gencontrol_flags += -Vdkms:nvidia-450-server-modules="nvidia-dkms-450-server (= $(dkms_nvidia_450_server_version))"
@@ -186,6 +194,7 @@  gencontrol_flags += -Vdkms:nvidia-450-server-modules="nvidia-dkms-450-server (=
 gencontrol_flags += -Vnvk:nvidia-390="nvidia-kernel-common-390 (<= $(nvidia_390_upstream_version)-1), nvidia-kernel-common-390 (>= $(nvidia_390_upstream_version))"
 gencontrol_flags += -Vnvk:nvidia-435="nvidia-kernel-common-435 (<= $(nvidia_435_upstream_version)-1), nvidia-kernel-common-435 (>= $(nvidia_435_upstream_version))"
 gencontrol_flags += -Vnvk:nvidia-450="nvidia-kernel-common-450 (<= $(nvidia_450_upstream_version)-1), nvidia-kernel-common-450 (>= $(nvidia_450_upstream_version))"
+gencontrol_flags += -Vnvk:nvidia-455="nvidia-kernel-common-455 (<= $(nvidia_455_upstream_version)-1), nvidia-kernel-common-455 (>= $(nvidia_455_upstream_version))"
 gencontrol_flags += -Vnvk:nvidia-418-server="nvidia-kernel-common-418-server (<= $(nvidia_418_server_upstream_version)-1), nvidia-kernel-common-418-server (>= $(nvidia_418_server_upstream_version))"
 gencontrol_flags += -Vnvk:nvidia-440-server="nvidia-kernel-common-440-server (<= $(nvidia_440_server_upstream_version)-1), nvidia-kernel-common-440-server (>= $(nvidia_440_server_upstream_version))"
 gencontrol_flags += -Vnvk:nvidia-450-server="nvidia-kernel-common-450-server (<= $(nvidia_450_server_upstream_version)-1), nvidia-kernel-common-450-server (>= $(nvidia_450_server_upstream_version))"