mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Rename buildroot_config_fragment_* to just br2_*
Add br2_local to persistently store new br2 options.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -7,7 +7,8 @@
|
||||
*.tmp
|
||||
*~
|
||||
.tmp_versions
|
||||
/buildroot_config_fragment_cli
|
||||
/br2_cli
|
||||
/br2_local
|
||||
/rootfs_overlay/etc/init.d/S99
|
||||
/rootfs_overlay/ignore.sh
|
||||
/9p
|
||||
|
||||
31
README.adoc
31
README.adoc
@@ -1034,7 +1034,7 @@ Only tested successfully in `x86_64`.
|
||||
Build:
|
||||
|
||||
....
|
||||
./build -i buildroot_config_fragment_x11
|
||||
./build -i br2_x11
|
||||
./run
|
||||
....
|
||||
|
||||
@@ -1996,7 +1996,6 @@ TODO is it possible to compile a single package with optimizations enabled? In a
|
||||
Buildroot built-in libraries, mostly under Libraries > Other:
|
||||
|
||||
* Armadillo `C++`: linear algebra
|
||||
* CBLAS / CLAPACK: linear algebra
|
||||
* fftw: Fourier transform
|
||||
* Eigen: linear algebra
|
||||
* Flann
|
||||
@@ -2008,7 +2007,7 @@ Buildroot built-in libraries, mostly under Libraries > Other:
|
||||
|
||||
There are not yet enabled, but it should be easy to so:
|
||||
|
||||
* enable them in link:buildroot_config_fragment[] and rebuild
|
||||
* enable them in link:br2[] and rebuild
|
||||
* create a test program that uses each library under link:kernel_module/user[]
|
||||
|
||||
External open source benchmarks. We will try to create Buildroot packages for them, add them to this repo, and potentially upstream:
|
||||
@@ -2028,7 +2027,7 @@ There are two ways to run PARSEC with this repo:
|
||||
====== PARSEC benchmark without parsecmgmt
|
||||
|
||||
....
|
||||
configure -gpq && ./build -a arm -g -i buildroot_config_fragment_parsec
|
||||
configure -gpq && ./build -a arm -g -i br2_parsec
|
||||
./run -a arm -g
|
||||
....
|
||||
|
||||
@@ -2061,7 +2060,7 @@ Running a benchmark of a different size requires a rebuild wit:
|
||||
-c 'BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE="simsmall"' \
|
||||
-c BR2_TARGET_ROOTFS_EXT2_SIZE="500M" \
|
||||
-g \
|
||||
-i buildroot_config_fragment_parsec \
|
||||
-i br2_parsec \
|
||||
-- parsec-benchmark-reconfigure \
|
||||
;
|
||||
....
|
||||
@@ -2113,7 +2112,7 @@ If you still want to run this, try it out with:
|
||||
./build -a arm \
|
||||
-c BR2_TARGET_ROOTFS_EXT2_SIZE="3G" \
|
||||
-g
|
||||
-i buildroot_config_fragment_parsec
|
||||
-i br2_parsec
|
||||
-- parsec-benchmark-reconfigure \
|
||||
;
|
||||
....
|
||||
@@ -2131,7 +2130,7 @@ parsecmgmt -a run -p splash2x.fmm -i test
|
||||
|
||||
One limitation is that only one input size is available on the guest for a given build.
|
||||
|
||||
To change that, edit link:buildroot_config_fragment_parsec[] to contain for example:
|
||||
To change that, edit link:br2_parsec[] to contain for example:
|
||||
|
||||
....
|
||||
BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE=simsmall
|
||||
@@ -2140,7 +2139,7 @@ BR2_PACKAGE_PARSEC_BENCHMARK_INPUT_SIZE=simsmall
|
||||
and then rebuild with:
|
||||
|
||||
....
|
||||
./build -a arm -g -i buildroot_config_fragment_parsec -- parsec-benchmark-reconfigure
|
||||
./build -a arm -g -i br2_parsec -- parsec-benchmark-reconfigure
|
||||
....
|
||||
|
||||
This limitation exists because `parsecmgmt` generates the input files just before running via the Bash scripts, but we can't run `parsecmgmt` on gem5 as it is too slow!
|
||||
@@ -2187,7 +2186,7 @@ before going for the cross compile build.
|
||||
Don't forget to explicitly rebuild PARSEC with:
|
||||
+
|
||||
....
|
||||
./build -a arm -g -i buildroot_config_fragment_parsec parsec-benchmark-reconfigure
|
||||
./build -a arm -g -i br2_parsec parsec-benchmark-reconfigure
|
||||
....
|
||||
+
|
||||
You may also want to test if your patches are still functionally correct inside of QEMU first, which is a faster emulator.
|
||||
@@ -2538,6 +2537,18 @@ dmesg
|
||||
|
||||
== Buildroot
|
||||
|
||||
=== Change Buildroot options
|
||||
|
||||
We provide the following mechanisms:
|
||||
|
||||
* `br2_local`: a gitignored file that gets appended to the `.config`. Get started with:
|
||||
+
|
||||
....
|
||||
cp br2_local.off br2_local
|
||||
....
|
||||
* `./build -i somefile`: append `somefile` to a single build. Must be passed every time you run `./build`.
|
||||
* `./build -c 'BR2_SOM_OPTION="myval"'`: append a single option to a single build.
|
||||
|
||||
=== ccache
|
||||
|
||||
We have link:https://buildroot.org/downloads/manual/manual.html#ccache[enabled ccached] builds by default.
|
||||
@@ -2774,7 +2785,7 @@ Save and quit.
|
||||
diff .config.olg .config
|
||||
....
|
||||
|
||||
Copy and paste the diff additions to `buildroot_config_fragment`.
|
||||
Copy and paste the diff additions to link:br2[].
|
||||
|
||||
==== Benchmarking this repo
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ BR2_PACKAGE_OVERRIDE_FILE="../buildroot_override"
|
||||
# For qemu-ga on guest. TODO: do something with it, and document it.
|
||||
BR2_PACKAGE_QEMU=y
|
||||
BR2_PACKAGE_STRACE=y
|
||||
#BR2_PACKAGE_OPENSSH=y
|
||||
BR2_ROOTFS_OVERLAY="../rootfs_overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="../rootfs_post_build_script"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="../rootfs_post_image_script"
|
||||
5
br2_local.off
Normal file
5
br2_local.off
Normal file
@@ -0,0 +1,5 @@
|
||||
# Rename this file to just br2_local
|
||||
# If is then gitignored, and you can add your own buildroot configs here to quickly test new buildroot features.
|
||||
# Often used for new packages.
|
||||
#BR2_PACKAGE_OPENSSH=y
|
||||
#BR2_PACKAGE_OPENBLAS=y
|
||||
13
build
13
build
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
arch=x86_64
|
||||
rm -f buildroot_config_fragment_cli
|
||||
touch buildroot_config_fragment_cli
|
||||
rm -f br2_cli
|
||||
touch br2_cli
|
||||
configure=true
|
||||
config_fragments='buildroot_config_fragment buildroot_config_fragment_cli'
|
||||
config_fragments='br2 br2_cli'
|
||||
extra_make_args=''
|
||||
gem5=false
|
||||
j="$(($(nproc) - 2))"
|
||||
@@ -18,7 +18,7 @@ while getopts 'a:c:Cgj:i:kK:lp:qS:v' OPT; do
|
||||
arch="$OPTARG"
|
||||
;;
|
||||
c)
|
||||
echo "$OPTARG" >> buildroot_config_fragment_cli
|
||||
echo "$OPTARG" >> br2_cli
|
||||
;;
|
||||
C)
|
||||
configure=false
|
||||
@@ -57,6 +57,9 @@ while getopts 'a:c:Cgj:i:kK:lp:qS:v' OPT; do
|
||||
done
|
||||
shift $(($OPTIND - 1))
|
||||
extra_make_args="$extra_make_args $@"
|
||||
if [ -f br2_local ]; then
|
||||
config_fragments="$config_fragments br2_local"
|
||||
fi
|
||||
case "$arch" in
|
||||
x86_64)
|
||||
defconfig=qemu_x86_64_defconfig
|
||||
@@ -77,7 +80,7 @@ if "$gem5"; then
|
||||
# Networking was not working, so disable it to speed things up.
|
||||
post_script_args="$post_script_args -n"
|
||||
else
|
||||
config_fragments="$config_fragments buildroot_config_fragment_qemu"
|
||||
config_fragments="$config_fragments br2_qemu"
|
||||
fi
|
||||
root_dir="$(pwd)"
|
||||
buildroot_dir="${root_dir}/buildroot"
|
||||
|
||||
Reference in New Issue
Block a user