Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull more Kbuild updates from Masahiro Yamada:

- add more Build-Depends to Debian source package

- prefix header search paths with $(srctree)/

- make modpost show verbose section mismatch warnings

- avoid hard-coded CROSS_COMPILE for h8300

- fix regression for Debian make-kpkg command

- add semantic patch to detect missing put_device()

- fix some warnings of 'make deb-pkg'

- optimize NOSTDINC_FLAGS evaluation

- add warnings about redundant generic-y

- clean up Makefiles and scripts

* tag 'kbuild-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: remove stale lxdialog/.gitignore
kbuild: force all architectures except um to include mandatory-y
kbuild: warn redundant generic-y
Revert "modsign: Abort modules_install when signing fails"
kbuild: Make NOSTDINC_FLAGS a simply expanded variable
kbuild: deb-pkg: avoid implicit effects
coccinelle: semantic code search for missing put_device()
kbuild: pkg: grep include/config/auto.conf instead of $KCONFIG_CONFIG
kbuild: deb-pkg: introduce is_enabled and if_enabled_echo to builddeb
kbuild: deb-pkg: add CONFIG_ prefix to kernel config options
kbuild: add workaround for Debian make-kpkg
kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
unicore32: simplify linker script generation for decompressor
h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
kbuild: move archive command to scripts/Makefile.lib
modpost: always show verbose warning for section mismatch
ia64: prefix header search path with $(srctree)/
libfdt: prefix header search paths with $(srctree)/
deb-pkg: generate correct build dependencies

