From b5b67adcc17e3e74dbcda09ff3f8a4636aa53486 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 19:40:22 +0200 Subject: Merging debian version 6.7.7-1. Signed-off-by: Daniel Baumann --- debian/rules.real | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'debian/rules.real') diff --git a/debian/rules.real b/debian/rules.real index 04c09d654a..6191062546 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -21,12 +21,7 @@ ifdef ARCH endif endif -ifneq ($(DEB_BUILD_ARCH),$(or $(KERNEL_DEB_ARCH),$(DEB_HOST_ARCH))) - CROSS_COMPILE := $(or $(KERNEL_GNU_TYPE),$(DEB_HOST_GNU_TYPE))- -else - CROSS_COMPILE := -endif -export CROSS_COMPILE +export CROSS_COMPILE := $(or $(KERNEL_GNU_TYPE),$(DEB_HOST_GNU_TYPE))- export DH_OPTIONS export DEB_HOST_ARCH DEB_HOST_GNU_TYPE DEB_BUILD_ARCH @@ -129,8 +124,6 @@ $(STAMPS_DIR)/source_none: $(STAMPS_DIR)/source $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR): CONFIG=$(BUILD_DIR)/config.$(ARCH)_$(FEATURESET)_$(FLAVOUR) $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR): SOURCE_DIR=$(BUILD_DIR)/source_$(FEATURESET) $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR): DIR=$(BUILD_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR) -$(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR): KERNEL_DEB_ARCH?=$(DEB_HOST_ARCH) -$(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR): KERNEL_GNU_TYPE?=$(DEB_HOST_GNU_TYPE) $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(STAMPS_DIR)/source_$(FEATURESET) $(BUILD_DIR)/config.$(ARCH)_$(FEATURESET)_$(FLAVOUR) rm -rf '$(DIR)' mkdir '$(DIR)' @@ -150,30 +143,36 @@ else # filename. echo 'CC = $$(if $$(DEBIAN_KERNEL_USE_CCACHE),$$(CCACHE)) $$(word 1,$$(foreach dir,$(dir $(COMPILER)) $$(subst :, ,$$(PATH)),$$(wildcard $$(dir)/$$(CROSS_COMPILE)$(notdir $(COMPILER)))))' >> '$(DIR)/.kernelvariables' endif -# TODO: Should we set CROSS_COMPILE always? echo 'DEB_BUILD_ARCH ?= $$(shell dpkg --print-architecture)' >> '$(DIR)/.kernelvariables' - echo 'ifneq ($$(DEB_BUILD_ARCH),$(KERNEL_DEB_ARCH))' >> '$(DIR)/.kernelvariables' - echo 'override CROSS_COMPILE = $(KERNEL_GNU_TYPE)-' >> '$(DIR)/.kernelvariables' - echo 'endif' >> '$(DIR)/.kernelvariables' + echo 'override CROSS_COMPILE = $(CROSS_COMPILE)' >> '$(DIR)/.kernelvariables' ifdef KCFLAGS - echo 'KCFLAGS += $(KCFLAGS)' >> '$(DIR)/.kernelvariables' + echo 'override KCFLAGS += $(KCFLAGS)' >> '$(DIR)/.kernelvariables' endif -ifdef COMPAT_DEB_ARCH - echo 'ifneq ($$(DEB_BUILD_ARCH),$(COMPAT_DEB_ARCH))' >> '$(DIR)/.kernelvariables' +ifdef COMPAT_GNU_TYPE echo 'override CROSS_COMPILE_COMPAT = $(COMPAT_GNU_TYPE)-' >> '$(DIR)/.kernelvariables' echo 'override CROSS32_COMPILE = $(COMPAT_GNU_TYPE)-' >> '$(DIR)/.kernelvariables' - echo 'endif' >> '$(DIR)/.kernelvariables' endif echo 'DEBIAN_KERNEL_NO_CC_VERSION_CHECK = y' >> '$(DIR)/.kernelvariables' +$(MAKE_CLEAN) -C '$(SOURCE_DIR)' O='$(CURDIR)/$(DIR)' listnewconfig +yes "" | $(MAKE_CLEAN) -C '$(SOURCE_DIR)' O='$(CURDIR)/$(DIR)' oldconfig >/dev/null @$(stamp) +$(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR): SOURCE_DIR=$(BUILD_DIR)/source_$(FEATURESET) $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR): DIR=$(BUILD_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR) $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR) $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR): +$(MAKE_CLEAN) -C '$(DIR)' + + mkdir -p $(DIR)/tools/bpf/bpftool + +$(MAKE_CLEAN) -C '$(SOURCE_DIR)/tools/bpf/bpftool' O=$(DIR)/tools/bpf/bpftool CROSS_COMPILE= FEATURE_TESTS= FEATURE_DISPLAY= + + if grep -q CONFIG_DEBUG_INFO_BTF=y $(DIR)/.config; then \ + $(DIR)/tools/bpf/bpftool/bpftool btf dump file $(DIR)/vmlinux format c > $(DIR)/vmlinux.h; \ + else \ + echo '#error "Kernel build without CONFIG_DEBUG_INFO_BTF, no type info available"' > $(DIR)/vmlinux.h; \ + fi + debian/bin/buildcheck.py $(DIR) $(ARCH) $(FEATURESET) $(FLAVOUR) @$(stamp) @@ -233,8 +232,8 @@ define dh_binary_post dh_compress dh_fixperms dh_missing - dh_strip - dh_makeshlibs + dh_strip $(DH_STRIP_ARGS) -Xvmlinux -Xvmlinuz + dh_makeshlibs -Xvmlinux -Xvmlinuz dh_shlibdeps $(DH_SHLIBDEPS_ARGS) dh_installdeb if command -v dh_movetousr >/dev/null; then dh_movetousr; fi @@ -325,7 +324,7 @@ binary_headers: $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR) $(dh_binary_pre) mkdir -p $(DIR)/arch/$(KERNEL_ARCH)/kernel - cp -a $(SOURCE_DIR)/{.config,.kernel*,Module.symvers,include} $(DIR) + cp -a $(SOURCE_DIR)/{.config,.kernel*,Module.symvers,include,vmlinux.h} $(DIR) cp -a $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/include $(DIR)/arch/$(KERNEL_ARCH) find $(DIR) -name '*.cmd' -delete @@ -379,7 +378,6 @@ binary_support: PACKAGE_ROOT = /usr/share/$(PACKAGE_NAME) binary_support: $(dh_binary_pre) dh_installdirs $(PACKAGE_ROOT)/lib/python/debian_linux $(PACKAGE_ROOT)/modules - cp debian/config.defines.dump $(DESTDIR)$(PACKAGE_ROOT) cp -R debian/installer $(DESTDIR)$(PACKAGE_ROOT)/installer cp debian/lib/python/debian_linux/*.py $(DESTDIR)$(PACKAGE_ROOT)/lib/python/debian_linux dh_python3 @@ -390,6 +388,7 @@ setup_image: $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR) build_image: $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR) +binary_image: DH_STRIP_ARGS = --no-automatic-dbgsym binary_image: REAL_VERSION = $(ABINAME)$(LOCALVERSION) binary_image: INSTALL_DIR = $(DESTDIR)/boot binary_image: DIR = $(BUILD_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR) @@ -409,7 +408,6 @@ endif +$(MAKE_SELF) \ binary_image_bug \ DESTDIR='$(DESTDIR)' PACKAGE_NAME='$(PACKAGE_NAME)' REAL_VERSION='$(REAL_VERSION)' - dh_strip --no-automatic-dbgsym -Xvmlinux -Xvmlinuz $(dh_binary_post) binary_image_bug: -- cgit v1.2.3