package/pico-sdk: Add host-pico-sdk
PATCH 1/2 package/pico-sdk: Add host-pico-sdk
Add a host-pico-sdk package to pico-sdk.
This will allow users to build rpi pico applications on the host system.
--- package/pico-sdk/pico-sdk.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/pico-sdk/pico-sdk.mk +6 -0
@@ -19,4 +19,10 @@ define PICO_SDK_INSTALL_STAGING_CMDS cp -r $(@D)/* $(STAGING_DIR)/usr/share/pico-sdk endef +define HOST_PICO_SDK_INSTALL_CMDS + mkdir -p $(HOST_DIR)/usr/share/pico-sdk + cp -r $(@D)/* $(HOST_DIR)/usr/share/pico-sdk +endef + $(eval $(generic-package)) +$(eval $(host-generic-package))
Signature · 6 lines
2.49.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/picotool: Add host-picotool
Add a host-picotool package to picotool.
This will allow users to build rpi pico applications on the host system.
Also add cmake as a dependency to target picotool.
--- package/picotool/picotool.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
package/picotool/picotool.mk +4 -1
@@ -6,9 +6,12 @@ PICOTOOL_VERSION = 2.1.1 PICOTOOL_SITE = $(call github,raspberrypi,picotool,$(PICOTOOL_VERSION)) +HOST_PICOTOOL_CONF_OPTS = -DPICO_SDK_PATH=$(HOST_DIR)/usr/share/pico-sdk +HOST_PICOTOOL_DEPENDENCIES = host-libusb host-pico-sdk2 host-cmake PICOTOOL_CONF_OPTS = -DPICO_SDK_PATH=$(STAGING_DIR)/usr/share/pico-sdk -PICOTOOL_DEPENDENCIES = libusb pico-sdk +PICOTOOL_DEPENDENCIES = libusb pico-sdk2 host-cmake PICOTOOL_LICENSE = BSD-3-Clause PICOTOOL_LICENSE_FILES = LICENSE.TXT $(eval $(cmake-package)) +$(eval $(host-cmake-package))
Signature · 6 lines
2.49.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/picotool: Add host-picotool
Hello Jesse,
Quoted 2 lines · On Mon, 4 Aug 2025 22:59:30 -0400 Jesse Taube <[email protected]> wrote:
Add a host-picotool package to picotool.
This will allow users to build rpi pico applications on the host system.
But what is the use-case for that?
Quoted 1 line
Also add cmake as a dependency to target picotool.
Nope this change is not correct, the host-cmake dependency is already handled by cmake-package, if needed.
package/picotool/picotool.mk line 10
Quoted 4 lines
PICOTOOL_VERSION= 2.1.1
PICOTOOL_SITE= $(call github,raspberrypi,picotool,$(PICOTOOL_VERSION))package/picotool/picotool.mk +2
-0+HOST_PICOTOOL_CONF_OPTS = -DPICO_SDK_PATH=$(HOST_DIR)/usr/share/pico-sdk +HOST_PICOTOOL_DEPENDENCIES = host-libusb host-pico-sdk2 host-cmake
^^ sdk2 ?
Also, drop host-cmake.
package/picotool/picotool.mk line 12
Quoted 3 lines
PICOTOOL_CONF_OPTS= -DPICO_SDK_PATH=$(STAGING_DIR)/usr/share/pico-sdkpackage/picotool/picotool.mk +1
-1-PICOTOOL_DEPENDENCIES = libusb pico-sdk +PICOTOOL_DEPENDENCIES = libusb pico-sdk2 host-cmake
sdk2 ?
Also, drop host-cmake.
Quoted 2 lines
PICOTOOL_LICENSE= BSD-3-Clause
PICOTOOL_LICENSE_FILES= LICENSE.TXT
Some reordering would make sense here:
PICOTOOL_VERSION = 2.1.1PICOTOOL_SITE = $(call github,raspberrypi,picotool,$(PICOTOOL_VERSION)) PICOTOOL_LICENSE = BSD-3-ClausePICOTOOL_LICENSE_FILES = LICENSE.TXT
PICOTOOL_CONF_OPTS = -DPICO_SDK_PATH=$(STAGING_DIR)/usr/share/pico-sdk PICOTOOL_DEPENDENCIES = libusb pico-sdk
HOST_PICOTOOL_CONF_OPTS = -DPICO_SDK_PATH=$(HOST_DIR)/usr/share/pico-sdk HOST_PICOTOOL_DEPENDENCIES = host-libusb host-pico-sdk
So that we have:
1. Generic variables (independent from host/target)
2. Target variables
3. Host variables
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/2] package/picotool: Add host-picotool
Quoted 10 lines · Thomas Petazzoni
Hello Jesse,
Quoted 2 lines · On Mon, 4 Aug 2025 22:59:30 -0400 Jesse Taube <[email protected]> wrote:
Add a host-picotool package to picotool.
This will allow users to build rpi pico applications on the host system.But what is the use-case for that?
If a board comes with a rp2040 or rp2350 and you want to build the firmware for it inside of buildroot you need picotool on the host system. The target can then use its picotool to flash the firmware in the rootfs to the pico.
You can also use the host picotool directly to flash firmware to a pico.
Most of the reason why I think this is a good addition is because picotool and the pico-sdk are already in buildroot and having a second version in BR2_EXTERNAL isn't a great solution.
Quoted 12 lines
Quoted 1 line
Also add cmake as a dependency to target picotool.
Nope this change is not correct, the host-cmake dependency is already handled by cmake-package, if needed.
package/picotool/picotool.mk line 10
Quoted 4 lines
PICOTOOL_VERSION= 2.1.1
PICOTOOL_SITE= $(call github,raspberrypi,picotool,$(PICOTOOL_VERSION))package/picotool/picotool.mk +2
-0+HOST_PICOTOOL_CONF_OPTS = -DPICO_SDK_PATH=$(HOST_DIR)/usr/share/pico-sdk +HOST_PICOTOOL_DEPENDENCIES = host-libusb host-pico-sdk2 host-cmake^^ sdk2 ?
Quoted 7 lines
Also, drop host-cmake.
package/picotool/picotool.mk line 12
Quoted 3 lines
PICOTOOL_CONF_OPTS= -DPICO_SDK_PATH=$(STAGING_DIR)/usr/share/pico-sdkpackage/picotool/picotool.mk +1
-1-PICOTOOL_DEPENDENCIES = libusb pico-sdk +PICOTOOL_DEPENDENCIES = libusb pico-sdk2 host-cmakesdk2 ?
I'm honestly not sure how I missed that. It is there because I was originally using BR2_EXTERNAL and needed a different name.
Thanks,
Jesse Taube
Quoted 27 lines
Also, drop host-cmake.
Quoted 2 lines
PICOTOOL_LICENSE= BSD-3-Clause
PICOTOOL_LICENSE_FILES= LICENSE.TXTSome reordering would make sense here:
PICOTOOL_VERSION= 2.1.1PICOTOOL_SITE= $(call github,raspberrypi,picotool,$(PICOTOOL_VERSION))PICOTOOL_LICENSE= BSD-3-ClausePICOTOOL_LICENSE_FILES= LICENSE.TXT
PICOTOOL_CONF_OPTS= -DPICO_SDK_PATH=$(STAGING_DIR)/usr/share/pico-sdkPICOTOOL_DEPENDENCIES= libusb pico-sdk
HOST_PICOTOOL_CONF_OPTS= -DPICO_SDK_PATH=$(HOST_DIR)/usr/share/pico-sdkHOST_PICOTOOL_DEPENDENCIES= host-libusb host-pico-sdkSo that we have:
1. Generic variables (independent from host/target)
2. Target variables
3. Host variables
Quoted 7 lines
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot