There are some tools in side the kernel,
<kernel source root directory>/tools
perf is one of them.
In ubuntu I think the tools inside this folder is available as package linux-tools
How can I compile it form source and install it and run it?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
I wanted to compile for a different architecture and this seems to work. I had hosttools from buildroot in the output/host/bin directory. Most people will have it there if using buildroot. I had to specify the LD and CC flag. So substitute with appropriate path and is the prefix for toolchain name.
make CC=<buildroot-dir>/output/host/bin/<arch>-gcc LD=<buildroot-dir>/output/host/bin/<arch>-ld -C tools/gpio/