* [Buildroot] [PATCH next 1/2] package/spi-tools: bump to version 1.2.0
@ 2026-12-01 21:54 Zoltan Gyarmati
2026-12-01 21:54 ` [Buildroot] [PATCH next 2/2] support/testing: add spi-tools runtime test Zoltan Gyarmati
2026-12-01 23:32 ` [Buildroot] [PATCH next 1/2] package/spi-tools: bump to version 1.2.0 Julien Olivain via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Zoltan Gyarmati @ 2026-12-01 21:54 UTC (permalink / raw)
To: buildroot; +Cc: Zoltan Gyarmati
Release notes:
https://github.com/cpb-/spi-tools/releases/tag/1.1.0
https://github.com/cpb-/spi-tools/releases/tag/1.2.0
Runtime tested on a BeagleBone Black (SPI0, MOSI/MISO loopback) with
spi-config and spi-pipe.
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
package/spi-tools/spi-tools.hash | 2 +-
package/spi-tools/spi-tools.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/spi-tools/spi-tools.hash b/package/spi-tools/spi-tools.hash
index 7a840b9155..0d6f7efea0 100644
--- a/package/spi-tools/spi-tools.hash
+++ b/package/spi-tools/spi-tools.hash
@@ -1,3 +1,3 @@
# locally computed hash
-sha256 f6a93ae4f729d42e9200ba491cf9088202b63cb88e011cf6bcb0a7d12432cdc4 spi-tools-1.0.2.tar.gz
+sha256 907d56e77c6fe403cce32b8bd2c89efa105cf39f60e15959fdb02dff4bdffe80 spi-tools-1.2.0.tar.gz
sha256 a01259a1b522cf0de95824f9860613b453153eebac468e96196d5d7dba84786c LICENSE
diff --git a/package/spi-tools/spi-tools.mk b/package/spi-tools/spi-tools.mk
index c3732fcb86..6da35bd30b 100644
--- a/package/spi-tools/spi-tools.mk
+++ b/package/spi-tools/spi-tools.mk
@@ -4,7 +4,7 @@
#
################################################################################
-SPI_TOOLS_VERSION = 1.0.2
+SPI_TOOLS_VERSION = 1.2.0
SPI_TOOLS_SITE = $(call github,cpb-,spi-tools,$(SPI_TOOLS_VERSION))
# autoreconf must be run as specified in package documentation
SPI_TOOLS_AUTORECONF = YES
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH next 2/2] support/testing: add spi-tools runtime test
2026-12-01 21:54 [Buildroot] [PATCH next 1/2] package/spi-tools: bump to version 1.2.0 Zoltan Gyarmati
@ 2026-12-01 21:54 ` Zoltan Gyarmati
2026-12-01 23:32 ` [Buildroot] [PATCH next 1/2] package/spi-tools: bump to version 1.2.0 Julien Olivain via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Zoltan Gyarmati @ 2026-12-01 21:54 UTC (permalink / raw)
To: buildroot; +Cc: Zoltan Gyarmati
Also adopting the package and its test in DEVELOPERS
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
DEVELOPERS | 3 +
.../testing/tests/package/test_spi_tools.py | 89 +++++++++++++++++++
.../test_spi_tools/linux-spidev.fragment | 2 +
3 files changed, 94 insertions(+)
create mode 100644 support/testing/tests/package/test_spi_tools.py
create mode 100644 support/testing/tests/package/test_spi_tools/linux-spidev.fragment
diff --git a/DEVELOPERS b/DEVELOPERS
index 9462f8e5f0..0b06ccb63f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -3688,7 +3688,10 @@ F: package/qt6/qt6core5compat/
F: package/quazip/
F: package/shapelib/
F: package/simple-mail/
+F: package/spi-tools/
F: package/tinc/
F: support/testing/tests/package/test_libusb_compat.py
F: support/testing/tests/package/test_libusb_compat/
F: support/testing/tests/package/test_quazip.py
+F: support/testing/tests/package/test_spi_tools.py
+F: support/testing/tests/package/test_spi_tools/
diff --git a/support/testing/tests/package/test_spi_tools.py b/support/testing/tests/package/test_spi_tools.py
new file mode 100644
index 0000000000..d0eda8f080
--- /dev/null
+++ b/support/testing/tests/package/test_spi_tools.py
@@ -0,0 +1,89 @@
+import os
+
+import infra.basetest
+
+
+class TestSpiTools(infra.basetest.BRTest):
+ # The Qemu sabrelite machine emulates an i.MX6 with a SST25VF016B
+ # SPI flash connected to the first ECSPI controller, which is
+ # also described in the Kernel device tree. We rebind this device
+ # to spidev to test the spi-tools against a real SPI slave. The
+ # i.MX SPI driver needs the SDMA driver, which is built as a
+ # module in imx_v6_v7_defconfig, so we build it in the Kernel.
+ linux_fragment = \
+ infra.filepath("tests/package/test_spi_tools/linux-spidev.fragment")
+ config = \
+ f"""
+ BR2_arm=y
+ BR2_cortex_a9=y
+ BR2_ARM_ENABLE_VFP=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+ BR2_LINUX_KERNEL=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.7"
+ BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
+ BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{linux_fragment}"
+ BR2_LINUX_KERNEL_DTS_SUPPORT=y
+ BR2_LINUX_KERNEL_INTREE_DTS_NAME="nxp/imx/imx6q-sabrelite"
+ BR2_PACKAGE_SPI_TOOLS=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ BR2_TARGET_ROOTFS_CPIO_GZIP=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
+
+ spidev = "/dev/spidev0.0"
+
+ def test_run(self):
+ img = os.path.join(self.builddir, "images", "rootfs.cpio.gz")
+ kern = os.path.join(self.builddir, "images", "zImage")
+ dtb = os.path.join(self.builddir, "images", "imx6q-sabrelite.dtb")
+ # The emulator always uses "-serial stdio" first, which is
+ # connected to the first UART (ttymxc0).
+ self.emulator.boot(arch="armv7",
+ kernel=kern,
+ kernel_cmdline=["console=ttymxc0"],
+ options=["-M", "sabrelite", "-smp", "4", "-m", "1G",
+ "-dtb", dtb, "-initrd", img,
+ "-display", "none"])
+ self.emulator.login()
+
+ # Check the programs can execute.
+ self.assertRunOk("spi-config --version")
+ self.assertRunOk("spi-pipe --version")
+
+ # At boot, the flash is bound to the spi-nor driver. Rebind
+ # it to spidev.
+ dev = "/sys/bus/spi/devices/spi0.0"
+ self.assertRunOk(f"echo spi0.0 > {dev}/driver/unbind")
+ self.assertRunOk(f"echo spidev > {dev}/driver_override")
+ self.assertRunOk("echo spi0.0 > /sys/bus/spi/drivers/spidev/bind")
+ self.assertRunOk(f"test -c {self.spidev}")
+
+ # Query the current configuration.
+ output, exit_code = self.emulator.run(f"spi-config -d {self.spidev} -q")
+ self.assertEqual(exit_code, 0)
+ self.assertIn("mode=0", output[0])
+
+ # Change the SPI mode, and check it is applied.
+ self.assertRunOk(f"spi-config -d {self.spidev} -m 3")
+ output, exit_code = self.emulator.run(f"spi-config -d {self.spidev} -q")
+ self.assertEqual(exit_code, 0)
+ self.assertIn("mode=3", output[0])
+ self.assertRunOk(f"spi-config -d {self.spidev} -m 0")
+
+ # Querying and setting options at the same time is not
+ # allowed.
+ _, exit_code = self.emulator.run(f"spi-config -d {self.spidev} -q -m 0")
+ self.assertNotEqual(exit_code, 0)
+
+ # Send the JEDEC "Read Identification" command (0x9f) to the
+ # flash, and check its answer. The SST25VF016B has the
+ # manufacturer ID 0xbf, and the device ID 0x2541.
+ cmd = "printf '\\237\\000\\000\\000'"
+ cmd += f" | spi-pipe -d {self.spidev} -b 4 -n 1 > /tmp/jedec-id"
+ self.assertRunOk(cmd)
+ output, exit_code = self.emulator.run("od -An -tx1 /tmp/jedec-id")
+ self.assertEqual(exit_code, 0)
+ self.assertIn("bf 25 41", output[0])
diff --git a/support/testing/tests/package/test_spi_tools/linux-spidev.fragment b/support/testing/tests/package/test_spi_tools/linux-spidev.fragment
new file mode 100644
index 0000000000..579f3e3aed
--- /dev/null
+++ b/support/testing/tests/package/test_spi_tools/linux-spidev.fragment
@@ -0,0 +1,2 @@
+CONFIG_IMX_SDMA=y
+CONFIG_SPI_SPIDEV=y
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH next 1/2] package/spi-tools: bump to version 1.2.0
2026-12-01 21:54 [Buildroot] [PATCH next 1/2] package/spi-tools: bump to version 1.2.0 Zoltan Gyarmati
2026-12-01 21:54 ` [Buildroot] [PATCH next 2/2] support/testing: add spi-tools runtime test Zoltan Gyarmati
@ 2026-12-01 23:32 ` Julien Olivain via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Julien Olivain via buildroot @ 2026-12-01 23:32 UTC (permalink / raw)
To: Zoltan Gyarmati; +Cc: buildroot
On 01/12/2026 22:54, Zoltan Gyarmati wrote:
> Release notes:
> https://github.com/cpb-/spi-tools/releases/tag/1.1.0
> https://github.com/cpb-/spi-tools/releases/tag/1.2.0
>
> Runtime tested on a BeagleBone Black (SPI0, MOSI/MISO loopback) with
> spi-config and spi-pipe.
>
> Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
Series applied to next. For info, I made few changes in
the runtime test, to make sure it is working in the Buildroot
Docker image. See:
https://gitlab.com/buildroot.org/buildroot/-/commit/305d3c9107cad6405e94243e72110b55a88e7dcb
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-01 23:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 21:54 [Buildroot] [PATCH next 1/2] package/spi-tools: bump to version 1.2.0 Zoltan Gyarmati
2026-12-01 21:54 ` [Buildroot] [PATCH next 2/2] support/testing: add spi-tools runtime test Zoltan Gyarmati
2026-12-01 23:32 ` [Buildroot] [PATCH next 1/2] package/spi-tools: bump to version 1.2.0 Julien Olivain via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox