[pve-devel] [PATCH kernel 3/3] add mapping from DEB_BUILD_ARCH to kernel arch subdirectory

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


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 1470d68..e32ae7a 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,14 @@ PACKAGE=pve-kernel-${KVNAME}
 HDRPACKAGE=pve-headers-${KVNAME}
 
 ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+
+# amd64/x86_64/x86 share the arch subdirectory in the kernel, 'x86' so we need
+# a mapping
+KERNEL_ARCH=x86
+ifneq (${ARCH}, amd64)
+KERNEL_ARCH=${ARCH}
+endif
+
 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)
@@ -307,7 +315,7 @@ ${HDR_DEB} hdr: .compile_mark headers-control.in headers-postinst.in
 	     -name '*.sh' -o -name '*.pl' \) \
 	  -print | cpio -pd --preserve-modification-time $(headers_dir)
 	cd ${KERNEL_SRC}; cp -a include scripts $(headers_dir)
-	cd ${KERNEL_SRC}; (find arch/x86 -name include -type d -print | \
+	cd ${KERNEL_SRC}; (find arch/${KERNEL_ARCH} -name include -type d -print | \
 		xargs -n1 -i: find : -type f) | \
 		cpio -pd --preserve-modification-time $(headers_dir)
 	mkdir -p ${headers_tmp}/lib/modules/${KVNAME}
-- 
2.11.0





More information about the pve-devel mailing list