From c9338828b8bd3db2125d0b9106f167b26c4355de Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 8 May 2018 21:11:39 +0100 Subject: [PATCH 1/3] readme: minor fixes --- README.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index f64437c..ab83fd8 100644 --- a/README.adoc +++ b/README.adoc @@ -2527,7 +2527,7 @@ and `%pB` is documented at `Documentation/core-api/printk-formats.rst`: If KALLSYMS are disabled then the symbol address is printed instead. .... -I wasn't able do disable `CONFIG_KALLSYMS` to test this this out however, it is being selected by some other option TODO which? How to find that out? +I wasn't able do disable `CONFIG_KALLSYMS` to test this this out however, it is being selected by some other option? But I then used `make menuconfig` to see which options select it, and they were all off... [[oops]] ==== Kernel oops @@ -2984,7 +2984,7 @@ I once got link:https://en.wikipedia.org/wiki/User-mode_Linux[UML] running on a But in part because it is dying, I didn't spend much effort to integrate it into this repo, although it would be a good fit in principle, since it is essentially a virtualization method. -Maybe some brave should will send a pull request one day. +Maybe some brave soul will send a pull request one day. === Linux kernel interactive stuff @@ -5042,6 +5042,8 @@ so which shows that the whole delay is inside our install itself. I put an `echo f` in `check_bin_arch`, and it just loops forever, does not stop on a particular package. +Ignored / declied patch at: http://lists.busybox.net/pipermail/buildroot/2018-May/220662.html I might just fork Buildroot on the submodule if this keeps annoying me. + === Report upstream bugs When asking for help on upstream repositories outside of this repository, you will need to provide the commands that you are running in detail without referencing our scripts. From 7cf9f23ae0e81d0006fc25be2a23e65be97814ad Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 8 May 2018 22:24:18 +0100 Subject: [PATCH 2/3] eigen: svd example, use pkg-config --- README.adoc | 4 ++-- kernel_module/user/Makefile | 1 + kernel_module/user/README.adoc | 4 ---- kernel_module/user/eigen.cpp | 21 +++++++++------------ kernel_module/user/eigen_svd.cpp | 24 ++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 18 deletions(-) create mode 100644 kernel_module/user/eigen_svd.cpp diff --git a/README.adoc b/README.adoc index 9955b10..dad2b19 100644 --- a/README.adoc +++ b/README.adoc @@ -4208,7 +4208,7 @@ Header only linear algebra library supported by Buildroot: .... ./build -B 'BR2_PACKAGE_EIGEN=y' -k -./run -F '/eigen.out' +./run -F '/eigen.out;/eigen_svd.out' .... ===== PARSEC benchmark @@ -5050,7 +5050,7 @@ so which shows that the whole delay is inside our install itself. I put an `echo f` in `check_bin_arch`, and it just loops forever, does not stop on a particular package. -Ignored / declied patch at: http://lists.busybox.net/pipermail/buildroot/2018-May/220662.html I might just fork Buildroot on the submodule if this keeps annoying me. +Ignored / declined patch at: http://lists.busybox.net/pipermail/buildroot/2018-May/220662.html I might just fork Buildroot on the submodule if this keeps annoying me. === Report upstream bugs diff --git a/kernel_module/user/Makefile b/kernel_module/user/Makefile index 1da24cc..9b8c413 100644 --- a/kernel_module/user/Makefile +++ b/kernel_module/user/Makefile @@ -15,6 +15,7 @@ endif ifeq ($(BR2_PACKAGE_EIGEN),y) # Header only. #LIBS += -leigen + CXXFLAGS_EXTRA += $(shell $(PKG_CONFIG) --cflags --libs eigen3) else OUTS := $(filter-out eigen%$(OUT_EXT),$(OUTS)) endif diff --git a/kernel_module/user/README.adoc b/kernel_module/user/README.adoc index 420dfec..c4f89c5 100644 --- a/kernel_module/user/README.adoc +++ b/kernel_module/user/README.adoc @@ -30,7 +30,3 @@ These programs can also be compiled and used on host. .. link:ioctl.c[] .. link:netlink.c[] .. link:poll.c[] -. Buildroot libraries -.. link:eigen.cpp[] -.. link:openmp.c[] -.. link:openblas.c[] diff --git a/kernel_module/user/eigen.cpp b/kernel_module/user/eigen.cpp index a6837d6..c7d480a 100644 --- a/kernel_module/user/eigen.cpp +++ b/kernel_module/user/eigen.cpp @@ -1,14 +1,11 @@ -/* Official hello world. */ - +/* Adapted from: https://eigen.tuxfamily.org/dox/GettingStarted.html */ #include -#include -using Eigen::MatrixXd; -int main() -{ - MatrixXd m(2,2); - m(0,0) = 3; - m(1,0) = 2.5; - m(0,1) = -1; - m(1,1) = m(1,0) + m(0,1); - std::cout << m << std::endl; +#include +int main() { + Eigen::MatrixXd m(2,2); + m(0,0) = 3; + m(1,0) = 2.5; + m(0,1) = -1; + m(1,1) = m(1,0) + m(0,1); + std::cout << m << std::endl; } diff --git a/kernel_module/user/eigen_svd.cpp b/kernel_module/user/eigen_svd.cpp new file mode 100644 index 0000000..c41e0be --- /dev/null +++ b/kernel_module/user/eigen_svd.cpp @@ -0,0 +1,24 @@ +/* Adapted from: https://eigen.tuxfamily.org/dox/classEigen_1_1JacobiSVD.html */ + +#include +using std::cout; +using std::endl; + +#include +#include +using Eigen::ComputeThinU; +using Eigen::ComputeThinV; +using Eigen::JacobiSVD; +using Eigen::MatrixXf; +using Eigen::Vector3f; + +int main() { + MatrixXf m = MatrixXf::Random(3,2); + JacobiSVD svd(m, ComputeThinU | ComputeThinV); + Vector3f rhs(1, 0, 0); + cout << "m = " << endl << m << endl << endl; + cout << "svd.singularValues() = " << endl << svd.singularValues() << endl << endl; + cout << "svd.MatrixU() = " << endl << svd.matrixU() << endl << endl; + cout << "svd.MatrixV() = " << endl << svd.matrixV() << endl << endl; + cout << "svd.solve() = " << endl << svd.solve(rhs) << endl << endl; +} From 04f13937f4a68f44c5d302954892eac8a79bade5 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 8 May 2018 22:30:02 +0100 Subject: [PATCH 3/3] readme: remove myinsmod and myrmmod from index since already mentioned in readme With time, all of those will be removed, and all will be mentioned on main README instead --- kernel_module/user/README.adoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel_module/user/README.adoc b/kernel_module/user/README.adoc index c4f89c5..c5cc356 100644 --- a/kernel_module/user/README.adoc +++ b/kernel_module/user/README.adoc @@ -11,8 +11,6 @@ These programs can also be compiled and used on host. . Standalone .. link:hello.c[] .. link:hello_cpp.cpp[] -.. link:myinsmod.c[] -.. link:myrmmod.c[] .. link:sched_getaffinity.c[] .. link:usermem.c[] ... link:pagemap_dump.c[]