mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
104 lines
2.6 KiB
Plaintext
104 lines
2.6 KiB
Plaintext
# Changes to this file are automatically used in the new kernel
|
|
# after ./run, no need to do anything different.
|
|
|
|
CONFIG_DEBUG_FS=y
|
|
CONFIG_DEBUG_INFO=y
|
|
CONFIG_DEBUG_KERNEL=y
|
|
CONFIG_GDB_SCRIPTS=y
|
|
|
|
# Non-static variables show up on /proc/kallsyms
|
|
# https://stackoverflow.com/questions/20196636/does-kallsyms-have-all-the-symbol-of-kernel-functions/44614878#44614878
|
|
CONFIG_KALLSYMS_ALL=y
|
|
|
|
# zcat /proc/config.gz
|
|
CONFIG_IKCONFIG=y
|
|
CONFIG_IKCONFIG_PROC=y
|
|
|
|
# TODO make example.
|
|
# This seems to allow userspace to create arbitrary configuration trees,
|
|
# which kernel modules can then read and interpret.
|
|
CONFIG_CONFIGFS_FS=y
|
|
|
|
# KGDB
|
|
CONFIG_CONSOLE_POLL=y
|
|
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
|
|
CONFIG_KDB_DEFAULT_ENABLE=0x1
|
|
CONFIG_KDB_KEYBOARD=y
|
|
CONFIG_KGDB=y
|
|
CONFIG_KGDB_KDB=y
|
|
CONFIG_KGDB_LOW_LEVEL_TRAP=y
|
|
CONFIG_KGDB_SERIAL_CONSOLE=y
|
|
CONFIG_KGDB_TESTS=y
|
|
CONFIG_KGDB_TESTS_ON_BOOT=n
|
|
CONFIG_MAGIC_SYSRQ=y
|
|
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
|
|
CONFIG_SERIAL_KGDB_NMI=n
|
|
|
|
# Module.symvers in kernel tree and modules tree contains CRC of signatures.
|
|
# TODO: I think the CRC are stored in the built kernel and module, and checked
|
|
# at insmod, but bgrep did not find it in kernel image.
|
|
# Does not show in /proc/kallyms either.
|
|
CONFIG_MODVERSIONS=y
|
|
|
|
# ftrace
|
|
CONFIG_DYNAMIC_FTRACE=y
|
|
CONFIG_FTRACE=y
|
|
CONFIG_FTRACE_SYSCALLS=y
|
|
CONFIG_FUNCTION_GRAPH_TRACER=y
|
|
CONFIG_FUNCTION_PROFILER=y
|
|
CONFIG_FUNCTION_TRACER=y
|
|
CONFIG_HWLAT_TRACER=y
|
|
CONFIG_IRQSOFF_TRACER=y
|
|
CONFIG_SCHED_TRACER=y
|
|
CONFIG_STACK_TRACER=y
|
|
CONFIG_TRACER_SNAPSHOT=y
|
|
|
|
# x86
|
|
# https://stackoverflow.com/questions/20069620/print-kernels-page-table-entries
|
|
# cat /sys/kernel/debug/kernel_page_tables
|
|
CONFIG_X86_PTDUMP=y
|
|
|
|
# LEDs.
|
|
#
|
|
# modprobe led-class
|
|
# modprobe leds-versatile
|
|
# ls /sys/class/leds
|
|
#
|
|
# TODO: the LEDs don't appear there. There are some entires under:
|
|
#
|
|
# /sys/devices/platform/10000000.core-module/10000000.core-module:led@08.0/
|
|
#
|
|
# but they don't have brightness file.
|
|
#
|
|
# https://raspberrypi.stackexchange.com/questions/697/how-do-i-control-the-system-leds-using-my-software
|
|
#
|
|
# Relevant QEMU files:
|
|
#
|
|
# - hw/arm/versatilepb.c
|
|
# - hw/misc/arm_sysctl.c
|
|
#
|
|
# Relevant kernel files:
|
|
#
|
|
# - arch/arm/boot/dts/versatile-pb.dts
|
|
# - drivers/leds/led-class.c
|
|
# - drivers/leds/leds-versatile.c
|
|
#
|
|
CONFIG_LEDS_CLASS=y
|
|
CONFIG_LEDS_CLASS_FLASH=y
|
|
CONFIG_LEDS_TRIGGERS=y
|
|
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
|
|
CONFIG_LEDS_TRIGGER_CPU=y
|
|
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
|
CONFIG_LEDS_TRIGGER_GPIO=y
|
|
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
|
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
|
CONFIG_LEDS_TRIGGER_TIMER=y
|
|
CONFIG_LEDS_VERSATILE=y
|
|
CONFIG_NEW_LEDS=y
|
|
|
|
# GPIO.
|
|
CONFIG_ARM_AMBA=y
|
|
CONFIG_GPIOLIB=y
|
|
CONFIG_GPIO_SYSFS=y
|
|
CONFIG_GPIO_PL061=y
|