+153 -156
+1 -1
Documentation/kbuild/makefiles.txt
··· 1274 1274 1275 1275 --- 7.4 mandatory-y 1276 1276 1277 - mandatory-y is essentially used by include/(uapi/)asm-generic/Kbuild.asm 1277 + mandatory-y is essentially used by include/(uapi/)asm-generic/Kbuild 1278 1278 to define the minimum set of ASM headers that all architectures must have. 1279 1279 1280 1280 This works like optional generic-y. If a mandatory header is missing
+15 -3
Makefile
··· 31 31 # descending is started. They are now explicitly listed as the 32 32 # prepare rule. 33 33 34 + # Ugly workaround for Debian make-kpkg: 35 + # make-kpkg directly includes the top Makefile of Linux kernel. In such a case, 36 + # skip sub-make to support debian_* targets in ruleset/kernel_version.mk, but 37 + # displays warning to discourage such abusage. 38 + ifneq ($(word 2, $(MAKEFILE_LIST)),) 39 + $(warning Do not include top Makefile of Linux Kernel) 40 + sub-make-done := 1 41 + MAKEFLAGS += -rR 42 + endif 43 + 34 44 ifneq ($(sub-make-done),1) 35 45 36 46 # Do not use make's built-in rules and variables ··· 412 402 413 403 CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 414 404 -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF) 415 - NOSTDINC_FLAGS = 405 + NOSTDINC_FLAGS := 416 406 CFLAGS_MODULE = 417 407 AFLAGS_MODULE = 418 408 LDFLAGS_MODULE = ··· 1098 1088 1099 1089 PHONY += asm-generic uapi-asm-generic 1100 1090 asm-generic: uapi-asm-generic 1101 - $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm 1091 + $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/asm \ 1092 + generic=include/asm-generic 1102 1093 uapi-asm-generic: 1103 - $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm 1094 + $(Q)$(MAKE) $(asm-generic)=arch/$(SRCARCH)/include/generated/uapi/asm \ 1095 + generic=include/uapi/asm-generic 1104 1096 1105 1097 PHONY += prepare-objtool 1106 1098 prepare-objtool: $(objtool_target)
-2
arch/alpha/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_32.h
-2
arch/arc/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += kvm_para.h 4 2 generic-y += ucontext.h
-1
arch/arm/include/asm/Kbuild
··· 18 18 generic-y += serial.h 19 19 generic-y += simd.h 20 20 generic-y += sizes.h 21 - generic-y += timex.h 22 21 generic-y += trace_clock.h 23 22 24 23 generated-y += mach-types.h
-1
arch/arm/include/uapi/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - include include/uapi/asm-generic/Kbuild.asm 3 2 4 3 generated-y += unistd-common.h 5 4 generated-y += unistd-oabi.h
-1
arch/arm64/include/uapi/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - include include/uapi/asm-generic/Kbuild.asm 3 2 4 3 generic-y += kvm_para.h
-2
arch/c6x/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += kvm_para.h 4 2 generic-y += ucontext.h
-2
arch/csky/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += ucontext.h
+1 -1
arch/h8300/Makefile
··· 27 27 CHECKFLAGS += -msize-long 28 28 29 29 ifeq ($(CROSS_COMPILE),) 30 - CROSS_COMPILE := h8300-unknown-linux- 30 + CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-) 31 31 endif 32 32 33 33 core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
-1
arch/h8300/include/asm/Kbuild
··· 17 17 generic-y += ftrace.h 18 18 generic-y += futex.h 19 19 generic-y += hardirq.h 20 - generic-y += hash.h 21 20 generic-y += hw_irq.h 22 21 generic-y += irq_regs.h 23 22 generic-y += irq_work.h
-2
arch/h8300/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += kvm_para.h 4 2 generic-y += ucontext.h
-2
arch/hexagon/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += ucontext.h
-3
arch/ia64/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_64.h 4 2 generic-y += kvm_para.h 5 - generic-y += socket.h
+1 -1
arch/ia64/sn/kernel/Makefile
··· 7 7 # Copyright (C) 1999,2001-2006,2008 Silicon Graphics, Inc. All Rights Reserved. 8 8 # 9 9 10 - ccflags-y := -Iarch/ia64/sn/include 10 + ccflags-y := -I $(srctree)/arch/ia64/sn/include 11 11 12 12 obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ 13 13 huberror.o io_acpi_init.o io_common.o \
-2
arch/ia64/sn/kernel/sn2/Makefile
··· 9 9 # sn2 specific kernel files 10 10 # 11 11 12 - ccflags-y := -Iarch/ia64/sn/include 13 - 14 12 obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ 15 13 prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o
-2
arch/ia64/sn/pci/Makefile
··· 7 7 # 8 8 # Makefile for the sn pci general routines. 9 9 10 - ccflags-y := -Iarch/ia64/sn/include 11 - 12 10 obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/
+1 -1
arch/ia64/sn/pci/pcibr/Makefile
··· 7 7 # 8 8 # Makefile for the sn2 io routines. 9 9 10 - ccflags-y := -Iarch/ia64/sn/include 10 + ccflags-y := -I $(srctree)/arch/ia64/sn/include 11 11 12 12 obj-y += pcibr_dma.o pcibr_reg.o \ 13 13 pcibr_ate.o pcibr_provider.o
-2
arch/m68k/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_32.h 4 2 generic-y += kvm_para.h
-2
arch/microblaze/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_32.h 4 2 generic-y += kvm_para.h 5 3 generic-y += ucontext.h
-2
arch/mips/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_n32.h 4 2 generated-y += unistd_n64.h 5 3 generated-y += unistd_o32.h
-2
arch/nds32/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += ucontext.h
-2
arch/nios2/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += kvm_para.h 4 2 generic-y += ucontext.h
-2
arch/openrisc/include/asm/Kbuild
··· 15 15 generic-y += ftrace.h 16 16 generic-y += hardirq.h 17 17 generic-y += hw_irq.h 18 - generic-y += irq.h 19 18 generic-y += irq_regs.h 20 19 generic-y += irq_work.h 21 20 generic-y += kdebug.h ··· 34 35 generic-y += sections.h 35 36 generic-y += segment.h 36 37 generic-y += shmparam.h 37 - generic-y += string.h 38 38 generic-y += switch_to.h 39 39 generic-y += topology.h 40 40 generic-y += trace_clock.h
-2
arch/openrisc/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += kvm_para.h 4 2 generic-y += ucontext.h
-2
arch/parisc/include/asm/Kbuild
··· 1 1 generated-y += syscall_table_32.h 2 2 generated-y += syscall_table_64.h 3 3 generated-y += syscall_table_c32.h 4 - generic-y += barrier.h 5 4 generic-y += current.h 6 5 generic-y += device.h 7 6 generic-y += div64.h ··· 19 20 generic-y += preempt.h 20 21 generic-y += seccomp.h 21 22 generic-y += segment.h 22 - generic-y += topology.h 23 23 generic-y += trace_clock.h 24 24 generic-y += user.h 25 25 generic-y += vga.h
-2
arch/parisc/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_32.h 4 2 generated-y += unistd_64.h 5 3 generic-y += kvm_para.h
-1
arch/powerpc/include/asm/Kbuild
··· 5 5 generic-y += div64.h 6 6 generic-y += export.h 7 7 generic-y += irq_regs.h 8 - generic-y += irq_work.h 9 8 generic-y += local64.h 10 9 generic-y += mcs_spinlock.h 11 10 generic-y += preempt.h
-2
arch/powerpc/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_32.h 4 2 generated-y += unistd_64.h
-1
arch/riscv/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm
-3
arch/s390/boot/Makefile
··· 57 57 $(obj)/compressed/vmlinux: $(obj)/startup.a FORCE 58 58 $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 59 59 60 - quiet_cmd_ar = AR $@ 61 - cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) 62 - 63 60 $(obj)/startup.a: $(OBJECTS) FORCE 64 61 $(call if_changed,ar) 65 62
-1
arch/s390/include/asm/Kbuild
··· 20 20 generic-y += local64.h 21 21 generic-y += mcs_spinlock.h 22 22 generic-y += mm-arch-hooks.h 23 - generic-y += preempt.h 24 23 generic-y += rwsem.h 25 24 generic-y += trace_clock.h 26 25 generic-y += unaligned.h
-2
arch/s390/include/uapi/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - include include/uapi/asm-generic/Kbuild.asm 3 2 4 3 generated-y += unistd_32.h 5 4 generated-y += unistd_64.h 6 - generic-y += socket.h
-1
arch/sh/include/uapi/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - include include/uapi/asm-generic/Kbuild.asm 3 2 4 3 generated-y += unistd_32.h 5 4 generic-y += kvm_para.h
-2
arch/sparc/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_32.h 4 2 generated-y += unistd_64.h
+1 -4
arch/unicore32/boot/compressed/Makefile
··· 61 61 ZTEXTADDR := 0x03000000 62 62 ZBSSADDR := ALIGN(4) 63 63 64 - SEDFLAGS_lds = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ 65 - $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/unicore32/boot/Makefile $(KCONFIG_CONFIG) 66 - @sed "$(SEDFLAGS_lds)" < $< > $@ 67 - 64 + CPPFLAGS_vmlinux.lds = -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"
arch/unicore32/boot/compressed/vmlinux.lds.in arch/unicore32/boot/compressed/vmlinux.lds.S
-2
arch/unicore32/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generic-y += kvm_para.h 4 2 generic-y += ucontext.h
-3
arch/x86/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_32.h 4 2 generated-y += unistd_64.h 5 3 generated-y += unistd_x32.h 6 - generic-y += socket.h
-1
arch/xtensa/include/asm/Kbuild
··· 15 15 generic-y += kdebug.h 16 16 generic-y += kmap_types.h 17 17 generic-y += kprobes.h 18 - generic-y += linkage.h 19 18 generic-y += local.h 20 19 generic-y += local64.h 21 20 generic-y += mcs_spinlock.h
-3
arch/xtensa/include/uapi/asm/Kbuild
··· 1 - include include/uapi/asm-generic/Kbuild.asm 2 - 3 1 generated-y += unistd_32.h 4 2 generic-y += kvm_para.h 5 - generic-y += socket.h
+5
include/asm-generic/Kbuild
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + # 3 + # asm headers that all architectures except um should have 4 + # (This file is not included when SRCARCH=um since UML borrows several 5 + # asm headers from the host architecutre.)
+3 -1
include/uapi/asm-generic/Kbuild.asm include/uapi/asm-generic/Kbuild
··· 1 + # SPDX-License-Identifier: GPL-2.0 1 2 # 2 3 # Headers that are mandatory in usr/include/asm/ 3 - # 4 + # (This file is not included when SRCARCH=um since UML does not support UAPI.) 5 + 4 6 mandatory-y += auxvec.h 5 7 mandatory-y += bitsperlong.h 6 8 mandatory-y += bpf_perf_event.h
+1 -1
lib/Makefile
··· 213 213 libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \ 214 214 fdt_empty_tree.o 215 215 $(foreach file, $(libfdt_files), \ 216 - $(eval CFLAGS_$(file) = -I$(src)/../scripts/dtc/libfdt)) 216 + $(eval CFLAGS_$(file) = -I $(srctree)/scripts/dtc/libfdt)) 217 217 lib-$(CONFIG_LIBFDT) += $(libfdt_files) 218 218 219 219 obj-$(CONFIG_RBTREE_TEST) += rbtree_test.o
+11
scripts/Makefile.asm-generic
··· 12 12 src := $(subst /generated,,$(obj)) 13 13 -include $(src)/Kbuild 14 14 15 + # $(generic)/Kbuild lists mandatory-y. Exclude um since it is a special case. 16 + ifneq ($(SRCARCH),um) 17 + include $(generic)/Kbuild 18 + endif 19 + 15 20 include scripts/Kbuild.include 21 + 22 + redundant := $(filter $(mandatory-y) $(generated-y), $(generic-y)) 23 + redundant += $(foreach f, $(generic-y), $(if $(wildcard $(srctree)/$(src)/$(f)),$(f))) 24 + redundant := $(sort $(redundant)) 25 + $(if $(redundant),\ 26 + $(warning redundant generic-y found in $(src)/Kbuild: $(redundant))) 16 27 17 28 # If arch does not implement mandatory headers, fallback to asm-generic ones. 18 29 mandatory-y := $(filter-out $(generated-y), $(mandatory-y))
+1 -5
scripts/Makefile.build
··· 426 426 # Rule to compile a set of .o files into one .a file (with symbol table) 427 427 # 428 428 ifdef lib-target 429 - quiet_cmd_link_l_target = AR $@ 430 - 431 - # lib target archives do get a symbol table and index 432 - cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) 433 429 434 430 $(lib-target): $(lib-y) FORCE 435 - $(call if_changed,link_l_target) 431 + $(call if_changed,ar) 436 432 437 433 targets += $(lib-target) 438 434
+6
scripts/Makefile.lib
··· 233 233 quiet_cmd_ld = LD $@ 234 234 cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@ 235 235 236 + # Archive 237 + # --------------------------------------------------------------------------- 238 + 239 + quiet_cmd_ar = AR $@ 240 + cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) 241 + 236 242 # Objcopy 237 243 # --------------------------------------------------------------------------- 238 244
+1 -1
scripts/Makefile.modinst
··· 23 23 mkdir -p $(2) ; \ 24 24 cp $@ $(2) ; \ 25 25 $(mod_strip_cmd) $(2)/$(notdir $@) ; \ 26 - $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) && \ 26 + $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) ; \ 27 27 $(mod_compress_cmd) $(2)/$(notdir $@) 28 28 29 29 # Modules built outside the kernel source tree go into extra by default
-1
scripts/Makefile.modpost
··· 77 77 $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ 78 78 $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \ 79 79 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ 80 - $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ 81 80 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ 82 81 $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) 83 82
+1 -8
scripts/adjust_autoksyms.sh
··· 39 39 esac 40 40 41 41 # We need access to CONFIG_ symbols 42 - case "${KCONFIG_CONFIG}" in 43 - */*) 44 - . "${KCONFIG_CONFIG}" 45 - ;; 46 - *) 47 - # Force using a file from the current directory 48 - . "./${KCONFIG_CONFIG}" 49 - esac 42 + . include/config/auto.conf 50 43 51 44 # Generate a new ksym list file with symbols needed by the current 52 45 # set of modules.
+56
scripts/coccinelle/free/put_device.cocci
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /// Find missing put_device for every of_find_device_by_node. 3 + /// 4 + // Confidence: Moderate 5 + // Copyright: (C) 2018-2019 Wen Yang, ZTE. 6 + // Comments: 7 + // Options: --no-includes --include-headers 8 + 9 + virtual report 10 + virtual org 11 + 12 + @search exists@ 13 + local idexpression id; 14 + expression x,e,e1; 15 + position p1,p2; 16 + type T,T1,T2,T3; 17 + @@ 18 + 19 + id = of_find_device_by_node@p1(x) 20 + ... when != e = id 21 + if (id == NULL || ...) { ... return ...; } 22 + ... when != put_device(&id->dev) 23 + when != platform_device_put(id) 24 + when != of_dev_put(id) 25 + when != if (id) { ... put_device(&id->dev) ... } 26 + when != e1 = (T)id 27 + when != e1 = &id->dev 28 + when != e1 = get_device(&id->dev) 29 + when != e1 = (T1)platform_get_drvdata(id) 30 + ( 31 + return 32 + ( id 33 + | (T2)dev_get_drvdata(&id->dev) 34 + | (T3)platform_get_drvdata(id) 35 + ); 36 + | return@p2 ...; 37 + ) 38 + 39 + @script:python depends on report@ 40 + p1 << search.p1; 41 + p2 << search.p2; 42 + @@ 43 + 44 + coccilib.report.print_report(p2[0], "ERROR: missing put_device; " 45 + + "call of_find_device_by_node on line " 46 + + p1[0].line 47 + + ", but without a corresponding object release " 48 + + "within this function.") 49 + 50 + @script:python depends on org@ 51 + p1 << search.p1; 52 + p2 << search.p2; 53 + @@ 54 + 55 + cocci.print_main("of_find_device_by_node", p1) 56 + cocci.print_secs("needed put_device", p2)
-4
scripts/kconfig/lxdialog/.gitignore
··· 1 - # 2 - # Generated files 3 - # 4 - lxdialog
+5 -22
scripts/mod/modpost.c
··· 35 35 static int warn_unresolved = 0; 36 36 /* How a symbol is exported */ 37 37 static int sec_mismatch_count = 0; 38 - static int sec_mismatch_verbose = 1; 39 38 static int sec_mismatch_fatal = 0; 40 39 /* ignore missing files */ 41 40 static int ignore_missing_files; ··· 1405 1406 char *prl_to; 1406 1407 1407 1408 sec_mismatch_count++; 1408 - if (!sec_mismatch_verbose) 1409 - return; 1410 1409 1411 1410 get_pretty_name(from_is_func, &from, &from_p); 1412 1411 get_pretty_name(to_is_func, &to, &to_p); ··· 1652 1655 1653 1656 sec_mismatch_count++; 1654 1657 1655 - if (sec_mismatch_verbose) 1656 - report_extable_warnings(modname, elf, mismatch, r, sym, 1657 - fromsec, tosec); 1658 + report_extable_warnings(modname, elf, mismatch, r, sym, fromsec, tosec); 1658 1659 1659 1660 if (match(tosec, mismatch->bad_tosec)) 1660 1661 fatal("The relocation at %s+0x%lx references\n" ··· 2428 2433 struct ext_sym_list *extsym_iter; 2429 2434 struct ext_sym_list *extsym_start = NULL; 2430 2435 2431 - while ((opt = getopt(argc, argv, "i:I:e:mnsST:o:awE")) != -1) { 2436 + while ((opt = getopt(argc, argv, "i:I:e:mnsT:o:awE")) != -1) { 2432 2437 switch (opt) { 2433 2438 case 'i': 2434 2439 kernel_read = optarg; ··· 2459 2464 break; 2460 2465 case 's': 2461 2466 vmlinux_section_warnings = 0; 2462 - break; 2463 - case 'S': 2464 - sec_mismatch_verbose = 0; 2465 2467 break; 2466 2468 case 'T': 2467 2469 files_source = optarg; ··· 2517 2525 } 2518 2526 if (dump_write) 2519 2527 write_dump(dump_write); 2520 - if (sec_mismatch_count) { 2521 - if (!sec_mismatch_verbose) { 2522 - warn("modpost: Found %d section mismatch(es).\n" 2523 - "To see full details build your kernel with:\n" 2524 - "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n", 2525 - sec_mismatch_count); 2526 - } 2527 - if (sec_mismatch_fatal) { 2528 - fatal("modpost: Section mismatches detected.\n" 2529 - "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n"); 2530 - } 2531 - } 2528 + if (sec_mismatch_count && sec_mismatch_fatal) 2529 + fatal("modpost: Section mismatches detected.\n" 2530 + "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n"); 2532 2531 free(buf.p); 2533 2532 2534 2533 return err;
+19 -13
scripts/package/builddeb
··· 12 12 13 13 set -e 14 14 15 + is_enabled() { 16 + grep -q "^$1=y" include/config/auto.conf 17 + } 18 + 19 + if_enabled_echo() { 20 + if is_enabled "$1"; then 21 + echo -n "$2" 22 + elif [ $# -ge 3 ]; then 23 + echo -n "$3" 24 + fi 25 + } 26 + 15 27 create_package() { 16 28 local pname="$1" pdir="$2" 17 29 ··· 74 62 installed_image_path="boot/vmlinuz-$version" 75 63 esac 76 64 77 - BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" 65 + BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes) 78 66 79 67 # Setup the directory structure 80 68 rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files ··· 95 83 fi 96 84 cp "$($MAKE -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path" 97 85 98 - if grep -q "^CONFIG_OF_EARLY_FLATTREE=y" $KCONFIG_CONFIG ; then 86 + if is_enabled CONFIG_OF_EARLY_FLATTREE; then 99 87 # Only some architectures with OF support have this target 100 88 if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then 101 89 $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/usr/lib/$packagename" dtbs_install 102 90 fi 103 91 fi 104 92 105 - if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then 93 + if is_enabled CONFIG_MODULES; then 106 94 INSTALL_MOD_PATH="$tmpdir" $MAKE -f $srctree/Makefile modules_install 107 95 rm -f "$tmpdir/lib/modules/$version/build" 108 96 rm -f "$tmpdir/lib/modules/$version/source" ··· 123 111 done 124 112 125 113 # resign stripped modules 126 - MODULE_SIG_ALL="$(grep -s '^CONFIG_MODULE_SIG_ALL=y' $KCONFIG_CONFIG || true)" 127 - if [ -n "$MODULE_SIG_ALL" ]; then 114 + if is_enabled CONFIG_MODULE_SIG_ALL; then 128 115 INSTALL_MOD_PATH="$tmpdir" $MAKE -f $srctree/Makefile modules_sign 129 116 fi 130 117 fi ··· 140 129 # make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and 141 130 # so do we; recent versions of dracut and initramfs-tools will obey this. 142 131 debhookdir=${KDEB_HOOKDIR:-/etc/kernel} 143 - if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then 144 - want_initrd=Yes 145 - else 146 - want_initrd=No 147 - fi 148 132 for script in postinst postrm preinst prerm ; do 149 133 mkdir -p "$tmpdir$debhookdir/$script.d" 150 134 cat <<EOF > "$tmpdir/DEBIAN/$script" ··· 151 145 export DEB_MAINT_PARAMS="\$*" 152 146 153 147 # Tell initramfs builder whether it's wanted 154 - export INITRD=$want_initrd 148 + export INITRD=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No) 155 149 156 150 test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d 157 151 exit 0 ··· 164 158 (cd $srctree; find arch/*/include include scripts -type f -o -type l) >> "$objtree/debian/hdrsrcfiles" 165 159 (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles" 166 160 (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles" 167 - if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then 161 + if is_enabled CONFIG_STACK_VALIDATION; then 168 162 (cd $objtree; find tools/objtool -type f -executable) >> "$objtree/debian/hdrobjfiles" 169 163 fi 170 164 (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f) >> "$objtree/debian/hdrobjfiles" 171 - if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then 165 + if is_enabled CONFIG_GCC_PLUGINS; then 172 166 (cd $objtree; find scripts/gcc-plugins -name \*.so -o -name gcc-common.h) >> "$objtree/debian/hdrobjfiles" 173 167 fi 174 168 destdir=$kernel_headers_dir/usr/src/linux-headers-$version
+1 -1
scripts/package/buildtar
··· 56 56 # 57 57 # Try to install modules 58 58 # 59 - if grep -q '^CONFIG_MODULES=y' "${KCONFIG_CONFIG}"; then 59 + if grep -q '^CONFIG_MODULES=y' include/config/auto.conf; then 60 60 make ARCH="${ARCH}" -f ${srctree}/Makefile INSTALL_MOD_PATH="${tmpdir}" modules_install 61 61 dirs="$dirs lib" 62 62 fi
+22 -17
scripts/package/mkdebian
··· 7 7 set -e 8 8 9 9 is_enabled() { 10 - grep -q "^CONFIG_$1=y" $KCONFIG_CONFIG 10 + grep -q "^$1=y" include/config/auto.conf 11 11 } 12 12 13 13 if_enabled_echo() { ··· 31 31 x86_64) 32 32 debarch=amd64 ;; 33 33 sparc*) 34 - debarch=sparc$(if_enabled_echo 64BIT 64) ;; 34 + debarch=sparc$(if_enabled_echo CONFIG_64BIT 64) ;; 35 35 s390*) 36 36 debarch=s390x ;; 37 37 ppc*) 38 - if is_enabled 64BIT; then 39 - debarch=ppc64$(if_enabled_echo CPU_LITTLE_ENDIAN el) 38 + if is_enabled CONFIG_64BIT; then 39 + debarch=ppc64$(if_enabled_echo CONFIG_CPU_LITTLE_ENDIAN el) 40 40 else 41 - debarch=powerpc$(if_enabled_echo SPE spe) 41 + debarch=powerpc$(if_enabled_echo CONFIG_SPE spe) 42 42 fi 43 43 ;; 44 44 parisc*) 45 45 debarch=hppa ;; 46 46 mips*) 47 - if is_enabled CPU_LITTLE_ENDIAN; then 48 - debarch=mips$(if_enabled_echo 64BIT 64)$(if_enabled_echo CPU_MIPSR6 r6)el 49 - elif is_enabled CPU_MIPSR6; then 50 - debarch=mips$(if_enabled_echo 64BIT 64)r6 47 + if is_enabled CONFIG_CPU_LITTLE_ENDIAN; then 48 + debarch=mips$(if_enabled_echo CONFIG_64BIT 64)$(if_enabled_echo CONFIG_CPU_MIPSR6 r6)el 49 + elif is_enabled CONFIG_CPU_MIPSR6; then 50 + debarch=mips$(if_enabled_echo CONFIG_64BIT 64)r6 51 51 else 52 52 debarch=mips 53 53 fi ··· 55 55 aarch64|arm64) 56 56 debarch=arm64 ;; 57 57 arm*) 58 - if is_enabled AEABI; then 59 - debarch=arm$(if_enabled_echo VFP hf el) 58 + if is_enabled CONFIG_AEABI; then 59 + debarch=arm$(if_enabled_echo CONFIG_VFP hf el) 60 60 else 61 61 debarch=arm 62 62 fi ··· 64 64 openrisc) 65 65 debarch=or1k ;; 66 66 sh) 67 - if is_enabled CPU_SH3; then 68 - debarch=sh3$(if_enabled_echo CPU_BIG_ENDIAN eb) 69 - elif is_enabled CPU_SH4; then 70 - debarch=sh4$(if_enabled_echo CPU_BIG_ENDIAN eb) 67 + if is_enabled CONFIG_CPU_SH3; then 68 + debarch=sh3$(if_enabled_echo CONFIG_CPU_BIG_ENDIAN eb) 69 + elif is_enabled CONFIG_CPU_SH4; then 70 + debarch=sh4$(if_enabled_echo CONFIG_CPU_BIG_ENDIAN eb) 71 71 fi 72 72 ;; 73 73 esac ··· 132 132 echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST explicitly" 133 133 fi 134 134 135 - mkdir -p debian/ 135 + mkdir -p debian/source/ 136 + echo "1.0" > debian/source/format 137 + 136 138 echo $debarch > debian/arch 139 + extra_build_depends=", $(if_enabled_echo CONFIG_UNWINDER_ORC libelf-dev)" 140 + extra_build_depends="$extra_build_depends, $(if_enabled_echo CONFIG_SYSTEM_TRUSTED_KEYRING libssl-dev:native)" 137 141 138 142 # Generate a simple changelog template 139 143 cat <<EOF > debian/changelog ··· 174 170 Section: kernel 175 171 Priority: optional 176 172 Maintainer: $maintainer 177 - Build-Depends: bc, kmod, cpio 173 + Build-Depends: bc, kmod, cpio, bison, flex | flex:native $extra_build_depends 178 174 Homepage: http://www.kernel.org/ 179 175 180 176 Package: $packagename ··· 225 221 226 222 binary: binary-arch 227 223 EOF 224 + chmod +x debian/rules 228 225 229 226 exit 0