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
176 y y y Y/m/n176 y y y Y/m/n
177 n m n N/m177 n m n N/m
178 m m m M/n178 m m m M/n
179 y m n M/n179 y m m M/n
180 y n * N180 y n * N
181 === === ============= ==============181 === === ============= ==============
182 182
Documentation/process/changes.rst+1−1
@@ -30,7 +30,7 @@ you probably needn't concern yourself with pcmciautils. · 29 unmodified lines
30 Program Minimal version Command to check the version30 Program Minimal version Command to check the version
31====================== =============== ========================================31====================== =============== ========================================
32GNU C 5.1 gcc --version32GNU C 5.1 gcc --version
33Clang/LLVM (optional) 10.0.1 clang --version33Clang/LLVM (optional) 11.0.0 clang --version
34GNU make 3.81 make --version34GNU make 3.81 make --version
35binutils 2.23 ld -v35binutils 2.23 ld -v
36flex 2.5.35 flex --version36flex 2.5.35 flex --version
MAINTAINERS+0−1
@@ -4467,7 +4467,6 @@ L: keyrings@vger.kernel.org · 4466 unmodified lines
4467S: Maintained4467S: Maintained
4468F: Documentation/admin-guide/module-signing.rst4468F: Documentation/admin-guide/module-signing.rst
4469F: certs/4469F: certs/
4470F: scripts/extract-cert.c
4471F: scripts/sign-file.c4470F: scripts/sign-file.c
4472 4471
4473CFAG12864B LCD DRIVER4472CFAG12864B LCD DRIVER
Makefile+3−12
@@ -1278,15 +1278,6 @@ headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts · 1277 unmodified lines
1278 $(Q)$(MAKE) $(hdr-inst)=include/uapi1278 $(Q)$(MAKE) $(hdr-inst)=include/uapi
1279 $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi1279 $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi
1280 1280
1281# Deprecated. It is no-op now.
1282PHONY += headers_check
1283headers_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
1290ifdef CONFIG_HEADERS_INSTALL1281ifdef CONFIG_HEADERS_INSTALL
1291prepare: headers1282prepare: headers
1292endif1283endif
@@ -1497,7 +1488,7 @@ MRPROPER_FILES += include/config include/generated \ · 204 unmodified lines
1497 debian snap tar-install \1488 debian snap tar-install \
1498 .config .config.old .version \1489 .config .config.old .version \
1499 Module.symvers \1490 Module.symvers \
1500 certs/signing_key.pem certs/signing_key.x509 \1491 certs/signing_key.pem \
1501 certs/x509.genkey \1492 certs/x509.genkey \
1502 vmlinux-gdb.py \1493 vmlinux-gdb.py \
1503 *.spec1494 *.spec
@@ -1723,9 +1714,9 @@ PHONY += prepare · 219 unmodified lines
1723# now expand this into a simple variable to reduce the cost of shell evaluations1714# now expand this into a simple variable to reduce the cost of shell evaluations
1724prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)1715prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
1725prepare:1716prepare:
1726 @if [ "$(CC_VERSION_TEXT)" != $(CONFIG_CC_VERSION_TEXT) ]; then \1717 @if [ "$(CC_VERSION_TEXT)" != "$(CONFIG_CC_VERSION_TEXT)" ]; then \
1727 echo >&2 "warning: the compiler differs from the one used to build the kernel"; \1718 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)"; \
1729 echo >&2 " You are using: $(CC_VERSION_TEXT)"; \1720 echo >&2 " You are using: $(CC_VERSION_TEXT)"; \
1730 fi1721 fi
1731 1722
arch/Kconfig+1−2
@@ -648,8 +648,7 @@ config ARCH_SUPPORTS_LTO_CLANG_THIN · 647 unmodified lines
648 648
649config HAS_LTO_CLANG649config HAS_LTO_CLANG
650 def_bool y650 def_bool y
651 # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510651 depends on CC_IS_CLANG && LD_IS_LLD && AS_IS_LLVM
652 depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD && AS_IS_LLVM
653 depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)652 depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
654 depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)653 depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
655 depends on ARCH_SUPPORTS_LTO_CLANG654 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
14tune-mcpu-def-$(CONFIG_ISA_ARCOMPACT) := -mcpu=arc70014tune-mcpu-def-$(CONFIG_ISA_ARCOMPACT) := -mcpu=arc700
15tune-mcpu-def-$(CONFIG_ISA_ARCV2) := -mcpu=hs3815tune-mcpu-def-$(CONFIG_ISA_ARCV2) := -mcpu=hs38
16 16
17ifeq ($(CONFIG_ARC_TUNE_MCPU),"")17ifeq ($(CONFIG_ARC_TUNE_MCPU),)
18cflags-y += $(tune-mcpu-def-y)18cflags-y += $(tune-mcpu-def-y)
19else19else
20tune-mcpu := $(shell echo $(CONFIG_ARC_TUNE_MCPU))20tune-mcpu := $(CONFIG_ARC_TUNE_MCPU)
21ifneq ($(call cc-option,$(tune-mcpu)),)21ifneq ($(call cc-option,$(tune-mcpu)),)
22cflags-y += $(tune-mcpu)22cflags-y += $(tune-mcpu)
23else23else
arch/arc/boot/dts/Makefile+2−2
@@ -2,8 +2,8 @@ · 1 unmodified line
2# Built-in dtb2# Built-in dtb
3builtindtb-y := nsim_7003builtindtb-y := nsim_700
4 4
5ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")5ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),)
6 builtindtb-y := $(patsubst "%",%,$(CONFIG_ARC_BUILTIN_DTB_NAME))6 builtindtb-y := $(CONFIG_ARC_BUILTIN_DTB_NAME)
7endif7endif
8 8
9obj-y += $(builtindtb-y).dtb.o9obj-y += $(builtindtb-y).dtb.o
arch/arm/Kconfig.debug+0−2
@@ -66,8 +66,6 @@ config UNWINDER_FRAME_POINTER · 65 unmodified lines
66config UNWINDER_ARM66config UNWINDER_ARM
67 bool "ARM EABI stack unwinder"67 bool "ARM EABI stack unwinder"
68 depends on AEABI && !FUNCTION_GRAPH_TRACER68 depends on AEABI && !FUNCTION_GRAPH_TRACER
69 # https://github.com/ClangBuiltLinux/linux/issues/732
70 depends on !LD_IS_LLD || LLD_VERSION >= 110000
71 select ARM_UNWIND69 select ARM_UNWIND
72 help70 help
73 This option enables stack unwinding support in the kernel71 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
76CPPFLAGS_vmlinux.lds += -DMALLOC_SIZE="$(MALLOC_SIZE)"76CPPFLAGS_vmlinux.lds += -DMALLOC_SIZE="$(MALLOC_SIZE)"
77 77
78compress-$(CONFIG_KERNEL_GZIP) = gzip78compress-$(CONFIG_KERNEL_GZIP) = gzip
79compress-$(CONFIG_KERNEL_LZO) = lzo79compress-$(CONFIG_KERNEL_LZO) = lzo_with_size
80compress-$(CONFIG_KERNEL_LZMA) = lzma80compress-$(CONFIG_KERNEL_LZMA) = lzma_with_size
81compress-$(CONFIG_KERNEL_XZ) = xzkern81compress-$(CONFIG_KERNEL_XZ) = xzkern_with_size
82compress-$(CONFIG_KERNEL_LZ4) = lz482compress-$(CONFIG_KERNEL_LZ4) = lz4_with_size
83 83
84libfdt_objs := fdt_rw.o fdt_ro.o fdt_wip.o fdt.o84libfdt_objs := fdt_rw.o fdt_ro.o fdt_wip.o fdt.o
85 85
arch/h8300/boot/compressed/Makefile+3−1
@@ -30,9 +30,11 @@ $(obj)/vmlinux.bin: vmlinux FORCE · 29 unmodified lines
30 30
31suffix-$(CONFIG_KERNEL_GZIP) := gzip31suffix-$(CONFIG_KERNEL_GZIP) := gzip
32suffix-$(CONFIG_KERNEL_LZO) := lzo32suffix-$(CONFIG_KERNEL_LZO) := lzo
33compress-$(CONFIG_KERNEL_GZIP) := gzip
34compress-$(CONFIG_KERNEL_LZO) := lzo_with_size
33 35
34$(obj)/vmlinux.bin.$(suffix-y): $(obj)/vmlinux.bin FORCE36$(obj)/vmlinux.bin.$(suffix-y): $(obj)/vmlinux.bin FORCE
35 $(call if_changed,$(suffix-y))37 $(call if_changed,$(compress-y))
36 38
37LDFLAGS_piggy.o := -r --format binary --oformat elf32-h8300-linux -T39LDFLAGS_piggy.o := -r --format binary --oformat elf32-h8300-linux -T
38OBJCOPYFLAGS := -O binary40OBJCOPYFLAGS := -O binary
arch/h8300/boot/dts/Makefile+1−5
@@ -1,9 +1,5 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'2obj-y += $(addsuffix .dtb.o, $(CONFIG_H8300_BUILTIN_DTB))
3BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_H8300_BUILTIN_DTB)).dtb.o
4endif
5
6obj-y += $(BUILTIN_DTB)
7 3
8dtb-$(CONFIG_H8300H_SIM) := h8300h_sim.dtb4dtb-$(CONFIG_H8300H_SIM) := h8300h_sim.dtb
9dtb-$(CONFIG_H8S_SIM) := h8s_sim.dtb5dtb-$(CONFIG_H8S_SIM) := h8s_sim.dtb
arch/microblaze/Makefile+4−4
@@ -5,10 +5,10 @@ UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\" · 4 unmodified lines
5 5
6# What CPU version are we building for, and crack it open6# What CPU version are we building for, and crack it open
7# as major.minor.rev7# as major.minor.rev
8CPU_VER := $(shell echo $(CONFIG_XILINX_MICROBLAZE0_HW_VER))8CPU_VER := $(CONFIG_XILINX_MICROBLAZE0_HW_VER)
9CPU_MAJOR := $(shell echo $(CPU_VER) | cut -d '.' -f 1)9CPU_MAJOR := $(word 1, $(subst ., , $(CPU_VER)))
10CPU_MINOR := $(shell echo $(CPU_VER) | cut -d '.' -f 2)10CPU_MINOR := $(word 2, $(subst ., , $(CPU_VER)))
11CPU_REV := $(shell echo $(CPU_VER) | cut -d '.' -f 3)11CPU_REV := $(word 3, $(subst ., , $(CPU_VER)))
12 12
13export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV13export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV
14 14
arch/mips/boot/compressed/Makefile+6−6
@@ -64,12 +64,12 @@ $(obj)/vmlinux.bin: $(KBUILD_IMAGE) FORCE · 63 unmodified lines
64 $(call if_changed,objcopy)64 $(call if_changed,objcopy)
65 65
66tool_$(CONFIG_KERNEL_GZIP) = gzip66tool_$(CONFIG_KERNEL_GZIP) = gzip
67tool_$(CONFIG_KERNEL_BZIP2) = bzip267tool_$(CONFIG_KERNEL_BZIP2) = bzip2_with_size
68tool_$(CONFIG_KERNEL_LZ4) = lz468tool_$(CONFIG_KERNEL_LZ4) = lz4_with_size
69tool_$(CONFIG_KERNEL_LZMA) = lzma69tool_$(CONFIG_KERNEL_LZMA) = lzma_with_size
70tool_$(CONFIG_KERNEL_LZO) = lzo70tool_$(CONFIG_KERNEL_LZO) = lzo_with_size
71tool_$(CONFIG_KERNEL_XZ) = xzkern71tool_$(CONFIG_KERNEL_XZ) = xzkern_with_size
72tool_$(CONFIG_KERNEL_ZSTD) = zstd2272tool_$(CONFIG_KERNEL_ZSTD) = zstd22_with_size
73 73
74targets += vmlinux.bin.z74targets += vmlinux.bin.z
75 75
arch/nds32/Makefile+0−6
@@ -31,12 +31,6 @@ core-y += arch/nds32/kernel/ arch/nds32/mm/ · 30 unmodified lines
31core-$(CONFIG_FPU) += arch/nds32/math-emu/31core-$(CONFIG_FPU) += arch/nds32/math-emu/
32libs-y += arch/nds32/lib/32libs-y += arch/nds32/lib/
33 33
34ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'
35BUILTIN_DTB := y
36else
37BUILTIN_DTB := n
38endif
39
40ifdef CONFIG_CPU_LITTLE_ENDIAN34ifdef CONFIG_CPU_LITTLE_ENDIAN
41KBUILD_CFLAGS += $(call cc-option, -EL)35KBUILD_CFLAGS += $(call cc-option, -EL)
42KBUILD_AFLAGS += $(call cc-option, -EL)36KBUILD_AFLAGS += $(call cc-option, -EL)
arch/nds32/boot/dts/Makefile+1−6
@@ -1,7 +1,2 @@
1# SPDX-License-Identifier: GPL-2.0-only1# SPDX-License-Identifier: GPL-2.0-only
2ifneq '$(CONFIG_NDS32_BUILTIN_DTB)' '""'2obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_NDS32_BUILTIN_DTB))
3BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_NDS32_BUILTIN_DTB)).dtb.o
4else
5BUILTIN_DTB :=
6endif
7obj-$(CONFIG_OF) += $(BUILTIN_DTB)
arch/nios2/boot/dts/Makefile+1−1
@@ -1,6 +1,6 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2 2
3obj-y := $(patsubst "%.dts",%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))3obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
4 4
5dtstree := $(srctree)/$(src)5dtstree := $(srctree)/$(src)
6dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))6dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
arch/openrisc/boot/dts/Makefile+1−6
@@ -1,9 +1,4 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2ifneq '$(CONFIG_OPENRISC_BUILTIN_DTB)' '""'2obj-y += $(addsuffix .dtb.o, $(CONFIG_OPENRISC_BUILTIN_DTB))
3BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_OPENRISC_BUILTIN_DTB)).dtb.o
4else
5BUILTIN_DTB :=
6endif
7obj-y += $(BUILTIN_DTB)
8 3
9#DTC_FLAGS ?= -p 10244#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
50$(obj)/vmlinux.bin: vmlinux FORCE50$(obj)/vmlinux.bin: vmlinux FORCE
51 $(call if_changed,objcopy)51 $(call if_changed,objcopy)
52 52
53vmlinux.bin.all-y := $(obj)/vmlinux.bin
54
55suffix-$(CONFIG_KERNEL_GZIP) := gz53suffix-$(CONFIG_KERNEL_GZIP) := gz
56suffix-$(CONFIG_KERNEL_BZIP2) := bz254suffix-$(CONFIG_KERNEL_BZIP2) := bz2
57suffix-$(CONFIG_KERNEL_LZ4) := lz455suffix-$(CONFIG_KERNEL_LZ4) := lz4
@@ -59,18 +57,18 @@ suffix-$(CONFIG_KERNEL_LZMA) := lzma · 1 unmodified line
59suffix-$(CONFIG_KERNEL_LZO) := lzo57suffix-$(CONFIG_KERNEL_LZO) := lzo
60suffix-$(CONFIG_KERNEL_XZ) := xz58suffix-$(CONFIG_KERNEL_XZ) := xz
61 59
62$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE60$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
63 $(call if_changed,gzip)61 $(call if_changed,gzip)
64$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE62$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
65 $(call if_changed,bzip2)63 $(call if_changed,bzip2_with_size)
66$(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE64$(obj)/vmlinux.bin.lz4: $(obj)/vmlinux.bin FORCE
67 $(call if_changed,lz4)65 $(call if_changed,lz4_with_size)
68$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE66$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
69 $(call if_changed,lzma)67 $(call if_changed,lzma_with_size)
70$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE68$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
71 $(call if_changed,lzo)69 $(call if_changed,lzo_with_size)
72$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE70$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
73 $(call if_changed,xzkern)71 $(call if_changed,xzkern_with_size)
74 72
75LDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T73LDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T
76$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE74$(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
365endif365endif
366 366
367# Allow extra targets to be added to the defconfig367# Allow extra targets to be added to the defconfig
368image-y += $(subst ",,$(CONFIG_EXTRA_TARGETS))368image-y += $(CONFIG_EXTRA_TARGETS)
369 369
370initrd- := $(patsubst zImage%, zImage.initrd%, $(image-))370initrd- := $(patsubst zImage%, zImage.initrd%, $(image-))
371initrd-y := $(patsubst zImage%, zImage.initrd%, \371initrd-y := $(patsubst zImage%, zImage.initrd%, \
arch/riscv/boot/dts/canaan/Makefile+1−3
@@ -1,5 +1,3 @@
1# SPDX-License-Identifier: GPL-2.01# SPDX-License-Identifier: GPL-2.0
2ifneq ($(CONFIG_SOC_CANAAN_K210_DTB_SOURCE),"")2dtb-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .dtb, $(CONFIG_SOC_CANAAN_K210_DTB_SOURCE))
3dtb-y += $(strip $(shell echo $(CONFIG_SOC_CANAAN_K210_DTB_SOURCE))).dtb
4obj-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .o, $(dtb-y))3obj-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .o, $(dtb-y))
5endif
arch/s390/boot/compressed/Makefile+13−15
@@ -58,8 +58,6 @@ OBJCOPYFLAGS_vmlinux.bin := -O binary --remove-section=.comment --remove-section · 57 unmodified lines
58$(obj)/vmlinux.bin: vmlinux FORCE58$(obj)/vmlinux.bin: vmlinux FORCE
59 $(call if_changed,objcopy)59 $(call if_changed,objcopy)
60 60
61vmlinux.bin.all-y := $(obj)/vmlinux.bin
62
63suffix-$(CONFIG_KERNEL_GZIP) := .gz61suffix-$(CONFIG_KERNEL_GZIP) := .gz
64suffix-$(CONFIG_KERNEL_BZIP2) := .bz262suffix-$(CONFIG_KERNEL_BZIP2) := .bz2
65suffix-$(CONFIG_KERNEL_LZ4) := .lz463suffix-$(CONFIG_KERNEL_LZ4) := .lz4
@@ -68,20 +66,20 @@ suffix-$(CONFIG_KERNEL_LZO) := .lzo · 2 unmodified lines
68suffix-$(CONFIG_KERNEL_XZ) := .xz66suffix-$(CONFIG_KERNEL_XZ) := .xz
69suffix-$(CONFIG_KERNEL_ZSTD) := .zst67suffix-$(CONFIG_KERNEL_ZSTD) := .zst
70 68
71$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE69$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
72 $(call if_changed,gzip)70 $(call if_changed,gzip)
73$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE71$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
74 $(call if_changed,bzip2)72 $(call if_changed,bzip2_with_size)
75$(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE73$(obj)/vmlinux.bin.lz4: $(obj)/vmlinux.bin FORCE
76 $(call if_changed,lz4)74 $(call if_changed,lz4_with_size)
77$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE75$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
78 $(call if_changed,lzma)76 $(call if_changed,lzma_with_size)
79$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE77$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
80 $(call if_changed,lzo)78 $(call if_changed,lzo_with_size)
81$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE79$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
82 $(call if_changed,xzkern)80 $(call if_changed,xzkern_with_size)
83$(obj)/vmlinux.bin.zst: $(vmlinux.bin.all-y) FORCE81$(obj)/vmlinux.bin.zst: $(obj)/vmlinux.bin FORCE
84 $(call if_changed,zstd22)82 $(call if_changed,zstd22_with_size)
85 83
86OBJCOPYFLAGS_piggy.o := -I binary -O elf64-s390 -B s390:64-bit --rename-section .data=.vmlinux.bin.compressed84OBJCOPYFLAGS_piggy.o := -I binary -O elf64-s390 -B s390:64-bit --rename-section .data=.vmlinux.bin.compressed
87$(obj)/piggy.o: $(obj)/vmlinux.bin$(suffix-y) FORCE85$(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
19CONFIG_ENTRY_OFFSET ?= 0x0000100019CONFIG_ENTRY_OFFSET ?= 0x00001000
20CONFIG_PHYSICAL_START ?= $(CONFIG_MEMORY_START)20CONFIG_PHYSICAL_START ?= $(CONFIG_MEMORY_START)
21 21
22suffix-y := bin22suffix_y := bin
23suffix-$(CONFIG_KERNEL_GZIP) := gz23suffix_$(CONFIG_KERNEL_GZIP) := gz
24suffix-$(CONFIG_KERNEL_BZIP2) := bz224suffix_$(CONFIG_KERNEL_BZIP2) := bz2
25suffix-$(CONFIG_KERNEL_LZMA) := lzma25suffix_$(CONFIG_KERNEL_LZMA) := lzma
26suffix-$(CONFIG_KERNEL_XZ) := xz26suffix_$(CONFIG_KERNEL_XZ) := xz
27suffix-$(CONFIG_KERNEL_LZO) := lzo27suffix_$(CONFIG_KERNEL_LZO) := lzo
28 28
29targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \29targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \
30 uImage.bz2 uImage.lzma uImage.xz uImage.lzo uImage.bin \30 uImage.bz2 uImage.lzma uImage.xz uImage.lzo uImage.bin \
@@ -106,10 +106,10 @@ OBJCOPYFLAGS_uImage.srec := -I binary -O srec · 75 unmodified lines
106$(obj)/uImage.srec: $(obj)/uImage FORCE106$(obj)/uImage.srec: $(obj)/uImage FORCE
107 $(call if_changed,objcopy)107 $(call if_changed,objcopy)
108 108
109$(obj)/uImage: $(obj)/uImage.$(suffix-y)109$(obj)/uImage: $(obj)/uImage.$(suffix_y)
110 @ln -sf $(notdir $<) $@110 @ln -sf $(notdir $<) $@
111 @echo ' Image $@ is ready'111 @echo ' Image $@ is ready'
112 112
113export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \113export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
114 CONFIG_PHYSICAL_START CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET \114 CONFIG_PHYSICAL_START CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET \
115 KERNEL_MEMORY suffix-y115 KERNEL_MEMORY suffix_y
arch/sh/boot/compressed/Makefile+10−12
@@ -47,22 +47,20 @@ $(obj)/vmlinux: $(addprefix $(obj)/, $(OBJECTS)) FORCE · 46 unmodified lines
47$(obj)/vmlinux.bin: vmlinux FORCE47$(obj)/vmlinux.bin: vmlinux FORCE
48 $(call if_changed,objcopy)48 $(call if_changed,objcopy)
49 49
50vmlinux.bin.all-y := $(obj)/vmlinux.bin50$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
51
52$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
53 $(call if_changed,gzip)51 $(call if_changed,gzip)
54$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE52$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
55 $(call if_changed,bzip2)53 $(call if_changed,bzip2_with_size)
56$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE54$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
57 $(call if_changed,lzma)55 $(call if_changed,lzma_with_size)
58$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE56$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
59 $(call if_changed,xzkern)57 $(call if_changed,xzkern_with_size)
60$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE58$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
61 $(call if_changed,lzo)59 $(call if_changed,lzo_with_size)
62 60
63OBJCOPYFLAGS += -R .empty_zero_page61OBJCOPYFLAGS += -R .empty_zero_page
64 62
65LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T63LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
66 64
67$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE65$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
68 $(call if_changed,ld)66 $(call if_changed,ld)
arch/sh/boot/dts/Makefile+1−3
@@ -1,4 +1,2 @@
1# SPDX-License-Identifier: GPL-2.0-only1# SPDX-License-Identifier: GPL-2.0-only
2ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")2obj-$(CONFIG_USE_BUILTIN_DTB) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
3obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
4endif
arch/x86/boot/compressed/Makefile+6−6
@@ -126,17 +126,17 @@ vmlinux.bin.all-$(CONFIG_X86_NEED_RELOCS) += $(obj)/vmlinux.relocs · 125 unmodified lines
126$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE126$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
127 $(call if_changed,gzip)127 $(call if_changed,gzip)
128$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE128$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
129 $(call if_changed,bzip2)129 $(call if_changed,bzip2_with_size)
130$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE130$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
131 $(call if_changed,lzma)131 $(call if_changed,lzma_with_size)
132$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE132$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
133 $(call if_changed,xzkern)133 $(call if_changed,xzkern_with_size)
134$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE134$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
135 $(call if_changed,lzo)135 $(call if_changed,lzo_with_size)
136$(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE136$(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) FORCE
137 $(call if_changed,lz4)137 $(call if_changed,lz4_with_size)
138$(obj)/vmlinux.bin.zst: $(vmlinux.bin.all-y) FORCE138$(obj)/vmlinux.bin.zst: $(vmlinux.bin.all-y) FORCE
139 $(call if_changed,zstd22)139 $(call if_changed,zstd22_with_size)
140 140
141suffix-$(CONFIG_KERNEL_GZIP) := gz141suffix-$(CONFIG_KERNEL_GZIP) := gz
142suffix-$(CONFIG_KERNEL_BZIP2) := bz2142suffix-$(CONFIG_KERNEL_BZIP2) := bz2
arch/xtensa/Makefile+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
12# Core configuration.12# Core configuration.
13# (Use VAR=<xtensa_config> to use another default compiler.)13# (Use VAR=<xtensa_config> to use another default compiler.)
14 14
15variant-y := $(patsubst "%",%,$(CONFIG_XTENSA_VARIANT_NAME))15variant-y := $(CONFIG_XTENSA_VARIANT_NAME)
16 16
17VARIANT = $(variant-y)17VARIANT = $(variant-y)
18 18
arch/xtensa/boot/dts/Makefile+1−4
@@ -7,10 +7,7 @@ · 6 unmodified lines
7#7#
8#8#
9 9
10BUILTIN_DTB_SOURCE := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o10obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
11ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")
12obj-$(CONFIG_OF) += $(BUILTIN_DTB_SOURCE)
13endif
14 11
15# for CONFIG_OF_ALL_DTBS test12# for CONFIG_OF_ALL_DTBS test
16dtstree := $(srctree)/$(src)13dtstree := $(srctree)/$(src)
certs/.gitignore+1−0
@@ -1,3 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0-only1# SPDX-License-Identifier: GPL-2.0-only
2/extract-cert
2/x509_certificate_list3/x509_certificate_list
3/x509_revocation_list4/x509_revocation_list
certs/Kconfig+1−3
@@ -17,21 +17,19 @@ config MODULE_SIG_KEY · 16 unmodified lines
17 17
18choice18choice
19 prompt "Type of module signing key to be generated"19 prompt "Type of module signing key to be generated"
20 default MODULE_SIG_KEY_TYPE_RSA20 depends on MODULE_SIG || (IMA_APPRAISE_MODSIG && MODULES)
21 help21 help
22 The type of module signing key type to generate. This option22 The type of module signing key type to generate. This option
23 does not apply if a #PKCS11 URI is used.23 does not apply if a #PKCS11 URI is used.
24 24
25config MODULE_SIG_KEY_TYPE_RSA25config MODULE_SIG_KEY_TYPE_RSA
26 bool "RSA"26 bool "RSA"
27 depends on MODULE_SIG || (IMA_APPRAISE_MODSIG && MODULES)
28 help27 help
29 Use an RSA key for module signing.28 Use an RSA key for module signing.
30 29
31config MODULE_SIG_KEY_TYPE_ECDSA30config MODULE_SIG_KEY_TYPE_ECDSA
32 bool "ECDSA"31 bool "ECDSA"
33 select CRYPTO_ECDSA32 select CRYPTO_ECDSA
34 depends on MODULE_SIG || (IMA_APPRAISE_MODSIG && MODULES)
35 help33 help
36 Use an elliptic curve key (NIST P384) for module signing. Consider34 Use an elliptic curve key (NIST P384) for module signing. Consider
37 using a strong hash like sha256 or sha384 for hashing modules.35 using a strong hash like sha256 or sha384 for hashing modules.
certs/Makefile+33−92
@@ -6,31 +6,21 @@ · 5 unmodified lines
6obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o common.o6obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o common.o
7obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o common.o7obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o common.o
8obj-$(CONFIG_SYSTEM_REVOCATION_LIST) += revocation_certificates.o8obj-$(CONFIG_SYSTEM_REVOCATION_LIST) += revocation_certificates.o
9ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"")9ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),)
10obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o10obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o
11else11else
12obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o12obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o
13endif13endif
14 14
15ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y)15quiet_cmd_extract_certs = CERT $@
16 cmd_extract_certs = $(obj)/extract-cert $(2) $@
16 17
17$(eval $(call config_filename,SYSTEM_TRUSTED_KEYS))
18
19# GCC doesn't include .incbin files in -MD generated dependencies (PR#66871)
20$(obj)/system_certificates.o: $(obj)/x509_certificate_list18$(obj)/system_certificates.o: $(obj)/x509_certificate_list
21 19
22# Cope with signing_key.x509 existing in $(srctree) not $(objtree)20$(obj)/x509_certificate_list: $(CONFIG_SYSTEM_TRUSTED_KEYS) $(obj)/extract-cert FORCE
23AFLAGS_system_certificates.o := -I$(srctree)21 $(call if_changed,extract_certs,$(if $(CONFIG_SYSTEM_TRUSTED_KEYS),$<,""))
24
25quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2))
26 cmd_extract_certs = scripts/extract-cert $(2) $@
27 22
28targets += x509_certificate_list23targets += 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))
31endif # CONFIG_SYSTEM_TRUSTED_KEYRING
32
33clean-files := x509_certificate_list .x509.list x509_revocation_list
34 24
35ifeq ($(CONFIG_MODULE_SIG),y)25ifeq ($(CONFIG_MODULE_SIG),y)
36 SIGN_KEY = y26 SIGN_KEY = y
@@ -50,103 +40,54 @@ ifdef SIGN_KEY · 13 unmodified lines
50# fail and that the kernel may be used afterwards.40# fail and that the kernel may be used afterwards.
51#41#
52###############################################################################42###############################################################################
53ifndef CONFIG_MODULE_SIG_HASH
54$(error Could not determine digest type to use from kernel config)
55endif
56
57redirect_openssl = 2>&1
58quiet_redirect_openssl = 2>&1
59silent_redirect_openssl = 2>/dev/null
60openssl_available = $(shell openssl help 2>/dev/null && echo yes)
61 43
62# We do it this way rather than having a boolean option for enabling an44# We do it this way rather than having a boolean option for enabling an
63# external private key, because 'make randconfig' might enable such a45# external private key, because 'make randconfig' might enable such a
64# boolean option and we unfortunately can't make it depend on !RANDCONFIG.46# boolean option and we unfortunately can't make it depend on !RANDCONFIG.
65ifeq ($(CONFIG_MODULE_SIG_KEY),"certs/signing_key.pem")47ifeq ($(CONFIG_MODULE_SIG_KEY),certs/signing_key.pem)
66 48
67ifeq ($(openssl_available),yes)49keytype-$(CONFIG_MODULE_SIG_KEY_TYPE_ECDSA) := -newkey ec -pkeyopt ec_paramgen_curve:secp384r1
68X509TEXT=$(shell openssl x509 -in "certs/signing_key.pem" -text 2>/dev/null)
69endif
70 50
71# Support user changing key type51quiet_cmd_gen_key = GENKEY $@
72ifdef CONFIG_MODULE_SIG_KEY_TYPE_ECDSA52 cmd_gen_key = openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \
73keytype_openssl = -newkey ec -pkeyopt ec_paramgen_curve:secp384r153 -batch -x509 -config $< \
74ifeq ($(openssl_available),yes)54 -outform PEM -out $@ -keyout $@ $(keytype-y) 2>&1
75$(if $(findstring id-ecPublicKey,$(X509TEXT)),,$(shell rm -f "certs/signing_key.pem"))
76endif
77endif # CONFIG_MODULE_SIG_KEY_TYPE_ECDSA
78 55
79ifdef CONFIG_MODULE_SIG_KEY_TYPE_RSA56$(obj)/signing_key.pem: $(obj)/x509.genkey FORCE
80ifeq ($(openssl_available),yes)57 $(call if_changed,gen_key)
81$(if $(findstring rsaEncryption,$(X509TEXT)),,$(shell rm -f "certs/signing_key.pem"))58
82endif59targets += signing_key.pem
83endif # 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) "###"
103 60
61quiet_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.
104$(obj)/x509.genkey:65$(obj)/x509.genkey:
105 @$(kecho) Generating X.509 key generation config66 $(call cmd,copy_x509_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"
123endif # CONFIG_MODULE_SIG_KEY
124 67
125$(eval $(call config_filename,MODULE_SIG_KEY))68endif # CONFIG_MODULE_SIG_KEY
126 69
127# If CONFIG_MODULE_SIG_KEY isn't a PKCS#11 URI, depend on it70# If CONFIG_MODULE_SIG_KEY isn't a PKCS#11 URI, depend on it
128ifeq ($(patsubst pkcs11:%,%,$(firstword $(MODULE_SIG_KEY_FILENAME))),$(firstword $(MODULE_SIG_KEY_FILENAME)))71ifneq ($(filter-out pkcs11:%, %(CONFIG_MODULE_SIG_KEY)),)
129X509_DEP := $(MODULE_SIG_KEY_SRCPREFIX)$(MODULE_SIG_KEY_FILENAME)72X509_DEP := $(CONFIG_MODULE_SIG_KEY)
130endif73endif
131 74
132# GCC PR#66871 again.
133$(obj)/system_certificates.o: $(obj)/signing_key.x50975$(obj)/system_certificates.o: $(obj)/signing_key.x509
134 76
135targets += signing_key.x50977$(obj)/signing_key.x509: $(X509_DEP) $(obj)/extract-cert FORCE
136$(obj)/signing_key.x509: scripts/extract-cert $(X509_DEP) FORCE78 $(call if_changed,extract_certs,$(if $(X509_DEP),$<,$(CONFIG_MODULE_SIG_KEY)))
137 $(call if_changed,extract_certs,$(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY))
138endif # CONFIG_MODULE_SIG79endif # CONFIG_MODULE_SIG
139 80
140ifeq ($(CONFIG_SYSTEM_REVOCATION_LIST),y)81targets += signing_key.x509
141
142$(eval $(call config_filename,SYSTEM_REVOCATION_KEYS))
143 82
144$(obj)/revocation_certificates.o: $(obj)/x509_revocation_list83$(obj)/revocation_certificates.o: $(obj)/x509_revocation_list
145 84
146quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2))85$(obj)/x509_revocation_list: $(CONFIG_SYSTEM_REVOCATION_KEYS) $(obj)/extract-cert FORCE
147 cmd_extract_certs = scripts/extract-cert $(2) $@86 $(call if_changed,extract_certs,$(if $(CONFIG_SYSTEM_REVOCATION_KEYS),$<,""))
148 87
149targets += x509_revocation_list88targets += x509_revocation_list
150$(obj)/x509_revocation_list: scripts/extract-cert $(SYSTEM_REVOCATION_KEYS_SRCPREFIX)$(SYSTEM_REVOCATION_KEYS_FILENAME) FORCE89
151 $(call if_changed,extract_certs,$(SYSTEM_REVOCATION_KEYS_SRCPREFIX)$(CONFIG_SYSTEM_REVOCATION_KEYS))90hostprogs := extract-cert
152endif91
92HOSTCFLAGS_extract-cert.o = $(shell pkg-config --cflags libcrypto 2> /dev/null)
93HOSTLDLIBS_extract-cert = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
certs/default_x509.genkey+17−0
@@ -0,0 +1,17 @@
1[ req ]
2default_bits = 4096
3distinguished_name = req_distinguished_name
4prompt = no
5string_mask = utf8only
6x509_extensions = myexts
7
8[ req_distinguished_name ]
9#O = Unspecified company
10CN = Build time autogenerated kernel key
11#emailAddress = unspecified.user@unspecified.company
12
13[ myexts ]
14basicConstraints=critical,CA:FALSE
15keyUsage=digitalSignature
16subjectKeyIdentifier=hash
17authorityKeyIdentifier=keyid
certs/extract-cert.crenamed from scripts/extract-cert.c+1−1
@@ -29,7 +29,7 @@ static __attribute__((noreturn)) · 28 unmodified lines
29void format(void)29void format(void)
30{30{
31 fprintf(stderr,31 fprintf(stderr,
32 "Usage: scripts/extract-cert <source> <dest>\n");32 "Usage: extract-cert <source> <dest>\n");
33 exit(2);33 exit(2);
34}34}
35 35
drivers/acpi/Makefile+1−1
@@ -9,7 +9,7 @@ ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT · 8 unmodified lines
9# ACPI Boot-Time Table Parsing9# ACPI Boot-Time Table Parsing
10#10#
11ifeq ($(CONFIG_ACPI_CUSTOM_DSDT),y)11ifeq ($(CONFIG_ACPI_CUSTOM_DSDT),y)
12tables.o: $(src)/../../include/$(subst $\",,$(CONFIG_ACPI_CUSTOM_DSDT_FILE)) ;12tables.o: $(src)/../../include/$(CONFIG_ACPI_CUSTOM_DSDT_FILE) ;
13 13
14endif14endif
15 15
drivers/base/firmware_loader/builtin/Makefile+2−2
@@ -3,10 +3,10 @@ obj-y += main.o · 2 unmodified lines
3 3
4# Create $(fwdir) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a4# Create $(fwdir) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a
5# leading /, it's relative to $(srctree).5# leading /, it's relative to $(srctree).
6fwdir := $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE_DIR))6fwdir := $(CONFIG_EXTRA_FIRMWARE_DIR)
7fwdir := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir))7fwdir := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir))
8 8
9firmware := $(addsuffix .gen.o, $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE)))9firmware := $(addsuffix .gen.o, $(CONFIG_EXTRA_FIRMWARE))
10obj-y += $(firmware)10obj-y += $(firmware)
11 11
12FWNAME = $(patsubst $(obj)/%.gen.S,%,$@)12FWNAME = $(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
403 if (size <= 16 * 1024 * 1024) return 24;403 if (size <= 16 * 1024 * 1024) return 24;
404 if (size <= 32 * 1024 * 1024) return 25;404 if (size <= 32 * 1024 * 1024) return 25;
405 405
406 if ((IS_ENABLED(CONFIG_CC_IS_GCC) || CONFIG_CLANG_VERSION >= 110000)406 if (!IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && size_is_constant)
407 && !IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES) && size_is_constant)
408 BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()");407 BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()");
409 else408 else
410 BUG();409 BUG();
include/uapi/linux/soundcard.h+1−1
@@ -1051,7 +1051,7 @@ typedef struct mixer_vol_table { · 1050 unmodified lines
1051 * the GPL version of OSS-4.x and build against that version1051 * the GPL version of OSS-4.x and build against that version
1052 * of the header.1052 * of the header.
1053 *1053 *
1054 * We redefine the extern keyword so that make headers_check1054 * We redefine the extern keyword so that usr/include/headers_check.pl
1055 * does not complain about SEQ_USE_EXTBUF.1055 * does not complain about SEQ_USE_EXTBUF.
1056 */1056 */
1057#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()1057#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
init/Kconfig+0−1
@@ -1414,7 +1414,6 @@ config LD_DEAD_CODE_DATA_ELIMINATION · 1413 unmodified lines
1414config LD_ORPHAN_WARN1414config LD_ORPHAN_WARN
1415 def_bool y1415 def_bool y
1416 depends on ARCH_WANT_LD_ORPHAN_WARN1416 depends on ARCH_WANT_LD_ORPHAN_WARN
1417 depends on !LD_IS_LLD || LLD_VERSION >= 110000
1418 depends on $(ld-option,--orphan-handling=warn)1417 depends on $(ld-option,--orphan-handling=warn)
1419 1418
1420config SYSCTL1419config SYSCTL
init/Makefile+1−1
@@ -31,7 +31,7 @@ quiet_cmd_compile.h = CHK $@ · 30 unmodified lines
31 cmd_compile.h = \31 cmd_compile.h = \
32 $(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \32 $(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
33 "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT_BUILD)" \33 "$(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)"
35 35
36include/generated/compile.h: FORCE36include/generated/compile.h: FORCE
37 $(call cmd,compile.h)37 $(call cmd,compile.h)
kernel/gcov/Kconfig+0−1
@@ -4,7 +4,6 @@ menu "GCOV-based kernel profiling" · 3 unmodified lines
4config GCOV_KERNEL4config GCOV_KERNEL
5 bool "Enable gcov-based kernel profiling"5 bool "Enable gcov-based kernel profiling"
6 depends on DEBUG_FS6 depends on DEBUG_FS
7 depends on !CC_IS_CLANG || CLANG_VERSION >= 110000
8 depends on !ARCH_WANTS_NO_INSTR || CC_HAS_NO_PROFILE_FN_ATTR7 depends on !ARCH_WANTS_NO_INSTR || CC_HAS_NO_PROFILE_FN_ATTR
9 select CONSTRUCTORS8 select CONSTRUCTORS
10 default n9 default n
net/wireless/Makefile+2−2
@@ -33,8 +33,8 @@ $(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.hex) · 32 unmodified lines
33 echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \33 echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \
34 ) > $@34 ) > $@
35 35
36$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \36$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDI) \
37 $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509)37 $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR)/*.x509)
38 @$(kecho) " GEN $@"38 @$(kecho) " GEN $@"
39 $(Q)(set -e; \39 $(Q)(set -e; \
40 allf=""; \40 allf=""; \
scripts/.gitignore+0−1
@@ -1,7 +1,6 @@
1# SPDX-License-Identifier: GPL-2.0-only1# SPDX-License-Identifier: GPL-2.0-only
2/asn1_compiler2/asn1_compiler
3/bin2c3/bin2c
4/extract-cert
5/insert-sys-cert4/insert-sys-cert
6/kallsyms5/kallsyms
7/module.lds6/module.lds
scripts/Kbuild.include+0−47
@@ -195,53 +195,6 @@ why = \ · 194 unmodified lines
195echo-why = $(call escsq, $(strip $(why)))195echo-why = $(call escsq, $(strip $(why)))
196endif196endif
197 197
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#
231define config_filename
232ifneq ($$(CONFIG_$(1)),"")
233$(1)_FILENAME := $$(subst \\,\,$$(subst \$$(quote),$$(quote),$$(subst $$(space_escape),\$$(space),$$(patsubst "%",%,$$(subst $$(space),$$(space_escape),$$(CONFIG_$(1)))))))
234ifneq ($$(patsubst /%,%,$$(firstword $$($(1)_FILENAME))),$$(firstword $$($(1)_FILENAME)))
235else
236ifeq ($$(wildcard $$($(1)_FILENAME)),)
237ifneq ($$(wildcard $$(srctree)/$$($(1)_FILENAME)),)
238$(1)_SRCPREFIX := $(srctree)/
239endif
240endif
241endif
242endif
243endef
244#
245###############################################################################198###############################################################################
246 199
247# delete partially updated (i.e. corrupted) files on error200# delete partially updated (i.e. corrupted) files on error
scripts/Makefile+2−9
@@ -3,26 +3,19 @@ · 2 unmodified lines
3# scripts contains sources for various helper programs used throughout3# scripts contains sources for various helper programs used throughout
4# the kernel for the build process.4# the kernel for the build process.
5 5
6CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
7CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null)
8
9hostprogs-always-$(CONFIG_BUILD_BIN2C) += bin2c6hostprogs-always-$(CONFIG_BUILD_BIN2C) += bin2c
10hostprogs-always-$(CONFIG_KALLSYMS) += kallsyms7hostprogs-always-$(CONFIG_KALLSYMS) += kallsyms
11hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount8hostprogs-always-$(BUILD_C_RECORDMCOUNT) += recordmcount
12hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable9hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT) += sorttable
13hostprogs-always-$(CONFIG_ASN1) += asn1_compiler10hostprogs-always-$(CONFIG_ASN1) += asn1_compiler
14hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file11hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
15hostprogs-always-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
16hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert12hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
17hostprogs-always-$(CONFIG_SYSTEM_REVOCATION_LIST) += extract-cert
18 13
19HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include14HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
20HOSTLDLIBS_sorttable = -lpthread15HOSTLDLIBS_sorttable = -lpthread
21HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include16HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
22HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)17HOSTCFLAGS_sign-file.o = $(shell pkg-config --cflags libcrypto 2> /dev/null)
23HOSTLDLIBS_sign-file = $(CRYPTO_LIBS)18HOSTLDLIBS_sign-file = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
24HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
25HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
26 19
27ifdef CONFIG_UNWINDER_ORC20ifdef CONFIG_UNWINDER_ORC
28ifeq ($(ARCH),x86_64)21ifeq ($(ARCH),x86_64)
scripts/Makefile.lib+28−7
@@ -399,20 +399,35 @@ printf "%08x\n" $$dec_size | \ · 398 unmodified lines
399 } \399 } \
400)400)
401 401
402quiet_cmd_file_size = GEN $@
403 cmd_file_size = $(size_append) > $@
404
402quiet_cmd_bzip2 = BZIP2 $@405quiet_cmd_bzip2 = BZIP2 $@
403 cmd_bzip2 = { cat $(real-prereqs) | $(KBZIP2) -9; $(size_append); } > $@406 cmd_bzip2 = cat $(real-prereqs) | $(KBZIP2) -9 > $@
407
408quiet_cmd_bzip2_with_size = BZIP2 $@
409 cmd_bzip2_with_size = { cat $(real-prereqs) | $(KBZIP2) -9; $(size_append); } > $@
404 410
405# Lzma411# Lzma
406# ---------------------------------------------------------------------------412# ---------------------------------------------------------------------------
407 413
408quiet_cmd_lzma = LZMA $@414quiet_cmd_lzma = LZMA $@
409 cmd_lzma = { cat $(real-prereqs) | $(LZMA) -9; $(size_append); } > $@415 cmd_lzma = cat $(real-prereqs) | $(LZMA) -9 > $@
416
417quiet_cmd_lzma_with_size = LZMA $@
418 cmd_lzma_with_size = { cat $(real-prereqs) | $(LZMA) -9; $(size_append); } > $@
410 419
411quiet_cmd_lzo = LZO $@420quiet_cmd_lzo = LZO $@
412 cmd_lzo = { cat $(real-prereqs) | $(KLZOP) -9; $(size_append); } > $@421 cmd_lzo = cat $(real-prereqs) | $(KLZOP) -9 > $@
422
423quiet_cmd_lzo_with_size = LZO $@
424 cmd_lzo_with_size = { cat $(real-prereqs) | $(KLZOP) -9; $(size_append); } > $@
413 425
414quiet_cmd_lz4 = LZ4 $@426quiet_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
429quiet_cmd_lz4_with_size = LZ4 $@
430 cmd_lz4_with_size = { cat $(real-prereqs) | $(LZ4) -l -c1 stdin stdout; \
416 $(size_append); } > $@431 $(size_append); } > $@
417 432
418# U-Boot mkimage433# U-Boot mkimage
@@ -455,7 +470,10 @@ quiet_cmd_uimage = UIMAGE $@ · 36 unmodified lines
455# big dictionary would increase the memory usage too much in the multi-call470# big dictionary would increase the memory usage too much in the multi-call
456# decompression mode. A BCJ filter isn't used either.471# decompression mode. A BCJ filter isn't used either.
457quiet_cmd_xzkern = XZKERN $@472quiet_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
475quiet_cmd_xzkern_with_size = XZKERN $@
476 cmd_xzkern_with_size = { cat $(real-prereqs) | sh $(srctree)/scripts/xz_wrap.sh; \
459 $(size_append); } > $@477 $(size_append); } > $@
460 478
461quiet_cmd_xzmisc = XZMISC $@479quiet_cmd_xzmisc = XZMISC $@
@@ -478,10 +496,13 @@ quiet_cmd_xzmisc = XZMISC $@ · 16 unmodified lines
478# be used because it would require zstd to allocate a 128 MB buffer.496# be used because it would require zstd to allocate a 128 MB buffer.
479 497
480quiet_cmd_zstd = ZSTD $@498quiet_cmd_zstd = ZSTD $@
481 cmd_zstd = { cat $(real-prereqs) | $(ZSTD) -19; $(size_append); } > $@499 cmd_zstd = cat $(real-prereqs) | $(ZSTD) -19 > $@
482 500
483quiet_cmd_zstd22 = ZSTD22 $@501quiet_cmd_zstd22 = ZSTD22 $@
484 cmd_zstd22 = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@502 cmd_zstd22 = cat $(real-prereqs) | $(ZSTD) -22 --ultra > $@
503
504quiet_cmd_zstd22_with_size = ZSTD22 $@
505 cmd_zstd22_with_size = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@
485 506
486# ASM offsets507# ASM offsets
487# ---------------------------------------------------------------------------508# ---------------------------------------------------------------------------
scripts/Makefile.modinst+2−2
@@ -66,9 +66,9 @@ endif · 65 unmodified lines
66# Don't stop modules_install even if we can't sign external modules.66# Don't stop modules_install even if we can't sign external modules.
67#67#
68ifeq ($(CONFIG_MODULE_SIG_ALL),y)68ifeq ($(CONFIG_MODULE_SIG_ALL),y)
69sig-key := $(if $(wildcard $(CONFIG_MODULE_SIG_KEY)),,$(srctree)/)$(CONFIG_MODULE_SIG_KEY)
69quiet_cmd_sign = SIGN $@70quiet_cmd_sign = SIGN $@
70$(eval $(call config_filename,MODULE_SIG_KEY))71 cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(sig-key) certs/signing_key.x509 $@ \
71 cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY) certs/signing_key.x509 $@ \
72 $(if $(KBUILD_EXTMOD),|| true)72 $(if $(KBUILD_EXTMOD),|| true)
73else73else
74quiet_cmd_sign :=74quiet_cmd_sign :=
scripts/gen_autoksyms.sh+3−8
@@ -16,20 +16,15 @@ case "$KBUILD_VERBOSE" in · 15 unmodified lines
16 ;;16 ;;
17esac17esac
18 18
19# We need access to CONFIG_ symbols
20. include/config/auto.conf
21
22needed_symbols=19needed_symbols=
23 20
24# Special case for modversions (see modpost.c)21# Special case for modversions (see modpost.c)
25if [ -n "$CONFIG_MODVERSIONS" ]; then22if grep -q "^CONFIG_MODVERSIONS=y$" include/config/auto.conf; then
26 needed_symbols="$needed_symbols module_layout"23 needed_symbols="$needed_symbols module_layout"
27fi24fi
28 25
29ksym_wl=26ksym_wl=$(sed -n 's/^CONFIG_UNUSED_KSYMS_WHITELIST=\(.*\)$/\1/p' include/config/auto.conf)
30if [ -n "$CONFIG_UNUSED_KSYMS_WHITELIST" ]; then27if [ -n "$ksym_wl" ]; then
31 # Use 'eval' to expand the whitelist path and check if it is relative
32 eval ksym_wl="$CONFIG_UNUSED_KSYMS_WHITELIST"
33 [ "${ksym_wl}" != "${ksym_wl#/}" ] || ksym_wl="$abs_srctree/$ksym_wl"28 [ "${ksym_wl}" != "${ksym_wl#/}" ] || ksym_wl="$abs_srctree/$ksym_wl"
34 if [ ! -f "$ksym_wl" ] || [ ! -r "$ksym_wl" ]; then29 if [ ! -f "$ksym_wl" ] || [ ! -r "$ksym_wl" ]; then
35 echo "ERROR: '$ksym_wl' whitelist file not found" >&230 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
69# deprecated for external use69# deprecated for external use
70simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \70simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \
71 alldefconfig randconfig listnewconfig olddefconfig syncconfig \71 alldefconfig randconfig listnewconfig olddefconfig syncconfig \
72 helpnewconfig yes2modconfig mod2yesconfig72 helpnewconfig yes2modconfig mod2yesconfig mod2noconfig
73 73
74PHONY += $(simple-targets)74PHONY += $(simple-targets)
75 75
@@ -134,6 +134,7 @@ help: · 58 unmodified lines
134 @echo ' randconfig - New config with random answer to all options'134 @echo ' randconfig - New config with random answer to all options'
135 @echo ' yes2modconfig - Change answers from yes to mod if possible'135 @echo ' yes2modconfig - Change answers from yes to mod if possible'
136 @echo ' mod2yesconfig - Change answers from mod to yes if possible'136 @echo ' mod2yesconfig - Change answers from mod to yes if possible'
137 @echo ' mod2noconfig - Change answers from mod to no if possible'
137 @echo ' listnewconfig - List new options'138 @echo ' listnewconfig - List new options'
138 @echo ' helpnewconfig - List new options and help text'139 @echo ' helpnewconfig - List new options and help text'
139 @echo ' olddefconfig - Same as oldconfig but sets new symbols to their'140 @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
35 olddefconfig,35 olddefconfig,
36 yes2modconfig,36 yes2modconfig,
37 mod2yesconfig,37 mod2yesconfig,
38 mod2noconfig,
38};39};
39static enum input_mode input_mode = oldaskconfig;40static enum input_mode input_mode = oldaskconfig;
40static int input_mode_opt;41static int input_mode_opt;
@@ -163,8 +164,6 @@ enum conf_def_mode { · 122 unmodified lines
163 def_default,164 def_default,
164 def_yes,165 def_yes,
165 def_mod,166 def_mod,
166 def_y2m,
167 def_m2y,
168 def_no,167 def_no,
169 def_random168 def_random
170};169};
@@ -302,12 +301,10 @@ static bool conf_set_all_new_symbols(enum conf_def_mode mode) · 131 unmodified lines
302 return has_changed;301 return has_changed;
303}302}
304 303
305static void conf_rewrite_mod_or_yes(enum conf_def_mode mode)304static void conf_rewrite_tristates(tristate old_val, tristate new_val)
306{305{
307 struct symbol *sym;306 struct symbol *sym;
308 int i;307 int i;
309 tristate old_val = (mode == def_y2m) ? yes : mod;
310 tristate new_val = (mode == def_y2m) ? mod : yes;
311 308
312 for_all_symbols(i, sym) {309 for_all_symbols(i, sym) {
313 if (sym_get_type(sym) == S_TRISTATE &&310 if (sym_get_type(sym) == S_TRISTATE &&
@@ -685,6 +682,7 @@ static const struct option long_opts[] = { · 371 unmodified lines
685 {"olddefconfig", no_argument, &input_mode_opt, olddefconfig},682 {"olddefconfig", no_argument, &input_mode_opt, olddefconfig},
686 {"yes2modconfig", no_argument, &input_mode_opt, yes2modconfig},683 {"yes2modconfig", no_argument, &input_mode_opt, yes2modconfig},
687 {"mod2yesconfig", no_argument, &input_mode_opt, mod2yesconfig},684 {"mod2yesconfig", no_argument, &input_mode_opt, mod2yesconfig},
685 {"mod2noconfig", no_argument, &input_mode_opt, mod2noconfig},
688 {NULL, 0, NULL, 0}686 {NULL, 0, NULL, 0}
689};687};
690 688
@@ -713,6 +711,7 @@ static void conf_usage(const char *progname) · 22 unmodified lines
713 printf(" --randconfig New config with random answer to all options\n");711 printf(" --randconfig New config with random answer to all options\n");
714 printf(" --yes2modconfig Change answers from yes to mod if possible\n");712 printf(" --yes2modconfig Change answers from yes to mod if possible\n");
715 printf(" --mod2yesconfig Change answers from mod to yes if possible\n");713 printf(" --mod2yesconfig Change answers from mod to yes if possible\n");
714 printf(" --mod2noconfig Change answers from mod to no if possible\n");
716 printf(" (If none of the above is given, --oldaskconfig is the default)\n");715 printf(" (If none of the above is given, --oldaskconfig is the default)\n");
717}716}
718 717
@@ -788,6 +787,7 @@ int main(int ac, char **av) · 69 unmodified lines
788 case olddefconfig:787 case olddefconfig:
789 case yes2modconfig:788 case yes2modconfig:
790 case mod2yesconfig:789 case mod2yesconfig:
790 case mod2noconfig:
791 conf_read(NULL);791 conf_read(NULL);
792 break;792 break;
793 case allnoconfig:793 case allnoconfig:
@@ -862,10 +862,13 @@ int main(int ac, char **av) · 68 unmodified lines
862 case savedefconfig:862 case savedefconfig:
863 break;863 break;
864 case yes2modconfig:864 case yes2modconfig:
865 conf_rewrite_mod_or_yes(def_y2m);865 conf_rewrite_tristates(yes, mod);
866 break;866 break;
867 case mod2yesconfig:867 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);
869 break;872 break;
870 case oldaskconfig:873 case oldaskconfig:
871 rootEntry = &rootmenu;874 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
244 p, sym->name);244 p, sym->name);
245 return 1;245 return 1;
246 case S_STRING:246 case S_STRING:
247 if (*p++ != '"')247 /* No escaping for S_DEF_AUTO (include/config/auto.conf) */
248 break;248 if (def != S_DEF_AUTO) {
249 for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) {249 if (*p++ != '"')
250 if (*p2 == '"') {
251 *p2 = 0;
252 break;250 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));
253 }257 }
254 memmove(p2, p2 + 1, strlen(p2));258 if (!p2) {
255 }
256 if (!p2) {
257 if (def != S_DEF_AUTO)
258 conf_warning("invalid string found");259 conf_warning("invalid string found");
259 return 1;260 return 1;
261 }
260 }262 }
261 /* fall through */263 /* fall through */
262 case S_INT:264 case S_INT:
@@ -700,7 +702,7 @@ static void print_symbol_for_dotconfig(FILE *fp, struct symbol *sym) · 437 unmodified lines
700 702
701static void print_symbol_for_autoconf(FILE *fp, struct symbol *sym)703static void print_symbol_for_autoconf(FILE *fp, struct symbol *sym)
702{704{
703 __print_symbol(fp, sym, OUTPUT_N_NONE, true);705 __print_symbol(fp, sym, OUTPUT_N_NONE, false);
704}706}
705 707
706void print_symbol_for_listconfig(struct symbol *sym)708void print_symbol_for_listconfig(struct symbol *sym)
scripts/kconfig/streamline_config.pl+1−1
@@ -170,7 +170,7 @@ sub read_kconfig { · 169 unmodified lines
170 $source =~ s/\$\($env\)/$ENV{$env}/;170 $source =~ s/\$\($env\)/$ENV{$env}/;
171 }171 }
172 172
173 open(my $kinfile, '<', $source) || die "Can't open $kconfig";173 open(my $kinfile, '<', $source) || die "Can't open $source";
174 while (<$kinfile>) {174 while (<$kinfile>) {
175 chomp;175 chomp;
176 176
scripts/link-vmlinux.sh+25−24
@@ -34,6 +34,10 @@ LD="$1" · 33 unmodified lines
34KBUILD_LDFLAGS="$2"34KBUILD_LDFLAGS="$2"
35LDFLAGS_vmlinux="$3"35LDFLAGS_vmlinux="$3"
36 36
37is_enabled() {
38 grep -q "^$1=y" include/config/auto.conf
39}
40
37# Nice output in kbuild format41# Nice output in kbuild format
38# Will be supressed by "make -s"42# Will be supressed by "make -s"
39info()43info()
@@ -80,11 +84,11 @@ modpost_link() · 40 unmodified lines
80 ${KBUILD_VMLINUX_LIBS} \84 ${KBUILD_VMLINUX_LIBS} \
81 --end-group"85 --end-group"
82 86
83 if [ -n "${CONFIG_LTO_CLANG}" ]; then87 if is_enabled CONFIG_LTO_CLANG; then
84 gen_initcalls88 gen_initcalls
85 lds="-T .tmp_initcalls.lds"89 lds="-T .tmp_initcalls.lds"
86 90
87 if [ -n "${CONFIG_MODVERSIONS}" ]; then91 if is_enabled CONFIG_MODVERSIONS; then
88 gen_symversions92 gen_symversions
89 lds="${lds} -T .tmp_symversions.lds"93 lds="${lds} -T .tmp_symversions.lds"
90 fi94 fi
@@ -104,21 +108,21 @@ objtool_link() · 13 unmodified lines
104 local objtoolcmd;108 local objtoolcmd;
105 local objtoolopt;109 local objtoolopt;
106 110
107 if [ "${CONFIG_LTO_CLANG} ${CONFIG_STACK_VALIDATION}" = "y y" ]; then111 if is_enabled CONFIG_LTO_CLANG && is_enabled CONFIG_STACK_VALIDATION; then
108 # Don't perform vmlinux validation unless explicitly requested,112 # Don't perform vmlinux validation unless explicitly requested,
109 # but run objtool on vmlinux.o now that we have an object file.113 # but run objtool on vmlinux.o now that we have an object file.
110 if [ -n "${CONFIG_UNWINDER_ORC}" ]; then114 if is_enabled CONFIG_UNWINDER_ORC; then
111 objtoolcmd="orc generate"115 objtoolcmd="orc generate"
112 fi116 fi
113 117
114 objtoolopt="${objtoolopt} --duplicate"118 objtoolopt="${objtoolopt} --duplicate"
115 119
116 if [ -n "${CONFIG_FTRACE_MCOUNT_USE_OBJTOOL}" ]; then120 if is_enabled CONFIG_FTRACE_MCOUNT_USE_OBJTOOL; then
117 objtoolopt="${objtoolopt} --mcount"121 objtoolopt="${objtoolopt} --mcount"
118 fi122 fi
119 fi123 fi
120 124
121 if [ -n "${CONFIG_VMLINUX_VALIDATION}" ]; then125 if is_enabled CONFIG_VMLINUX_VALIDATION; then
122 objtoolopt="${objtoolopt} --noinstr"126 objtoolopt="${objtoolopt} --noinstr"
123 fi127 fi
124 128
@@ -127,19 +131,19 @@ objtool_link() · 2 unmodified lines
127 objtoolcmd="check"131 objtoolcmd="check"
128 fi132 fi
129 objtoolopt="${objtoolopt} --vmlinux"133 objtoolopt="${objtoolopt} --vmlinux"
130 if [ -z "${CONFIG_FRAME_POINTER}" ]; then134 if ! is_enabled CONFIG_FRAME_POINTER; then
131 objtoolopt="${objtoolopt} --no-fp"135 objtoolopt="${objtoolopt} --no-fp"
132 fi136 fi
133 if [ -n "${CONFIG_GCOV_KERNEL}" ] || [ -n "${CONFIG_LTO_CLANG}" ]; then137 if is_enabled CONFIG_GCOV_KERNEL || is_enabled CONFIG_LTO_CLANG; then
134 objtoolopt="${objtoolopt} --no-unreachable"138 objtoolopt="${objtoolopt} --no-unreachable"
135 fi139 fi
136 if [ -n "${CONFIG_RETPOLINE}" ]; then140 if is_enabled CONFIG_RETPOLINE; then
137 objtoolopt="${objtoolopt} --retpoline"141 objtoolopt="${objtoolopt} --retpoline"
138 fi142 fi
139 if [ -n "${CONFIG_X86_SMAP}" ]; then143 if is_enabled CONFIG_X86_SMAP; then
140 objtoolopt="${objtoolopt} --uaccess"144 objtoolopt="${objtoolopt} --uaccess"
141 fi145 fi
142 if [ -n "${CONFIG_SLS}" ]; then146 if is_enabled CONFIG_SLS; then
143 objtoolopt="${objtoolopt} --sls"147 objtoolopt="${objtoolopt} --sls"
144 fi148 fi
145 info OBJTOOL ${1}149 info OBJTOOL ${1}
@@ -164,7 +168,7 @@ vmlinux_link() · 18 unmodified lines
164 # skip output file argument168 # skip output file argument
165 shift169 shift
166 170
167 if [ -n "${CONFIG_LTO_CLANG}" ]; then171 if is_enabled CONFIG_LTO_CLANG; then
168 # Use vmlinux.o instead of performing the slow LTO link again.172 # Use vmlinux.o instead of performing the slow LTO link again.
169 objs=vmlinux.o173 objs=vmlinux.o
170 libs=174 libs=
@@ -192,7 +196,7 @@ vmlinux_link() · 21 unmodified lines
192 ldflags="${ldflags} ${wl}--strip-debug"196 ldflags="${ldflags} ${wl}--strip-debug"
193 fi197 fi
194 198
195 if [ -n "${CONFIG_VMLINUX_MAP}" ]; then199 if is_enabled CONFIG_VMLINUX_MAP; then
196 ldflags="${ldflags} ${wl}-Map=${output}.map"200 ldflags="${ldflags} ${wl}-Map=${output}.map"
197 fi201 fi
198 202
@@ -242,15 +246,15 @@ kallsyms() · 43 unmodified lines
242{246{
243 local kallsymopt;247 local kallsymopt;
244 248
245 if [ -n "${CONFIG_KALLSYMS_ALL}" ]; then249 if is_enabled CONFIG_KALLSYMS_ALL; then
246 kallsymopt="${kallsymopt} --all-symbols"250 kallsymopt="${kallsymopt} --all-symbols"
247 fi251 fi
248 252
249 if [ -n "${CONFIG_KALLSYMS_ABSOLUTE_PERCPU}" ]; then253 if is_enabled CONFIG_KALLSYMS_ABSOLUTE_PERCPU; then
250 kallsymopt="${kallsymopt} --absolute-percpu"254 kallsymopt="${kallsymopt} --absolute-percpu"
251 fi255 fi
252 256
253 if [ -n "${CONFIG_KALLSYMS_BASE_RELATIVE}" ]; then257 if is_enabled CONFIG_KALLSYMS_BASE_RELATIVE; then
254 kallsymopt="${kallsymopt} --base-relative"258 kallsymopt="${kallsymopt} --base-relative"
255 fi259 fi
256 260
@@ -315,9 +319,6 @@ if [ "$1" = "clean" ]; then · 58 unmodified lines
315 exit 0319 exit 0
316fi320fi
317 321
318# We need access to CONFIG_ symbols
319. include/config/auto.conf
320
321# Update version322# Update version
322info GEN .version323info GEN .version
323if [ -r .version ]; then324if [ -r .version ]; then
@@ -346,7 +347,7 @@ tr '\0' '\n' < modules.builtin.modinfo | sed -n 's/^[[:alnum:]:_]*\.file=//p' | · 22 unmodified lines
346 tr ' ' '\n' | uniq | sed -e 's:^:kernel/:' -e 's/$/.ko/' > modules.builtin347 tr ' ' '\n' | uniq | sed -e 's:^:kernel/:' -e 's/$/.ko/' > modules.builtin
347 348
348btf_vmlinux_bin_o=""349btf_vmlinux_bin_o=""
349if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then350if is_enabled CONFIG_DEBUG_INFO_BTF; then
350 btf_vmlinux_bin_o=.btf.vmlinux.bin.o351 btf_vmlinux_bin_o=.btf.vmlinux.bin.o
351 if ! gen_btf .tmp_vmlinux.btf $btf_vmlinux_bin_o ; then352 if ! gen_btf .tmp_vmlinux.btf $btf_vmlinux_bin_o ; then
352 echo >&2 "Failed to generate BTF for vmlinux"353 echo >&2 "Failed to generate BTF for vmlinux"
@@ -358,7 +359,7 @@ fi · 5 unmodified lines
358kallsymso=""359kallsymso=""
359kallsymso_prev=""360kallsymso_prev=""
360kallsyms_vmlinux=""361kallsyms_vmlinux=""
361if [ -n "${CONFIG_KALLSYMS}" ]; then362if is_enabled CONFIG_KALLSYMS; then
362 363
363 # kallsyms support364 # kallsyms support
364 # Generate section listing all symbols and add it into vmlinux365 # Generate section listing all symbols and add it into vmlinux
@@ -398,7 +399,7 @@ fi · 33 unmodified lines
398vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}399vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}
399 400
400# fill in BTF IDs401# fill in BTF IDs
401if [ -n "${CONFIG_DEBUG_INFO_BTF}" -a -n "${CONFIG_BPF}" ]; then402if is_enabled CONFIG_DEBUG_INFO_BTF && is_enabled CONFIG_BPF; then
402 info BTFIDS vmlinux403 info BTFIDS vmlinux
403 ${RESOLVE_BTFIDS} vmlinux404 ${RESOLVE_BTFIDS} vmlinux
404fi405fi
@@ -406,7 +407,7 @@ fi · 1 unmodified line
406info SYSMAP System.map407info SYSMAP System.map
407mksysmap vmlinux System.map408mksysmap vmlinux System.map
408 409
409if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then410if is_enabled CONFIG_BUILDTIME_TABLE_SORT; then
410 info SORTTAB vmlinux411 info SORTTAB vmlinux
411 if ! sorttable vmlinux; then412 if ! sorttable vmlinux; then
412 echo >&2 Failed to sort kernel tables413 echo >&2 Failed to sort kernel tables
@@ -415,7 +416,7 @@ if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then · 2 unmodified lines
415fi416fi
416 417
417# step a (see comment above)418# step a (see comment above)
418if [ -n "${CONFIG_KALLSYMS}" ]; then419if is_enabled CONFIG_KALLSYMS; then
419 mksysmap ${kallsyms_vmlinux} .tmp_System.map420 mksysmap ${kallsyms_vmlinux} .tmp_System.map
420 421
421 if ! cmp -s System.map .tmp_System.map; then422 if ! cmp -s System.map .tmp_System.map; then
scripts/min-tool-version.sh+1−1
@@ -28,7 +28,7 @@ llvm) · 27 unmodified lines
28 if [ "$SRCARCH" = s390 ]; then28 if [ "$SRCARCH" = s390 ]; then
29 echo 13.0.029 echo 13.0.0
30 else30 else
31 echo 10.0.131 echo 11.0.0
32 fi32 fi
33 ;;33 ;;
34*)34*)
scripts/remove-stale-files+2−0
@@ -39,3 +39,5 @@ if [ -n "${building_out_of_srctree}" ]; then · 38 unmodified lines
39 rm -f arch/parisc/boot/compressed/${f}39 rm -f arch/parisc/boot/compressed/${f}
40 done40 done
41fi41fi
42
43rm -f scripts/extract-cert
scripts/setlocalversion+4−5
@@ -111,9 +111,7 @@ if $scm_only; then · 110 unmodified lines
111 exit111 exit
112fi112fi
113 113
114if test -e include/config/auto.conf; then114if ! test -e include/config/auto.conf; then
115 . include/config/auto.conf
116else
117 echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2115 echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2
118 exit 1116 exit 1
119fi117fi
@@ -125,10 +123,11 @@ if test ! "$srctree" -ef .; then · 5 unmodified lines
125fi123fi
126 124
127# CONFIG_LOCALVERSION and LOCALVERSION (if set)125# CONFIG_LOCALVERSION and LOCALVERSION (if set)
128res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"126config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf)
127res="${res}${config_localversion}${LOCALVERSION}"
129 128
130# scm version string if not at a tagged commit129# scm version string if not at a tagged commit
131if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then130if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then
132 # full scm version string131 # full scm version string
133 res="$res$(scm_version)"132 res="$res$(scm_version)"
134elif [ "${LOCALVERSION+set}" != "set" ]; then133elif [ "${LOCALVERSION+set}" != "set" ]; then
usr/Makefile+1−6
@@ -3,11 +3,6 @@ · 2 unmodified lines
3# kbuild file for usr/ - including initramfs image3# kbuild file for usr/ - including initramfs image
4#4#
5 5
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.
9override size_append := :
10
11compress-y := shipped6compress-y := shipped
12compress-$(CONFIG_INITRAMFS_COMPRESSION_GZIP) := gzip7compress-$(CONFIG_INITRAMFS_COMPRESSION_GZIP) := gzip
13compress-$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) := bzip28compress-$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) := bzip2
@@ -21,7 +16,7 @@ obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o · 7 unmodified lines
21 16
22$(obj)/initramfs_data.o: $(obj)/initramfs_inc_data17$(obj)/initramfs_data.o: $(obj)/initramfs_inc_data
23 18
24ramfs-input := $(strip $(shell echo $(CONFIG_INITRAMFS_SOURCE)))19ramfs-input := $(CONFIG_INITRAMFS_SOURCE)
25cpio-data :=20cpio-data :=
26 21
27# If CONFIG_INITRAMFS_SOURCE is empty, generate a small initramfs with the22# 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
99 cmd_hdrtest = \99 cmd_hdrtest = \
100 $(CC) $(c_flags) -S -o /dev/null -x c /dev/null \100 $(CC) $(c_flags) -S -o /dev/null -x c /dev/null \
101 $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \101 $(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) $<; \
103 touch $@103 touch $@
104 104
105$(obj)/%.hdrtest: $(obj)/%.h FORCE105$(obj)/%.hdrtest: $(obj)/%.h FORCE
106 $(call if_changed_dep,hdrtest)106 $(call if_changed_dep,hdrtest)
107 107
108clean-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.
110clean-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