perf is only available since kernel 2.6.31, so if we can't find
tools/perf/Makefile, error out and tell the user about this.
perf without libelf can only be built since kernel 3.7, so error out
and tell the user about this if he's trying to build perf from a < 3.7
kernel without libelf.
Unfortunately, those tests can only be build-time checks as we either
need to know the real kernel version (i.e, using LINUX_VERSION would
not be correct as it can be a Git commit ID, or Git tag), or have
access to the kernel sources themselves. So we can't prevent those
invalid situations at the configuration, we can only nicely tell the
user at build time.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Now that libelf is available thanks to elfutils (for glibc only),
allow to build perf against it if available.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This patch adds a new package that allows to build the 'perf'
userspace tool that comes in the tools/perf directory of the kernel
sources.
It is an alternative proposal to the one done by Kaiwan Billimoria
<kaiwan.billimoria@gmail.com>, in that it creates the package in
package/perf/. It therefore properly integrates with the Buildroot
package infrastructure.
Of course, the package depends on the Linux kernel to be built by
Buildroot, in order to get Perf sources matching the version of the
kernel that will be executed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>