aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel-defaults.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-02-02 16:39:28 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-02-02 16:39:28 +0000
commitd755be2b9e7dce177787ed10dca8ae359e8aea6b (patch)
tree8ed6cafadf578cef89957bc1e5dc711dbc4eb6ec /include/kernel-defaults.mk
parent9c6d3972ae0ceb267b6771d57cf0025c8cbd506a (diff)
downloadupstream-d755be2b9e7dce177787ed10dca8ae359e8aea6b.tar.gz
upstream-d755be2b9e7dce177787ed10dca8ae359e8aea6b.tar.bz2
upstream-d755be2b9e7dce177787ed10dca8ae359e8aea6b.zip
strip the .note.gnu.build-id section from kernel images, which on some platforms can lead to unusable 3.1G kernel image files
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14357 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/kernel-defaults.mk')
-rw-r--r--include/kernel-defaults.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index e3897a64cc..258c8ccc77 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -102,11 +102,13 @@ define Kernel/CompileModules/Default
+$(MAKE) $(KERNEL_MAKEOPTS) modules
endef
+OBJCOPY_STRIP = -R .reginfo -R .note -R .comment -R .mdebug -R .note.gnu.build-id
+
define Kernel/CompileImage/Default
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),,rm -f $(TARGET_DIR)/init)
+$(MAKE) $(KERNEL_MAKEOPTS) $(KERNELNAME)
- $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)
- $(KERNEL_CROSS)objcopy -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
+ $(KERNEL_CROSS)objcopy -O binary $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)
+ $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
endef
define Kernel/Clean/Default