Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You must build the kernel with the following configuration options. Not that =y means they must be enabled, and =n means  means they just be disabled. Please use menuconfig to confirm each one.

Note that some of these configurations can only be enabled if CONFIG_EXPERT=y.

  • CONFIG_DEBUG_INFO=y
  • CONFIG_DEBUG_INFO_REDUCED=n
  • CONFIG_DEBUG_INFO_SPLIT=n
  • CONFIG_RANDOMIZE_BASE=n
  • CONFIG_EXPERT=y
  • CONFIG_UNMAP_KERNEL_AT_EL0=n

...

To debug modules:

  • CONFIG_KALLSYMS=y

To make sure the HW breakpoint resources are not touched during boot :(as in, when the kernel boots, it clears all hardware breakpoints)

  • CONFIG_CORESIGHT=n
  • PERF_EVENTS=n

To remove code optimization:

  • Because of the default compiler optimization level (-O2), stepping thru the code may be problematic / unpredictable. Using menuconfig you can only select between -O2 and -Os (CC_OPTIMIZE_FOR_PERFORMANCE, CC_OPTIMIZE_FOR_SIZE). There's also a relatively new CC_OPTIMIZE_FOR_PERFORMANCE_O3 to select -O3 but no real way to choose a lower optimization level. It is not mandatory but to get a code flow that is easier to follow, you can manually hack the main Makefile (the one at the base of the source tree) and turn -O2 into -O1:

Kernel Boot Arguments:

You need to add the follow to your kernel boot arguments:

...