From 34193c5b099f8912cae1b9da0e81b5126d936532 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Wed, 3 Aug 2022 16:39:23 +0200 Subject: Initial commit --- README.html | 73 +++++++++++++++++++++++++++++++++ dev-util/pico-sdk/Manifest | 7 ++++ dev-util/pico-sdk/metadata.xml | 12 ++++++ dev-util/pico-sdk/pico-sdk-1.4.0.ebuild | 72 ++++++++++++++++++++++++++++++++ metadata/layout.conf | 1 + profiles/repo_name | 1 + 6 files changed, 166 insertions(+) create mode 100644 README.html create mode 100644 dev-util/pico-sdk/Manifest create mode 100644 dev-util/pico-sdk/metadata.xml create mode 100644 dev-util/pico-sdk/pico-sdk-1.4.0.ebuild create mode 100644 metadata/layout.conf create mode 100644 profiles/repo_name diff --git a/README.html b/README.html new file mode 100644 index 0000000..d6b2001 --- /dev/null +++ b/README.html @@ -0,0 +1,73 @@ +

rpi-pico

+

+ This is an overlay voor the Gentoo Linux distribution, it provides an ebuild + for the + Raspberry Pi Pico + SDK. +

+

Why this overlay?

+

+ I recently got interested in the + Raspberry Pi + Pico and the SDK is not in the main portage tree. Usual instructions tell + you to install it in your home directory, but in my opinion software like this + should be managed by your package manager so i started writing an ebuild. I'm + sharing this to help other Gentoo users. +

+

What is in this overlay?

+

+ This overlay provides a single package: dev-utils/pico-sdk. It installs the + SDK under /opt/pico-sdk-<version> and a symlink /opt/pico-sdk. It has + some use flags to control which external parts get included: +

+ +

+ You may notice that the ebuild does depend on cross-arm-none-eabi/binutils, + cross-arm-none-eabi/gcc and cross-arm-none-eabi/newlib and these packages may + not be available on your system. You can use crossdev (sys-devel/crossdev) to + create them with the command: crossdev -t arm-none-eabi --init-target. +

+

How to use this overlay?

+

+ First you'll have to clone this overlay on a place you like, a common place + these days is /var/db/repos. So cd into that directory and use + git clone https://code.pa4wdh.nl.eu.org/gentoo/rpi-pico, this will + create a directory called rpi-pico with the overlay in it. +

+

+ Next you have to make portage aware of the repo, for that you'll have to + create a config file under /etc/portage/repos.conf. Create a file + called rpi-pico.conf and give it these contents: +

+
+[rpi-pico]
+location = /var/db/repos/rpi-pico
+sync-type = git
+sync-uri = https://code.pa4wdh.nl.eu.org/gentoo/rpi-pico
+
+

+ If you placed the overlay on a different place than /var/db/repos make + sure to adapt the location line to your needs. +

+

What can i do with this?

+

+ With the SDK installed you can start developing programs in the C programming + language for the Raspberry Pi Pico. See + this documentation + to learn how to start your own project. To use the SDK set PICO_SDK_PATH + to /opt/pico-sdk or include + include(/opt/pico-sdk/pico_sdk_init.cmake) in your + CMakeLists.txt. +

+

+ If you have any feedback on this overlay, you're quite likely to find me on + the Gentoo forums. +

+

+ Have fun! +

