X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fspidev_test%2Fspidev_test.mk;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fspidev_test%2Fspidev_test.mk;h=646372f2f5d794afbf1f1a580fcc215edf2a21d4;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/spidev_test/spidev_test.mk b/cirros-testvm/src-cirros/buildroot-2015.05/package/spidev_test/spidev_test.mk new file mode 100644 index 0000000..646372f --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/spidev_test/spidev_test.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# spidev_test +# +################################################################################ + +# v3.15+ requires SPI_TX_QUAD/SPI_RX_QUAD to build +# Normally kernel headers can't be newer than kernel so switch based on that. +# If you need quad-pumped spi support you need to upgrade your toolchain. +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15),y) +SPIDEV_TEST_VERSION = v3.15 +else +SPIDEV_TEST_VERSION = v3.0 +endif +SPIDEV_TEST_SITE = http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/spi +SPIDEV_TEST_SOURCE = spidev_test.c?id=$(SPIDEV_TEST_VERSION) +SPIDEV_TEST_LICENSE = GPLv2 + +define SPIDEV_TEST_EXTRACT_CMDS + cp $(BR2_DL_DIR)/$(SPIDEV_TEST_SOURCE) $(@D)/spidev_test.c +endef + +define SPIDEV_TEST_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) \ + -o $(@D)/spidev_test $(@D)/spidev_test.c +endef + +define SPIDEV_TEST_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/spidev_test \ + $(TARGET_DIR)/usr/sbin/spidev_test +endef + +$(eval $(generic-package))