preparing test_user_mode, need to generalize stuff as usual

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-05 00:00:00 +00:00
parent 1d766fe3d7
commit abb67c14b8
8 changed files with 173 additions and 67 deletions

View File

@@ -1011,6 +1011,7 @@ The `build` scripts inside link:userland/[] are just symlinks to link:build-user
./build-userland-in-tree
./build-userland-in-tree c
./build-userland-in-tree c/hello.c
./build-userland-in-tree userland/c/hello.c
....
which is in turn just a thin wrapper around link:build-userland[], so you can use any option supported by that script freely.
@@ -3641,7 +3642,7 @@ So programs that rely on those libraries might not compile as GCC can't find the
For example, if we try to build <<blas>> statically:
....
./build-userland --has-package openblas --static -- libs/openblas/hello
./build-userland --has-package openblas --static -- userland/libs/openblas/hello.c
....
it fails with:
@@ -8182,7 +8183,7 @@ DRM / DRI is the new interface that supersedes `fbdev`:
....
./build-buildroot --config 'BR2_PACKAGE_LIBDRM=y'
./build-userland --has-package libdrm -- libs/libdrm/modeset
./build-userland --has-package libdrm -- userland/libs/libdrm/modeset.c
./run --eval-after './libs/libdrm/modeset.out' --graphic
....
@@ -9931,7 +9932,7 @@ Buildroot supports it, which makes everything just trivial:
....
./build-buildroot --config 'BR2_PACKAGE_OPENBLAS=y'
./build-userland --has-package openblas -- libs/openblas/hello
./build-userland --has-package openblas -- userland/libs/openblas/hello.c
./run --eval-after './libs/openblas/hello.out; echo $?'
....
@@ -9971,7 +9972,7 @@ Header only linear algebra library with a mainline Buildroot package:
....
./build-buildroot --config 'BR2_PACKAGE_EIGEN=y'
./build-userland --has-package eigen -- libs/eigen/hello
./build-userland --has-package eigen -- userland/libs/eigen/hello.cpp
....
Just create an array and print it:
@@ -11622,7 +11623,7 @@ TODO: review this section, make a more controlled userland experiment with <<m5o
Let's have some fun and try to correlate the gem5 <<stats-txt>> `system.cpu.numCycles` cycle count with the link:https://en.wikipedia.org/wiki/Time_Stamp_Counter[x86 `rdtsc` instruction] that is supposed to do the same thing:
....
./build-userland --static arch/x86_64/c/rdtsc
./build-userland --static userland/arch/x86_64/c/rdtsc.c
./run --eval './arch/x86_64/c/rdtsc.out;m5 exit;' --emulator gem5
./gem5-stat
....