407c6e6299
- bump to version in Linux 5.8 (depends on SPI_TX_OCTAL/SPI_RX_OCTAL available since Linux 5.0) Changelog (since 4.10): 9006a7b3220e spi: spidev_test: add option to continuously transfer data 35386dfd13b7 spi: spidev_test: Improve decoded text part of hex dump 84a14ae8c44f treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 178 020bd6c48ebd spi: spidev_test: Remove break after exit statement 1f3c36328a48 spi: spidev_test: Check input_tx and input_file first after parse options 470a072e1220 spi: spidev_test: Use perror() only if errno is not 0 896fa735084e spi: spidev_test: Add support for Octal mode data transfers 9ec8ade81224 spi: spidev_test: Use %u to format unsigned numbers bd2077915bfe spi: tools: Make default_tx/rx and input_tx static - update Config.in help text - indent hashes by 2 spaces Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
52 lines
1.7 KiB
Makefile
52 lines
1.7 KiB
Makefile
################################################################################
|
|
#
|
|
# spidev_test
|
|
#
|
|
################################################################################
|
|
|
|
# Build the latest version that is compatible with the toolchain's kernel headers
|
|
# 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.
|
|
# Note that the location of spidev_test.c changes from v4.5 onwards.
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0),y)
|
|
SPIDEV_TEST_VERSION = 5.8
|
|
SPIDEV_TEST_PATH = tools/spi
|
|
else ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15),y)
|
|
SPIDEV_TEST_VERSION = 4.10
|
|
SPIDEV_TEST_PATH = tools/spi
|
|
else
|
|
SPIDEV_TEST_VERSION = 3.0
|
|
SPIDEV_TEST_PATH = Documentation/spi
|
|
endif
|
|
|
|
SPIDEV_TEST_SITE = http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/$(SPIDEV_TEST_PATH)
|
|
SPIDEV_TEST_SOURCE = spidev_test.c?id=v$(SPIDEV_TEST_VERSION)
|
|
SPIDEV_TEST_LICENSE = GPL-2.0
|
|
|
|
# musl libc requires linux/ioctl.h for _IOC_SIZEBITS. Do a sed patch to keep
|
|
# compatibility with different spidev_test.c versions that we support.
|
|
define SPIDEV_TEST_ADD_LINUX_IOCTL
|
|
$(SED) 's~^#include <sys/ioctl.h>~#include <sys/ioctl.h>\n#include <linux/ioctl.h>~' \
|
|
$(@D)/spidev_test.c
|
|
endef
|
|
|
|
SPIDEV_TEST_POST_PATCH_HOOKS += SPIDEV_TEST_ADD_LINUX_IOCTL
|
|
|
|
define SPIDEV_TEST_EXTRACT_CMDS
|
|
cp $(SPIDEV_TEST_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))
|