aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-10 23:41:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-10 23:41:43 -0400
commit23ea3f62f3f90caaa7b4bf32690c341101228cca (patch)
treee9b0f5594ecb484b2c6e9c207560f2b91b7f0315
parent593043d35ddff8ab033546c2a89bb1d4080d03e1 (diff)
parent9eb3c95896a337256489124857157f49616d2c6b (diff)
Merge tag 'kbuild-misc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull misc Kbuild updates from Masahiro Yamada: - clean up builddeb script - use full path for KBUILD_IMAGE to fix rpm-pkg build - fix objdiff tool to ignore debug info * tag 'kbuild-misc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: builddeb: fix typo builddeb: Update a few outdated and hardcoded strings deb-pkg: Remove the KBUILD_IMAGE workaround unicore32: Use full path in KBUILD_IMAGE definition sh: Use full path in KBUILD_IMAGE definition arc: Use full path in KBUILD_IMAGE definition arm: Use full path in KBUILD_IMAGE definition arm64: Use full path in KBUILD_IMAGE definition scripts: objdiff: Ignore debug info when comparing
-rw-r--r--arch/arc/Makefile4
-rw-r--r--arch/arm/Makefile8
-rw-r--r--arch/arm64/Makefile6
-rw-r--r--arch/sh/Makefile7
-rw-r--r--arch/unicore32/Makefile4
-rwxr-xr-xscripts/objdiff5
-rwxr-xr-xscripts/package/builddeb16
7 files changed, 21 insertions, 29 deletions
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 19cce226d1a8..44ef35d33956 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -123,9 +123,9 @@ libs-y += arch/arc/lib/ $(LIBGCC)
123boot := arch/arc/boot 123boot := arch/arc/boot
124 124
125#default target for make without any arguments. 125#default target for make without any arguments.
126KBUILD_IMAGE := bootpImage 126KBUILD_IMAGE := $(boot)/bootpImage
127 127
128all: $(KBUILD_IMAGE) 128all: bootpImage
129bootpImage: vmlinux 129bootpImage: vmlinux
130 130
131boot_targets += uImage uImage.bin uImage.gz 131boot_targets += uImage uImage.bin uImage.gz
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index ab30cc634d02..65f4e2a4eb94 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -297,10 +297,11 @@ drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
297libs-y := arch/arm/lib/ $(libs-y) 297libs-y := arch/arm/lib/ $(libs-y)
298 298
299# Default target when executing plain make 299# Default target when executing plain make
300boot := arch/arm/boot
300ifeq ($(CONFIG_XIP_KERNEL),y) 301ifeq ($(CONFIG_XIP_KERNEL),y)
301KBUILD_IMAGE := xipImage 302KBUILD_IMAGE := $(boot)/xipImage
302else 303else
303KBUILD_IMAGE := zImage 304KBUILD_IMAGE := $(boot)/zImage
304endif 305endif
305 306
306# Build the DT binary blobs if we have OF configured 307# Build the DT binary blobs if we have OF configured
@@ -308,9 +309,8 @@ ifeq ($(CONFIG_USE_OF),y)
308KBUILD_DTBS := dtbs 309KBUILD_DTBS := dtbs
309endif 310endif
310 311
311all: $(KBUILD_IMAGE) $(KBUILD_DTBS) 312all: $(notdir $(KBUILD_IMAGE)) $(KBUILD_DTBS)
312 313
313boot := arch/arm/boot
314 314
315archheaders: 315archheaders:
316 $(Q)$(MAKE) $(build)=arch/arm/tools uapi 316 $(Q)$(MAKE) $(build)=arch/arm/tools uapi
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 7dedf2d8494e..f839ecd919f9 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -102,12 +102,12 @@ libs-y := arch/arm64/lib/ $(libs-y)
102core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a 102core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
103 103
104# Default target when executing plain make 104# Default target when executing plain make
105KBUILD_IMAGE := Image.gz 105boot := arch/arm64/boot
106KBUILD_IMAGE := $(boot)/Image.gz
106KBUILD_DTBS := dtbs 107KBUILD_DTBS := dtbs
107 108
108all: $(KBUILD_IMAGE) $(KBUILD_DTBS) 109all: Image.gz $(KBUILD_DTBS)
109 110
110boot := arch/arm64/boot
111 111
112Image: vmlinux 112Image: vmlinux
113 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 113 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 336f33a419d9..280bbff12102 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -94,7 +94,8 @@ defaultimage-$(CONFIG_SH_7206_SOLUTION_ENGINE) := vmlinux
94defaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux 94defaultimage-$(CONFIG_SH_7619_SOLUTION_ENGINE) := vmlinux
95 95
96# Set some sensible Kbuild defaults 96# Set some sensible Kbuild defaults
97KBUILD_IMAGE := $(defaultimage-y) 97boot := arch/sh/boot
98KBUILD_IMAGE := $(boot)/$(defaultimage-y)
98 99
99# 100#
100# Choosing incompatible machines durings configuration will result in 101# Choosing incompatible machines durings configuration will result in
@@ -186,8 +187,6 @@ cpuincdir-y += cpu-common # Must be last
186drivers-y += arch/sh/drivers/ 187drivers-y += arch/sh/drivers/
187drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/ 188drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
188 189
189boot := arch/sh/boot
190
191cflags-y += $(foreach d, $(cpuincdir-y), -Iarch/sh/include/$(d)) \ 190cflags-y += $(foreach d, $(cpuincdir-y), -Iarch/sh/include/$(d)) \
192 $(foreach d, $(machdir-y), -Iarch/sh/include/$(d)) 191 $(foreach d, $(machdir-y), -Iarch/sh/include/$(d))
193 192
@@ -211,7 +210,7 @@ BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.xz uImage.lzo \
211 romImage 210 romImage
212PHONY += $(BOOT_TARGETS) 211PHONY += $(BOOT_TARGETS)
213 212
214all: $(KBUILD_IMAGE) 213all: $(notdir $(KBUILD_IMAGE))
215 214
216$(BOOT_TARGETS): vmlinux 215$(BOOT_TARGETS): vmlinux
217 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 216 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
diff --git a/arch/unicore32/Makefile b/arch/unicore32/Makefile
index b6f5c4c1eaf9..98a5ca43ae87 100644
--- a/arch/unicore32/Makefile
+++ b/arch/unicore32/Makefile
@@ -43,9 +43,9 @@ boot := arch/unicore32/boot
43 43
44# Default defconfig and target when executing plain make 44# Default defconfig and target when executing plain make
45KBUILD_DEFCONFIG := $(ARCH)_defconfig 45KBUILD_DEFCONFIG := $(ARCH)_defconfig
46KBUILD_IMAGE := zImage 46KBUILD_IMAGE := $(boot)/zImage
47 47
48all: $(KBUILD_IMAGE) 48all: zImage
49 49
50zImage Image uImage: vmlinux 50zImage Image uImage: vmlinux
51 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 51 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
diff --git a/scripts/objdiff b/scripts/objdiff
index 62e51dae2138..4fb5d6796893 100755
--- a/scripts/objdiff
+++ b/scripts/objdiff
@@ -57,13 +57,15 @@ get_output_dir() {
57do_objdump() { 57do_objdump() {
58 dir=$(get_output_dir $1) 58 dir=$(get_output_dir $1)
59 base=${1##*/} 59 base=${1##*/}
60 stripped=$dir/${base%.o}.stripped
60 dis=$dir/${base%.o}.dis 61 dis=$dir/${base%.o}.dis
61 62
62 [ ! -d "$dir" ] && mkdir -p $dir 63 [ ! -d "$dir" ] && mkdir -p $dir
63 64
64 # remove addresses for a cleaner diff 65 # remove addresses for a cleaner diff
65 # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and 66 # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and
66 $OBJDUMP -D $1 | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dis 67 $STRIP -g $1 -R __bug_table -R .note -R .comment -o $stripped
68 $OBJDUMP -D $stripped | sed -e "s/^[[:space:]]\+[0-9a-f]\+//" -e "s:^$stripped:$1:" > $dis
67} 69}
68 70
69dorecord() { 71dorecord() {
@@ -73,6 +75,7 @@ dorecord() {
73 75
74 CMT="`git rev-parse --short HEAD`" 76 CMT="`git rev-parse --short HEAD`"
75 77
78 STRIP="${CROSS_COMPILE}strip"
76 OBJDUMP="${CROSS_COMPILE}objdump" 79 OBJDUMP="${CROSS_COMPILE}objdump"
77 80
78 for d in $FILES; do 81 for d in $FILES; do
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 676fc10c9514..aad67000e4dd 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -69,7 +69,7 @@ set_debarch() {
69 echo "" >&2 69 echo "" >&2
70 echo "** ** ** WARNING ** ** **" >&2 70 echo "** ** ** WARNING ** ** **" >&2
71 echo "" >&2 71 echo "" >&2
72 echo "Your architecture doesn't have it's equivalent" >&2 72 echo "Your architecture doesn't have its equivalent" >&2
73 echo "Debian userspace architecture defined!" >&2 73 echo "Debian userspace architecture defined!" >&2
74 echo "Falling back to using your current userspace instead!" >&2 74 echo "Falling back to using your current userspace instead!" >&2
75 echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 75 echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
@@ -143,12 +143,7 @@ else
143 cp System.map "$tmpdir/boot/System.map-$version" 143 cp System.map "$tmpdir/boot/System.map-$version"
144 cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" 144 cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
145fi 145fi
146# Not all arches include the boot path in KBUILD_IMAGE 146cp "$($MAKE -s image_name)" "$tmpdir/$installed_image_path"
147if [ -e $KBUILD_IMAGE ]; then
148 cp $KBUILD_IMAGE "$tmpdir/$installed_image_path"
149else
150 cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path"
151fi
152 147
153if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then 148if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then
154 # Only some architectures with OF support have this target 149 # Only some architectures with OF support have this target
@@ -265,7 +260,7 @@ This is a packacked upstream version of the Linux kernel.
265The sources may be found at most Linux archive sites, including: 260The sources may be found at most Linux archive sites, including:
266https://www.kernel.org/pub/linux/kernel 261https://www.kernel.org/pub/linux/kernel
267 262
268Copyright: 1991 - 2015 Linus Torvalds and others. 263Copyright: 1991 - 2017 Linus Torvalds and others.
269 264
270The git repository for mainline kernel development is at: 265The git repository for mainline kernel development is at:
271git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 266git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
@@ -288,7 +283,6 @@ Section: kernel
288Priority: optional 283Priority: optional
289Maintainer: $maintainer 284Maintainer: $maintainer
290Build-Depends: $build_depends 285Build-Depends: $build_depends
291Standards-Version: 3.8.4
292Homepage: http://www.kernel.org/ 286Homepage: http://www.kernel.org/
293EOF 287EOF
294 288
@@ -296,7 +290,6 @@ if [ "$ARCH" = "um" ]; then
296 cat <<EOF >> debian/control 290 cat <<EOF >> debian/control
297 291
298Package: $packagename 292Package: $packagename
299Provides: linux-image, linux-image-2.6, linux-modules-$version
300Architecture: any 293Architecture: any
301Description: User Mode Linux kernel, version $version 294Description: User Mode Linux kernel, version $version
302 User-mode Linux is a port of the Linux kernel to its own system call 295 User-mode Linux is a port of the Linux kernel to its own system call
@@ -313,7 +306,6 @@ else
313 cat <<EOF >> debian/control 306 cat <<EOF >> debian/control
314 307
315Package: $packagename 308Package: $packagename
316Provides: linux-image, linux-image-2.6, linux-modules-$version
317Suggests: $fwpackagename 309Suggests: $fwpackagename
318Architecture: any 310Architecture: any
319Description: Linux kernel, version $version 311Description: Linux kernel, version $version
@@ -346,7 +338,6 @@ rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
346cat <<EOF >> debian/control 338cat <<EOF >> debian/control
347 339
348Package: $kernel_headers_packagename 340Package: $kernel_headers_packagename
349Provides: linux-headers, linux-headers-2.6
350Architecture: any 341Architecture: any
351Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch} 342Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
352 This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch} 343 This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
@@ -404,7 +395,6 @@ if [ -n "$BUILD_DEBUG" ] ; then
404 395
405Package: $dbg_packagename 396Package: $dbg_packagename
406Section: debug 397Section: debug
407Provides: linux-debug, linux-debug-$version
408Architecture: any 398Architecture: any
409Description: Linux kernel debugging symbols for $version 399Description: Linux kernel debugging symbols for $version
410 This package will come in handy if you need to debug the kernel. It provides 400 This package will come in handy if you need to debug the kernel. It provides