* [Buildroot] [PATCH v2 1/2] package/pico-sdk: new package
@ 2024-02-28 20:24 Marcus Hoffmann via buildroot
2024-02-28 20:24 ` [Buildroot] [PATCH v2 2/2] package/picotool: " Marcus Hoffmann via buildroot
2024-07-15 19:44 ` [Buildroot] [PATCH v2 1/2] package/pico-sdk: " Thomas Petazzoni via buildroot
0 siblings, 2 replies; 6+ messages in thread
From: Marcus Hoffmann via buildroot @ 2024-02-28 20:24 UTC (permalink / raw)
To: buildroot; +Cc: Thomas Petazzoni
Add the pi-pico sdk as a dependency for picotool. This is a bit of a
weird package, because you normally clone the git repository and point
the picotool (or rp2040 firmware project) build to it.
For picotool specifically, only headers are used from the sdk, for
building a firmware project, it is included as source files via cmake,
so this pretty much has the same semantics for that as well.
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
---
package/Config.in | 1 +
package/pico-sdk/Config.in | 9 +++++++++
package/pico-sdk/pico-sdk.hash | 3 +++
package/pico-sdk/pico-sdk.mk | 20 ++++++++++++++++++++
4 files changed, 33 insertions(+)
create mode 100644 package/pico-sdk/Config.in
create mode 100644 package/pico-sdk/pico-sdk.hash
create mode 100644 package/pico-sdk/pico-sdk.mk
diff --git a/package/Config.in b/package/Config.in
index bf0fe078b9..b01024ae04 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1785,6 +1785,7 @@ menu "Hardware handling"
source "package/opensc/Config.in"
source "package/owfs/Config.in"
source "package/pcsc-lite/Config.in"
+ source "package/pico-sdk/Config.in"
source "package/rpi-rgb-led-matrix/Config.in"
source "package/tslib/Config.in"
source "package/uhd/Config.in"
diff --git a/package/pico-sdk/Config.in b/package/pico-sdk/Config.in
new file mode 100644
index 0000000000..962139925c
--- /dev/null
+++ b/package/pico-sdk/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PICO_SDK
+ bool "pico-sdk"
+ help
+ Raspberry Pi Pico SDK. Provides the headers, libraries
+ and build system necessary to write programs for the
+ RP2040-based devices such as the Raspberry Pi Pico in
+ C, C++ or assembly language.
+
+ https://github.com/raspberrypi/pico-sdk
diff --git a/package/pico-sdk/pico-sdk.hash b/package/pico-sdk/pico-sdk.hash
new file mode 100644
index 0000000000..5db7e8bdb4
--- /dev/null
+++ b/package/pico-sdk/pico-sdk.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 95f5e522be3919e36a47975ffd3b208c38880c14468bd489ac672cfe3cec803c pico-sdk-1.5.1.tar.gz
+sha256 483f865953435b66c443dee7558debe3cc3cf8fcbb6a112fd9fc6a795d53f1f6 LICENSE.TXT
diff --git a/package/pico-sdk/pico-sdk.mk b/package/pico-sdk/pico-sdk.mk
new file mode 100644
index 0000000000..0c475d8aa1
--- /dev/null
+++ b/package/pico-sdk/pico-sdk.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# pico-sdk
+#
+################################################################################
+
+PICO_SDK_VERSION = 1.5.1
+PICO_SDK_SITE = $(call github,raspberrypi,pico-sdk,$(PICO_SDK_VERSION))
+PICO_SDK_LICENSE = BSD-3-Clause
+PICO_SDK_LICENSE_FILES = LICENSE.TXT
+PICO_SDK_INSTALL_STAGING = YES
+# Header-only lib, as far as buildroot is concerned
+PICO_SDK_INSTALL_TARGET = NO
+
+define PICO_SDK_INSTALL_STAGING_CMDS
+ mkdir -p $(STAGING_DIR)/usr/include/pico-sdk
+ cp -r $(@D)/* $(STAGING_DIR)/usr/include/pico-sdk
+endef
+
+$(eval $(generic-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/picotool: new package
2024-02-28 20:24 [Buildroot] [PATCH v2 1/2] package/pico-sdk: new package Marcus Hoffmann via buildroot
@ 2024-02-28 20:24 ` Marcus Hoffmann via buildroot
2024-07-12 13:28 ` Thomas Petazzoni via buildroot
2024-07-15 19:45 ` Thomas Petazzoni via buildroot
2024-07-15 19:44 ` [Buildroot] [PATCH v2 1/2] package/pico-sdk: " Thomas Petazzoni via buildroot
1 sibling, 2 replies; 6+ messages in thread
From: Marcus Hoffmann via buildroot @ 2024-02-28 20:24 UTC (permalink / raw)
To: buildroot; +Cc: Samuel Martin
Add the raspberry pi picotool for interacting with rp2040 binaries and
devices.
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
---
Changes v1 -> v2:
- fix check-package
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 --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..0046f8ad61
--- /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 USBstdio 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))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/picotool: new package
2024-02-28 20:24 ` [Buildroot] [PATCH v2 2/2] package/picotool: " Marcus Hoffmann via buildroot
@ 2024-07-12 13:28 ` Thomas Petazzoni via buildroot
2024-07-15 18:31 ` Marcus Hoffmann via buildroot
2024-07-15 19:45 ` Thomas Petazzoni via buildroot
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-12 13:28 UTC (permalink / raw)
To: Marcus Hoffmann via buildroot; +Cc: Samuel Martin, Marcus Hoffmann
Hello Marcus,
On Wed, 28 Feb 2024 21:24:13 +0100
Marcus Hoffmann via buildroot <buildroot@buildroot.org> wrote:
> +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 USBstdio support from the Raspberry Pi Pico
> + SDK.
> +
> + https://github.com/raspberrypi/picotool
Could you give some details on the use case for having picotool on your
target? In which context is your RP2040 connected to your target
system generated by Buildroot?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/picotool: new package
2024-07-12 13:28 ` Thomas Petazzoni via buildroot
@ 2024-07-15 18:31 ` Marcus Hoffmann via buildroot
0 siblings, 0 replies; 6+ messages in thread
From: Marcus Hoffmann via buildroot @ 2024-07-15 18:31 UTC (permalink / raw)
To: Thomas Petazzoni, Marcus Hoffmann via buildroot; +Cc: Samuel Martin
Hi Thomas,
On 12.07.24 15:28, Thomas Petazzoni via buildroot wrote:
> Hello Marcus,
>
> On Wed, 28 Feb 2024 21:24:13 +0100
> Marcus Hoffmann via buildroot <buildroot@buildroot.org> wrote:
>
>> +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 USBstdio support from the Raspberry Pi Pico
Just noticed this is missing a "with" between devices and USBstdio.
>> + SDK.
>> +
>> + https://github.com/raspberrypi/picotool
>
> Could you give some details on the use case for having picotool on your
> target? In which context is your RP2040 connected to your target
> system generated by Buildroot?
We use it to to reboot a usb-connected rp2040 devices into bootloader
mode from where you can apply a firmware update. (This requires using
the pico sdk for the rp2040 firmware and setting a specific flag when
setting up the usb support)
Does that help?
>
> Thomas
Best,
Marcus
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/picotool: new package
2024-02-28 20:24 ` [Buildroot] [PATCH v2 2/2] package/picotool: " Marcus Hoffmann via buildroot
2024-07-12 13:28 ` Thomas Petazzoni via buildroot
@ 2024-07-15 19:45 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-15 19:45 UTC (permalink / raw)
To: Marcus Hoffmann via buildroot; +Cc: Samuel Martin, Marcus Hoffmann
Hello Marcus,
On Wed, 28 Feb 2024 21:24:13 +0100
Marcus Hoffmann via buildroot <buildroot@buildroot.org> wrote:
> 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
Entry in the DEVELOPERS file was missing, so I added one.
> 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
This should have used the $(call github,...) macro since they don't
provide specific tarballs other than the auto-generated ones.
> +PICOTOOL_SOURCE = $(PICOTOOL_VERSION).tar.gz
This can therefore go.
> +PICOTOOL_CONF_OPTS = -DPICO_SDK_PATH=$(STAGING_DIR)/usr/include/pico-sdk
And this had to be adjusted to usr/share/pico-sdk.
Applied with those minor fixes. Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/pico-sdk: new package
2024-02-28 20:24 [Buildroot] [PATCH v2 1/2] package/pico-sdk: new package Marcus Hoffmann via buildroot
2024-02-28 20:24 ` [Buildroot] [PATCH v2 2/2] package/picotool: " Marcus Hoffmann via buildroot
@ 2024-07-15 19:44 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-15 19:44 UTC (permalink / raw)
To: Marcus Hoffmann via buildroot; +Cc: Marcus Hoffmann
Hello,
On Wed, 28 Feb 2024 21:24:12 +0100
Marcus Hoffmann via buildroot <buildroot@buildroot.org> wrote:
> package/Config.in | 1 +
> package/pico-sdk/Config.in | 9 +++++++++
> package/pico-sdk/pico-sdk.hash | 3 +++
> package/pico-sdk/pico-sdk.mk | 20 ++++++++++++++++++++
> 4 files changed, 33 insertions(+)
> create mode 100644 package/pico-sdk/Config.in
> create mode 100644 package/pico-sdk/pico-sdk.hash
> create mode 100644 package/pico-sdk/pico-sdk.mk
Entry in DEVELOPERS file was missing, so I added one.
> +define PICO_SDK_INSTALL_STAGING_CMDS
> + mkdir -p $(STAGING_DIR)/usr/include/pico-sdk
> + cp -r $(@D)/* $(STAGING_DIR)/usr/include/pico-sdk
Since it's not just headers, but a big pile of stuff, I changed to
install it to usr/share/pico-sdk instead.
Applied with those changes. Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-07-15 19:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 20:24 [Buildroot] [PATCH v2 1/2] package/pico-sdk: new package Marcus Hoffmann via buildroot
2024-02-28 20:24 ` [Buildroot] [PATCH v2 2/2] package/picotool: " Marcus Hoffmann via buildroot
2024-07-12 13:28 ` Thomas Petazzoni via buildroot
2024-07-15 18:31 ` Marcus Hoffmann via buildroot
2024-07-15 19:45 ` Thomas Petazzoni via buildroot
2024-07-15 19:44 ` [Buildroot] [PATCH v2 1/2] package/pico-sdk: " Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox