[OpenWrt-Devel] [PATCH] include/kernel: Do not strip kernel's Elf

Alexey Brodkin Alexey.Brodkin at synopsys.com
Mon May 16 10:42:43 EDT 2016


If an image gets built as an Elf there's a chance
it will be used by developers for debugging purposes.
In that case it's very helpful to keep debugging info
in that image.

I would think that most OWRT-powered devices in production
will use some form of binary image for booting so Elf
flavours could be left a bit bulkier with more debug info
inside.

Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
---
 include/kernel-defaults.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 406fd46..0166dc5 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -142,7 +142,7 @@ endif
 define Kernel/CopyImage
 	cmp -s $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug || { \
 		$(KERNEL_CROSS)objcopy -O binary $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)$(1); \
-		$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).elf; \
+		$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).elf; \
 		$(CP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug; \
 		$(foreach k, \
 			$(if $(KERNEL_IMAGES),$(KERNEL_IMAGES),$(filter-out dtbs,$(KERNELNAME))), \
-- 
2.5.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list