From 608cb9f1a0d793479f669ca0b6d53d52f3a4e579 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Thu, 21 Nov 2024 05:25:43 -0800 Subject: [PATCH] Add: Raspberry Pi Picotool (#2500) (#2509) * sign * Add: Picotool * Remove rpi-utils folder * Add sdk_version update script Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> * Fix second Rhai script Co-authored-by: madomado Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --------- Signed-off-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> Co-authored-by: madomado (cherry picked from commit f63e40f45437bc61eca3bbc9b5055bd03b771199) Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --- anda/tools/picotool/anda.hcl | 5 +++++ anda/tools/picotool/picotool.spec | 34 +++++++++++++++++++++++++++++++ anda/tools/picotool/update.rhai | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 anda/tools/picotool/anda.hcl create mode 100644 anda/tools/picotool/picotool.spec create mode 100644 anda/tools/picotool/update.rhai diff --git a/anda/tools/picotool/anda.hcl b/anda/tools/picotool/anda.hcl new file mode 100644 index 0000000000..61639932c6 --- /dev/null +++ b/anda/tools/picotool/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "picotool.spec" + } +} \ No newline at end of file diff --git a/anda/tools/picotool/picotool.spec b/anda/tools/picotool/picotool.spec new file mode 100644 index 0000000000..7363599a2f --- /dev/null +++ b/anda/tools/picotool/picotool.spec @@ -0,0 +1,34 @@ +%define sdk_version 2.0.0 +Name: picotool +Version: 2.0.0 +Release: 1%?dist +Summary: Tool to inspect RP2040 binaries +License: BSD-3-Clause +URL: https://github.com/raspberrypi/picotool +Source0: https://github.com/raspberrypi/picotool/archive/%version.tar.gz#/picotool-%version.tar.gz +Source1: https://github.com/raspberrypi/pico-sdk/archive/%sdk_version.tar.gz#/pico-sdk-%sdk_version.tar.gz +BuildRequires: cmake g++ libusb1-devel + +%description +Picotool is a tool for inspecting RP2040 binaries, and interacting with RP2040 devices when they are in BOOTSEL mode. + +%prep +%autosetup -a 1 + +%build +%cmake -DPICO_SDK_PATH="../pico-sdk-%sdk_version" +%cmake_build + +%install +%cmake_install + +%files +%doc README.md +%license LICENSE.TXT +%_bindir/picotool +%_libdir/cmake/picotool +%_datadir/picotool + +%changelog +* Mon Nov 18 2024 Owen-sz +- Package Raspberry Pi Picotools \ No newline at end of file diff --git a/anda/tools/picotool/update.rhai b/anda/tools/picotool/update.rhai new file mode 100644 index 0000000000..b9c19d6d80 --- /dev/null +++ b/anda/tools/picotool/update.rhai @@ -0,0 +1,2 @@ +rpm.version(gh("raspberrypi/picotool")); +rpm.define("sdk_version", gh("raspberrypi/pico-sdk"));