From 2f70800e91d09655468a3b934923f019e097707e Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Fri, 30 Jun 2023 10:41:54 -0700 Subject: [PATCH] resources: Disable CONFIG_DEBUG_MISC and set CONFIG_DEBUG_INFO_NONE Otherwise, CONFIG_DEBUG_INFO will be enabled automatically bloating the size of the kernel image. Now the size of kernel image is reduced from 635M to 60M on x86_64. Signed-off-by: Bo Chen --- resources/linux-config-aarch64 | 13 +++---------- resources/linux-config-x86_64 | 13 +++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/resources/linux-config-aarch64 b/resources/linux-config-aarch64 index 13e559672..91a3ed295 100644 --- a/resources/linux-config-aarch64 +++ b/resources/linux-config-aarch64 @@ -3050,23 +3050,16 @@ CONFIG_SYMBOLIC_ERRNAME=y # end of printk and dmesg options CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_MISC=y +# CONFIG_DEBUG_MISC is not set # # Compile-time checks and compiler options # -# CONFIG_DEBUG_INFO is not set CONFIG_AS_HAS_NON_CONST_LEB128=y -# CONFIG_DEBUG_INFO_NONE is not set -CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y +CONFIG_DEBUG_INFO_NONE=y +# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_DWARF5 is not set -# CONFIG_DEBUG_INFO_REDUCED is not set -CONFIG_DEBUG_INFO_COMPRESSED_NONE=y -# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set -# CONFIG_DEBUG_INFO_SPLIT is not set -# CONFIG_DEBUG_INFO_BTF is not set -# CONFIG_GDB_SCRIPTS is not set CONFIG_FRAME_WARN=2048 CONFIG_STRIP_ASM_SYMS=y # CONFIG_READABLE_ASM is not set diff --git a/resources/linux-config-x86_64 b/resources/linux-config-x86_64 index 35f90ea93..9d4d066c3 100644 --- a/resources/linux-config-x86_64 +++ b/resources/linux-config-x86_64 @@ -2924,23 +2924,16 @@ CONFIG_SYMBOLIC_ERRNAME=y # end of printk and dmesg options CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_MISC=y +# CONFIG_DEBUG_MISC is not set # # Compile-time checks and compiler options # -# CONFIG_DEBUG_INFO is not set CONFIG_AS_HAS_NON_CONST_LEB128=y -# CONFIG_DEBUG_INFO_NONE is not set -CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y +CONFIG_DEBUG_INFO_NONE=y +# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_DWARF5 is not set -# CONFIG_DEBUG_INFO_REDUCED is not set -CONFIG_DEBUG_INFO_COMPRESSED_NONE=y -# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set -# CONFIG_DEBUG_INFO_SPLIT is not set -# CONFIG_DEBUG_INFO_BTF is not set -# CONFIG_GDB_SCRIPTS is not set CONFIG_FRAME_WARN=2048 CONFIG_STRIP_ASM_SYMS=y # CONFIG_READABLE_ASM is not set