some more docs, retore full Linux configs, wont touch that now

This commit is contained in:
Ciro Santilli
2018-09-08 08:54:39 +01:00
parent a99e041c8a
commit dd7614cbce
4 changed files with 41 additions and 22 deletions

View File

@@ -193,7 +193,24 @@ We tend to support the following Ubuntu host versions at least:
==== About the QEMU Buildroot setup
link:https://en.wikipedia.org/wiki/Buildroot[] is a set of `make` scripts that downloads everything from source
link:https://en.wikipedia.org/wiki/Buildroot[] is a set of `make` scripts that downloads from source and compiles compatible versions of:
* GCC
* Linux kernel
* glibc
* BusyBox
It therefore produces a pristine, blob-less and debuggable setup.
The price that you pay is that the first build takes a while, but it is well worth it.
link:https://en.wikipedia.org/wiki/QEMU[QEMU] is a system simulator: it simulates a CPU and devices such as interrupt handlers, timers, UART, screen, keyboard, etc.
QEMU is the leading cross arch system simulator as of 2018. It is even the default Android simulator that developers get with Android Studio 3 to develop apps without real hardware.
QEMU is also supported by Buildroot in-tree, see e.g.: https://github.com/buildroot/buildroot/blob/2018.05/configs/qemu_aarch64_virt_defconfig
All of this makes QEMU the natural choice of system simulator.
=== gem5 Buildroot setup
@@ -2574,9 +2591,9 @@ We also have one letter shorthand names for the architectures and `--arch` optio
....
# aarch64
./run --arch aarch64
./run -a A
# arm
./run --arch arm
./run -a a
# x86_64
./run -a x
....
@@ -9665,10 +9682,10 @@ This directory has the following structure:
Every directory inside it is a Buildroot package.
Those packages get automatically added to Buildroot's `BR2_EXTERNAL` so you just need to turn them on during build, e.g.:
Those packages get automatically added to Buildroot's `BR2_EXTERNAL`, so all you need to do is to turn them on during build, e.g.:
....
BR2_SAMPLE_PACKAGE=y
./build --buildroot-config BR2_SAMPLE_PACKAGE=y
....
==== patches

3
build
View File

@@ -12,6 +12,7 @@ import re
import common
defaults = {
'buildroot_bare_kernel': False,
'buildroot_config': [],
'buildroot_config_fragment': [],
'initramfs': False,
@@ -146,7 +147,7 @@ def main(args, extra_args=None):
default_kernel_config_fragments = []
else:
kernel_config_fragment_dir = os.path.join(common.root_dir, 'kernel_config')
default_kernel_config_fragments = ['min']
default_kernel_config_fragments = ['min', 'default']
if args.linux_reconfigure:
# https://stackoverflow.com/questions/49260466/why-when-i-change-br2-linux-kernel-custom-config-file-and-run-make-linux-reconfi
pathlib.Path(os.path.join(kernel_config_fragment_dir, 'min')).touch()

View File

@@ -1,28 +1,16 @@
# Misc.
CONFIG_BLK_DEV_INITRD=y
CONFIG_STRICT_DEVMEM=n
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_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
# /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
@@ -38,6 +26,19 @@ 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.

View File

@@ -1,4 +1,4 @@
# This file contains only configs which are required to boot all configurations.
# This file contains only configs which are required to boot all configurations and get a shell.
## gem5 x86