diff options
Diffstat (limited to 'recipes-kernel/kselftests/kselftests_4.9.bb')
-rw-r--r-- | recipes-kernel/kselftests/kselftests_4.9.bb | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/recipes-kernel/kselftests/kselftests_4.9.bb b/recipes-kernel/kselftests/kselftests_4.9.bb new file mode 100644 index 00000000..3b1e43ee --- /dev/null +++ b/recipes-kernel/kselftests/kselftests_4.9.bb | |||
@@ -0,0 +1,182 @@ | |||
1 | SUMMARY = "Linux Kernel Selftests" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
4 | |||
5 | SRC_URI = "https://www.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz" | ||
6 | |||
7 | SRC_URI[md5sum] = "0a68ef3615c64bd5ee54a3320e46667d" | ||
8 | SRC_URI[sha256sum] = "029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a" | ||
9 | |||
10 | S = "${WORKDIR}/linux-${PV}" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | DEPENDS = "libcap popt rsync-native" | ||
15 | |||
16 | inherit kernel-arch | ||
17 | |||
18 | # Filter out arch specific tests | ||
19 | TARGETS = " \ | ||
20 | ${@bb.utils.contains_any("TARGET_ARCH", [ "x86", "x86-64" ], "breakpoints", "", d)} \ | ||
21 | capabilities \ | ||
22 | cpu-hotplug \ | ||
23 | efivarfs \ | ||
24 | exec \ | ||
25 | firmware \ | ||
26 | ftrace \ | ||
27 | futex \ | ||
28 | ${@bb.utils.contains_any("TARGET_ARCH", [ "x86", "x86-64" ], "ipc", "", d)} \ | ||
29 | kcmp \ | ||
30 | lib \ | ||
31 | membarrier \ | ||
32 | memfd \ | ||
33 | memory-hotplug \ | ||
34 | mount \ | ||
35 | mqueue \ | ||
36 | net \ | ||
37 | nsfs \ | ||
38 | ${@bb.utils.contains_any("TARGET_ARCH", [ "powerpc", "powerpc64" ], "powerpc", "", d)} \ | ||
39 | pstore \ | ||
40 | ptrace \ | ||
41 | seccomp \ | ||
42 | sigaltstack \ | ||
43 | size \ | ||
44 | static_keys \ | ||
45 | sysctl \ | ||
46 | timers \ | ||
47 | user \ | ||
48 | vm \ | ||
49 | ${@bb.utils.contains_any("TARGET_ARCH", [ "x86", "x86-64" ], "x86", "", d)} \ | ||
50 | zram \ | ||
51 | " | ||
52 | |||
53 | EXTRA_OEMAKE += "-C tools/testing/selftests TARGETS="${TARGETS}" INSTALL_PATH=${D}${bindir}/kselftests CC="${CC}"" | ||
54 | |||
55 | # Their Makefiles are so sloppy, let's clean up a bit | ||
56 | do_configure () { | ||
57 | sed "s|^CC := .*||g" -i ${S}/tools/testing/selftests/lib.mk | ||
58 | sed "s|^CC = .*||g" -i ${S}/tools/testing/selftests/timers/Makefile | ||
59 | sed "s|^CC = .*||g" -i ${S}/tools/testing/selftests/memfd/Makefile | ||
60 | sed "s|^CC := .*||g" -i ${S}/tools/testing/selftests/powerpc/switch_endian/Makefile | ||
61 | sed "s|gcc|\$(CC)|g" -i ${S}/tools/testing/selftests/breakpoints/Makefile | ||
62 | sed "s|^LDFLAGS += -lrt -lpthread|LDLIBS += -lrt -lpthread|g" -i ${S}/tools/testing/selftests/timers/Makefile | ||
63 | } | ||
64 | |||
65 | do_compile () { | ||
66 | oe_runmake | ||
67 | } | ||
68 | |||
69 | do_install () { | ||
70 | oe_runmake install | ||
71 | chown -R root:root ${D} | ||
72 | } | ||
73 | |||
74 | PACKAGE_BEFORE_PN = " \ | ||
75 | ${PN}-breakpoints \ | ||
76 | ${PN}-capabilities \ | ||
77 | ${PN}-cpu-hotplug \ | ||
78 | ${PN}-efivarfs \ | ||
79 | ${PN}-exec \ | ||
80 | ${PN}-firmware \ | ||
81 | ${PN}-ftrace \ | ||
82 | ${PN}-futex \ | ||
83 | ${PN}-ipc \ | ||
84 | ${PN}-kcmp \ | ||
85 | ${PN}-lib \ | ||
86 | ${PN}-membarrier \ | ||
87 | ${PN}-memfd \ | ||
88 | ${PN}-memory-hotplug \ | ||
89 | ${PN}-mount \ | ||
90 | ${PN}-mqueue \ | ||
91 | ${PN}-net \ | ||
92 | ${PN}-nsfs \ | ||
93 | ${PN}-powerpc \ | ||
94 | ${PN}-pstore \ | ||
95 | ${PN}-ptrace \ | ||
96 | ${PN}-seccomp \ | ||
97 | ${PN}-sigaltstack \ | ||
98 | ${PN}-size \ | ||
99 | ${PN}-static-keys \ | ||
100 | ${PN}-sysctl \ | ||
101 | ${PN}-timers \ | ||
102 | ${PN}-user \ | ||
103 | ${PN}-vm \ | ||
104 | ${PN}-x86 \ | ||
105 | ${PN}-zram \ | ||
106 | " | ||
107 | |||
108 | FILES_${PN}-breakpoints = "${bindir}/kselftests/breakpoints" | ||
109 | FILES_${PN}-capabilities = "${bindir}/kselftests/capabilities" | ||
110 | FILES_${PN}-cpu-hotplug = "${bindir}/kselftests/cpu-hotplug" | ||
111 | FILES_${PN}-efivarfs = "${bindir}/kselftests/efivarfs" | ||
112 | FILES_${PN}-exec = "${bindir}/kselftests/exec" | ||
113 | FILES_${PN}-firmware = "${bindir}/kselftests/firmware" | ||
114 | FILES_${PN}-ftrace = "${bindir}/kselftests/ftrace" | ||
115 | FILES_${PN}-futex = "${bindir}/kselftests/futex" | ||
116 | FILES_${PN}-ipc = "${bindir}/kselftests/ipc" | ||
117 | FILES_${PN}-kcmp = "${bindir}/kselftests/kcmp" | ||
118 | FILES_${PN}-lib = "${bindir}/kselftests/lib" | ||
119 | FILES_${PN}-membarrier = "${bindir}/kselftests/membarrier" | ||
120 | FILES_${PN}-memfd = "${bindir}/kselftests/memfd" | ||
121 | FILES_${PN}-memory-hotplug = "${bindir}/kselftests/memory-hotplug" | ||
122 | FILES_${PN}-mount = "${bindir}/kselftests/mount" | ||
123 | FILES_${PN}-mqueue = "${bindir}/kselftests/mqueue" | ||
124 | FILES_${PN}-net = "${bindir}/kselftests/net" | ||
125 | FILES_${PN}-nsfs = "${bindir}/kselftests/nsfs" | ||
126 | FILES_${PN}-powerpc = "${bindir}/kselftests/powerpc" | ||
127 | FILES_${PN}-pstore = "${bindir}/kselftests/pstore" | ||
128 | FILES_${PN}-ptrace = "${bindir}/kselftests/ptrace" | ||
129 | FILES_${PN}-seccomp = "${bindir}/kselftests/seccomp" | ||
130 | FILES_${PN}-sigaltstack = "${bindir}/kselftests/sigaltstack" | ||
131 | FILES_${PN}-size = "${bindir}/kselftests/size" | ||
132 | FILES_${PN}-static-keys = "${bindir}/kselftests/static_keys" | ||
133 | FILES_${PN}-sysctl = "${bindir}/kselftests/sysctl" | ||
134 | FILES_${PN}-timers = "${bindir}/kselftests/timers" | ||
135 | FILES_${PN}-user = "${bindir}/kselftests/user" | ||
136 | FILES_${PN}-vm = "${bindir}/kselftests/vm" | ||
137 | FILES_${PN}-x86 = "${bindir}/kselftests/x86" | ||
138 | FILES_${PN}-zram = "${bindir}/kselftests/zram" | ||
139 | FILES_${PN}-dbg += "${bindir}/kselftests/*/.debug" | ||
140 | |||
141 | RDEPENDS_${PN}-cpu-hotplug += "bash" | ||
142 | RDEPENDS_${PN}-efivarfs += "bash" | ||
143 | RDEPENDS_${PN}-memory-hotplug += "bash" | ||
144 | RDEPENDS_${PN}-net += "bash" | ||
145 | RDEPENDS_${PN}-vm += "bash" | ||
146 | RDEPENDS_${PN}-zram += "bash" | ||
147 | RDEPENDS_${PN} += "bash \ | ||
148 | ${PN}-capabilities \ | ||
149 | ${PN}-cpu-hotplug \ | ||
150 | ${PN}-efivarfs \ | ||
151 | ${PN}-exec \ | ||
152 | ${PN}-firmware \ | ||
153 | ${PN}-ftrace \ | ||
154 | ${PN}-futex \ | ||
155 | ${PN}-kcmp \ | ||
156 | ${PN}-lib \ | ||
157 | ${PN}-membarrier \ | ||
158 | ${PN}-memfd \ | ||
159 | ${PN}-memory-hotplug \ | ||
160 | ${PN}-mount \ | ||
161 | ${PN}-mqueue \ | ||
162 | ${PN}-net \ | ||
163 | ${PN}-nsfs \ | ||
164 | ${PN}-pstore \ | ||
165 | ${PN}-ptrace \ | ||
166 | ${PN}-seccomp \ | ||
167 | ${PN}-sigaltstack \ | ||
168 | ${PN}-size \ | ||
169 | ${PN}-static-keys \ | ||
170 | ${PN}-sysctl \ | ||
171 | ${PN}-timers \ | ||
172 | ${PN}-user \ | ||
173 | ${PN}-vm \ | ||
174 | ${PN}-zram \ | ||
175 | " | ||
176 | |||
177 | RDEPENDS_${PN}_append_x86 = " ${PN}-breakpoints ${PN}-ipc ${PN}-x86" | ||
178 | RDEPENDS_${PN}_append_x86-64 = " ${PN}-breakpoints ${PN}-ipc ${PN}-x86" | ||
179 | RDEPENDS_${PN}_append_powerpc = " ${PN}-powerpc" | ||
180 | RDEPENDS_${PN}_append_powerpc64 = " ${PN}-powerpc" | ||
181 | |||
182 | INSANE_SKIP_${PN} = "already-stripped" | ||