new file mode 100644
@@ -0,0 +1,8 @@
+# Autogenerated with 'bitbake -c update_crates vock'
+
+# from Cargo.lock
+SRC_URI += " \
+ crate://crates.io/libc/0.2.189 \
+"
+
+SRC_URI[libc-0.2.189.sha256sum] = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
new file mode 100644
@@ -0,0 +1,33 @@
+SUMMARY = "Kernel code coverage of a user-space command (KCOV, Intel PT, AMD LBR and Arm Coresight ETMv4)"
+DESCRIPTION = "vock runs a command and reports which kernel code it executed, \
+using KCOV or hardware tracing (Intel PT, AMD LBR/IBS and Arm Coresight ETMv4), \
+optionally with an strace-style syscall trace and syzkaller-compatible output. \
+Coverage is symbolized against a vmlinux (DWARF or BTF) and annotated with kernel source."
+HOMEPAGE = "https://github.com/yskzalloc/vock"
+BUGTRACKER = "https://github.com/yskzalloc/vock/issues"
+SECTION = "devel"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=daf2426a488a4a2b68a88bd7cf6410e4"
+
+SRC_URI = "git://github.com/yskzalloc/vock.git;protocol=https;branch=main"
+SRCREV = "db50863d4d70038738a157379d24a9d9e5e4ce2a"
+PV = "0.1.0+git"
+
+inherit cargo cargo-update-recipe-crates
+
+require ${BPN}-crates.inc
+
+# Syscall decoding, ptrace register access and the hardware-trace backends
+# are implemented for x86_64 and aarch64 only.
+COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
+
+do_install:append() {
+ # LD_PRELOAD shim used by --mode kcov to follow forks and threads. vock
+ # looks it up next to its binary as ../lib/vock/kcov.so, i.e. under
+ # ${nonarch_libdir} regardless of multilib.
+ install -Dm 0755 ${B}/target/${CARGO_TARGET_SUBDIR}/libkcov_preload.so \
+ ${D}${nonarch_libdir}/vock/kcov.so
+}
+
+FILES:${PN} += "${nonarch_libdir}/vock"
vock reports the kernel code a userspace command executes, using KCOV or hardware tracing (Intel PT, AMD LBR/IBS and Arm Coresight ETMv4), symbolized against a vmlinux and annotated with kernel source. Forked children and threads are followed through an LD_PRELOAD library in KCOV mode and through inherited per-CPU perf events in hardware mode. It is useful to see which kernel paths a workload reaches when testing or debugging an embedded system. COMPATIBLE_HOST is limited to x86_64 and aarch64, the only architectures with syscall decoding and trace backends. Tested with poky on qemux86-64 and qemuarm64 (build, packaging, update_crates) and by running KCOV coverage, fork following and syscall tracing in core-image-minimal on qemux86-64 with a KCOV kernel. Signed-off-by: Yunseong Kim <yunseong.kim@est.tech> --- meta-oe/recipes-kernel/vock/vock-crates.inc | 8 +++++ meta-oe/recipes-kernel/vock/vock.bb | 33 +++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta-oe/recipes-kernel/vock/vock-crates.inc create mode 100644 meta-oe/recipes-kernel/vock/vock.bb