History

Merge tag 'kbuild-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild updates from Masahiro Yamada: - Add new kconfig target 'make mod2noconfig', which will be useful to speed up the build and test iteration. - Raise the minimum supported version of LLVM to 11.0.0 - Refactor certs/Makefile - Change the format of include/config/auto.conf to stop double-quoting string type CONFIG options. - Fix ARCH=sh builds in dash - Separate compression macros for general purposes (cmd_bzip2 etc.) and the ones for decompressors (cmd_bzip2_with_size etc.) - Misc Makefile cleanups * tag 'kbuild-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits) kbuild: add cmd_file_size arch: decompressor: remove useless vmlinux.bin.all-y kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22} kbuild: drop $(size_append) from cmd_zstd sh: rename suffix-y to suffix_y doc: kbuild: fix default in `imply` table microblaze: use built-in function to get CPU_{MAJOR,MINOR,REV} certs: move scripts/extract-cert to certs/ kbuild: do not quote string values in include/config/auto.conf kbuild: do not include include/config/auto.conf from shell scripts certs: simplify $(srctree)/ handling and remove config_filename macro kbuild: stop using config_filename in scripts/Makefile.modsign certs: remove misleading comments about GCC PR certs: refactor file cleaning certs: remove unneeded -I$(srctree) option for system_certificates.o certs: unify duplicated cmd_extract_certs and improve the log certs: use $< and $@ to simplify the key generation rule kbuild: remove headers_check stub kbuild: move headers_check.pl to usr/include/ certs: use if_changed to re-generate the key when the key type is changed ...

Linus Torvalds committed 4 years ago

Commit fd6f57b2 parents 0ed9059 c4d7f4057 files · +243 −367Browse files

Unified · Split

57 files
  1. Documentation/kbuild/kconfig-language.rst +1 −1
  2. Documentation/process/changes.rst +1 −1
  3. MAINTAINERS +0 −1
  4. Makefile +3 −12
  5. arch/Kconfig +1 −2
  6. arch/arc/Makefile +2 −2
  7. arch/arc/boot/dts/Makefile +2 −2
  8. arch/arm/Kconfig.debug +0 −2
  9. arch/arm/boot/compressed/Makefile +4 −4
  10. arch/h8300/boot/compressed/Makefile +3 −1
  11. arch/h8300/boot/dts/Makefile +1 −5
  12. arch/microblaze/Makefile +4 −4
  13. arch/mips/boot/compressed/Makefile +6 −6
  14. arch/nds32/Makefile +0 −6
  15. arch/nds32/boot/dts/Makefile +1 −6
  16. arch/nios2/boot/dts/Makefile +1 −1
  17. arch/openrisc/boot/dts/Makefile +1 −6
  18. arch/parisc/boot/compressed/Makefile +11 −13
  19. arch/powerpc/boot/Makefile +1 −1
  20. arch/riscv/boot/dts/canaan/Makefile +1 −3
  21. arch/s390/boot/compressed/Makefile +13 −15
  22. arch/sh/boot/Makefile +8 −8
  23. arch/sh/boot/compressed/Makefile +10 −12
  24. arch/sh/boot/dts/Makefile +1 −3
  25. arch/x86/boot/compressed/Makefile +6 −6
  26. arch/xtensa/Makefile +1 −1
  27. arch/xtensa/boot/dts/Makefile +1 −4
  28. certs/.gitignore +1 −0
  29. certs/Kconfig +1 −3
  30. certs/Makefile +33 −92
  31. certs/default_x509.genkey +17 −0
  32. certs/extract-cert.c +1 −1
  33. drivers/acpi/Makefile +1 −1
  34. drivers/base/firmware_loader/builtin/Makefile +2 −2
  35. include/linux/slab.h +1 −2
  36. include/uapi/linux/soundcard.h +1 −1
  37. init/Kconfig +0 −1
  38. init/Makefile +1 −1
  39. kernel/gcov/Kconfig +0 −1
  40. net/wireless/Makefile +2 −2
  41. scripts/.gitignore +0 −1
  42. scripts/Kbuild.include +0 −47
  43. scripts/Makefile +2 −9
  44. scripts/Makefile.lib +28 −7
  45. scripts/Makefile.modinst +2 −2
  46. scripts/gen_autoksyms.sh +3 −8
  47. scripts/kconfig/Makefile +2 −1
  48. scripts/kconfig/conf.c +10 −7
  49. scripts/kconfig/confdata.c +13 −11
  50. scripts/kconfig/streamline_config.pl +1 −1
  51. scripts/link-vmlinux.sh +25 −24
  52. scripts/min-tool-version.sh +1 −1
  53. scripts/remove-stale-files +2 −0
  54. scripts/setlocalversion +4 −5
  55. usr/Makefile +1 −6
  56. usr/include/Makefile +4 −2
  57. usr/include/headers_check.pl +0 −0
