blob: 100cfacbe2473c81220c87ee4fce8d7722fb7c3c [file]
#!/bin/bash
. $LKP_SRC/lib/run-env.sh
download()
{
[[ -d linux ]] || {
local linux_git=${GIT_WORK_TREE:-${LKP_GIT_WORK_TREE:-$(git_root_dir)/linux}}
[[ -d $linux_git ]] && local opt_ref="--reference $linux_git"
git clone -q $opt_ref https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git
}
linux_dir="$(pwd)/linux"
git_clone_update https://github.com/andikleen/pmu-tools.git || return
cd $source_dir
XDG_CACHE_HOME=$BM_ROOT ./event_download.py -a
}
build()
{
cd "$linux_dir"/tools/perf
make
cd $source_dir/jevents
make
}
install()
{
cp -af $linux_dir/tools/perf/perf $BM_ROOT
cp -af $source_dir/* $BM_ROOT
}