sed -i 's/KBUILD_CFLAGS += -O2/KBUILD_CFLAGS += -O1/g' Makefile
内核调试选项
1 2 3 4 5 6 7
Kernel hacking ---> Compile-time checks and compiler options ---> [*] Compile the kernel with debug info [*] Provide GDB scripts for kernel debugging [*] Enable full Section mismatch analysis
[*] Kernel debugging
对应编译选项如下:
1 2 3 4
CONFIG_DEBUG_INFO = y CONFIG_GDB_SCRIPTS = y CONFIG_DEBUG_SECTION_MISMATCH = y CONFIG_DEBUG_KERNEL = y