aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Roman <davidroman96@gmail.com>2022-05-25 10:23:45 +0200
committerDavid Roman <davidroman96@gmail.com>2022-05-25 10:23:45 +0200
commit289c277dfe70f7e436bd406d11da06b9bf4a05a4 (patch)
treebf04c368f7167e154111c99399a736f727ac7dcf /dev-embedded/esp-idf
parentapp-shells/powerline-go: version bump to 1.22.1 (diff)
downloadguru-289c277dfe70f7e436bd406d11da06b9bf4a05a4.tar.gz
guru-289c277dfe70f7e436bd406d11da06b9bf4a05a4.tar.bz2
guru-289c277dfe70f7e436bd406d11da06b9bf4a05a4.zip
dev-embedded/esp-idf: new package, add 4.4.1
Signed-off-by: David Roman <davidroman96@gmail.com>
Diffstat (limited to 'dev-embedded/esp-idf')
-rw-r--r--dev-embedded/esp-idf/Manifest7
-rw-r--r--dev-embedded/esp-idf/esp-idf-4.4.1.ebuild141
-rw-r--r--dev-embedded/esp-idf/metadata.xml8
3 files changed, 156 insertions, 0 deletions
diff --git a/dev-embedded/esp-idf/Manifest b/dev-embedded/esp-idf/Manifest
new file mode 100644
index 000000000..82ad5461b
--- /dev/null
+++ b/dev-embedded/esp-idf/Manifest
@@ -0,0 +1,7 @@
+DIST binutils-esp32ulp-linux-amd64-2.28.51-esp-20191205.tar.gz 8248656 BLAKE2B 313e847733f2534d4f5a12609d6757c4245ce4914f1b0e12f2593d8ac559bc615888bed031b83ac8cf4610be9cd3a3aaec8bceb006358f3a386facac3b52d544 SHA512 6ee3af4ed346821f16bf1c029b9cd452453a4cebc8fc64e0b01de2efbf98cea06364d39aab6b3566e615b9d8daab16202b9c50c66776754a232154db30d0b100
+DIST esp-idf-4.4.1.zip 898663301 BLAKE2B b5896efc50a82c1a0c0910f980fd5ce32069b310be4b9efaaf51b735b9b63af9ab04e0192f352021feb26be95955fcc112eb6a66200b4552a13456e6d74551d0 SHA512 cb26959a882231ae8a0747136685314b33daa851a3f15e0d56620dfa1af7f55845e86d9889f9556ad298af79369d95be9e88dd394d94b631df023c7feac7a3cb
+DIST openocd-esp32-linux-amd64-0.11.0-esp32-20211220.tar.gz 1901040 BLAKE2B d1fc70dbbb730022162a4d7ebfa5e49880122fb7e12f374be9d168fbe8fab35cd7fb5f81bc573f2d26cbd48f63d5cf41c765f68e1027c36cafa3f3027c7afd82 SHA512 9ea4955a4b204dafefc5c2b99f9557eeedb28320b485193c4478cf797eb09caf9eba9cb0aeb5000482664312daef07f0de9978f7b2c776f6f0973e93875f57b3
+DIST riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz 106843321 BLAKE2B 95921f64838d6c5f6e9fc366c7da8e685349e91fc636a2c401d0b0bb6fbc414f54ac0bcff0d6c482173264f1f764c37fefd592941d50f6924720a95b2ef232c4 SHA512 96af5013de4aca521ed3f81f93bb3bd64cb541352663eb1225cad1c5a547a57bafd5f930d3cffaaab057f8f740d83f79a97f4649e2f8f25d9f2002d68d7b9d36
+DIST xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz 90569312 BLAKE2B 7d1f0a2772cffadc4005e579e2f2713c82197171d4e824b088b2bd600739d44caf2d6dce0e3c598a0880417ce84dbc39730f57fde0d553dbfeccbb8fb6cf0810 SHA512 7378e19ca75da07a3454987bdded8e39eb73bb87d604568f482e40a95eba04a65448b63597ec360fcdd4d7df8d1e0cec7ad00d0afb1e63d0484aa8c879f0edad
+DIST xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz 90894048 BLAKE2B 2f46477d43c585b26dad094b58d6704a61ab7ab5137678fe214cb461944ce9b0f1fe6c7807e9b9e0d20e3e11e9cce3b53b5197a1ae931adc1ebc6909f170318b SHA512 a1c191556367e5137ffb9978725c75aa1b3e96542f8625515824de29caeafccf74eb7e473aa7f49f73a3f400529d275a547309d9e34a2bb0c9c3e2436c596d18
+DIST xtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz 90903617 BLAKE2B 8d30be8b7610f0f972e87ad9af5f00e2de05e1b52c0cc82da70b021b7cbba3ad0f4693e7d3e0704d5e8a7b0cce7917c180fb3f52a6c8691caad39e7ae3e6d3af SHA512 fc76fb71c02352b2c7daa890d7d73dbcca43b3af2165eb872e3419853e787920b73022a3b826d463064e0d076f0c54f6244151391b938bbc2c031df8c074d6a4
diff --git a/dev-embedded/esp-idf/esp-idf-4.4.1.ebuild b/dev-embedded/esp-idf/esp-idf-4.4.1.ebuild
new file mode 100644
index 000000000..0a8c05c04
--- /dev/null
+++ b/dev-embedded/esp-idf/esp-idf-4.4.1.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+VER="esp-2021r2-patch3"
+CROSSTOOL_URL="https://github.com/espressif/crosstool-NG/releases/download/${VER}"
+
+inherit python-r1
+
+DESCRIPTION="Espressif IoT Development Framework"
+HOMEPAGE="https://www.espressif.com/"
+SRC_URI="https://dl.espressif.com/github_assets/espressif/${PN}/releases/download/v${PV}/${PN}-v${PV}.zip -> ${P}.zip
+ https://github.com/espressif/binutils-esp32ulp/releases/download/v2.28.51-esp-20191205/binutils-esp32ulp-linux-amd64-2.28.51-esp-20191205.tar.gz
+ https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20211220/openocd-esp32-linux-amd64-0.11.0-esp32-20211220.tar.gz
+ ${CROSSTOOL_URL}/xtensa-esp32-elf-gcc8_4_0-${VER}-linux-amd64.tar.gz
+ ${CROSSTOOL_URL}/xtensa-esp32s2-elf-gcc8_4_0-${VER}-linux-amd64.tar.gz
+ ${CROSSTOOL_URL}/xtensa-esp32s3-elf-gcc8_4_0-${VER}-linux-amd64.tar.gz
+ ${CROSSTOOL_URL}/riscv32-esp-elf-gcc8_4_0-${VER}-linux-amd64.tar.gz
+"
+ #https://dl.espressif.com/dl/toolchains/preview/riscv32-esp-elf-gcc8_4_0-crosstool-ng-1.24.0-123-g64eb9ff-linux-amd64.tar.gz
+
+S="${WORKDIR}/${PN}-v${PV}"
+
+KEYWORDS="~amd64"
+LICENSE="Apache-2.0"
+IUSE="+esp32 esp32s2 esp32s3 riscv32"
+SLOT="0"
+
+RDEPEND="
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/bitstring[${PYTHON_USEDEP}]
+ dev-python/construct[${PYTHON_USEDEP}]
+ dev-python/ecdsa[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+ dev-python/kconfiglib[${PYTHON_USEDEP}]
+ dev-python/pyelftools[${PYTHON_USEDEP}]
+ <dev-python/pyparsing-2.4.0[${PYTHON_USEDEP}]
+ dev-python/pyserial[${PYTHON_USEDEP}]
+ dev-python/python-socketio[${PYTHON_USEDEP}]
+ dev-python/reedsolomon[${PYTHON_USEDEP}]
+ dev-embedded/esptool[${PYTHON_USEDEP}]
+"
+
+RESTRICT="strip"
+
+QA_PREBUILT="opt/* usr/lib* usr/share/esp-idf/*"
+QA_PRESTRIPPED="opt/*"
+
+install_tool() {
+ shopt -s globstar
+
+ into /opt/${1}
+
+ if [[ -d "../${1}/lib" ]]; then
+ if stat *.so &>/dev/null; then
+ for i in ../${1}/lib/**/*.so*; do
+ dolib.so ${i}
+ done
+ fi
+
+ if stat *.a &>/dev/null; then
+ for i in ../${1}/lib/**/*.a*; do
+ dolib.a ${i}
+ done
+ fi
+
+ insinto /opt/${1}/lib
+ doins -r ../${1}/lib/*
+ fi
+
+ exeinto /opt/${1}/bin
+ doexe ../${1}/bin/*
+ (
+ cd ../${1}
+ for i in libexec/**/*; do
+ exeinto /opt/${1}/$(dirname ${i})
+ if [[ -x "${i}" && ! -d "${i}" ]]; then
+ doexe ${i}
+ fi
+ done
+
+ if [[ -d "include" ]]; then
+ insinto /opt/${1}
+ doins -r include
+ fi
+
+ if [[ -d "share" ]]; then
+ insinto /opt/${1}
+ doins -r share
+ fi
+ )
+
+ (
+ cd ${D}/opt/${1}/bin/ || die
+ for i in *; do
+ dodir /opt/bin
+ cd ${D}/opt/bin || die
+ dosym ../${1}/bin/${i} /opt/bin/${i}
+ done
+ )
+}
+
+src_install() {
+ echo -e "#!/bin/sh\npython /usr/share/${PN}/tools/idf.py \"\$@\"" > idf
+ dobin idf
+
+ if use esp32; then
+ install_tool xtensa-esp32-elf
+ install_tool xtensa-esp32-elf/xtensa-esp32-elf
+ fi
+
+ if use esp32s2; then
+ install_tool xtensa-esp32s2-elf
+ fi
+
+ if use esp32s3; then
+ install_tool xtensa-esp32s3-elf
+ fi
+
+ if use riscv32; then
+ install_tool riscv32-esp-elf
+ fi
+ install_tool esp32ulp-elf-binutils
+ install_tool openocd-esp32
+
+ echo "IDF_PATH=/usr/share/${PN}" > 99esp-idf || die
+ doenvd 99esp-idf
+
+ insinto /usr/share/${PN}
+ rm requirements.txt || die
+ touch requirements.txt
+
+ rm -r .git || die
+ doins -r .
+}
+
+
diff --git a/dev-embedded/esp-idf/metadata.xml b/dev-embedded/esp-idf/metadata.xml
new file mode 100644
index 000000000..01c1fc848
--- /dev/null
+++ b/dev-embedded/esp-idf/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>davidroman96@gmail.com</email>
+ <name>David Roman</name>
+ </maintainer>
+</pkgmetadata>