diff --git a/dev-util/pico-sdk/Manifest b/dev-util/pico-sdk/Manifest new file mode 100644 index 0000000..a7484d0 --- /dev/null +++ b/dev-util/pico-sdk/Manifest @@ -0,0 +1,7 @@ +DIST pico-sdk-1.4.0-cyw43.zip 487825 BLAKE2B 8dda0f5ccbaded18a2b1995a03ad4e9f7d80d54bb67f9ec49e464da67eeef49c30b99404a8353800d3f9fb99cb3d2c24b8a7fd74c02d39f0f87f8d21f3ceb632 SHA512 f434c690f48e43c53b37a1999608a029e7ae9f065f08f0461c0cbe084bcfb09bb2e48f56add898cc9f2786c5ab54d55f46251f3977b2849eafc499c2bfe38a1d +DIST pico-sdk-1.4.0-examples.zip 5542251 BLAKE2B 53176c731e05f3bfd91d339152c70fed447ea0c808254c72ce5b97282d9f629713f132e71d208121aabc03837b01faba74c629eed800d0abd2b483e19ca3564c SHA512 4512a6516987e4d4dd458d8d412f6fd45b195d088d89d3ebab8e6e3acd628b0fe6057cc0bb31d67bb02f249ab0f79cdbaf463bd02a0a4bc78f8a20d54f0726b9 +DIST pico-sdk-1.4.0-lwip.tar.gz 1580159 BLAKE2B ce7d1bf23cd59e71cbe0c4532734fe8b76b5f6e70b31d9d8418b6453dc736505b31160f8b211a123a0b074eb82303e89b945279477ec87a01bd99982113ba9b6 SHA512 8f790d90afacfd138f1f08817f4fb00d833d53aaa9799d415be0026c27e042f860349bd1733d7f03e8e4b85ac090577536d04807fa17d26b804c7dfa84238099 +DIST pico-sdk-1.4.0-tinyusb.zip 2538439 BLAKE2B 4f128cf95c0fe975094e2c086f83cf02010a47455bc13fb5c192f02a217483c53f8740324f142ad0d40681bad2970270301d370a2d42f079cf4ec9e5249f06c3 SHA512 909cae604d7b08b485a8ac90172cf8e774b6496e4fbad1302d922036adc8d03dd25c202564d2b7ad04c0e555418f770d81e3f3a2e2b70ade451b1e01db75bafa +DIST pico-sdk-1.4.0.zip 1236507 BLAKE2B c277b5663d8618d7cadc6c30c361af496b9072597500b4dc8ed0ede2c21c9cc06584b0a275aafd67b34e9fca0384ade98bc408bbc3b327cf8348aeeca4ce9659 SHA512 4794df98882d3b8068a5609869318f3d105fb19b9098bc4b437538e0a39dd0cdcc3e2d9d3a677bc62e045f94e7b1d203cf123bb1a55c0825d8af449d6bfca336 +EBUILD pico-sdk-1.4.0.ebuild 2191 BLAKE2B 29409e9abb3cb7ab2b552cdd730a99be1e86dd1733457d73ff69484ed3532e61ddb229f22e358641832521d8dcae0372d086960b8e198b8a31502edee52fe1cc SHA512 4db4e8bade85413264908458cba80b2dd52a4b90fe3914f8a1661d663667960f0ca6695155dea7aa5b77734b90b3ae7c4262dd1f029ff989e2a5c4a30c6fa7d1 +MISC metadata.xml 410 BLAKE2B 715a1ee33e0d2b8954ddacb40c674a4279ee1b807619fdf159fdf417b43f0b394a0ab4422f0d5a3077c4ddd313138d7d966fda6bd3d8df9d7849fb543f907c6b SHA512 3a27ff75f60c88eba0b09ec948b1d9ec34f8901f441072adba4beae76722e11a915a5f9914a3615602f198eeae0e3b9e65fb4fb36cde2e1fff83be6f2ea4efad diff --git a/dev-util/pico-sdk/metadata.xml b/dev-util/pico-sdk/metadata.xml new file mode 100644 index 0000000..89f2f9b --- /dev/null +++ b/dev-util/pico-sdk/metadata.xml @@ -0,0 +1,12 @@ + + + + + + + + Include the cyw43 driver, required for PICO-W wireless + Include the lwip IP Stack + Include the tinyusb USB Stack + + diff --git a/dev-util/pico-sdk/pico-sdk-1.4.0.ebuild b/dev-util/pico-sdk/pico-sdk-1.4.0.ebuild new file mode 100644 index 0000000..65941e9 --- /dev/null +++ b/dev-util/pico-sdk/pico-sdk-1.4.0.ebuild @@ -0,0 +1,72 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CYW43_COMMIT="195dfcc10bb6f379e3dea45147590db2203d3c7b" +LWIP_COMMIT="239918ccc173cb2c2a62f41a40fd893f57faf1d6" +TINYUSB_COMMIT="4bfab30c02279a0530e1a56f4a7c539f2d35a293" + +DESCRIPTION="Raspberry Pi Pico SDK" +HOMEPAGE="https://github.com/raspberrypi/pico-sdk/" +IUSE="cyw43 examples lwip tinyusb" +SRC_URI="https://github.com/raspberrypi/${PN}/archive/refs/tags/${PV}.zip -> ${PN}-${PV}.zip + cyw43? ( https://github.com/georgerobotics/cyw43-driver/archive/${CYW43_COMMIT}.zip -> ${P}-cyw43.zip ) + examples? ( https://github.com/raspberrypi/pico-examples/archive/refs/tags/sdk-${PV}.zip -> ${P}-examples.zip ) + lwip? ( https://git.savannah.gnu.org/cgit/lwip.git/snapshot/lwip-${LWIP_COMMIT}.tar.gz -> ${P}-lwip.tar.gz ) + tinyusb? ( https://github.com/hathach/tinyusb/archive/${TINYUSB_COMMIT}.zip -> ${P}-tinyusb.zip )" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64" + +DEPEND=" + cross-arm-none-eabi/binutils + cross-arm-none-eabi/gcc[cxx] + cross-arm-none-eabi/newlib" + +RDEPEND="${DEPEND}" +BDEPEND="dev-util/cmake" + +src_prepare() { + if use cyw43 + then + einfo "Including the cyw43 driver" + rmdir "${S}/lib/cyw43-driver" + mv "${WORKDIR}/cyw43-driver-${CYW43_COMMIT}" "${S}/lib/cyw43-driver" || die "Failed to install cyw43 driver" + fi + if use examples + then + einfo "Including examples" + mv "${WORKDIR}/pico-examples-sdk-${PV}" "${S}/examples" || die "Failed to install examples" + fi + if use lwip + then + einfo "Including the lwip IP Stack" + rmdir "${S}/lib/lwip" + mv "${WORKDIR}/lwip-${LWIP_COMMIT}" "${S}/lib/lwip" || die "Failed to install lwip" + fi + if use tinyusb + then + einfo "Including the tinyusb USB Stack" + rmdir "${S}/lib/tinyusb" + mv "${WORKDIR}/tinyusb-${TINYUSB_COMMIT}" "${S}/lib/tinyusb" || die "Failed to install tinyusb" + fi + eapply_user +} + +src_compile() { + return +} + +src_install() { + dodoc README.md CONTRIBUTING.md + mkdir "${D}/opt" + cp -R "${S}" "${D}/opt/" + ln -s "${PN}-${PV}" "${D}/opt/${PN}" +} + +pkg_postinst() { + einfo "When compiling your projects set PICO_SDK_PATH to /opt/${PN}" + einfo "or include(/opt/pico-sdk/pico_sdk_init.cmake) in your CMakeLists.txt" +} diff --git a/metadata/layout.conf b/metadata/layout.conf new file mode 100644 index 0000000..d43e61c --- /dev/null +++ b/metadata/layout.conf @@ -0,0 +1 @@ +masters = gentoo diff --git a/profiles/repo_name b/profiles/repo_name new file mode 100644 index 0000000..28742f7 --- /dev/null +++ b/profiles/repo_name @@ -0,0 +1 @@ +rpi-pico -- cgit v1.2.3