mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
reamde userland directory: explain the different ways to run it, link back to user mode
This commit is contained in:
22
README.adoc
22
README.adoc
@@ -11653,9 +11653,13 @@ They contain data structs and magic constant for kernel to userland communicatio
|
|||||||
|
|
||||||
==== userland directory
|
==== userland directory
|
||||||
|
|
||||||
Userland test programs.
|
Userland test programs. They can be used in the following ways:
|
||||||
|
|
||||||
For usage in the guest, build with:
|
* inside a full system simulation
|
||||||
|
* inside <<user-mode-simulation>>
|
||||||
|
* directly on the host
|
||||||
|
|
||||||
|
For usage inside full system, first ensure that Buildroot has been built for the toolchain, and then build the examples with:
|
||||||
|
|
||||||
....
|
....
|
||||||
./build-userland
|
./build-userland
|
||||||
@@ -11663,7 +11667,7 @@ For usage in the guest, build with:
|
|||||||
|
|
||||||
Source: link:build-userland[].
|
Source: link:build-userland[].
|
||||||
|
|
||||||
This makes them visible immediately on the 9P mount `/mnt/9p/out_root_overlay`.
|
This makes them visible immediately on the <<9p>> mount of a running simulator.
|
||||||
|
|
||||||
In order to place them in the root filesystem image itself, you must also run:
|
In order to place them in the root filesystem image itself, you must also run:
|
||||||
|
|
||||||
@@ -11671,7 +11675,9 @@ In order to place them in the root filesystem image itself, you must also run:
|
|||||||
./build-buildroot
|
./build-buildroot
|
||||||
....
|
....
|
||||||
|
|
||||||
It is possible to build and run those examples directly on your host:
|
===== userland directory host build
|
||||||
|
|
||||||
|
It is possible to build and run some of the userland examples directly on your host:
|
||||||
|
|
||||||
....
|
....
|
||||||
cd userland
|
cd userland
|
||||||
@@ -11705,14 +11711,6 @@ TODO: OpenMP does not like `-static`:
|
|||||||
|
|
||||||
See: https://stackoverflow.com/questions/23869981/linking-openmp-statically-with-gcc
|
See: https://stackoverflow.com/questions/23869981/linking-openmp-statically-with-gcc
|
||||||
|
|
||||||
It is also possible to build other architectures with the host toolchain for other archs than your host arch:
|
|
||||||
|
|
||||||
....
|
|
||||||
./build-userland --arch arm --host --userland-build-id host
|
|
||||||
....
|
|
||||||
|
|
||||||
You won't be able to run those executables directly, but this is interesting if you are playing around with <<qemu-user-mode>>.
|
|
||||||
|
|
||||||
==== buildroot_packages directory
|
==== buildroot_packages directory
|
||||||
|
|
||||||
Source: link:buildroot_packages/[]
|
Source: link:buildroot_packages/[]
|
||||||
|
|||||||
Reference in New Issue
Block a user