diff options
Diffstat (limited to 'meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb')
| -rw-r--r-- | meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb index 430b5974b3..5c001696d0 100644 --- a/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb +++ b/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb | |||
| @@ -12,12 +12,17 @@ S = "${UNPACKDIR}" | |||
| 12 | SRC_URI:append:libc-musl = "\ | 12 | SRC_URI:append:libc-musl = "\ |
| 13 | file://userfaultfd.patch \ | 13 | file://userfaultfd.patch \ |
| 14 | " | 14 | " |
| 15 | |||
| 16 | # Fix liburing detection (from Linux v7.0) | ||
| 17 | MM_PATCH = "file://0001-selftests-mm-pass-down-full-CC-and-CFLAGS-to-check_c.patch" | ||
| 18 | |||
| 15 | SRC_URI += "file://run-ptest \ | 19 | SRC_URI += "file://run-ptest \ |
| 16 | file://COPYING \ | 20 | file://COPYING \ |
| 17 | file://0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch \ | 21 | file://0001-selftests-timers-Fix-clock_adjtime-for-newer-32-bit-.patch \ |
| 22 | ${@bb.utils.contains('PACKAGECONFIG', 'mm', '${MM_PATCH}', '', d)} \ | ||
| 18 | " | 23 | " |
| 19 | 24 | ||
| 20 | # now we just test bpf and vm | 25 | # now we just test bpf and mm (formerly known as vm) |
| 21 | # we will append other kernel selftest in the future | 26 | # we will append other kernel selftest in the future |
| 22 | # bpf was added in 4.10 with: https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d | 27 | # bpf was added in 4.10 with: https://github.com/torvalds/linux/commit/5aa5bd14c5f8660c64ceedf14a549781be47e53d |
| 23 | # if you have older kernel than that you need to remove it from PACKAGECONFIG | 28 | # if you have older kernel than that you need to remove it from PACKAGECONFIG |
| @@ -25,20 +30,17 @@ PACKAGECONFIG ??= "firmware" | |||
| 25 | # bpf needs working clang compiler anyway | 30 | # bpf needs working clang compiler anyway |
| 26 | PACKAGECONFIG:append:toolchain-clang:x86-64 = " bpf" | 31 | PACKAGECONFIG:append:toolchain-clang:x86-64 = " bpf" |
| 27 | PACKAGECONFIG:remove:x86 = "bpf" | 32 | PACKAGECONFIG:remove:x86 = "bpf" |
| 28 | PACKAGECONFIG:remove:arm = "bpf vm" | 33 | PACKAGECONFIG:remove:arm = "bpf mm" |
| 29 | # host ptrace.h is used to compile BPF target but mips ptrace.h is needed | 34 | # host ptrace.h is used to compile BPF target but mips ptrace.h is needed |
| 30 | # progs/loop1.c:21:9: error: incomplete definition of type 'struct user_pt_regs' | 35 | # progs/loop1.c:21:9: error: incomplete definition of type 'struct user_pt_regs' |
| 31 | # m = PT_REGS_RC(ctx); | 36 | # m = PT_REGS_RC(ctx); |
| 32 | # vm tests need libhugetlbfs starting 5.8+ (https://lkml.org/lkml/2020/4/22/1654) | 37 | PACKAGECONFIG:remove:qemumips = "bpf" |
| 33 | PACKAGECONFIG:remove:qemumips = "bpf vm" | 38 | PACKAGECONFIG:remove:riscv64 = "bpf" |
| 34 | 39 | PACKAGECONFIG:remove:riscv32 = "bpf" | |
| 35 | # riscv does not support libhugetlbfs yet | ||
| 36 | PACKAGECONFIG:remove:riscv64 = "bpf vm" | ||
| 37 | PACKAGECONFIG:remove:riscv32 = "bpf vm" | ||
| 38 | 40 | ||
| 39 | PACKAGECONFIG[bpf] = ",,elfutils elfutils-native libcap libcap-ng rsync-native python3-docutils-native," | 41 | PACKAGECONFIG[bpf] = ",,elfutils elfutils-native libcap libcap-ng rsync-native python3-docutils-native," |
| 40 | PACKAGECONFIG[firmware] = ",,libcap, bash" | 42 | PACKAGECONFIG[firmware] = ",,libcap, bash" |
| 41 | PACKAGECONFIG[vm] = ",,libcap libhugetlbfs,libgcc bash" | 43 | PACKAGECONFIG[mm] = ",,libcap liburing numactl, libgcc bash" |
| 42 | 44 | ||
| 43 | do_patch[depends] += "virtual/kernel:do_shared_workdir" | 45 | do_patch[depends] += "virtual/kernel:do_shared_workdir" |
| 44 | do_compile[depends] += "virtual/kernel:do_install" | 46 | do_compile[depends] += "virtual/kernel:do_install" |
| @@ -48,7 +50,7 @@ inherit linux-kernel-base module-base kernel-arch ptest siteinfo | |||
| 48 | DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" | 50 | DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" |
| 49 | 51 | ||
| 50 | TEST_LIST = "\ | 52 | TEST_LIST = "\ |
| 51 | ${@bb.utils.filter('PACKAGECONFIG', 'bpf firmware vm', d)} \ | 53 | ${@bb.utils.filter('PACKAGECONFIG', 'bpf firmware mm', d)} \ |
| 52 | cpufreq \ | 54 | cpufreq \ |
| 53 | cpu-hotplug \ | 55 | cpu-hotplug \ |
| 54 | rtc \ | 56 | rtc \ |
| @@ -78,6 +80,7 @@ KERNEL_SELFTEST_SRC ?= "Makefile \ | |||
| 78 | tools \ | 80 | tools \ |
| 79 | scripts \ | 81 | scripts \ |
| 80 | arch \ | 82 | arch \ |
| 83 | ${@bb.utils.filter('PACKAGECONFIG', 'mm', d)} \ | ||
| 81 | LICENSES \ | 84 | LICENSES \ |
| 82 | " | 85 | " |
| 83 | do_compile() { | 86 | do_compile() { |
