diff --git a/meta-oniro-core/recipes-core/images/oniro-image-base-tests.bb b/meta-oniro-core/recipes-core/images/oniro-image-base-tests.bb
index 92c63c0f88e8ed0143afd8f2c85d47bee566935e..5669da3fb18dad73eecdb6e8507968b4a1874241 100644
--- a/meta-oniro-core/recipes-core/images/oniro-image-base-tests.bb
+++ b/meta-oniro-core/recipes-core/images/oniro-image-base-tests.bb
@@ -10,6 +10,7 @@ IMAGE_INSTALL:append = "\
     packagegroup-oniro-tests \
     ltp \
     perf \
+    kernel-selftest \
 "
 
 # This adds ptest packages to the image
diff --git a/meta-oniro-core/recipes-kernel/kernel-selftest/kernel-selftest.bbappend b/meta-oniro-core/recipes-kernel/kernel-selftest/kernel-selftest.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..cb29ce987e0cd6d68ac6607cf3bf2dc1ba5c506a
--- /dev/null
+++ b/meta-oniro-core/recipes-kernel/kernel-selftest/kernel-selftest.bbappend
@@ -0,0 +1,23 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+COMPATIBLE_HOST:libc-musl = "(i.86|x86_64|arm|aarch64).*-linux"
+
+RDEPENDS:${PN} += "perl"
+
+# bpf depends on clang/llvm. It is removed on x86 and arm by default for backward compatibility.
+# Reference: http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb?h=master#n22
+# clang/llvm is not needed until we want to enable bpf.
+DEPENDS:remove = "clang-native llvm-native"
+
+TEST_LIST = "\
+    rtc \
+    cpufreq \
+    cpu-hotplug \
+"
+
+do_install:append() {
+    cp ${S}/tools/testing/selftests/run_kselftest.sh ${D}/usr/kernel-selftest
+    cp -R ${S}/tools/testing/selftests/kselftest ${D}/usr/kernel-selftest
+}