[pve-devel] [PATCH kernel 1/3] build-sys: replace fixed architecture use where possible

Thomas Lamprecht t.lamprecht at proxmox.com
Wed May 10 10:45:48 CEST 2017


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 Makefile           | 10 +++++-----
 control.in         |  2 +-
 control.tools      |  2 +-
 headers-control.in |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 2deadfa..1470d68 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ KVNAME=${KERNEL_VER}${EXTRAVERSION}
 PACKAGE=pve-kernel-${KVNAME}
 HDRPACKAGE=pve-headers-${KVNAME}
 
-ARCH=amd64
+ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell cat .git/refs/heads/master)
 CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate -lchangelog.Debian)
 export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp -lchangelog.Debian)
@@ -50,7 +50,7 @@ VIRTUALHDRPACKAGE=pve-headers
 VIRTUAL_HDR_DEB=${VIRTUALHDRPACKAGE}_${RELEASE}-${PKGREL}_all.deb
 
 LINUX_TOOLS_PKG=linux-tools-4.10
-LINUX_TOOLS_DEB=${LINUX_TOOLS_PKG}_${KERNEL_VER}-${PKGREL}_amd64.deb
+LINUX_TOOLS_DEB=${LINUX_TOOLS_PKG}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
 
 DEBS=${DST_DEB} ${HDR_DEB} ${PVE_DEB} ${VIRTUAL_HDR_DEB} ${LINUX_TOOLS_DEB}
 
@@ -92,7 +92,7 @@ endif
 
 ${DST_DEB}: data control.in prerm.in postinst.in postrm.in copyright changelog.Debian | fwcheck abicheck
 	mkdir -p data/DEBIAN
-	sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' <control.in >data/DEBIAN/control
+	sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' -e 's/@ARCH@/${ARCH}/' <control.in >data/DEBIAN/control
 	sed -e 's/@@KVNAME@@/${KVNAME}/g'  <prerm.in >data/DEBIAN/prerm
 	chmod 0755 data/DEBIAN/prerm
 	sed -e 's/@@KVNAME@@/${KVNAME}/g'  <postinst.in >data/DEBIAN/postinst
@@ -147,7 +147,7 @@ data: .compile_mark igb.ko ixgbe.ko e1000e.ko ${SPL_MODULES} ${ZFS_MODULES}
 	mkdir tmp/boot
 	install -m 644 ${KERNEL_SRC}/.config tmp/boot/config-${KVNAME}
 	install -m 644 ${KERNEL_SRC}/System.map tmp/boot/System.map-${KVNAME}
-	install -m 644 ${KERNEL_SRC}/arch/x86_64/boot/bzImage tmp/boot/vmlinuz-${KVNAME}
+	install -m 644 ${KERNEL_SRC}/arch/${ARCH}/boot/bzImage tmp/boot/vmlinuz-${KVNAME}
 	cd ${KERNEL_SRC}; make INSTALL_MOD_PATH=../tmp/ modules_install
 	## install latest ibg driver
 	install -m 644 igb.ko tmp/lib/modules/${KVNAME}/kernel/drivers/net/ethernet/intel/igb/
@@ -292,7 +292,7 @@ headers_dir := $(headers_tmp)/usr/src/linux-headers-${KVNAME}
 ${HDR_DEB} hdr: .compile_mark headers-control.in headers-postinst.in
 	rm -rf $(headers_tmp)
 	install -d $(headers_tmp)/DEBIAN $(headers_dir)/include/
-	sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' <headers-control.in >$(headers_tmp)/DEBIAN/control
+	sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' -e 's/@ARCH@/${ARCH}/' <headers-control.in >$(headers_tmp)/DEBIAN/control
 	sed -e 's/@@KVNAME@@/${KVNAME}/g'  <headers-postinst.in >$(headers_tmp)/DEBIAN/postinst
 	chmod 0755 $(headers_tmp)/DEBIAN/postinst
 	install -D -m 644 copyright $(headers_tmp)/usr/share/doc/${HDRPACKAGE}/copyright
diff --git a/control.in b/control.in
index 61ece86..df434a1 100644
--- a/control.in
+++ b/control.in
@@ -2,7 +2,7 @@ Package: pve-kernel- at KVNAME@
 Version: @KERNEL_VER at -@PKGREL@
 Section: admin
 Priority: optional
-Architecture: amd64
+Architecture: @ARCH@
 Provides: linux-image, linux-image-2.6
 Suggests: pve-firmware
 Depends: grub-pc | grub-efi-amd64 | grub-efi-ia32, initramfs-tools, busybox
diff --git a/control.tools b/control.tools
index db61d55..3ad6c27 100644
--- a/control.tools
+++ b/control.tools
@@ -2,7 +2,7 @@ Source: pve-kernel
 Maintainer: Proxmox Support Team <support at proxmox.com>
 
 Package: linux-tools-4.10
-Architecture: amd64
+Architecture: any
 Section: devel
 Priority: optional
 Depends: ${misc:Depends}, ${shlibs:Depends}, linux-base
diff --git a/headers-control.in b/headers-control.in
index efccbe2..c9a7cf3 100644
--- a/headers-control.in
+++ b/headers-control.in
@@ -2,7 +2,7 @@ Package: pve-headers- at KVNAME@
 Version: @KERNEL_VER at -@PKGREL@
 Section: devel
 Priority: optional
-Architecture: amd64
+Architecture: @ARCH@
 Provides: linux-headers, linux-headers-2.6
 Depends: coreutils | fileutils (>= 4.0)
 Maintainer: Proxmox Support Team <support at proxmox.com>
-- 
2.11.0





More information about the pve-devel mailing list