summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes-devtools/spidev-test/spidev-test.bb12
1 files changed, 11 insertions, 1 deletions
diff --git a/recipes-devtools/spidev-test/spidev-test.bb b/recipes-devtools/spidev-test/spidev-test.bb
index 8ce252a..3e0b1e1 100644
--- a/recipes-devtools/spidev-test/spidev-test.bb
+++ b/recipes-devtools/spidev-test/spidev-test.bb
@@ -7,8 +7,18 @@ S = "${WORKDIR}"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
+# the spidev_test.c example got moved to tools/spi/ starting with
+# the v.4.5.y kernel
+KERNELPATH = "tools/spi/spidev_test.c"
+KERNELPATH-OLD = "Documentation/spi/spidev_test.c"
+
do_compile () {
- ${CC} ${STAGING_KERNEL_DIR}/tools/spi/spidev_test.c -o spidev_test
+ if [ -f "${STAGING_KERNEL_DIR}/${KERNELPATH}" ]
+ then
+ ${CC} ${LDFLAGS} ${STAGING_KERNEL_DIR}/${KERNELPATH} -o spidev_test
+ else
+ ${CC} ${LDFLAGS} ${STAGING_KERNEL_DIR}/${KERNELPATH-OLD} -o spidev_test
+ fi
}
do_install () {