Hello,
I want to capture and decode trace data on a Hikey620 (on Target) with OpenCSD and perf. I have been trying different kernels, compilers and compile options for weeks already, but I can not get it working. If anybody could take a look at my current build process or just provide me a tested combination of kernel, config and compiler, it would be very helpful.
I have to cross compile its kernel (and therefore also tools/perf) on a host computer. For that I use a docker container to ensure I have a clean and controlled system.
When compiling tools/perf I always get "libopencsd: [ OFF ]", and when executing "perf report" on target I get this error: 178 [0x268]: failed to process type: 70 Error: failed to process sample Therefore I suspect the building process of OpenCSD or tools/perf to be the problem. Trace collection without perf and OpenCSD works just fine.
My current build process is:
Installing OpenCSD on host: cd OpenCSD/decoder/build/linux/ make -f makefile.dev DEBUG=1 ARCH=arm64 make -f makefile.dev DEBUG=1 ARCH=arm64 install
Building kernel on host: cd coresight make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules hisilicon/hi6220-hikey.dtb O=./out make INSTALL_MOD_PATH=./modules modules_install O=./out
Building /tools/perf on host: mkdir coresight/out/perf make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C tools/perf VF=1 CORESIGHT=1 O=/opt/hikey620/coresight/out/perf
Installing OpenCSD on target (Hikey620): cd OpenCSD/decoder/build/linux/ make -f makefile.dev make -f makefile.dev install
My compiler is the "gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu" from Linaro My kernel is the one from Mathieu Poirier: https://git.linaro.org/people/mathieu.poirier/coresight.git (5.1-rc3-cpu-wide-v3)
My .config was created by make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig but whith CoreSight and ARCH_MXC enabled: CONFIG_CORESIGHT=y CONFIG_CORESIGHT_LINKS_AND_SINKS=y CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y CONFIG_CORESIGHT_CATU=y CONFIG_CORESIGHT_SINK_TPIU=y CONFIG_CORESIGHT_SINK_ETBV10=y CONFIG_CORESIGHT_SOURCE_ETM4X=y CONFIG_CORESIGHT_DYNAMIC_REPLICATOR=y CONFIG_CORESIGHT_STM=y CONFIG_CORESIGHT_CPU_DEBUG=y CONFIG_ARCH_MXC=y
Thanks,
Dominik Huber