Documentation/kbuild/kconfig-language.rst+1−1
@@ -176,7 +176,7 @@ applicable everywhere (see syntax). · 175 unmodified lines
176176 y y y Y/m/n
177177 n m n N/m
178178 m m m M/n
179− y m n M/n
179+ y m m M/n
180180 y n * N
181181 === === ============= ==============
182182
Documentation/process/changes.rst+1−1
@@ -30,7 +30,7 @@ you probably needn't concern yourself with pcmciautils. · 29 unmodified lines
3030 Program Minimal version Command to check the version
3131 ====================== =============== ========================================
3232 GNU C 5.1 gcc --version
33−Clang/LLVM (optional) 10.0.1 clang --version
33+Clang/LLVM (optional) 11.0.0 clang --version
3434 GNU make 3.81 make --version
3535 binutils 2.23 ld -v
3636 flex 2.5.35 flex --version
MAINTAINERS+0−1
@@ -4467,7 +4467,6 @@ L: keyrings@vger.kernel.org · 4466 unmodified lines
44674467 S: Maintained
44684468 F: Documentation/admin-guide/module-signing.rst
44694469 F: certs/
4470−F: scripts/extract-cert.c
44714470 F: scripts/sign-file.c
44724471
44734472 CFAG12864B LCD DRIVER
Makefile+3−12
@@ -1278,15 +1278,6 @@ headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts · 1277 unmodified lines
12781278 $(Q)$(MAKE) $(hdr-inst)=include/uapi
12791279 $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi
12801280
1281−# Deprecated. It is no-op now.
1282−PHONY += headers_check
1283−headers_check:
1284− @echo >&2 "=================== WARNING ==================="
1285− @echo >&2 "Since Linux 5.5, 'make headers_check' is no-op,"
1286− @echo >&2 "and will be removed after Linux 5.15 release."
1287− @echo >&2 "Please remove headers_check from your scripts."
1288− @echo >&2 "==============================================="
1289−
12901281 ifdef CONFIG_HEADERS_INSTALL
12911282 prepare: headers
12921283 endif
@@ -1497,7 +1488,7 @@ MRPROPER_FILES += include/config include/generated \ · 204 unmodified lines
14971488 debian snap tar-install \
14981489 .config .config.old .version \
14991490 Module.symvers \
1500− certs/signing_key.pem certs/signing_key.x509 \
1491+ certs/signing_key.pem \
15011492 certs/x509.genkey \
15021493 vmlinux-gdb.py \
15031494 *.spec
@@ -1723,9 +1714,9 @@ PHONY += prepare · 219 unmodified lines
17231714 # now expand this into a simple variable to reduce the cost of shell evaluations
17241715 prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
17251716 prepare:
1726− @if [ "$(CC_VERSION_TEXT)" != $(CONFIG_CC_VERSION_TEXT) ]; then \
1717+ @if [ "$(CC_VERSION_TEXT)" != "$(CONFIG_CC_VERSION_TEXT)" ]; then \
17271718 echo >&2 "warning: the compiler differs from the one used to build the kernel"; \
1728− echo >&2 " The kernel was built by: "$(CONFIG_CC_VERSION_TEXT); \
1719+ echo >&2 " The kernel was built by: $(CONFIG_CC_VERSION_TEXT)"; \
17291720 echo >&2 " You are using: $(CC_VERSION_TEXT)"; \
17301721 fi
17311722
arch/Kconfig+1−2
@@ -648,8 +648,7 @@ config ARCH_SUPPORTS_LTO_CLANG_THIN · 647 unmodified lines
648648
649649 config HAS_LTO_CLANG
650650 def_bool y
651− # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510
652− depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD && AS_IS_LLVM
651+ depends on CC_IS_CLANG && LD_IS_LLD && AS_IS_LLVM
653652 depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
654653 depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
655654 depends on ARCH_SUPPORTS_LTO_CLANG
arch/arc/Makefile+2−2
@@ -14,10 +14,10 @@ cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__ · 13 unmodified lines
1414 tune-mcpu-def-$(CONFIG_ISA_ARCOMPACT) := -mcpu=arc700
1515 tune-mcpu-def-$(CONFIG_ISA_ARCV2) := -mcpu=hs38
1616
17−ifeq ($(CONFIG_ARC_TUNE_MCPU),"")
17+ifeq ($(CONFIG_ARC_TUNE_MCPU),)
1818 cflags-y += $(tune-mcpu-def-y)
1919 else
20−tune-mcpu := $(shell echo $(CONFIG_ARC_TUNE_MCPU))
20+tune-mcpu := $(CONFIG_ARC_TUNE_MCPU)
2121 ifneq ($(call cc-option,$(tune-mcpu)),)
2222 cflags-y += $(tune-mcpu)
2323 else
arch/arc/boot/dts/Makefile+2−2
@@ -2,8 +2,8 @@ · 1 unmodified line
22 # Built-in dtb
33 builtindtb-y := nsim_700
44
5−ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")
6− builtindtb-y := $(patsubst "%",%,$(CONFIG_ARC_BUILTIN_DTB_NAME))
5+ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),)
6+ builtindtb-y := $(CONFIG_ARC_BUILTIN_DTB_NAME)
77 endif
88
99 obj-y += $(builtindtb-y).dtb.o
arch/arm/Kconfig.debug+0−2
@@ -66,8 +66,6 @@ config UNWINDER_FRAME_POINTER · 65 unmodified lines
6666 config UNWINDER_ARM
6767 bool "ARM EABI stack unwinder"
6868 depends on AEABI && !FUNCTION_GRAPH_TRACER
69− # https://github.com/ClangBuiltLinux/linux/issues/732
70− depends on !LD_IS_LLD || LLD_VERSION >= 110000
7169 select ARM_UNWIND
7270 help
7371 This option enables stack unwinding support in the kernel
arch/arm/boot/compressed/Makefile+4−4
@@ -76,10 +76,10 @@ CPPFLAGS_vmlinux.lds += -DTEXT_OFFSET="$(TEXT_OFFSET)" · 75 unmodified lines
7676 CPPFLAGS_vmlinux.lds += -DMALLOC_SIZE="$(MALLOC_SIZE)"
7777
7878 compress-$(CONFIG_KERNEL_GZIP) = gzip
79−compress-$(CONFIG_KERNEL_LZO) = lzo
80−compress-$(CONFIG_KERNEL_LZMA) = lzma
81−compress-$(CONFIG_KERNEL_XZ) = xzkern
82−compress-$(CONFIG_KERNEL_LZ4) = lz4
79+compress-$(CONFIG_KERNEL_LZO) = lzo_with_size
80+compress-$(CONFIG_KERNEL_LZMA) = lzma_with_size
81+compress-$(CONFIG_KERNEL_XZ) = xzkern_with_size
82+compress-$(CONFIG_KERNEL_LZ4) = lz4_with_size
8383
8484 libfdt_objs := fdt_rw.o fdt_ro.o fdt_wip.o fdt.o
8585
arch/h8300/boot/compressed/Makefile+3−1
@@ -30,9 +30,11 @@ $(obj)/vmlinux.bin: vmlinux FORCE · 29 unmodified lines
3030
3131 suffix-$(CONFIG_KERNEL_GZIP) := gzip
3232 suffix-$(CONFIG_KERNEL_LZO) := lzo
33+compress-$(CONFIG_KERNEL_GZIP) := gzip
34+compress-$(CONFIG_KERNEL_LZO) := lzo_with_size
3335
3436 $(obj)/vmlinux.bin.$(suffix-y): $(obj)/vmlinux.bin FORCE
35− $(call if_changed,$(suffix-y))
37+ $(call if_changed,$(compress-y))
3638
3739 LDFLAGS_piggy.o := -r --format binary --oformat elf32-h8300-linux -T
3840 OBJCOPYFLAGS := -O binary
arch/h8300/boot/dts/Makefile+1−5
@@ -1,9 +1,5 @@
11 # SPDX-License-Identifier: GPL-2.0
2−ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
3−BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_H8300_BUILTIN_DTB)).dtb.o
4−endif
5−
6−obj-y += $(BUILTIN_DTB)
2+obj-y += $(addsuffix .dtb.o, $(CONFIG_H8300_BUILTIN_DTB))
73
84 dtb-$(CONFIG_H8300H_SIM) := h8300h_sim.dtb
95 dtb-$(CONFIG_H8S_SIM) := h8s_sim.dtb
arch/microblaze/Makefile+4−4
@@ -5,10 +5,10 @@ UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\" · 4 unmodified lines
55
66 # What CPU version are we building for, and crack it open
77 # as major.minor.rev
8−CPU_VER := $(shell echo $(CONFIG_XILINX_MICROBLAZE0_HW_VER))
9−CPU_MAJOR := $(shell echo $(CPU_VER) | cut -d '.' -f 1)
10−CPU_MINOR := $(shell echo $(CPU_VER) | cut -d '.' -f 2)
11−CPU_REV := $(shell echo $(CPU_VER) | cut -d '.' -f 3)
8+CPU_VER := $(CONFIG_XILINX_MICROBLAZE0_HW_VER)
9+CPU_MAJOR := $(word 1, $(subst ., , $(CPU_VER)))
10+CPU_MINOR := $(word 2, $(subst ., , $(CPU_VER)))
11+CPU_REV := $(word 3, $(subst ., , $(CPU_VER)))
1212
1313 export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV
1414
arch/mips/boot/compressed/Makefile+6−6
@@ -64,12 +64,12 @@ $(obj)/vmlinux.bin: $(KBUILD_IMAGE) FORCE · 63 unmodified lines
6464 $(call if_changed,objcopy)
6565
6666 tool_$(CONFIG_KERNEL_GZIP) = gzip
67−tool_$(CONFIG_KERNEL_BZIP2) = bzip2
68−tool_$(CONFIG_KERNEL_LZ4) = lz4
69−tool_$(CONFIG_KERNEL_LZMA) = lzma
70−tool_$(CONFIG_KERNEL_LZO) = lzo
71−tool_$(CONFIG_KERNEL_XZ) = xzkern
72−tool_$(CONFIG_KERNEL_ZSTD) = zstd22
67+tool_$(CONFIG_KERNEL_BZIP2) = bzip2_with_size
68+tool_$(CONFIG_KERNEL_LZ4) = lz4_with_size
69+tool_$(CONFIG_KERNEL_LZMA) = lzma_with_size
70+tool_$(CONFIG_KERNEL_LZO) = lzo_with_size
71+tool_$(CONFIG_KERNEL_XZ) = xzkern_with_size
72+tool_$(CONFIG_KERNEL_ZSTD) = zstd22_with_size
7373
7474 targets += vmlinux.bin.z
7575
arch/nds32/Makefile+0−6
@@ -31,12 +31,6 @@ core-y += arch/nds32/kernel/ arch/nds32/mm/ · 30 unmodified lines
3131 core-$(CONFIG_FPU) += arch/nds32/math-emu/
3232 libs-y += arch/nds32/lib/
3333
34−ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
35−BUILTIN_DTB := y
36−else
37−BUILTIN_DTB := n
38−endif
39−
4034 ifdef CONFIG_CPU_LITTLE_ENDIAN
4135 KBUILD_CFLAGS += $(call cc-option, -EL)
4236 KBUILD_AFLAGS += $(call cc-option, -EL)
arch/nds32/boot/dts/Makefile+1−6
@@ -1,7 +1,2 @@
11 # SPDX-License-Identifier: GPL-2.0-only
2−ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
3−BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_NDS32_BUILTIN_DTB)).dtb.o
4−else
5−BUILTIN_DTB :=
6−endif
7−obj-$(CONFIG_OF) += $(BUILTIN_DTB)
2+obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_NDS32_BUILTIN_DTB))
arch/nios2/boot/dts/Makefile+1−1
@@ -1,6 +1,6 @@
11 # SPDX-License-Identifier: GPL-2.0
22
3−obj-y := $(patsubst "%.dts",%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
3+obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
44
55 dtstree := $(srctree)/$(src)
66 dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
arch/openrisc/boot/dts/Makefile+1−6
@@ -1,9 +1,4 @@
11 # SPDX-License-Identifier: GPL-2.0
2−ifneq '$(CONFIG_OPENRISC_BUILTIN_DTB)' '""'
3−BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_OPENRISC_BUILTIN_DTB)).dtb.o
4−else
5−BUILTIN_DTB :=
6−endif
7−obj-y += $(BUILTIN_DTB)
2+obj-y += $(addsuffix .dtb.o, $(CONFIG_OPENRISC_BUILTIN_DTB))
83
94 #DTC_FLAGS ?= -p 1024
arch/parisc/boot/compressed/Makefile+11−13
@@ -50,8 +50,6 @@ OBJCOPYFLAGS_vmlinux.bin := -R .comment -R .note -S · 49 unmodified lines
5050 $(obj)/vmlinux.bin: vmlinux FORCE
5151 $(call if_changed,objcopy)
5252
53−vmlinux.bin.all-y := $(obj)/vmlinux.bin
54−
5553 suffix-$(CONFIG_KERNEL_GZIP) := gz
5654 suffix-$(CONFIG_KERNEL_BZIP2) := bz2
5755 suffix-$(CONFIG_KERNEL_LZ4) := lz4
@@ -59,18 +57,18 @@ suffix-$(CONFIG_KERNEL_LZMA) := lzma · 1 unmodified line
5957 suffix-$(CONFIG_KERNEL_LZO) := lzo
6058 suffix-$(CONFIG_KERNEL_XZ) := xz
6159
62−$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
60+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
6361 $(call if_changed,gzip)
64−$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
65− $(call if_changed,bzip2)
66−$(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE
67− $(call if_changed,lz4)
68−$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
69− $(call if_changed,lzma)
70−$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
71− $(call if_changed,lzo)
72−$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
73− $(call if_changed,xzkern)
62+$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
63+ $(call if_changed,bzip2_with_size)
64+$(obj)/vmlinux.bin.lz4: $(obj)/vmlinux.bin FORCE
65+ $(call if_changed,lz4_with_size)
66+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
67+ $(call if_changed,lzma_with_size)
68+$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
69+ $(call if_changed,lzo_with_size)
70+$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
71+ $(call if_changed,xzkern_with_size)
7472
7573 LDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T
7674 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
arch/powerpc/boot/Makefile+1−1
@@ -365,7 +365,7 @@ image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot · 364 unmodified lines
365365 endif
366366
367367 # Allow extra targets to be added to the defconfig
368−image-y += $(subst ",,$(CONFIG_EXTRA_TARGETS))
368+image-y += $(CONFIG_EXTRA_TARGETS)
369369
370370 initrd- := $(patsubst zImage%, zImage.initrd%, $(image-))
371371 initrd-y := $(patsubst zImage%, zImage.initrd%, \
arch/riscv/boot/dts/canaan/Makefile+1−3
@@ -1,5 +1,3 @@
11 # SPDX-License-Identifier: GPL-2.0
2−ifneq ($(CONFIG_SOC_CANAAN_K210_DTB_SOURCE),"")
3−dtb-y += $(strip $(shell echo $(CONFIG_SOC_CANAAN_K210_DTB_SOURCE))).dtb
2+dtb-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .dtb, $(CONFIG_SOC_CANAAN_K210_DTB_SOURCE))
43 obj-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .o, $(dtb-y))
5−endif
arch/s390/boot/compressed/Makefile+13−15
@@ -58,8 +58,6 @@ OBJCOPYFLAGS_vmlinux.bin := -O binary --remove-section=.comment --remove-section · 57 unmodified lines
5858 $(obj)/vmlinux.bin: vmlinux FORCE
5959 $(call if_changed,objcopy)
6060
61−vmlinux.bin.all-y := $(obj)/vmlinux.bin
62−
6361 suffix-$(CONFIG_KERNEL_GZIP) := .gz
6462 suffix-$(CONFIG_KERNEL_BZIP2) := .bz2
6563 suffix-$(CONFIG_KERNEL_LZ4) := .lz4
@@ -68,20 +66,20 @@ suffix-$(CONFIG_KERNEL_LZO) := .lzo · 2 unmodified lines
6866 suffix-$(CONFIG_KERNEL_XZ) := .xz
6967 suffix-$(CONFIG_KERNEL_ZSTD) := .zst
7068
71−$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
69+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
7270 $(call if_changed,gzip)
73−$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
74− $(call if_changed,bzip2)
75−$(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE
76− $(call if_changed,lz4)
77−$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
78− $(call if_changed,lzma)
79−$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
80− $(call if_changed,lzo)
81−$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
82− $(call if_changed,xzkern)
83−$(obj)/vmlinux.bin.zst: $(vmlinux.bin.all-y) FORCE
84− $(call if_changed,zstd22)
71+$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
72+ $(call if_changed,bzip2_with_size)
73+$(obj)/vmlinux.bin.lz4: $(obj)/vmlinux.bin FORCE
74+ $(call if_changed,lz4_with_size)
75+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
76+ $(call if_changed,lzma_with_size)
77+$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
78+ $(call if_changed,lzo_with_size)
79+$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
80+ $(call if_changed,xzkern_with_size)
81+$(obj)/vmlinux.bin.zst: $(obj)/vmlinux.bin FORCE
82+ $(call if_changed,zstd22_with_size)
8583
8684 OBJCOPYFLAGS_piggy.o := -I binary -O elf64-s390 -B s390:64-bit --rename-section .data=.vmlinux.bin.compressed
8785 $(obj)/piggy.o: $(obj)/vmlinux.bin$(suffix-y) FORCE
arch/sh/boot/Makefile+8−8
@@ -19,12 +19,12 @@ CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 · 18 unmodified lines
1919 CONFIG_ENTRY_OFFSET ?= 0x00001000
2020 CONFIG_PHYSICAL_START ?= $(CONFIG_MEMORY_START)
2121
22−suffix-y := bin
23−suffix-$(CONFIG_KERNEL_GZIP) := gz
24−suffix-$(CONFIG_KERNEL_BZIP2) := bz2
25−suffix-$(CONFIG_KERNEL_LZMA) := lzma
26−suffix-$(CONFIG_KERNEL_XZ) := xz
27−suffix-$(CONFIG_KERNEL_LZO) := lzo
22+suffix_y := bin
23+suffix_$(CONFIG_KERNEL_GZIP) := gz
24+suffix_$(CONFIG_KERNEL_BZIP2) := bz2
25+suffix_$(CONFIG_KERNEL_LZMA) := lzma
26+suffix_$(CONFIG_KERNEL_XZ) := xz
27+suffix_$(CONFIG_KERNEL_LZO) := lzo
2828
2929 targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \
3030 uImage.bz2 uImage.lzma uImage.xz uImage.lzo uImage.bin \
@@ -106,10 +106,10 @@ OBJCOPYFLAGS_uImage.srec := -I binary -O srec · 75 unmodified lines
106106 $(obj)/uImage.srec: $(obj)/uImage FORCE
107107 $(call if_changed,objcopy)
108108
109−$(obj)/uImage: $(obj)/uImage.$(suffix-y)
109+$(obj)/uImage: $(obj)/uImage.$(suffix_y)
110110 @ln -sf $(notdir $<) $@
111111 @echo ' Image $@ is ready'
112112
113113 export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
114114 CONFIG_PHYSICAL_START CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET \
115− KERNEL_MEMORY suffix-y
115+ KERNEL_MEMORY suffix_y
arch/sh/boot/compressed/Makefile+10−12
@@ -47,22 +47,20 @@ $(obj)/vmlinux: $(addprefix $(obj)/, $(OBJECTS)) FORCE · 46 unmodified lines
4747 $(obj)/vmlinux.bin: vmlinux FORCE
4848 $(call if_changed,objcopy)
4949
50−vmlinux.bin.all-y := $(obj)/vmlinux.bin
51−
52−$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
50+$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
5351 $(call if_changed,gzip)
54−$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
55− $(call if_changed,bzip2)
56−$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
57− $(call if_changed,lzma)
58−$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
59− $(call if_changed,xzkern)
60−$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
61− $(call if_changed,lzo)
52+$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
53+ $(call if_changed,bzip2_with_size)
54+$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
55+ $(call if_changed,lzma_with_size)
56+$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
57+ $(call if_changed,xzkern_with_size)
58+$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
59+ $(call if_changed,lzo_with_size)
6260
6361 OBJCOPYFLAGS += -R .empty_zero_page
6462
6563 LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
6664
67−$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
65+$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
6866 $(call if_changed,ld)
arch/sh/boot/dts/Makefile+1−3
@@ -1,4 +1,2 @@
11 # SPDX-License-Identifier: GPL-2.0-only
2−ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")
3−obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
4−endif
2+obj-$(CONFIG_USE_BUILTIN_DTB) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
arch/x86/boot/compressed/Makefile+6−6
@@ -126,17 +126,17 @@ vmlinux.bin.all-$(CONFIG_X86_NEED_RELOCS) += $(obj)/vmlinux.relocs · 125 unmodified lines
126126 $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
127127 $(call if_changed,gzip)
128128 $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
129− $(call if_changed,bzip2)
129+ $(call if_changed,bzip2_with_size)
130130 $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
131− $(call if_changed,lzma)
131+ $(call if_changed,lzma_with_size)
132132 $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
133− $(call if_changed,xzkern)
133+ $(call if_changed,xzkern_with_size)
134134 $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
135− $(call if_changed,lzo)
135+ $(call if_changed,lzo_with_size)
136136 $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE
137− $(call if_changed,lz4)
137+ $(call if_changed,lz4_with_size)
138138 $(obj)/vmlinux.bin.zst: $(vmlinux.bin.all-y) FORCE
139− $(call if_changed,zstd22)
139+ $(call if_changed,zstd22_with_size)
140140
141141 suffix-$(CONFIG_KERNEL_GZIP) := gz
142142 suffix-$(CONFIG_KERNEL_BZIP2) := bz2
arch/xtensa/Makefile+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
1212 # Core configuration.
1313 # (Use VAR=<xtensa_config> to use another default compiler.)
1414
15−variant-y := $(patsubst "%",%,$(CONFIG_XTENSA_VARIANT_NAME))
15+variant-y := $(CONFIG_XTENSA_VARIANT_NAME)
1616
1717 VARIANT = $(variant-y)
1818
arch/xtensa/boot/dts/Makefile+1−4
@@ -7,10 +7,7 @@ · 6 unmodified lines
77 #
88 #
99
10−BUILTIN_DTB_SOURCE := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
11−ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")
12−obj-$(CONFIG_OF) += $(BUILTIN_DTB_SOURCE)
13−endif
10+obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
1411
1512 # for CONFIG_OF_ALL_DTBS test
1613 dtstree := $(srctree)/$(src)
certs/.gitignore+1−0
@@ -1,3 +1,4 @@
11 # SPDX-License-Identifier: GPL-2.0-only
2+/extract-cert
23 /x509_certificate_list
34 /x509_revocation_list
certs/Kconfig+1−3
@@ -17,21 +17,19 @@ config MODULE_SIG_KEY · 16 unmodified lines
1717
1818 choice
1919 prompt "Type of module signing key to be generated"
20− default MODULE_SIG_KEY_TYPE_RSA
20+ depends on MODULE_SIG || (IMA_APPRAISE_MODSIG && MODULES)
2121 help
2222 The type of module signing key type to generate. This option
2323 does not apply if a #PKCS11 URI is used.
2424
2525 config MODULE_SIG_KEY_TYPE_RSA
2626 bool "RSA"
27− depends on MODULE_SIG || (IMA_APPRAISE_MODSIG && MODULES)
2827 help
2928 Use an RSA key for module signing.
3029
3130 config MODULE_SIG_KEY_TYPE_ECDSA
3231 bool "ECDSA"
3332 select CRYPTO_ECDSA
34− depends on MODULE_SIG || (IMA_APPRAISE_MODSIG && MODULES)
3533 help
3634 Use an elliptic curve key (NIST P384) for module signing. Consider
3735 using a strong hash like sha256 or sha384 for hashing modules.
certs/Makefile+33−92
@@ -6,31 +6,21 @@ · 5 unmodified lines
66 obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o common.o
77 obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o common.o
88 obj-$(CONFIG_SYSTEM_REVOCATION_LIST) += revocation_certificates.o
9−ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"")
9+ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),)
1010 obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o
1111 else
1212 obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o
1313 endif
1414
15−ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y)
15+quiet_cmd_extract_certs = CERT $@
16+ cmd_extract_certs = $(obj)/extract-cert $(2) $@
1617
17−$(eval $(call config_filename,SYSTEM_TRUSTED_KEYS))
18−
19−# GCC doesn't include .incbin files in -MD generated dependencies (PR#66871)
2018 $(obj)/system_certificates.o: $(obj)/x509_certificate_list
2119
22−# Cope with signing_key.x509 existing in $(srctree) not $(objtree)
23−AFLAGS_system_certificates.o := -I$(srctree)
24−
25−quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2))
26− cmd_extract_certs = scripts/extract-cert $(2) $@
20+$(obj)/x509_certificate_list: $(CONFIG_SYSTEM_TRUSTED_KEYS) $(obj)/extract-cert FORCE
21+ $(call if_changed,extract_certs,$(if $(CONFIG_SYSTEM_TRUSTED_KEYS),$<,""))
2722
2823 targets += x509_certificate_list
29−$(obj)/x509_certificate_list: scripts/extract-cert $(SYSTEM_TRUSTED_KEYS_SRCPREFIX)$(SYSTEM_TRUSTED_KEYS_FILENAME) FORCE
30− $(call if_changed,extract_certs,$(SYSTEM_TRUSTED_KEYS_SRCPREFIX)$(CONFIG_SYSTEM_TRUSTED_KEYS))
31−endif # CONFIG_SYSTEM_TRUSTED_KEYRING
32−
33−clean-files := x509_certificate_list .x509.list x509_revocation_list
3424
3525 ifeq ($(CONFIG_MODULE_SIG),y)
3626 SIGN_KEY = y
@@ -50,103 +40,54 @@ ifdef SIGN_KEY · 13 unmodified lines
5040 # fail and that the kernel may be used afterwards.
5141 #
5242 ###############################################################################
53−ifndef CONFIG_MODULE_SIG_HASH
54−$(error Could not determine digest type to use from kernel config)
55−endif
56−
57−redirect_openssl = 2>&1
58−quiet_redirect_openssl = 2>&1
59−silent_redirect_openssl = 2>/dev/null
60−openssl_available = $(shell openssl help 2>/dev/null && echo yes)
6143
6244 # We do it this way rather than having a boolean option for enabling an
6345 # external private key, because 'make randconfig' might enable such a
6446 # boolean option and we unfortunately can't make it depend on !RANDCONFIG.
65−ifeq ($(CONFIG_MODULE_SIG_KEY),"certs/signing_key.pem")
47+ifeq ($(CONFIG_MODULE_SIG_KEY),certs/signing_key.pem)
6648
67−ifeq ($(openssl_available),yes)
68−X509TEXT=$(shell openssl x509 -in "certs/signing_key.pem" -text 2>/dev/null)
69−endif
49+keytype-$(CONFIG_MODULE_SIG_KEY_TYPE_ECDSA) := -newkey ec -pkeyopt ec_paramgen_curve:secp384r1
7050
71−# Support user changing key type
72−ifdef CONFIG_MODULE_SIG_KEY_TYPE_ECDSA
73−keytype_openssl = -newkey ec -pkeyopt ec_paramgen_curve:secp384r1
74−ifeq ($(openssl_available),yes)
75−$(if $(findstring id-ecPublicKey,$(X509TEXT)),,$(shell rm -f "certs/signing_key.pem"))
76−endif
77−endif # CONFIG_MODULE_SIG_KEY_TYPE_ECDSA
51+quiet_cmd_gen_key = GENKEY $@
52+ cmd_gen_key = openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \
53+ -batch -x509 -config $< \
54+ -outform PEM -out $@ -keyout $@ $(keytype-y) 2>&1
7855
79−ifdef CONFIG_MODULE_SIG_KEY_TYPE_RSA
80−ifeq ($(openssl_available),yes)
81−$(if $(findstring rsaEncryption,$(X509TEXT)),,$(shell rm -f "certs/signing_key.pem"))
82−endif
83−endif # CONFIG_MODULE_SIG_KEY_TYPE_RSA
84−
85−$(obj)/signing_key.pem: $(obj)/x509.genkey
86− @$(kecho) "###"
87− @$(kecho) "### Now generating an X.509 key pair to be used for signing modules."
88− @$(kecho) "###"
89− @$(kecho) "### If this takes a long time, you might wish to run rngd in the"
90− @$(kecho) "### background to keep the supply of entropy topped up. It"
91− @$(kecho) "### needs to be run as root, and uses a hardware random"
92− @$(kecho) "### number generator if one is available."
93− @$(kecho) "###"
94− $(Q)openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \
95− -batch -x509 -config $(obj)/x509.genkey \
96− -outform PEM -out $(obj)/signing_key.pem \
97− -keyout $(obj)/signing_key.pem \
98− $(keytype_openssl) \
99− $($(quiet)redirect_openssl)
100− @$(kecho) "###"
101− @$(kecho) "### Key pair generated."
102− @$(kecho) "###"
56+$(obj)/signing_key.pem: $(obj)/x509.genkey FORCE
57+ $(call if_changed,gen_key)
58+
59+targets += signing_key.pem
10360
61+quiet_cmd_copy_x509_config = COPY $@
62+ cmd_copy_x509_config = cat $(srctree)/$(src)/default_x509.genkey > $@
63+
64+# You can provide your own config file. If not present, copy the default one.
10465 $(obj)/x509.genkey:
105− @$(kecho) Generating X.509 key generation config
106− @echo >$@ "[ req ]"
107− @echo >>$@ "default_bits = 4096"
108− @echo >>$@ "distinguished_name = req_distinguished_name"
109− @echo >>$@ "prompt = no"
110− @echo >>$@ "string_mask = utf8only"
111− @echo >>$@ "x509_extensions = myexts"
112− @echo >>$@
113− @echo >>$@ "[ req_distinguished_name ]"
114− @echo >>$@ "#O = Unspecified company"
115− @echo >>$@ "CN = Build time autogenerated kernel key"
116− @echo >>$@ "#emailAddress = unspecified.user@unspecified.company"
117− @echo >>$@
118− @echo >>$@ "[ myexts ]"
119− @echo >>$@ "basicConstraints=critical,CA:FALSE"
120− @echo >>$@ "keyUsage=digitalSignature"
121− @echo >>$@ "subjectKeyIdentifier=hash"
122− @echo >>$@ "authorityKeyIdentifier=keyid"
123−endif # CONFIG_MODULE_SIG_KEY
66+ $(call cmd,copy_x509_config)
12467
125−$(eval $(call config_filename,MODULE_SIG_KEY))
68+endif # CONFIG_MODULE_SIG_KEY
12669
12770 # If CONFIG_MODULE_SIG_KEY isn't a PKCS#11 URI, depend on it
128−ifeq ($(patsubst pkcs11:%,%,$(firstword $(MODULE_SIG_KEY_FILENAME))),$(firstword $(MODULE_SIG_KEY_FILENAME)))
129−X509_DEP := $(MODULE_SIG_KEY_SRCPREFIX)$(MODULE_SIG_KEY_FILENAME)
71+ifneq ($(filter-out pkcs11:%, %(CONFIG_MODULE_SIG_KEY)),)
72+X509_DEP := $(CONFIG_MODULE_SIG_KEY)
13073 endif
13174
132−# GCC PR#66871 again.
13375 $(obj)/system_certificates.o: $(obj)/signing_key.x509
13476
135−targets += signing_key.x509
136−$(obj)/signing_key.x509: scripts/extract-cert $(X509_DEP) FORCE
137− $(call if_changed,extract_certs,$(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY))
77+$(obj)/signing_key.x509: $(X509_DEP) $(obj)/extract-cert FORCE
78+ $(call if_changed,extract_certs,$(if $(X509_DEP),$<,$(CONFIG_MODULE_SIG_KEY)))
13879 endif # CONFIG_MODULE_SIG
13980
140−ifeq ($(CONFIG_SYSTEM_REVOCATION_LIST),y)
141−
142−$(eval $(call config_filename,SYSTEM_REVOCATION_KEYS))
81+targets += signing_key.x509
14382
14483 $(obj)/revocation_certificates.o: $(obj)/x509_revocation_list
14584
146−quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2))
147− cmd_extract_certs = scripts/extract-cert $(2) $@
85+$(obj)/x509_revocation_list: $(CONFIG_SYSTEM_REVOCATION_KEYS) $(obj)/extract-cert FORCE
86+ $(call if_changed,extract_certs,$(if $(CONFIG_SYSTEM_REVOCATION_KEYS),$<,""))
14887
14988 targets += x509_revocation_list
150−$(obj)/x509_revocation_list: scripts/extract-cert $(SYSTEM_REVOCATION_KEYS_SRCPREFIX)$(SYSTEM_REVOCATION_KEYS_FILENAME) FORCE
151− $(call if_changed,extract_certs,$(SYSTEM_REVOCATION_KEYS_SRCPREFIX)$(CONFIG_SYSTEM_REVOCATION_KEYS))
152−endif
89+
90+hostprogs := extract-cert
91+
92+HOSTCFLAGS_extract-cert.o = $(shell pkg-config --cflags libcrypto 2> /dev/null)
93+HOSTLDLIBS_extract-cert = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
certs/default_x509.genkey+17−0
@@ -0,0 +1,17 @@
1+[ req ]
2+default_bits = 4096
3+distinguished_name = req_distinguished_name
4+prompt = no
5+string_mask = utf8only
6+x509_extensions = myexts
7+
8+[ req_distinguished_name ]
9+#O = Unspecified company
10+CN = Build time autogenerated kernel key
11+#emailAddress = unspecified.user@unspecified.company
12+
13+[ myexts ]
14+basicConstraints=critical,CA:FALSE
15+keyUsage=digitalSignature
16+subjectKeyIdentifier=hash
17+authorityKeyIdentifier=keyid
certs/extract-cert.crenamed from scripts/extract-cert.c+1−1
@@ -29,7 +29,7 @@ static __attribute__((noreturn)) · 28 unmodified lines
2929 void format(void)
3030 {
3131 fprintf(stderr,
32− "Usage: scripts/extract-cert <source> <dest>\n");
32+ "Usage: extract-cert <source> <dest>\n");
3333 exit(2);
3434 }
3535
drivers/acpi/Makefile+1−1
@@ -9,7 +9,7 @@ ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT · 8 unmodified lines
99 # ACPI Boot-Time Table Parsing
1010 #
1111 ifeq ($(CONFIG_ACPI_CUSTOM_DSDT),y)
12−tables.o: $(src)/../../include/$(subst $\",,$(CONFIG_ACPI_CUSTOM_DSDT_FILE)) ;
12+tables.o: $(src)/../../include/$(CONFIG_ACPI_CUSTOM_DSDT_FILE) ;
1313
1414 endif
1515
drivers/base/firmware_loader/builtin/Makefile+2−2
@@ -3,10 +3,10 @@ obj-y += main.o · 2 unmodified lines
33
44 # Create $(fwdir) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a
55 # leading /, it's relative to $(srctree).
6−fwdir := $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE_DIR))
6+fwdir := $(CONFIG_EXTRA_FIRMWARE_DIR)
77 fwdir := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir))
88
9−firmware := $(addsuffix .gen.o, $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE)))
9+firmware := $(addsuffix .gen.o, $(CONFIG_EXTRA_FIRMWARE))
1010 obj-y += $(firmware)
1111
1212 FWNAME = $(patsubst $(obj)/%.gen.S,%,$@)
include/linux/slab.h+1−2
@@ -403,8 +403,7 @@ static __always_inline unsigned int __kmalloc_index(size_t size, · 402 unmodified lines
403403 if (size <= 16 * 1024 * 1024) return 24;
404404 if (size <= 32 * 1024 * 1024) return 25;
405405
406− if ((IS_ENABLED(CONFIG_CC_IS_GCC) || CONFIG_CLANG_VERSION >= 110000)
407− && !IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && size_is_constant)
406+ if (!IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && size_is_constant)
408407 BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()");
409408 else
410409 BUG();
include/uapi/linux/soundcard.h+1−1
@@ -1051,7 +1051,7 @@ typedef struct mixer_vol_table { · 1050 unmodified lines
10511051 * the GPL version of OSS-4.x and build against that version
10521052 * of the header.
10531053 *
1054− * We redefine the extern keyword so that make headers_check
1054+ * We redefine the extern keyword so that usr/include/headers_check.pl
10551055 * does not complain about SEQ_USE_EXTBUF.
10561056 */
10571057 #define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
init/Kconfig+0−1
@@ -1414,7 +1414,6 @@ config LD_DEAD_CODE_DATA_ELIMINATION · 1413 unmodified lines
14141414 config LD_ORPHAN_WARN
14151415 def_bool y
14161416 depends on ARCH_WANT_LD_ORPHAN_WARN
1417− depends on !LD_IS_LLD || LLD_VERSION >= 110000
14181417 depends on $(ld-option,--orphan-handling=warn)
14191418
14201419 config SYSCTL
init/Makefile+1−1
@@ -31,7 +31,7 @@ quiet_cmd_compile.h = CHK $@ · 30 unmodified lines
3131 cmd_compile.h = \
3232 $(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
3333 "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT_BUILD)" \
34− "$(CONFIG_PREEMPT_RT)" $(CONFIG_CC_VERSION_TEXT) "$(LD)"
34+ "$(CONFIG_PREEMPT_RT)" "$(CONFIG_CC_VERSION_TEXT)" "$(LD)"
3535
3636 include/generated/compile.h: FORCE
3737 $(call cmd,compile.h)
kernel/gcov/Kconfig+0−1
@@ -4,7 +4,6 @@ menu "GCOV-based kernel profiling" · 3 unmodified lines
44 config GCOV_KERNEL
55 bool "Enable gcov-based kernel profiling"
66 depends on DEBUG_FS
7− depends on !CC_IS_CLANG || CLANG_VERSION >= 110000
87 depends on !ARCH_WANTS_NO_INSTR || CC_HAS_NO_PROFILE_FN_ATTR
98 select CONSTRUCTORS
109 default n
net/wireless/Makefile+2−2
@@ -33,8 +33,8 @@ $(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.hex) · 32 unmodified lines
3333 echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \
3434 ) > $@
3535
36−$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \
37− $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509)
36+$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDI) \
37+ $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR)/*.x509)
3838 @$(kecho) " GEN $@"
3939 $(Q)(set -e; \
4040 allf=""; \
scripts/.gitignore+0−1
@@ -1,7 +1,6 @@
11 # SPDX-License-Identifier: GPL-2.0-only
22 /asn1_compiler
33 /bin2c
4−/extract-cert
54 /insert-sys-cert
65 /kallsyms
76 /module.lds
scripts/Kbuild.include+0−47
@@ -195,53 +195,6 @@ why = \ · 194 unmodified lines
195195 echo-why = $(call escsq, $(strip $(why)))
196196 endif
197197
198−###############################################################################
199−#
200−# When a Kconfig string contains a filename, it is suitable for
201−# passing to shell commands. It is surrounded by double-quotes, and
202−# any double-quotes or backslashes within it are escaped by
203−# backslashes.
204−#
205−# This is no use for dependencies or $(wildcard). We need to strip the
206−# surrounding quotes and the escaping from quotes and backslashes, and
207−# we *do* need to escape any spaces in the string. So, for example:
208−#
209−# Usage: $(eval $(call config_filename,FOO))
210−#
211−# Defines FOO_FILENAME based on the contents of the CONFIG_FOO option,
212−# transformed as described above to be suitable for use within the
213−# makefile.
214−#
215−# Also, if the filename is a relative filename and exists in the source
216−# tree but not the build tree, define FOO_SRCPREFIX as $(srctree)/ to
217−# be prefixed to *both* command invocation and dependencies.
218−#
219−# Note: We also print the filenames in the quiet_cmd_foo text, and
220−# perhaps ought to have a version specially escaped for that purpose.
221−# But it's only cosmetic, and $(patsubst "%",%,$(CONFIG_FOO)) is good
222−# enough. It'll strip the quotes in the common case where there's no
223−# space and it's a simple filename, and it'll retain the quotes when
224−# there's a space. There are some esoteric cases in which it'll print
225−# the wrong thing, but we don't really care. The actual dependencies
226−# and commands *do* get it right, with various combinations of single
227−# and double quotes, backslashes and spaces in the filenames.
228−#
229−###############################################################################
230−#
231−define config_filename
232−ifneq ($$(CONFIG_$(1)),"")
233−$(1)_FILENAME := $$(subst \\,\,$$(subst \$$(quote),$$(quote),$$(subst $$(space_escape),\$$(space),$$(patsubst "%",%,$$(subst $$(space),$$(space_escape),$$(CONFIG_$(1)))))))
234−ifneq ($$(patsubst /%,%,$$(firstword $$($(1)_FILENAME))),$$(firstword $$($(1)_FILENAME)))
235−else
236−ifeq ($$(wildcard $$($(1)_FILENAME)),)
237−ifneq ($$(wildcard $$(srctree)/$$($(1)_FILENAME)),)
238−$(1)_SRCPREFIX := $(srctree)/
239−endif
240−endif
241−endif
242−endif
243−endef
244−#
245198 ###############################################################################
246199
247200 # delete partially updated (i.e. corrupted) files on error
scripts/Makefile+2−9
@@ -3,26 +3,19 @@ · 2 unmodified lines
33 # scripts contains sources for various helper programs used throughout
44 # the kernel for the build process.
55
6−CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
7−CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null)
8−
96 hostprogs-always-$(CONFIG_BUILD_BIN2C) += bin2c
107 hostprogs-always-$(CONFIG_KALLSYMS) += kallsyms
118 hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount
129 hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
1310 hostprogs-always-$(CONFIG_ASN1) += asn1_compiler
1411 hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
15−hostprogs-always-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
1612 hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
17−hostprogs-always-$(CONFIG_SYSTEM_REVOCATION_LIST) += extract-cert
1813
1914 HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
2015 HOSTLDLIBS_sorttable = -lpthread
2116 HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
22−HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)
23−HOSTLDLIBS_sign-file = $(CRYPTO_LIBS)
24−HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
25−HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
17+HOSTCFLAGS_sign-file.o = $(shell pkg-config --cflags libcrypto 2> /dev/null)
18+HOSTLDLIBS_sign-file = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
2619
2720 ifdef CONFIG_UNWINDER_ORC
2821 ifeq ($(ARCH),x86_64)
scripts/Makefile.lib+28−7
@@ -399,20 +399,35 @@ printf "%08x\n" $$dec_size | \ · 398 unmodified lines
399399 } \
400400 )
401401
402+quiet_cmd_file_size = GEN $@
403+ cmd_file_size = $(size_append) > $@
404+
402405 quiet_cmd_bzip2 = BZIP2 $@
403− cmd_bzip2 = { cat $(real-prereqs) | $(KBZIP2) -9; $(size_append); } > $@
406+ cmd_bzip2 = cat $(real-prereqs) | $(KBZIP2) -9 > $@
407+
408+quiet_cmd_bzip2_with_size = BZIP2 $@
409+ cmd_bzip2_with_size = { cat $(real-prereqs) | $(KBZIP2) -9; $(size_append); } > $@
404410
405411 # Lzma
406412 # ---------------------------------------------------------------------------
407413
408414 quiet_cmd_lzma = LZMA $@
409− cmd_lzma = { cat $(real-prereqs) | $(LZMA) -9; $(size_append); } > $@
415+ cmd_lzma = cat $(real-prereqs) | $(LZMA) -9 > $@
416+
417+quiet_cmd_lzma_with_size = LZMA $@
418+ cmd_lzma_with_size = { cat $(real-prereqs) | $(LZMA) -9; $(size_append); } > $@
410419
411420 quiet_cmd_lzo = LZO $@
412− cmd_lzo = { cat $(real-prereqs) | $(KLZOP) -9; $(size_append); } > $@
421+ cmd_lzo = cat $(real-prereqs) | $(KLZOP) -9 > $@
422+
423+quiet_cmd_lzo_with_size = LZO $@
424+ cmd_lzo_with_size = { cat $(real-prereqs) | $(KLZOP) -9; $(size_append); } > $@
413425
414426 quiet_cmd_lz4 = LZ4 $@
415− cmd_lz4 = { cat $(real-prereqs) | $(LZ4) -l -c1 stdin stdout; \
427+ cmd_lz4 = cat $(real-prereqs) | $(LZ4) -l -c1 stdin stdout > $@
428+
429+quiet_cmd_lz4_with_size = LZ4 $@
430+ cmd_lz4_with_size = { cat $(real-prereqs) | $(LZ4) -l -c1 stdin stdout; \
416431 $(size_append); } > $@
417432
418433 # U-Boot mkimage
@@ -455,7 +470,10 @@ quiet_cmd_uimage = UIMAGE $@ · 36 unmodified lines
455470 # big dictionary would increase the memory usage too much in the multi-call
456471 # decompression mode. A BCJ filter isn't used either.
457472 quiet_cmd_xzkern = XZKERN $@
458− cmd_xzkern = { cat $(real-prereqs) | sh $(srctree)/scripts/xz_wrap.sh; \
473+ cmd_xzkern = cat $(real-prereqs) | sh $(srctree)/scripts/xz_wrap.sh > $@
474+
475+quiet_cmd_xzkern_with_size = XZKERN $@
476+ cmd_xzkern_with_size = { cat $(real-prereqs) | sh $(srctree)/scripts/xz_wrap.sh; \
459477 $(size_append); } > $@
460478
461479 quiet_cmd_xzmisc = XZMISC $@
@@ -478,10 +496,13 @@ quiet_cmd_xzmisc = XZMISC $@ · 16 unmodified lines
478496 # be used because it would require zstd to allocate a 128 MB buffer.
479497
480498 quiet_cmd_zstd = ZSTD $@
481− cmd_zstd = { cat $(real-prereqs) | $(ZSTD) -19; $(size_append); } > $@
499+ cmd_zstd = cat $(real-prereqs) | $(ZSTD) -19 > $@
482500
483501 quiet_cmd_zstd22 = ZSTD22 $@
484− cmd_zstd22 = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@
502+ cmd_zstd22 = cat $(real-prereqs) | $(ZSTD) -22 --ultra > $@
503+
504+quiet_cmd_zstd22_with_size = ZSTD22 $@
505+ cmd_zstd22_with_size = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@
485506
486507 # ASM offsets
487508 # ---------------------------------------------------------------------------
scripts/Makefile.modinst+2−2
@@ -66,9 +66,9 @@ endif · 65 unmodified lines
6666 # Don't stop modules_install even if we can't sign external modules.
6767 #
6868 ifeq ($(CONFIG_MODULE_SIG_ALL),y)
69+sig-key := $(if $(wildcard $(CONFIG_MODULE_SIG_KEY)),,$(srctree)/)$(CONFIG_MODULE_SIG_KEY)
6970 quiet_cmd_sign = SIGN $@
70−$(eval $(call config_filename,MODULE_SIG_KEY))
71− cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY) certs/signing_key.x509 $@ \
71+ cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(sig-key) certs/signing_key.x509 $@ \
7272 $(if $(KBUILD_EXTMOD),|| true)
7373 else
7474 quiet_cmd_sign :=
scripts/gen_autoksyms.sh+3−8
@@ -16,20 +16,15 @@ case "$KBUILD_VERBOSE" in · 15 unmodified lines
1616 ;;
1717 esac
1818
19−# We need access to CONFIG_ symbols
20−. include/config/auto.conf
21−
2219 needed_symbols=
2320
2421 # Special case for modversions (see modpost.c)
25−if [ -n "$CONFIG_MODVERSIONS" ]; then
22+if grep -q "^CONFIG_MODVERSIONS=y$" include/config/auto.conf; then
2623 needed_symbols="$needed_symbols module_layout"
2724 fi
2825
29−ksym_wl=
30−if [ -n "$CONFIG_UNUSED_KSYMS_WHITELIST" ]; then
31− # Use 'eval' to expand the whitelist path and check if it is relative
32− eval ksym_wl="$CONFIG_UNUSED_KSYMS_WHITELIST"
26+ksym_wl=$(sed -n 's/^CONFIG_UNUSED_KSYMS_WHITELIST=\(.*\)$/\1/p' include/config/auto.conf)
27+if [ -n "$ksym_wl" ]; then
3328 [ "${ksym_wl}" != "${ksym_wl#/}" ] || ksym_wl="$abs_srctree/$ksym_wl"
3429 if [ ! -f "$ksym_wl" ] || [ ! -r "$ksym_wl" ]; then
3530 echo "ERROR: '$ksym_wl' whitelist file not found" >&2
scripts/kconfig/Makefile+2−1
@@ -69,7 +69,7 @@ localyesconfig localmodconfig: $(obj)/conf · 68 unmodified lines
6969 # deprecated for external use
7070 simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
7171 alldefconfig randconfig listnewconfig olddefconfig syncconfig \
72− helpnewconfig yes2modconfig mod2yesconfig
72+ helpnewconfig yes2modconfig mod2yesconfig mod2noconfig
7373
7474 PHONY += $(simple-targets)
7575
@@ -134,6 +134,7 @@ help: · 58 unmodified lines
134134 @echo ' randconfig - New config with random answer to all options'
135135 @echo ' yes2modconfig - Change answers from yes to mod if possible'
136136 @echo ' mod2yesconfig - Change answers from mod to yes if possible'
137+ @echo ' mod2noconfig - Change answers from mod to no if possible'
137138 @echo ' listnewconfig - List new options'
138139 @echo ' helpnewconfig - List new options and help text'
139140 @echo ' olddefconfig - Same as oldconfig but sets new symbols to their'
scripts/kconfig/conf.c+10−7
@@ -35,6 +35,7 @@ enum input_mode { · 34 unmodified lines
3535 olddefconfig,
3636 yes2modconfig,
3737 mod2yesconfig,
38+ mod2noconfig,
3839 };
3940 static enum input_mode input_mode = oldaskconfig;
4041 static int input_mode_opt;
@@ -163,8 +164,6 @@ enum conf_def_mode { · 122 unmodified lines
163164 def_default,
164165 def_yes,
165166 def_mod,
166− def_y2m,
167− def_m2y,
168167 def_no,
169168 def_random
170169 };
@@ -302,12 +301,10 @@ static bool conf_set_all_new_symbols(enum conf_def_mode mode) · 131 unmodified lines
302301 return has_changed;
303302 }
304303
305−static void conf_rewrite_mod_or_yes(enum conf_def_mode mode)
304+static void conf_rewrite_tristates(tristate old_val, tristate new_val)
306305 {
307306 struct symbol *sym;
308307 int i;
309− tristate old_val = (mode == def_y2m) ? yes : mod;
310− tristate new_val = (mode == def_y2m) ? mod : yes;
311308
312309 for_all_symbols(i, sym) {
313310 if (sym_get_type(sym) == S_TRISTATE &&
@@ -685,6 +682,7 @@ static const struct option long_opts[] = { · 371 unmodified lines
685682 {"olddefconfig", no_argument, &input_mode_opt, olddefconfig},
686683 {"yes2modconfig", no_argument, &input_mode_opt, yes2modconfig},
687684 {"mod2yesconfig", no_argument, &input_mode_opt, mod2yesconfig},
685+ {"mod2noconfig", no_argument, &input_mode_opt, mod2noconfig},
688686 {NULL, 0, NULL, 0}
689687 };
690688
@@ -713,6 +711,7 @@ static void conf_usage(const char *progname) · 22 unmodified lines
713711 printf(" --randconfig New config with random answer to all options\n");
714712 printf(" --yes2modconfig Change answers from yes to mod if possible\n");
715713 printf(" --mod2yesconfig Change answers from mod to yes if possible\n");
714+ printf(" --mod2noconfig Change answers from mod to no if possible\n");
716715 printf(" (If none of the above is given, --oldaskconfig is the default)\n");
717716 }
718717
@@ -788,6 +787,7 @@ int main(int ac, char **av) · 69 unmodified lines
788787 case olddefconfig:
789788 case yes2modconfig:
790789 case mod2yesconfig:
790+ case mod2noconfig:
791791 conf_read(NULL);
792792 break;
793793 case allnoconfig:
@@ -862,10 +862,13 @@ int main(int ac, char **av) · 68 unmodified lines
862862 case savedefconfig:
863863 break;
864864 case yes2modconfig:
865− conf_rewrite_mod_or_yes(def_y2m);
865+ conf_rewrite_tristates(yes, mod);
866866 break;
867867 case mod2yesconfig:
868− conf_rewrite_mod_or_yes(def_m2y);
868+ conf_rewrite_tristates(mod, yes);
869+ break;
870+ case mod2noconfig:
871+ conf_rewrite_tristates(mod, no);
869872 break;
870873 case oldaskconfig:
871874 rootEntry = &rootmenu;
scripts/kconfig/confdata.c+13−11
@@ -244,19 +244,21 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 243 unmodified lines
244244 p, sym->name);
245245 return 1;
246246 case S_STRING:
247− if (*p++ != '"')
248− break;
249− for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) {
250− if (*p2 == '"') {
251− *p2 = 0;
247+ /* No escaping for S_DEF_AUTO (include/config/auto.conf) */
248+ if (def != S_DEF_AUTO) {
249+ if (*p++ != '"')
252250 break;
251+ for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) {
252+ if (*p2 == '"') {
253+ *p2 = 0;
254+ break;
255+ }
256+ memmove(p2, p2 + 1, strlen(p2));
253257 }
254− memmove(p2, p2 + 1, strlen(p2));
255− }
256− if (!p2) {
257− if (def != S_DEF_AUTO)
258+ if (!p2) {
258259 conf_warning("invalid string found");
259− return 1;
260+ return 1;
261+ }
260262 }
261263 /* fall through */
262264 case S_INT:
@@ -700,7 +702,7 @@ static void print_symbol_for_dotconfig(FILE *fp, struct symbol *sym) · 437 unmodified lines
700702
701703 static void print_symbol_for_autoconf(FILE *fp, struct symbol *sym)
702704 {
703− __print_symbol(fp, sym, OUTPUT_N_NONE, true);
705+ __print_symbol(fp, sym, OUTPUT_N_NONE, false);
704706 }
705707
706708 void print_symbol_for_listconfig(struct symbol *sym)
scripts/kconfig/streamline_config.pl+1−1
@@ -170,7 +170,7 @@ sub read_kconfig { · 169 unmodified lines
170170 $source =~ s/\$\($env\)/$ENV{$env}/;
171171 }
172172
173− open(my $kinfile, '<', $source) || die "Can't open $kconfig";
173+ open(my $kinfile, '<', $source) || die "Can't open $source";
174174 while (<$kinfile>) {
175175 chomp;
176176
scripts/link-vmlinux.sh+25−24
@@ -34,6 +34,10 @@ LD="$1" · 33 unmodified lines
3434 KBUILD_LDFLAGS="$2"
3535 LDFLAGS_vmlinux="$3"
3636
37+is_enabled() {
38+ grep -q "^$1=y" include/config/auto.conf
39+}
40+
3741 # Nice output in kbuild format
3842 # Will be supressed by "make -s"
3943 info()
@@ -80,11 +84,11 @@ modpost_link() · 40 unmodified lines
8084 ${KBUILD_VMLINUX_LIBS} \
8185 --end-group"
8286
83− if [ -n "${CONFIG_LTO_CLANG}" ]; then
87+ if is_enabled CONFIG_LTO_CLANG; then
8488 gen_initcalls
8589 lds="-T .tmp_initcalls.lds"
8690
87− if [ -n "${CONFIG_MODVERSIONS}" ]; then
91+ if is_enabled CONFIG_MODVERSIONS; then
8892 gen_symversions
8993 lds="${lds} -T .tmp_symversions.lds"
9094 fi
@@ -104,21 +108,21 @@ objtool_link() · 13 unmodified lines
104108 local objtoolcmd;
105109 local objtoolopt;
106110
107− if [ "${CONFIG_LTO_CLANG} ${CONFIG_STACK_VALIDATION}" = "y y" ]; then
111+ if is_enabled CONFIG_LTO_CLANG && is_enabled CONFIG_STACK_VALIDATION; then
108112 # Don't perform vmlinux validation unless explicitly requested,
109113 # but run objtool on vmlinux.o now that we have an object file.
110− if [ -n "${CONFIG_UNWINDER_ORC}" ]; then
114+ if is_enabled CONFIG_UNWINDER_ORC; then
111115 objtoolcmd="orc generate"
112116 fi
113117
114118 objtoolopt="${objtoolopt} --duplicate"
115119
116− if [ -n "${CONFIG_FTRACE_MCOUNT_USE_OBJTOOL}" ]; then
120+ if is_enabled CONFIG_FTRACE_MCOUNT_USE_OBJTOOL; then
117121 objtoolopt="${objtoolopt} --mcount"
118122 fi
119123 fi
120124
121− if [ -n "${CONFIG_VMLINUX_VALIDATION}" ]; then
125+ if is_enabled CONFIG_VMLINUX_VALIDATION; then
122126 objtoolopt="${objtoolopt} --noinstr"
123127 fi
124128
@@ -127,19 +131,19 @@ objtool_link() · 2 unmodified lines
127131 objtoolcmd="check"
128132 fi
129133 objtoolopt="${objtoolopt} --vmlinux"
130− if [ -z "${CONFIG_FRAME_POINTER}" ]; then
134+ if ! is_enabled CONFIG_FRAME_POINTER; then
131135 objtoolopt="${objtoolopt} --no-fp"
132136 fi
133− if [ -n "${CONFIG_GCOV_KERNEL}" ] || [ -n "${CONFIG_LTO_CLANG}" ]; then
137+ if is_enabled CONFIG_GCOV_KERNEL || is_enabled CONFIG_LTO_CLANG; then
134138 objtoolopt="${objtoolopt} --no-unreachable"
135139 fi
136− if [ -n "${CONFIG_RETPOLINE}" ]; then
140+ if is_enabled CONFIG_RETPOLINE; then
137141 objtoolopt="${objtoolopt} --retpoline"
138142 fi
139− if [ -n "${CONFIG_X86_SMAP}" ]; then
143+ if is_enabled CONFIG_X86_SMAP; then
140144 objtoolopt="${objtoolopt} --uaccess"
141145 fi
142− if [ -n "${CONFIG_SLS}" ]; then
146+ if is_enabled CONFIG_SLS; then
143147 objtoolopt="${objtoolopt} --sls"
144148 fi
145149 info OBJTOOL ${1}
@@ -164,7 +168,7 @@ vmlinux_link() · 18 unmodified lines
164168 # skip output file argument
165169 shift
166170
167− if [ -n "${CONFIG_LTO_CLANG}" ]; then
171+ if is_enabled CONFIG_LTO_CLANG; then
168172 # Use vmlinux.o instead of performing the slow LTO link again.
169173 objs=vmlinux.o
170174 libs=
@@ -192,7 +196,7 @@ vmlinux_link() · 21 unmodified lines
192196 ldflags="${ldflags} ${wl}--strip-debug"
193197 fi
194198
195− if [ -n "${CONFIG_VMLINUX_MAP}" ]; then
199+ if is_enabled CONFIG_VMLINUX_MAP; then
196200 ldflags="${ldflags} ${wl}-Map=${output}.map"
197201 fi
198202
@@ -242,15 +246,15 @@ kallsyms() · 43 unmodified lines
242246 {
243247 local kallsymopt;
244248
245− if [ -n "${CONFIG_KALLSYMS_ALL}" ]; then
249+ if is_enabled CONFIG_KALLSYMS_ALL; then
246250 kallsymopt="${kallsymopt} --all-symbols"
247251 fi
248252
249− if [ -n "${CONFIG_KALLSYMS_ABSOLUTE_PERCPU}" ]; then
253+ if is_enabled CONFIG_KALLSYMS_ABSOLUTE_PERCPU; then
250254 kallsymopt="${kallsymopt} --absolute-percpu"
251255 fi
252256
253− if [ -n "${CONFIG_KALLSYMS_BASE_RELATIVE}" ]; then
257+ if is_enabled CONFIG_KALLSYMS_BASE_RELATIVE; then
254258 kallsymopt="${kallsymopt} --base-relative"
255259 fi
256260
@@ -315,9 +319,6 @@ if [ "$1" = "clean" ]; then · 58 unmodified lines
315319 exit 0
316320 fi
317321
318−# We need access to CONFIG_ symbols
319−. include/config/auto.conf
320−
321322 # Update version
322323 info GEN .version
323324 if [ -r .version ]; then
@@ -346,7 +347,7 @@ tr '\0' '\n' < modules.builtin.modinfo | sed -n 's/^[[:alnum:]:_]*\.file=//p' | · 22 unmodified lines
346347 tr ' ' '\n' | uniq | sed -e 's:^:kernel/:' -e 's/$/.ko/' > modules.builtin
347348
348349 btf_vmlinux_bin_o=""
349−if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
350+if is_enabled CONFIG_DEBUG_INFO_BTF; then
350351 btf_vmlinux_bin_o=.btf.vmlinux.bin.o
351352 if ! gen_btf .tmp_vmlinux.btf $btf_vmlinux_bin_o ; then
352353 echo >&2 "Failed to generate BTF for vmlinux"
@@ -358,7 +359,7 @@ fi · 5 unmodified lines
358359 kallsymso=""
359360 kallsymso_prev=""
360361 kallsyms_vmlinux=""
361−if [ -n "${CONFIG_KALLSYMS}" ]; then
362+if is_enabled CONFIG_KALLSYMS; then
362363
363364 # kallsyms support
364365 # Generate section listing all symbols and add it into vmlinux
@@ -398,7 +399,7 @@ fi · 33 unmodified lines
398399 vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}
399400
400401 # fill in BTF IDs
401−if [ -n "${CONFIG_DEBUG_INFO_BTF}" -a -n "${CONFIG_BPF}" ]; then
402+if is_enabled CONFIG_DEBUG_INFO_BTF && is_enabled CONFIG_BPF; then
402403 info BTFIDS vmlinux
403404 ${RESOLVE_BTFIDS} vmlinux
404405 fi
@@ -406,7 +407,7 @@ fi · 1 unmodified line
406407 info SYSMAP System.map
407408 mksysmap vmlinux System.map
408409
409−if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then
410+if is_enabled CONFIG_BUILDTIME_TABLE_SORT; then
410411 info SORTTAB vmlinux
411412 if ! sorttable vmlinux; then
412413 echo >&2 Failed to sort kernel tables
@@ -415,7 +416,7 @@ if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then · 2 unmodified lines
415416 fi
416417
417418 # step a (see comment above)
418−if [ -n "${CONFIG_KALLSYMS}" ]; then
419+if is_enabled CONFIG_KALLSYMS; then
419420 mksysmap ${kallsyms_vmlinux} .tmp_System.map
420421
421422 if ! cmp -s System.map .tmp_System.map; then
scripts/min-tool-version.sh+1−1
@@ -28,7 +28,7 @@ llvm) · 27 unmodified lines
2828 if [ "$SRCARCH" = s390 ]; then
2929 echo 13.0.0
3030 else
31− echo 10.0.1
31+ echo 11.0.0
3232 fi
3333 ;;
3434 *)
scripts/remove-stale-files+2−0
@@ -39,3 +39,5 @@ if [ -n "${building_out_of_srctree}" ]; then · 38 unmodified lines
3939 rm -f arch/parisc/boot/compressed/${f}
4040 done
4141 fi
42+
43+rm -f scripts/extract-cert
scripts/setlocalversion+4−5
@@ -111,9 +111,7 @@ if $scm_only; then · 110 unmodified lines
111111 exit
112112 fi
113113
114−if test -e include/config/auto.conf; then
115− . include/config/auto.conf
116−else
114+if ! test -e include/config/auto.conf; then
117115 echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
118116 exit 1
119117 fi
@@ -125,10 +123,11 @@ if test ! "$srctree" -ef .; then · 5 unmodified lines
125123 fi
126124
127125 # CONFIG_LOCALVERSION and LOCALVERSION (if set)
128−res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"
126+config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf)
127+res="${res}${config_localversion}${LOCALVERSION}"
129128
130129 # scm version string if not at a tagged commit
131−if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
130+if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then
132131 # full scm version string
133132 res="$res$(scm_version)"
134133 elif [ "${LOCALVERSION+set}" != "set" ]; then
usr/Makefile+1−6
@@ -3,11 +3,6 @@ · 2 unmodified lines
33 # kbuild file for usr/ - including initramfs image
44 #
55
6−# cmd_bzip2, cmd_lzma, cmd_lzo, cmd_lz4 from scripts/Makefile.lib appends the
7−# size at the end of the compressed file, which unfortunately does not work
8−# with unpack_to_rootfs(). Make size_append no-op.
9−override size_append := :
10−
116 compress-y := shipped
127 compress-$(CONFIG_INITRAMFS_COMPRESSION_GZIP) := gzip
138 compress-$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) := bzip2
@@ -21,7 +16,7 @@ obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o · 7 unmodified lines
2116
2217 $(obj)/initramfs_data.o: $(obj)/initramfs_inc_data
2318
24−ramfs-input := $(strip $(shell echo $(CONFIG_INITRAMFS_SOURCE)))
19+ramfs-input := $(CONFIG_INITRAMFS_SOURCE)
2520 cpio-data :=
2621
2722 # If CONFIG_INITRAMFS_SOURCE is empty, generate a small initramfs with the
usr/include/Makefile+4−2
@@ -99,10 +99,12 @@ quiet_cmd_hdrtest = HDRTEST $< · 98 unmodified lines
9999 cmd_hdrtest = \
100100 $(CC) $(c_flags) -S -o /dev/null -x c /dev/null \
101101 $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
102− $(PERL) $(srctree)/scripts/headers_check.pl $(obj) $(SRCARCH) $<; \
102+ $(PERL) $(srctree)/$(src)/headers_check.pl $(obj) $(SRCARCH) $<; \
103103 touch $@
104104
105105 $(obj)/%.hdrtest: $(obj)/%.h FORCE
106106 $(call if_changed_dep,hdrtest)
107107
108−clean-files += $(filter-out Makefile, $(notdir $(wildcard $(obj)/*)))
108+# Since GNU Make 4.3, $(patsubst $(obj)/%/,%,$(wildcard $(obj)/*/)) works.
109+# To support older Make versions, use a somewhat tedious way.
110+clean-files += $(filter-out Makefile headers_check.pl, $(notdir $(wildcard $(obj)/*)))
usr/include/headers_check.plrenamed from scripts/headers_check.pl+0−0

File renamed without changes.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t