summaryrefslogtreecommitdiffstats
path: root/debian/rules.real
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:59 +0000
commit27d3313807296c3943a96ceef8c2b7279cb56962 (patch)
tree7d08e78c36ab6437b403fc7cd8c23e41f135c7a3 /debian/rules.real
parentMerging upstream version 6.7.7. (diff)
downloadlinux-27d3313807296c3943a96ceef8c2b7279cb56962.tar.xz
linux-27d3313807296c3943a96ceef8c2b7279cb56962.zip
Adding debian version 6.7.7-1.debian/6.7.7-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules.real')
-rw-r--r--debian/rules.real40
1 files changed, 19 insertions, 21 deletions
diff --git a/debian/rules.real b/debian/rules.real
index 45f91261ad..40e7420e76 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -20,12 +20,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
@@ -128,8 +123,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)'
@@ -149,30 +142,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)
@@ -232,8 +231,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
@@ -324,7 +323,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
@@ -378,7 +377,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
@@ -389,6 +387,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)
@@ -408,7 +407,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: