X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/db92b585b6f455c290fc93b20f5e796e37391cdc..854e6d03d478e03b867a797eeedbeba13a22cb58:/include/kernel-defaults.mk?ds=inline diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 258c8ccc7..0ba1e056a 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -22,6 +22,11 @@ KERNEL_MAKEOPTS := -C $(LINUX_DIR) \ KBUILD_HAVE_NLS=no \ CONFIG_SHELL="$(BASH)" +ifdef CONFIG_STRIP_KERNEL_EXPORTS + KERNEL_MAKEOPTS += \ + EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h" +endif + INITRAMFS_EXTRA_FILES ?= $(GENERIC_PLATFORM_DIR)/image/initramfs-base-files.txt ifneq (,$(KERNEL_CC)) @@ -66,6 +71,8 @@ ifeq ($(KERNEL),2.6) echo 'CONFIG_INITRAMFS_SOURCE="$(strip $(TARGET_DIR) $(INITRAMFS_EXTRA_FILES))"' >> $(LINUX_DIR)/.config echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_COMPRESSION_NONE=y' >> $(LINUX_DIR)/.config + echo '# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set' >> $(LINUX_DIR)/.config endef else define Kernel/SetInitramfs @@ -89,7 +96,10 @@ define Kernel/Configure/Default echo "$(if $(CONFIG_KERNEL_KALLSYMS),CONFIG_KALLSYMS=y,# CONFIG_KALLSYMS is not set)" >> $(LINUX_DIR)/.config.target echo "$(if $(CONFIG_KERNEL_PROFILING),CONFIG_PROFILING=y,# CONFIG_PROFILING is not set)" >> $(LINUX_DIR)/.config.target echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target + echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target + $(SED) 's,.*CONFIG_AEABI.*,$(if $(CONFIG_EABI_SUPPORT),CONFIG_AEABI=y,# CONFIG_AEABI is not set),' $(LINUX_DIR)/.config.target + $(if $(CONFIG_EABI_SUPPORT),echo '# CONFIG_OABI_COMPAT is not set' >> $(LINUX_DIR)/.config.target) $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(TOPDIR)/.config > $(LINUX_DIR)/.config.override $(SCRIPT_DIR)/kconfig.pl 'm+' $(LINUX_DIR)/.config.target $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config $(call Kernel/SetInitramfs) @@ -102,7 +112,7 @@ define Kernel/CompileModules/Default +$(MAKE) $(KERNEL_MAKEOPTS) modules endef -OBJCOPY_STRIP = -R .reginfo -R .note -R .comment -R .mdebug -R .note.gnu.build-id +OBJCOPY_STRIP = -R .reginfo -R .notes -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)