mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
readme: make host docker awesome
This commit is contained in:
19
README.adoc
19
README.adoc
@@ -389,12 +389,17 @@ Workaround by checking out kernel 4.17 as explained at <<linux-kernel-build-vari
|
||||
More information at: <<gem5>>
|
||||
|
||||
[[docker]]
|
||||
=== QEMU Buildroot setup inside Docker
|
||||
=== Docker host setup
|
||||
|
||||
This is the same as the native <<qemu-buildroot-setup>>, but run from inside a link:https://en.wikipedia.org/wiki/Docker_(software)[Docker] on the host.
|
||||
This repository has been tested inside clean link:https://en.wikipedia.org/wiki/Docker_(software)[Docker] containers.
|
||||
|
||||
This is a good option if you are on a Linux host, but the native setup failed due to your weird host distribution, and you have better things to do with your life than to debug it.
|
||||
|
||||
Buildroot is the most complex thing we build, and therefore the most likely to break, so running inside Docker is specially relevant to run:
|
||||
|
||||
* <<qemu-buildroot-setup>>
|
||||
* <<gem5-buildroot-setup>>
|
||||
|
||||
Before anything, you must get rid of any host build files on `out/` if you have any. A simple way to do this it to:
|
||||
|
||||
....
|
||||
@@ -439,15 +444,15 @@ Restart the container:
|
||||
./rundocker
|
||||
....
|
||||
|
||||
Open a second shell in a running container:
|
||||
In order to use functionality such as <<gdb>>, you need a second shell inside the container. You can either do that with:
|
||||
|
||||
....
|
||||
./rundocker sh
|
||||
....
|
||||
|
||||
You will need this for example to use <<gdb>>.
|
||||
or even better, by starting a <<tmux>> session inside the container. We install `tmux` by default in the container.
|
||||
|
||||
Start a second shell, and run a command in it at the same time:
|
||||
You can start a second shell and run a command in it at the same time with:
|
||||
|
||||
....
|
||||
./rundocker sh ./rungdb start_kernel
|
||||
@@ -495,12 +500,14 @@ After this, to start using Docker again will you need another:
|
||||
./rundocker setup
|
||||
....
|
||||
|
||||
Tested on: a760cb1196161e913a94684e03cfeaebf71f0cdd
|
||||
|
||||
[[prebuilt]]
|
||||
=== Prebuilt setup
|
||||
|
||||
==== About the prebuilt setup
|
||||
|
||||
This setup uses prebuilt binaries of the <<qemu-buildroot-setup>> that we upload to GitHub from time to time.
|
||||
This setup uses prebuilt binaries of the <<qemu-buildroot-setup>> that we upload to GitHub from time to time.
|
||||
|
||||
We don't currently provide a full prebuilt because it would be too big to host freely, notably because of the cross toolchain.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user