From f0e825295e5ba3d54e8a97f99e36119de08cea01 Mon Sep 17 00:00:00 2001 From: Laurent Alfonsi Date: Wed, 25 May 2022 18:52:02 +0200 Subject: prepare-board.sh : linux-tools need to be configured for start* Change-Id: I839c8cf309f2c92719d4975cd96db917253693ec --- prepare-board.sh | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'prepare-board.sh') diff --git a/prepare-board.sh b/prepare-board.sh index c1ffb20..481b105 100755 --- a/prepare-board.sh +++ b/prepare-board.sh @@ -111,20 +111,25 @@ hw_tag2board_type() # configure access to linux tools: cpupower and perf configure_linux_tools() { - # All hw_tags tk1/tx1/sq/apm/fx either 32/64 are all aliased in - # all tcwg-base containers to the proper linux tools to use. - # We then rely on that. - - # For tags tk1_32, tx1_64 and tx1_32, they are all aliased - # to linux-tools-4.18.0-13-generic from ubuntu bionic. - # Perf from 4.18 is recent enough to support symbol_size sorting - # field, which we use to track code-size, and appears to work - # just fine with TK1s 3.10 and TX1s 4.4 kernels. - LINUX_TOOLS="/usr/lib/linux-tools/$HW_TAG" - - if ! [ -d "$LINUX_TOOLS" ]; then - error "Docker image does not support hw_tag $HW_TAG" - fi + local op=$1 + + case "$op" in + start_*) + # All hw_tags tk1/tx1/sq/apm/fx either 32/64 are all aliased in + # all tcwg-base containers to the proper linux tools to use. + # We then rely on that. + + # For tags tk1_32, tx1_64 and tx1_32, they are all aliased + # to linux-tools-4.18.0-13-generic from ubuntu bionic. + # Perf from 4.18 is recent enough to support symbol_size sorting + # field, which we use to track code-size, and appears to work + # just fine with TK1s 3.10 and TX1s 4.4 kernels. + LINUX_TOOLS="/usr/lib/linux-tools/$HW_TAG" + + if ! [ -d "$LINUX_TOOLS" ]; then + error "Docker image does not support hw_tag $HW_TAG" + fi + esac } # set_var writes a value to a file (eg in /proc), and records -- cgit v1.2.3