diff --git a/debian/changelog b/debian/changelog index 4028aa1..6352c1b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +linux (6.15.8-1) sid; urgency=medium + + * New upstream stable update: + https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.15.8 + + -- Konstantin Demin Sat, 26 Jul 2025 12:31:39 +0300 + linux (6.15.7-1) sid; urgency=medium * New upstream stable update: diff --git a/debian/config/amd64/config.cloud b/debian/config/amd64/config.cloud index 8637db7..627f486 100644 --- a/debian/config/amd64/config.cloud +++ b/debian/config/amd64/config.cloud @@ -2359,7 +2359,6 @@ CONFIG_IP_VS_PROTO_AH_ESP=y CONFIG_KEXEC_CORE=y CONFIG_LZ4HC_COMPRESS=m CONFIG_LZ4_COMPRESS=m -# CONFIG_MDIO_BUS is not set CONFIG_MFD_CORE=m CONFIG_ND_BTT=m CONFIG_ND_PFN=m diff --git a/debian/config/amd64/config.mobile b/debian/config/amd64/config.mobile index 2ea4af7..e1f4465 100644 --- a/debian/config/amd64/config.mobile +++ b/debian/config/amd64/config.mobile @@ -8817,7 +8817,6 @@ CONFIG_MADERA_IRQ=m CONFIG_MAPPING_DIRTY_HELPERS=y CONFIG_MCTP_FLOWS=y CONFIG_MDIO=m -CONFIG_MDIO_BUS=m CONFIG_MDIO_BUS_MUX=m CONFIG_MDIO_CAVIUM=m CONFIG_MDIO_I2C=m diff --git a/debian/config/amd64/config.vm b/debian/config/amd64/config.vm index b874085..6ea673d 100644 --- a/debian/config/amd64/config.vm +++ b/debian/config/amd64/config.vm @@ -3956,7 +3956,6 @@ CONFIG_LZ4HC_COMPRESS=m CONFIG_LZ4_COMPRESS=m CONFIG_MAPPING_DIRTY_HELPERS=y CONFIG_MCTP_FLOWS=y -CONFIG_MDIO_BUS=m CONFIG_MFD_CORE=m CONFIG_MOUSE_PS2_SMBUS=y CONFIG_ND_BTT=m diff --git a/debian/config/config b/debian/config/config index 95a68ee..7ad4b79 100644 --- a/debian/config/config +++ b/debian/config/config @@ -4081,6 +4081,7 @@ CONFIG_LRU_GEN_WALKS_MMU=y CONFIG_LZ4_DECOMPRESS=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y +CONFIG_MDIO_BUS=m CONFIG_MDIO_DEVRES=m CONFIG_MEMORY_BALLOON=y CONFIG_MEMORY_ISOLATION=y diff --git a/debian/rules.d/Makefile.inc b/debian/rules.d/Makefile.inc index 67dbc3e..27bbda2 100644 --- a/debian/rules.d/Makefile.inc +++ b/debian/rules.d/Makefile.inc @@ -5,60 +5,108 @@ VPATH = $(top_rulesdir)/$(OUTDIR) $(top_srcdir)/$(OUTDIR) SHELL = /bin/sh -e +srcdir := $(top_srcdir)/$(OUTDIR) +objdir := $(CURDIR) + CC = $(CROSS_COMPILE)gcc CXX = $(CROSS_COMPILE)g++ PKG_CONFIG = $(CROSS_COMPILE)pkg-config CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \ - -I$(top_srcdir)/$(OUTDIR) \ - -I$(top_srcdir)/debian/build/build-tools/$(OUTDIR) \ - -I$(top_srcdir)/scripts/include \ - -isystem $(top_srcdir)/debian/build/build-tools/include + -I$(srcdir) \ + -I$(top_srcdir)/debian/build/build-tools/$(OUTDIR) \ + -I$(top_srcdir)/scripts/include \ + -isystem $(top_srcdir)/debian/build/build-tools/include CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) installdir ?= $(prefix)/$(OUTDIR) all: all-local all-recursive -clean: clean-recursive install: install-local install-recursive %-recursive: - +@list='$(SUBDIRS)' ; \ - for i in $$list ; do \ - echo "Making $* in $$i" ; \ - mkdir -p "$$i" ; \ - $(MAKE) -C "$$i" \ - -f $(top_rulesdir)/$(OUTDIR)/$$i/Makefile \ - OUTDIR=$(OUTDIR)/$$i \ - $* ; \ + +@list='$(SUBDIRS)'; \ + for subdir in $$list; do \ + echo "Making $* in $$subdir"; \ + mkdir -p $$subdir; \ + $(MAKE) -C $$subdir -f $(top_rulesdir)/$(OUTDIR)/$$subdir/Makefile OUTDIR=$(OUTDIR)/$$subdir $*; \ done -all-local: $(PROGS) +all-local: $(PROGS) $(KBUILD_PROGS) install-local: install-local-progs install-local-scripts install-local-data -install-local-progs: $(PROGS) - @for p in $^ ; do \ - echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'" ; \ - install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename "$$p")" ; \ +install-local-progs: $(PROGS) $(KBUILD_PROGS) + @for p in $^; do \ + echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \ + install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \ done -SCRIPTS_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS))) +SCRIPTS_REAL = $(wildcard $(addprefix $(srcdir)/,$(SCRIPTS))) install-local-scripts: $(SCRIPTS_REAL) - @for p in $^ ; do \ - echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'" ; \ - install -D -m755 \ - -s --strip-program $(top_srcdir)/debian/bin/fix-shebang \ - "$$p" "$(DESTDIR)/$(installdir)/$$(basename "$$p")" ; \ + @for p in $^; do \ + echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \ + install -D -m755 \ + -s --strip-program $(top_srcdir)/debian/bin/fix-shebang \ + "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \ done -DATA_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA))) +DATA_REAL = $(wildcard $(addprefix $(srcdir)/,$(DATA))) install-local-data: $(DATA_REAL) - @for p in $^ ; do \ - echo " install -m644 '$$p' '$(DESTDIR)/$(installdir)'" ; \ - install -D -m644 "$$p" "$(DESTDIR)/$(installdir)/$$(basename "$$p")" ; \ + @for p in $^; do \ + echo " install -m644 '$$p' '$(DESTDIR)/$(installdir)'"; \ + install -D -m644 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \ done +# Invoke upstream makefile with common required variables, not +# including architecture and toolchain options +MAKE_UPSTREAM_BASE = +$(MAKE_UPSTREAM_ENV) $(MAKE) -C $(srcdir) \ + prefix=/usr \ + bindir=$(or $(bindir),/usr/bin) \ + libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ + mandir=/usr/share/man \ + DESTDIR=$(DESTDIR) \ + O=$(objdir) \ + STRIP=true \ + V=1 + +# Invoke upstream makefile with common required variables +MAKE_UPSTREAM = $(MAKE_UPSTREAM_BASE) \ + ARCH=$(KERNEL_ARCH) \ + CC='$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)' \ + CXX='$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)' \ + LD=$(CROSS_COMPILE)ld \ + PKG_CONFIG='$(PKG_CONFIG)' + +MAKE_UPSTREAM_FORCE_CROSS_VARS = \ + HOSTARCH=$(KERNEL_ARCH) \ + HOSTAR=$(CROSS_COMPILE)ar \ + HOSTCC='$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)' \ + HOSTLD=$(CROSS_COMPILE)ld \ + HOSTPKG_CONFIG=$(CROSS_COMPILE)pkg-config \ + REALHOSTCC=gcc \ + REALHOSTLD=ld + +# Invoke upstream makefile with common required variables, forcing +# cross-build of a tool that expects to always be native +MAKE_UPSTREAM_FORCE_CROSS = $(MAKE_UPSTREAM_BASE) \ + $(MAKE_UPSTREAM_FORCE_CROSS_VARS) + +ifdef KBUILD_PROGS +# Invoke Kbuild for this directory, forcing cross-build of hostprogs +$(KBUILD_PROGS): + +$(MAKE) -C $(top_srcdir)/debian/build/build-tools \ + -f $(top_srcdir)/scripts/Makefile.build \ + srcroot=$(top_srcdir) \ + srctree=$(top_srcdir) \ + VPATH=$(top_srcdir) \ + building_out_of_srctree=1 \ + objtree=$(top_srcdir)/debian/build/build-tools \ + obj=$(OUTDIR) \ + KBUILD_VERBOSE=1 \ + $(MAKE_UPSTREAM_FORCE_CROSS_VARS) \ + $(addprefix $(OUTDIR)/,$@) +endif diff --git a/debian/rules.d/certs/Makefile b/debian/rules.d/certs/Makefile index 12f01ef..2684736 100644 --- a/debian/rules.d/certs/Makefile +++ b/debian/rules.d/certs/Makefile @@ -1,7 +1,4 @@ -PROGS = \ +KBUILD_PROGS = \ extract-cert include $(top_rulesdir)/Makefile.inc - -CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I$(top_srcdir)/scripts -extract-cert: LDLIBS += -lcrypto diff --git a/debian/rules.d/scripts/basic/Makefile b/debian/rules.d/scripts/basic/Makefile index 127f53f..a69d497 100644 --- a/debian/rules.d/scripts/basic/Makefile +++ b/debian/rules.d/scripts/basic/Makefile @@ -1,4 +1,11 @@ PROGS = \ - fixdep + fixdep.host include $(top_rulesdir)/Makefile.inc + +# We build fixdep as fixdep.host to avoid overwriting the native build +# that Kbuild depends on +fixdep.host: fixdep.c + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< +install-local-progs: + install -D -m755 fixdep.host $(DESTDIR)/$(installdir)/fixdep diff --git a/debian/rules.d/scripts/genksyms/Makefile b/debian/rules.d/scripts/genksyms/Makefile index 8852456..e080ac8 100644 --- a/debian/rules.d/scripts/genksyms/Makefile +++ b/debian/rules.d/scripts/genksyms/Makefile @@ -1,16 +1,3 @@ -PROGS = genksyms +KBUILD_PROGS = genksyms include $(top_rulesdir)/Makefile.inc - -genksyms: genksyms.o parse.tab.o lex.lex.o - -lex.lex.o: keywords.c parse.tab.h - -parse.tab.c: parse.y - $(YACC) -o$@ -t -l $< - -parse.tab.h: parse.y - $(YACC) -o/dev/null --defines=$@ -t -l $< - -lex.lex.c: lex.l - $(LEX) -o$@ -L $< diff --git a/debian/rules.d/scripts/kconfig/Makefile b/debian/rules.d/scripts/kconfig/Makefile index c9ad2aa..cd3e66f 100644 --- a/debian/rules.d/scripts/kconfig/Makefile +++ b/debian/rules.d/scripts/kconfig/Makefile @@ -1,16 +1,3 @@ -PROGS = conf +KBUILD_PROGS = conf include $(top_rulesdir)/Makefile.inc - -conf: conf.o confdata.o expr.o lexer.lex.o menu.o parser.tab.o preprocess.o symbol.o util.o - -lexer.lex.o: parser.tab.h - -%.lex.c: %.l - flex -o$@ -L $< - -%.tab.c: %.y - bison -o$@ -t -l $< - -%.tab.h: %.y - bison -o/dev/null --defines=$@ -t -l $< diff --git a/debian/rules.d/scripts/mod/Makefile b/debian/rules.d/scripts/mod/Makefile index 6ebade2..dc8c950 100644 --- a/debian/rules.d/scripts/mod/Makefile +++ b/debian/rules.d/scripts/mod/Makefile @@ -10,12 +10,12 @@ include $(top_rulesdir)/Makefile.inc wrapperdir = $(top_rulesdir)/$(OUTDIR) modpost.real-%: - $(MAKE) -f $(wrapperdir)/Makefile.real TYPE=$* SOURCEDIR=$(top_srcdir)/scripts/mod + $(MAKE) -f $(wrapperdir)/Makefile.real TYPE=$* SOURCEDIR=$(srcdir) %: %.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -modpost-opts.h: $(top_srcdir)/scripts/mod/modpost.c +modpost-opts.h: $(srcdir)/modpost.c $(wrapperdir)/gendef.py $< > $@ modpost.o: modpost.c modpost-opts.h diff --git a/debian/rules.d/tools/bootconfig/Makefile b/debian/rules.d/tools/bootconfig/Makefile index 76a9aa5..b89d242 100644 --- a/debian/rules.d/tools/bootconfig/Makefile +++ b/debian/rules.d/tools/bootconfig/Makefile @@ -1,11 +1,5 @@ include $(top_rulesdir)/Makefile.inc -# bootconfig does not support appending user CFLAGS or LDFLAGS, -# so we have to specify the include directory too. -MAKE_BOOTCONFIG := $(MAKE) -C $(top_srcdir)/tools/bootconfig \ - O=$(CURDIR) \ - CFLAGS='$(CFLAGS) $(CPPFLAGS) -Iinclude $(LDFLAGS)' - # Default target (all) includes running tests. If this is not wanted # (e.g. for cross-builds), build the bootconfig target instead. ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) @@ -15,8 +9,8 @@ BUILD_TARGET := $(CURDIR)/bootconfig endif all: - $(MAKE_BOOTCONFIG) $(BUILD_TARGET) + $(MAKE_UPSTREAM) $(BUILD_TARGET) install: mkdir -p $(DESTDIR)/usr/bin - $(MAKE_BOOTCONFIG) install + $(MAKE_UPSTREAM) install diff --git a/debian/rules.d/tools/bpf/bpftool/Makefile b/debian/rules.d/tools/bpf/bpftool/Makefile index 02a5979..2afcdba 100644 --- a/debian/rules.d/tools/bpf/bpftool/Makefile +++ b/debian/rules.d/tools/bpf/bpftool/Makefile @@ -1,23 +1,15 @@ include $(top_rulesdir)/Makefile.inc -MAKE_BPFTOOL := +$(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) -MAKE_BPFTOOL += prefix=/usr -MAKE_BPFTOOL += mandir=/usr/share/man -MAKE_BPFTOOL += V=1 -MAKE_BPFTOOL += ARCH=$(KERNEL_ARCH) -MAKE_BPFTOOL += EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' -MAKE_BPFTOOL += EXTRA_LDFLAGS='$(LDFLAGS)' - # dynamically linking with libbfd is not allowed in Debian -MAKE_BPFTOOL += feature-libbfd=0 feature-libbfd-liberty=0 feature-libbfd-liberty-z=0 +MAKE_UPSTREAM += feature-libbfd=0 feature-libbfd-liberty=0 feature-libbfd-liberty-z=0 all: - $(MAKE_BPFTOOL) - $(MAKE_BPFTOOL) doc + $(MAKE_UPSTREAM) + $(MAKE_UPSTREAM) doc # Check that bpftool wasn't linked with libbfd type ldd ! ldd $(CURDIR)/bpftool | grep -E '\blibbfd' install: - $(MAKE_BPFTOOL) install - $(MAKE_BPFTOOL) doc-install + $(MAKE_UPSTREAM) install + $(MAKE_UPSTREAM) doc-install diff --git a/debian/rules.d/tools/bpf/resolve_btfids/Makefile b/debian/rules.d/tools/bpf/resolve_btfids/Makefile index ee2c070..26e7aad 100644 --- a/debian/rules.d/tools/bpf/resolve_btfids/Makefile +++ b/debian/rules.d/tools/bpf/resolve_btfids/Makefile @@ -3,14 +3,4 @@ PROGS = resolve_btfids include $(top_rulesdir)/Makefile.inc resolve_btfids: -# resolve_btfids always uses HOSTCC, HOSTLD, and HOSTAR; we need to -# override these on the command line to make cross-builds work. But -# it also builds fixdep which still needs to be native in a -# cross-build. Set REALHOSTCC and REALHOSTLD variables which will be -# used for fixdep. - $(MAKE) -C $(top_srcdir)/tools/bpf/resolve_btfids O=$(CURDIR) \ - HOSTCC=$(CC) HOSTCFLAGS='$(CFLAGS) $(CPPFLAGS)' \ - HOSTLD=$(CROSS_COMPILE)ld KBUILD_HOSTLDFLAGS='$(LDFLAGS)' \ - HOSTAR=$(CROSS_COMPILE)ar \ - REALHOSTCC=gcc REALHOSTLD=ld \ - V=1 + $(MAKE_UPSTREAM_FORCE_CROSS) diff --git a/debian/rules.d/tools/objtool/Makefile b/debian/rules.d/tools/objtool/Makefile index 6b48701..c25bf49 100644 --- a/debian/rules.d/tools/objtool/Makefile +++ b/debian/rules.d/tools/objtool/Makefile @@ -5,24 +5,10 @@ PROGS = \ include $(top_rulesdir)/Makefile.inc +objtool.real-%: objdir = $(CURDIR)/$* objtool.real-%: mkdir -p $* -# objtool always uses HOSTCC, HOSTLD, and HOSTAR; we need to override -# these on the command line to make cross-builds work. But it also -# builds fixdep which still needs to be native in a cross-build. Set -# REALHOSTCC and REALHOSTLD variables which will be used for fixdep. - $(MAKE) -C $(top_srcdir)/tools/objtool \ - O=$(CURDIR)/$* \ - HOSTARCH=$(KERNEL_ARCH) \ - ARCH=$* \ - HOSTCC=$(CC) \ - KBUILD_HOSTCFLAGS='$(CFLAGS) $(CPPFLAGS)' \ - HOSTLD=$(CROSS_COMPILE)ld \ - KBUILD_HOSTLDFLAGS='$(LDFLAGS)' \ - HOSTAR=$(CROSS_COMPILE)ar \ - REALHOSTCC=gcc \ - REALHOSTLD=ld \ - V=1 + $(MAKE_UPSTREAM_FORCE_CROSS) ARCH=$* ln -f $*/objtool $@ %: %.o diff --git a/debian/rules.d/tools/perf/Makefile b/debian/rules.d/tools/perf/Makefile index 6c36936..181378d 100644 --- a/debian/rules.d/tools/perf/Makefile +++ b/debian/rules.d/tools/perf/Makefile @@ -7,60 +7,57 @@ ifneq ($(filter -ffile-prefix-map=%,$(CFLAGS)),) CFLAGS += -fdebug-prefix-map=$(DEB_BUILD_PATH)=. endif -MAKE_PERF := $(MAKE) O=$(CURDIR) prefix=/usr V=1 VF=1 ARCH=$(KERNEL_ARCH) WERROR=0 EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' EXTRA_CXXFLAGS='$(CXXFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' +MAKE_UPSTREAM += VF=1 WERROR=0 # Disable Gtk UI until it's more usable -MAKE_PERF += NO_GTK2=1 +MAKE_UPSTREAM += NO_GTK2=1 # Do not build the unversioned jvmti library -MAKE_PERF += feature-jvmti=0 +MAKE_UPSTREAM += feature-jvmti=0 -MAKE_PERF += perfexecdir=lib/perf-core plugindir=/usr/lib/traceevent/plugins tipdir=share/doc/linux-perf perf_include_dir=include/perf perf_examples_dir=share/doc/linux-perf/examples +MAKE_UPSTREAM += perfexecdir=lib/perf-core plugindir=/usr/lib/traceevent/plugins tipdir=share/doc/linux-perf perf_include_dir=include/perf perf_examples_dir=share/doc/linux-perf/examples # perf can link against libcrypto if available, but the result is # undistributable as GPL v2 and Apache 2.0 are not compatible without # an explicit exception. Override detection of libcrypto. -MAKE_PERF += NO_LIBCRYPTO=1 +MAKE_UPSTREAM += NO_LIBCRYPTO=1 # perf only links against libopencsd (coresight) if specifically enabled -MAKE_PERF += CORESIGHT=1 +MAKE_UPSTREAM += CORESIGHT=1 # Currently babeltrace support for `perf data' is not automatically detected. -MAKE_PERF += LIBBABELTRACE=1 +MAKE_UPSTREAM += LIBBABELTRACE=1 # Build with asciidoctor, not asciidoc -MAKE_PERF += USE_ASCIIDOCTOR=1 +MAKE_UPSTREAM += USE_ASCIIDOCTOR=1 # Build with Python 3, not Python 2 -MAKE_PERF += PYTHON=/usr/bin/python3 +MAKE_UPSTREAM += PYTHON=/usr/bin/python3 # Ensure the right options are picked up for libperl and libpython export PERL5LIB=/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config -MAKE_PERF += PYTHON_CONFIG=$(CROSS_COMPILE)python3-config +MAKE_UPSTREAM += PYTHON_CONFIG=$(CROSS_COMPILE)python3-config # Explicitly set DEBUG=0. This is the default for perf itself, but # it's not passed down to libapi and it uses the wrong compiler # options unless it's explicitly set. -MAKE_PERF += DEBUG=0 +MAKE_UPSTREAM += DEBUG=0 all: -# perf changes some default directories depending on whether DESTDIR is -# set. We must define it even when building to avoid a rebuild when we -# run 'make install'. - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf all DESTDIR=dummy - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation man + $(MAKE_UPSTREAM) -f Makefile.perf all + $(MAKE_UPSTREAM) -C $(srcdir)/Documentation man # Check that perf didn't get linked against incompatibly-licensed libraries - @if readelf -d $(CURDIR)/perf | sed -rne 's/.*NEEDED.*\[(.*)\]/\1/p' | grep -E '\blib(bfd|crypto)' ; then \ - echo ; \ - echo 'perf linked against incompatibly-licensed libraries' ; \ - echo ; \ - exit 1 ; \ + @if readelf -d $(CURDIR)/perf | sed -rne 's/.*NEEDED.*\[(.*)\]/\1/p' | grep -E '\blib(bfd|crypto)'; then \ + echo; \ + echo 'perf linked against incompatibly-licensed libraries'; \ + echo; \ + exit 1; \ fi # Check that it links against abi::__cxa_demangle from libstdc++ grep __cxa_demangle $(CURDIR)/perf install: - +$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf install install-python_ext + $(MAKE_UPSTREAM) -f Makefile.perf install install-python_ext # Don't install a 'trace' alias yet: # - We need a wrapper for it anyway, so there's little point adding a # versioned link @@ -70,5 +67,5 @@ install: rm -f $(DESTDIR)/usr/bin/trace mkdir -p $(DESTDIR)/usr/share/bash-completion/ mv $(DESTDIR)/etc/bash_completion.d \ - $(DESTDIR)/usr/share/bash-completion/completions + $(DESTDIR)/usr/share/bash-completion/completions rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc diff --git a/debian/rules.d/tools/power/cpupower/Makefile b/debian/rules.d/tools/power/cpupower/Makefile index 635ba0e..2432352 100644 --- a/debian/rules.d/tools/power/cpupower/Makefile +++ b/debian/rules.d/tools/power/cpupower/Makefile @@ -1,21 +1,11 @@ include $(top_rulesdir)/Makefile.inc -MAKE_CPUPOWER := CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) CPUFREQ_BENCH=false V=true mandir=/usr/share/man - -MAKE_CPUPOWER += DEBUG=$(if $(filter noopt,$(DEB_BUILD_OPTIONS)),true,) - -# Don't strip binaries here; let dh_strip determine what to do -MAKE_CPUPOWER += STRIP=true - -MAKE_CPUPOWER += CROSS='$(CROSS_COMPILE)' - -MAKE_CPUPOWER += libdir=/usr/lib/$(DEB_HOST_MULTIARCH) +MAKE_UPSTREAM += CPUFREQ_BENCH=false V=true +MAKE_UPSTREAM += DEBUG=$(if $(filter noopt,$(DEB_BUILD_OPTIONS)),true,) +MAKE_UPSTREAM += CROSS='$(CROSS_COMPILE)' all: - +$(MAKE_CPUPOWER) + $(MAKE_UPSTREAM) install: - +$(MAKE_CPUPOWER) install DESTDIR=$(DESTDIR) - -clean: - +$(MAKE_CPUPOWER) clean + $(MAKE_UPSTREAM) install diff --git a/debian/rules.d/tools/power/x86/intel-speed-select/Makefile b/debian/rules.d/tools/power/x86/intel-speed-select/Makefile index b1fab39..324ebb6 100644 --- a/debian/rules.d/tools/power/x86/intel-speed-select/Makefile +++ b/debian/rules.d/tools/power/x86/intel-speed-select/Makefile @@ -1,15 +1,9 @@ include $(top_rulesdir)/Makefile.inc -# Intel Speed Select Tool (ISST) -MAKE_ISST := CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) -C $(top_srcdir)/tools/power/x86/intel-speed-select O=$(CURDIR) - -MAKE_ISST += bindir=/usr/sbin V=1 +bindir := /usr/sbin all: - $(MAKE_ISST) + $(MAKE_UPSTREAM) install: - $(MAKE_ISST) install DESTDIR=$(DESTDIR) - -clean: - $(MAKE_ISST) clean + $(MAKE_UPSTREAM) install diff --git a/debian/rules.d/tools/power/x86/turbostat/Makefile b/debian/rules.d/tools/power/x86/turbostat/Makefile index 005e14a..dfa2039 100644 --- a/debian/rules.d/tools/power/x86/turbostat/Makefile +++ b/debian/rules.d/tools/power/x86/turbostat/Makefile @@ -4,9 +4,5 @@ installdir = /usr/sbin include $(top_rulesdir)/Makefile.inc -CPPFLAGS += -I$(top_srcdir)/tools/include -CPPFLAGS += -DMSRHEADER='"$(top_srcdir)/arch/x86/include/asm/msr-index.h"' -CPPFLAGS += -DINTEL_FAMILY_HEADER='"$(top_srcdir)/arch/x86/include/asm/intel-family.h"' -CPPFLAGS += -DBUILD_BUG_HEADER='"$(top_srcdir)/include/linux/build_bug.h"' - -LDLIBS += -lcap -lrt +$(PROGS): + $(MAKE_UPSTREAM) diff --git a/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile b/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile index e8f4471..ecdfe72 100644 --- a/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile +++ b/debian/rules.d/tools/power/x86/x86_energy_perf_policy/Makefile @@ -4,5 +4,5 @@ installdir = /usr/sbin include $(top_rulesdir)/Makefile.inc -CPPFLAGS += -I$(top_srcdir)/tools/include -CPPFLAGS += -DMSRHEADER='"$(top_srcdir)/arch/x86/include/asm/msr-index.h"' +$(PROGS): + $(MAKE_UPSTREAM) diff --git a/debian/rules.d/tools/thermal/Makefile b/debian/rules.d/tools/thermal/Makefile index 97208da..658e5d1 100644 --- a/debian/rules.d/tools/thermal/Makefile +++ b/debian/rules.d/tools/thermal/Makefile @@ -1,43 +1,3 @@ -srcdir := $(top_srcdir)/tools/thermal +SUBDIRS := lib thermometer tmon include $(top_rulesdir)/Makefile.inc - -MAKE_THERMAL_LIB = $(MAKE) -C $(srcdir)/lib \ - O=$(CURDIR)/lib \ - EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' \ - LDFLAGS='$(LDFLAGS)' \ - SRCARCH=$(ARCH) \ - V=1 - -# thermometer does not support OOT build, so we copy the -# source before building. -# thermometer does not support appending user CFLAGS or LDFLAGS, -# so we have to specify the include directory and libraries too. -# Use the static libthermal_tools so we don't have to support it -# as a shared library. -MAKE_THERMOMETER = $(MAKE) -C thermometer \ - CC='$(CC)' CFLAGS='$(CFLAGS) $(CPPFLAGS) -I$(srcdir)/lib' \ - LD='$(CROSS_COMPILE)-ld' LDFLAGS='$(LDFLAGS) $(CURDIR)/lib/libthermal_tools.a -lconfig' - -# tmon does not support OOT build, so we copy the source before -# building. Use the make -I option to allow it to include other -# Makefiles in the source tree. -# tmon expects us to set INSTALL_ROOT instead of DESTDIR (?!). -MAKE_TMON = $(MAKE) -C tmon -I $(srcdir)/tmon \ - INSTALL_ROOT=$(DESTDIR) \ - CC='$(CC)' CFLAGS='$(CFLAGS) $(CPPFLAGS)' \ - LDFLAGS='$(LDFLAGS)' - -all: - mkdir -p lib - rsync -a $(srcdir)/thermometer $(srcdir)/tmon . -# We do not want a shared library, and the shared library link does -# not include LDFLAGS so blhc will complain about it - $(MAKE_THERMAL_LIB) fixdep - $(MAKE_THERMAL_LIB) $(CURDIR)/lib/libthermal_tools.a - $(MAKE_THERMOMETER) - $(MAKE_TMON) - -install: - install -D -m755 thermometer/thermometer $(DESTDIR)/usr/bin/ - $(MAKE_TMON) install diff --git a/debian/rules.d/tools/thermal/lib/Makefile b/debian/rules.d/tools/thermal/lib/Makefile new file mode 100644 index 0000000..d9cba89 --- /dev/null +++ b/debian/rules.d/tools/thermal/lib/Makefile @@ -0,0 +1,7 @@ +include $(top_rulesdir)/Makefile.inc + +all: +# We do not want a shared library, and the shared library link does +# not include LDFLAGS so blhc will complain about it + $(MAKE_UPSTREAM) fixdep + $(MAKE_UPSTREAM) $(objdir)/libthermal_tools.a diff --git a/debian/rules.d/tools/thermal/thermometer/Makefile b/debian/rules.d/tools/thermal/thermometer/Makefile new file mode 100644 index 0000000..d99fb83 --- /dev/null +++ b/debian/rules.d/tools/thermal/thermometer/Makefile @@ -0,0 +1,15 @@ +PROGS = thermometer + +installdir = /usr/bin + +include $(top_rulesdir)/Makefile.inc + +# thermometer does not support OOT build, so we copy the +# source before building. +real_srcdir := $(srcdir) +srcdir := $(objdir) +CPPFLAGS += -I$(real_srcdir)/../lib +LDFLAGS += -L$(objdir)/../lib +$(PROGS): + rsync -a $(real_srcdir)/ . + $(MAKE_UPSTREAM) diff --git a/debian/rules.d/tools/thermal/tmon/Makefile b/debian/rules.d/tools/thermal/tmon/Makefile new file mode 100644 index 0000000..62cba21 --- /dev/null +++ b/debian/rules.d/tools/thermal/tmon/Makefile @@ -0,0 +1,16 @@ +PROGS = tmon + +installdir = /usr/bin + +include $(top_rulesdir)/Makefile.inc + +# tmon does not support OOT build, so we copy the source before +# building. Use the make -I option to allow it to include other +# Makefiles in the source tree. +# tmon expects us to set INSTALL_ROOT instead of DESTDIR (?!). +real_srcdir := $(srcdir) +srcdir := $(objdir) +MAKE_UPSTREAM += -I $(real_srcdir) INSTALL_ROOT=$(DESTDIR) +$(PROGS): + rsync -a $(real_srcdir)/ . + $(MAKE_UPSTREAM) diff --git a/debian/rules.d/tools/tracing/rtla/Makefile b/debian/rules.d/tools/tracing/rtla/Makefile index dd7d8e8..2565f19 100644 --- a/debian/rules.d/tools/tracing/rtla/Makefile +++ b/debian/rules.d/tools/tracing/rtla/Makefile @@ -1,23 +1,17 @@ include $(top_rulesdir)/Makefile.inc -# Upstream enables LTO by default, but we don't want it -CFLAGS += -fno-lto +# Upstream enables LTO by default, but we don't want it. We need to +# put -fno-lto in the CFLAGS *environment* variable so it comes after +# the -flto option but does not override other necessary options +# appended to CFLAGS by upstream. +MAKE_UPSTREAM_ENV = CFLAGS=-fno-lto # Use the version of libcpupower that we just built CPPFLAGS += -I$(top_srcdir)/tools/power/cpupower/lib LDFLAGS += -L$(CURDIR)/../../power/cpupower -MAKE_RTLA := +CFLAGS='$(CFLAGS) $(CPPFLAGS)' EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) -C $(top_srcdir)/$(OUTDIR) O=$(CURDIR) -MAKE_RTLA += LD='$(CROSS_COMPILE)ld' -MAKE_RTLA += PKG_CONFIG='$(PKG_CONFIG)' -MAKE_RTLA += STRIP=true -MAKE_RTLA += V=1 - all: - $(MAKE_RTLA) + $(MAKE_UPSTREAM) install: - $(MAKE_RTLA) install - -clean: - rm -rf * + $(MAKE_UPSTREAM) install diff --git a/debian/rules.d/tools/usb/usbip/Makefile b/debian/rules.d/tools/usb/usbip/Makefile index 2933d92..a304645 100644 --- a/debian/rules.d/tools/usb/usbip/Makefile +++ b/debian/rules.d/tools/usb/usbip/Makefile @@ -7,22 +7,19 @@ unexport MAKEFLAGS all: export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) all: export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \ - -isystem $(top_srcdir)/debian/build/build-tools/include + -isystem $(top_srcdir)/debian/build/build-tools/include all: export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) all: rsync -a $(srcdir)/ . ./autogen.sh ./configure \ - --prefix=/usr \ - --with-tcp-wrappers \ - --with-usbids-dir=/usr/share/misc \ - --disable-shared \ - --disable-static \ - --host=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + --prefix=/usr \ + --with-tcp-wrappers \ + --with-usbids-dir=/usr/share/misc \ + --disable-shared \ + --disable-static \ + --host=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) $(MAKE) V=1 install: $(MAKE) V=1 install - -clean: - rm -rf * diff --git a/debian/rules.real b/debian/rules.real index f3ad273..9478ac9 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -419,17 +419,20 @@ define make-tools KERNEL_ARCH=$(KERNEL_ARCH) endef -$(STAMPS_DIR)/build-tools-headers: BUILD_DIR_TOOLS = $(BUILD_DIR)/build-tools -$(STAMPS_DIR)/build-tools-headers: +$(STAMPS_DIR)/prepare-build-tools: BUILD_DIR_TOOLS = $(BUILD_DIR)/build-tools +$(STAMPS_DIR)/prepare-build-tools: mkdir -p $(BUILD_DIR_TOOLS)/headers-tools $(MAKE) \ ARCH=$(KERNEL_ARCH) \ O=$(BUILD_DIR_TOOLS)/headers-tools \ INSTALL_HDR_PATH=$(CURDIR)/$(BUILD_DIR_TOOLS) \ headers_install + mkdir -p $(BUILD_DIR)/build-tools/scripts/basic + ln -f $(BUILD_DIR)/build-tools/headers-tools/scripts/basic/fixdep \ + $(BUILD_DIR)/build-tools/scripts/basic/fixdep @$(stamp) -build_bpftool: $(STAMPS_DIR)/build-tools-headers +build_bpftool: $(STAMPS_DIR)/prepare-build-tools $(call make-tools,tools/bpf/bpftool) binary_bpftool: BPFTOOL_VERSION_MAJOR = $(shell sed -ne 's,^#define LIBBPF_MAJOR_VERSION \(.*\)$$,\1,p' tools/lib/bpf/libbpf_version.h) @@ -442,7 +445,7 @@ binary_bpftool: build_bpftool $(call make-tools,tools/bpf/bpftool) install $(dh_binary_post) -build_kbuild: $(STAMPS_DIR)/build-tools-headers +build_kbuild: $(STAMPS_DIR)/prepare-build-tools $(call make-tools,certs) $(call make-tools,scripts) $(call make-tools,tools/bpf/resolve_btfids) @@ -459,7 +462,7 @@ binary_kbuild: build_kbuild $(dh_binary_post) build_cpupower: $(STAMPS_DIR)/build-cpupower -$(STAMPS_DIR)/build-cpupower: $(STAMPS_DIR)/build-tools-headers +$(STAMPS_DIR)/build-cpupower: $(STAMPS_DIR)/prepare-build-tools $(call make-tools,tools/power/cpupower) ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),) $(call make-tools,tools/power/x86) @@ -490,7 +493,7 @@ endif binary_perf build_perf: export _PYTHON_SYSCONFIGDATA_NAME = _sysconfigdata__$(DEB_HOST_MULTIARCH) -build_perf: $(STAMPS_DIR)/build-tools-headers +build_perf: $(STAMPS_DIR)/prepare-build-tools $(call make-tools,tools/perf) binary_perf: DH_COMPRESS_ARGS = -Xtips.txt @@ -504,7 +507,7 @@ binary_perf: build_perf dh_python3 /usr/lib/perf-core/scripts/python/Perf-Trace-Util/lib/ $(dh_binary_post) -build_usbip: $(STAMPS_DIR)/build-tools-headers +build_usbip: $(STAMPS_DIR)/prepare-build-tools $(call make-tools,tools/usb/usbip) binary_usbip: DIR = $(CURDIR)/debian/usbip-tmp @@ -516,7 +519,7 @@ binary_usbip: build_usbip $(call make-tools,tools/usb/usbip) install DESTDIR=$(DIR) $(dh_binary_post) -build_hyperv-daemons: $(STAMPS_DIR)/build-tools-headers +build_hyperv-daemons: $(STAMPS_DIR)/prepare-build-tools $(call make-tools,tools/hv) binary_hyperv-daemons: build_hyperv-daemons @@ -530,7 +533,7 @@ binary_hyperv-daemons: build_hyperv-daemons done $(dh_binary_post) -build_rtla: $(STAMPS_DIR)/build-tools-headers $(STAMPS_DIR)/build-cpupower +build_rtla: $(STAMPS_DIR)/prepare-build-tools $(STAMPS_DIR)/build-cpupower $(call make-tools,tools/tracing/rtla) binary_rtla: build_rtla @@ -538,7 +541,7 @@ binary_rtla: build_rtla $(call make-tools,tools/tracing/rtla) install $(dh_binary_post) -build_sdsi: $(STAMPS_DIR)/build-tools-headers +build_sdsi: $(STAMPS_DIR)/prepare-build-tools $(call make-tools,tools/arch/x86/intel_sdsi) binary_sdsi: build_sdsi @@ -546,7 +549,7 @@ binary_sdsi: build_sdsi $(call make-tools,tools/arch/x86/intel_sdsi) install $(dh_binary_post) -build_misc-tools: $(STAMPS_DIR)/build-tools-headers +build_misc-tools: $(STAMPS_DIR)/prepare-build-tools $(call make-tools,tools/bootconfig) $(call make-tools,tools/firmware) $(call make-tools,tools/thermal)