mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
lkmc v2-rc
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
This commit is contained in:
125
kernel_config/default
Normal file
125
kernel_config/default
Normal file
@@ -0,0 +1,125 @@
|
||||
# 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
|
||||
9
kernel_config/display
Normal file
9
kernel_config/display
Normal file
@@ -0,0 +1,9 @@
|
||||
CONFIG_DRM=y
|
||||
|
||||
## QEMU
|
||||
CONFIG_DRM_VIRTIO_GPU=y
|
||||
|
||||
## gem5
|
||||
CONFIG_DRM_HDLCD=y
|
||||
# Only present in the gem5 fork.
|
||||
CONFIG_DRM_VIRT_ENCODER=y
|
||||
4
kernel_config/gpio
Normal file
4
kernel_config/gpio
Normal file
@@ -0,0 +1,4 @@
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_PL061=y
|
||||
12
kernel_config/leds
Normal file
12
kernel_config/leds
Normal file
@@ -0,0 +1,12 @@
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_CLASS_FLASH=y
|
||||
CONFIG_LEDS_SYSCON=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_NEW_LEDS=y
|
||||
25
kernel_config/min
Normal file
25
kernel_config/min
Normal file
@@ -0,0 +1,25 @@
|
||||
# This file contains only configs which are required to boot all configurations and get a shell.
|
||||
|
||||
## gem5 x86
|
||||
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
|
||||
|
||||
## qemu aarch64
|
||||
|
||||
# For some reason not selected by the Buildroot kernel config by default as it was for arm,
|
||||
# and pci modules fail to build. Not that we have PCI working on ARM anyways.
|
||||
CONFIG_PCI=y
|
||||
|
||||
## gem5 aarch64
|
||||
|
||||
# Minimal options required to run gem5 aarch64 in addition to QEMU's aarch64 setup.
|
||||
# Doing such a minimal boot made the gem5 boot 3x faster on the P51, which is awesome.
|
||||
CONFIG_ATA_PIIX=y
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
|
||||
## qemu aarch64 ext2
|
||||
|
||||
# Also requires gem5 aarch64 options.
|
||||
# Not needed for initrd / initramfs.
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
Reference in New Issue
Block a user