From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/linux-tools: introduce spi linux tools
Date: Wed, 13 May 2020 20:46:23 +0300 [thread overview]
Message-ID: <87r1vn6840.fsf@tarshish> (raw)
In-Reply-To: <c577cbdf-b84a-4af8-8d55-f2759e13c137@microchip.com>
Hi Eugen,
On Wed, May 13 2020, Eugen.Hristev at microchip.com wrote:
> On 13.05.2020 18:21, Baruch Siach wrote:
>> On Wed, May 13 2020, Eugen Hristev wrote:
>>> Add new linux tools package : spi. This is present in the Linux Kernel since
>>> 4.5.
>>> It now includes spidev_test and spidev_fdx tools.
>>
>> We have a package for spidev_test already. Consider adding spidev_fdx to
>> that package instead.
>
> While I understand your point, you should also consider that all linux
> tools have a specific way to build in buildroot, and this I think should
> be consistent.
Agreed.
> And spi tools would be not just spidev_test and might include future
> applications, which may or may not have their place in the same spot as
> spidev_test .
In that case I think you should remove the spidev_test package.
baruch
>>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>>> ---
>>>
>>> Inspired by the linux-tools iio mk.in file.
>>>
>>> package/linux-tools/Config.in | 7 ++++++
>>> package/linux-tools/linux-tool-spi.mk.in | 29 ++++++++++++++++++++++++
>>> 2 files changed, 36 insertions(+)
>>> create mode 100644 package/linux-tools/linux-tool-spi.mk.in
>>>
>>> diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
>>> index ceb58c668a..60df99dc4a 100644
>>> --- a/package/linux-tools/Config.in
>>> +++ b/package/linux-tools/Config.in
>>> @@ -108,6 +108,13 @@ comment "selftests needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS and a toolchain w/ dyna
>>> depends on BR2_USE_MMU
>>> depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS || BR2_STATIC_LIBS
>>>
>>> +config BR2_PACKAGE_LINUX_TOOLS_SPI
>>> + bool "spi"
>>> + select BR2_PACKAGE_LINUX_TOOLS
>>> + help
>>> + spi is a collection of tools to test and measure performances
>>> + of SPI (Serial Peripheral Interface) bus devices.
>>> +
>>> config BR2_PACKAGE_LINUX_TOOLS_TMON
>>> bool "tmon"
>>> select BR2_PACKAGE_LINUX_TOOLS
>>> diff --git a/package/linux-tools/linux-tool-spi.mk.in b/package/linux-tools/linux-tool-spi.mk.in
>>> new file mode 100644
>>> index 0000000000..f6c4298380
>>> --- /dev/null
>>> +++ b/package/linux-tools/linux-tool-spi.mk.in
>>> @@ -0,0 +1,29 @@
>>> +################################################################################
>>> +#
>>> +# spi
>>> +#
>>> +################################################################################
>>> +
>>> +LINUX_TOOLS += spi
>>> +
>>> +SPI_MAKE_OPTS = $(LINUX_MAKE_FLAGS)
>>> +
>>> +define SPI_BUILD_CMDS
>>> + $(Q)if ! grep install $(LINUX_DIR)/tools/spi/Makefile >/dev/null 2>&1 ; then \
>>> + echo "Your kernel version is too old and does not have install section in the spi tools." ; \
>>> + echo "At least kernel 4.5 must be used." ; \
>>> + exit 1 ; \
>>> + fi
>>> +
>>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/spi \
>>> + $(SPI_MAKE_OPTS)
>>> +endef
>>> +
>>> +# DESTDIR used since kernel version 4.14
>>> +define SPI_INSTALL_TARGET_CMDS
>>> + $(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/spi \
>>> + $(SPI_MAKE_OPTS) \
>>> + INSTALL_ROOT=$(TARGET_DIR) \
>>> + DESTDIR=$(TARGET_DIR) \
>>> + install
>>> +endef
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
next prev parent reply other threads:[~2020-05-13 17:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 15:03 [Buildroot] [PATCH] package/linux-tools: introduce spi linux tools Eugen Hristev
2020-05-13 15:21 ` Baruch Siach
2020-05-13 15:59 ` Eugen.Hristev at microchip.com
2020-05-13 17:46 ` Baruch Siach [this message]
2020-05-13 19:58 ` Yann E. MORIN
2020-06-04 14:27 ` Eugen.Hristev at microchip.com
2020-06-04 15:35 ` Baruch Siach
2020-06-04 21:59 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1vn6840.fsf@tarshish \
--to=baruch@tkos.co.il \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox