summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-15 14:15:59 -0700
committerTom Rini <trini@konsulko.com>2023-02-11 12:22:35 -0500
commit71d3e7949c652b87c33193ccbed36b9887c5b5c2 (patch)
treec9fc0e8f0e9c9e0e044dd1b81b7ba24c661a19d7 /tools
parent97f3024d16915fd885336c8b983c8a47ac19bcd8 (diff)
Docker: Support trace-cmd
Build trace-cmd as part of the docker image, so that trace tests can be used. Unfortunately the version provided by distributions is a little old and has bugs. It also does not support specifying the time base for the trace, which is required to convert microseconds to nanaseconds. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/docker/Dockerfile16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 3d5a9a0744..aa19d924cc 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -213,6 +213,22 @@ RUN git clone https://github.com/stefanberger/swtpm /tmp/swtpm && \
make install && \
rm -rf /tmp/swtpm
+# Build trace-cmd
+RUN mkdir /tmp/trace && \
+ git clone https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git /tmp/trace/libtraceevent && \
+ cd /tmp/trace/libtraceevent && \
+ make -j$(nproc) && \
+ sudo make install && \
+ git clone https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git /tmp/trace/libtracefs && \
+ cd /tmp/trace/libtracefs && \
+ make -j$(nproc) && \
+ sudo make install && \
+ git clone https://github.com/rostedt/trace-cmd.git /tmp/trace/trace-cmd && \
+ cd /tmp/trace/trace-cmd && \
+ make -j$(nproc) && \
+ sudo make install && \
+ rm -rf /tmp/trace
+
# Create our user/group
RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
RUN useradd -m -U uboot