diff mbox series

[2/2] package/picotool: new package

Message ID 20240228195333.712751-2-buildroot@bubu1.eu
State Superseded
Headers show
Series [1/2] package/pico-sdk: new package | expand

Commit Message

Marcus Hoffmann Feb. 28, 2024, 7:53 p.m. UTC
Add the raspberry pi picotool for interacting with rp2040 binaries and
devices.

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
---
 package/Config.in              |  1 +
 package/picotool/Config.in     | 16 ++++++++++++++++
 package/picotool/picotool.hash |  3 +++
 package/picotool/picotool.mk   | 15 +++++++++++++++
 4 files changed, 35 insertions(+)
 create mode 100644 package/picotool/Config.in
 create mode 100644 package/picotool/picotool.hash
 create mode 100644 package/picotool/picotool.mk
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index b01024ae04..2d4559036b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -583,6 +583,7 @@  endmenu
 	source "package/pciutils/Config.in"
 	source "package/pdbg/Config.in"
 	source "package/picocom/Config.in"
+	source "package/picotool/Config.in"
 	source "package/pifmrds/Config.in"
 	source "package/pigpio/Config.in"
 	source "package/powertop/Config.in"
diff --git a/package/picotool/Config.in b/package/picotool/Config.in
new file mode 100644
index 0000000000..03772bb116
--- /dev/null
+++ b/package/picotool/Config.in
@@ -0,0 +1,16 @@ 
+comment "picotool needs a toolchain w/ C++ and gcc >= 4.9"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_HOST_GCC_AT_LEAST_4_9
+
+config BR2_PACKAGE_PICOTOOL
+	bool "picotool"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_HOST_GCC_AT_LEAST_4_9 # libusb
+	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_PICO_SDK
+	help
+	  picotool is a tool for inspecting rp2040 binaries and interacting
+	  with rp2040 devices when they are in bootsel mode or devices USB
+	  stdio support from the Raspberry Pi Pico SDK.
+
+	   https://github.com/raspberrypi/picotool
+
diff --git a/package/picotool/picotool.hash b/package/picotool/picotool.hash
new file mode 100644
index 0000000000..b573ada09e
--- /dev/null
+++ b/package/picotool/picotool.hash
@@ -0,0 +1,3 @@ 
+# Locally calculated
+sha256  f1746ead7815c13be1152f0645db8ea3b277628eb0110d42a0a186db37d40a91  1.1.2.tar.gz
+sha256  483f865953435b66c443dee7558debe3cc3cf8fcbb6a112fd9fc6a795d53f1f6  LICENSE.TXT
diff --git a/package/picotool/picotool.mk b/package/picotool/picotool.mk
new file mode 100644
index 0000000000..c98284c491
--- /dev/null
+++ b/package/picotool/picotool.mk
@@ -0,0 +1,15 @@ 
+################################################################################
+#
+# picotool
+#
+################################################################################
+
+PICOTOOL_VERSION = 1.1.2
+PICOTOOL_SITE = https://github.com/raspberrypi/picotool/archive/refs/tags
+PICOTOOL_SOURCE = $(PICOTOOL_VERSION).tar.gz
+PICOTOOL_CONF_OPTS = -DPICO_SDK_PATH=$(STAGING_DIR)/usr/include/pico-sdk
+PICOTOOL_DEPENDENCIES = libusb pico-sdk
+PICOTOOL_LICENSE = BSD-3-Clause
+PICOTOOL_LICENSE_FILES = LICENSE.TXT
+
+$(eval $(cmake-package))