mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
Unsquashed version at v2-rc-unsquashed, but that cannot be merged as it breaks bisects at several points. All bugs will not bisect to this humongous change. It all started with a conversion of the Bash scripts to Python, mainly because I couldn't stand not being able to properly use --options for run which has a million options. Then since that required a full testing, I decided to do all the refactorings that I had in mind at once, and so I did and it became v2-rc. This is the largest patch I have ever done! OMG a few weeks of extra time. I'm never writing a Bash script for anything that starts getting big again. Some of the features are: * separate build-qemu and build-gem5 commands * common: convert scripts to python. Add --option for everything * rename build to build-buildroot now that we are splitting all the build commands, Linux kernel to follow * move all git submodules to submodules/ and all buildroot packages to packages/ * refactor the out/ structure. Keep projects on toplevel, because guest projects separate archs and host ones don't, making a toplevel arch wrong * do-release: rename to just release https://stackoverflow.com/questions/16174992/cant-get-argparse-to-read-quoted-string-with-dashes-in-it * run: add --terminal and explain gem5 pdb * just track the lvimrc * store CLI kernel config fragment inside buildlroot to avoid conflicts * gem5: document m5 initparam * readme: make a bunch of things awesomer * readme: fix broken refs * parsec-benchmark: update to 75d55ac446a43c47efb1044844a108c6c330184c Could not fetch otherwise. * gem5: M5_OVERRIDE_PY_SOURCE
126 lines
3.0 KiB
Plaintext
126 lines
3.0 KiB
Plaintext
# Misc.
|
|
CONFIG_BLK_DEV_INITRD=y
|
|
CONFIG_DEBUG_FS=y
|
|
CONFIG_DYNAMIC_DEBUG=y
|
|
CONFIG_MODULE_SRCVERSION_ALL=y
|
|
CONFIG_OVERLAY_FS=y
|
|
CONFIG_STRICT_DEVMEM=n
|
|
|
|
# GDB debugging.
|
|
CONFIG_DEBUG_INFO=y
|
|
CONFIG_DEBUG_KERNEL=y
|
|
CONFIG_GDB_SCRIPTS=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
|
|
|
|
# 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
|
|
|
|
# /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
|
|
|
|
# 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
|
|
|
|
# Process tracing.
|
|
CONFIG_CONNECTOR=y
|
|
CONFIG_PROC_EVENTS=y
|
|
|
|
# 9P
|
|
CONFIG_9P_FS=y
|
|
CONFIG_9P_FS_POSIX_ACL=y
|
|
CONFIG_9P_FS_SECURITY=y
|
|
CONFIG_NETWORK_FILESYSTEMS=y
|
|
CONFIG_NET_9P=y
|
|
CONFIG_NET_9P_DEBUG=y
|
|
CONFIG_NET_9P_VIRTIO=y
|
|
# 9P needed for ARM. Not fully minimized, but so be it.
|
|
CONFIG_PCI=y
|
|
CONFIG_PCI_HOST_COMMON=y
|
|
CONFIG_PCI_HOST_GENERIC=y
|
|
CONFIG_VIRTIO_PCI=y
|
|
CONFIG_VIRTIO_BLK=y
|
|
|
|
# Misc
|
|
CONFIG_DUMMY_IRQ=m
|
|
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
|
# Requirement for LOGO.
|
|
CONFIG_FB=y
|
|
CONFIG_LOGO=y
|
|
|
|
## Networking
|
|
|
|
# Will everything blow up?
|
|
# https://superuser.com/questions/684005/how-does-one-permanently-disable-gnu-linux-networking/1255015#1255015
|
|
#CONFIG_NET=n
|
|
|
|
# If given, we can use QEMU 2.9.0 default x86 networking without any -net or -netdev options,
|
|
# since E1000 is the default networking device as mentioned at:
|
|
# https://en.wikibooks.org/w/index.php?title=QEMU/Networking&oldid=3268753
|
|
#CONFIG_E1000=y
|
|
|
|
## x86
|
|
|
|
# https://stackoverflow.com/questions/20069620/print-kernels-page-table-entries
|
|
# cat /sys/kernel/debug/kernel_page_tables
|
|
CONFIG_X86_PTDUMP=y
|
|
|
|
## UIO
|
|
|
|
# All other UIO depend on this module.
|
|
CONFIG_UIO=m
|
|
|
|
# Generic platform devices.
|
|
# https://yurovsky.github.io/2014/10/10/linux-uio-gpio-interrupt/
|
|
CONFIG_UIO_DMEM_GENIRQ=m
|
|
CONFIG_UIO_PDRV_GENIRQ=m
|
|
|
|
# https://github.com/rumpkernel/wiki/wiki/Howto:-Accessing-PCI-devices-from-userspace
|
|
# /sys/class/uio/
|
|
# /sys/class/uio/uio0
|
|
CONFIG_UIO_PCI_GENERIC=m
|
|
|
|
## ARM
|
|
|
|
# Like CONFIG_X86_PTDUMP for ARM.
|
|
CONFIG_ARM64_PTDUMP=y
|
|
|
|
# For record and replay.
|
|
CONFIG_8139CP=y
|