summaryrefslogtreecommitdiff
path: root/dev-embedded
diff options
context:
space:
mode:
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/Manifest.gzbin8890 -> 8894 bytes
-rw-r--r--dev-embedded/stm32flash/Manifest7
-rw-r--r--dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-01fbb65.patch28
-rw-r--r--dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-17a24f8.patch65
-rw-r--r--dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-b079cd0.patch103
-rw-r--r--dev-embedded/stm32flash/stm32flash-0.6.ebuild (renamed from dev-embedded/stm32flash/stm32flash-0.5.ebuild)11
-rw-r--r--dev-embedded/usbprog/Manifest3
-rw-r--r--dev-embedded/usbprog/files/usbprog-0.3.0_p20140828_versions.xml.patch28
-rw-r--r--dev-embedded/usbprog/usbprog-0.3.0_p20140828-r1.ebuild (renamed from dev-embedded/usbprog/usbprog-0.3.0_p20140828.ebuild)21
9 files changed, 253 insertions, 13 deletions
diff --git a/dev-embedded/Manifest.gz b/dev-embedded/Manifest.gz
index 2e7ce9150097..4733f93435c8 100644
--- a/dev-embedded/Manifest.gz
+++ b/dev-embedded/Manifest.gz
Binary files differ
diff --git a/dev-embedded/stm32flash/Manifest b/dev-embedded/stm32flash/Manifest
index 18cf1843edfd..0077e1a3384d 100644
--- a/dev-embedded/stm32flash/Manifest
+++ b/dev-embedded/stm32flash/Manifest
@@ -1,3 +1,6 @@
-DIST stm32flash-0.5.tar.gz 41087 BLAKE2B 581ef883537783fafcff8a7471a697f50929b572d847791d692799040fd54845a67a7b6b608401df24f05810ae81b7e19df646f2835bc3d7cd35888d8649be6a SHA512 a01875a315d92d5e347372b736f2afa2f633851bf13af1326341c0c91e17cef54b6730ed1279280e86d3797033c856dfc25e8c595e010772b9287aaf965273f9
-EBUILD stm32flash-0.5.ebuild 493 BLAKE2B 005d32677b1960a3cf928df51c938063fb0cf80433eb6023853cdc3715d69c7d63294d61e9548589b52fdbc1fd1d8596cd1c049f6e736dd8c7f92c3dc4d0dc0c SHA512 b06eb6106ea672cccb75c4d75f4ef77ea1cafecb8d30d72376a77971d0c806e5005549e01cba9e9359d6632e5e1d0b58bd040b3225e145a235a867cad963e8a6
+AUX stm32flash-0.6-fix-i2c-erase-01fbb65.patch 897 BLAKE2B 1b0885926d95c828dfa3ae04050ce7c1b4a10cac22e0d33776a2ab2e2e32fbdce825d05dd21dcbecc60a4bd88e7b302103b7809e999084bc881b724dce56c2a4 SHA512 3646b737bdd8d7f1ad750d230b6d975a92557f3204261b8637aaef75fad311c6b43717c4a989e23d566a9d37c4a464a8ef0736acee1e2be15683f2c8d17bb07e
+AUX stm32flash-0.6-fix-i2c-erase-17a24f8.patch 2355 BLAKE2B 450e7bf2da49e38eeeabfb380ef6f30bf8154226ed12e0392dd00a01cd37e423957a37d63ebcb35ddebbd84899b07f0ed730e8bd79b2e8eacf9594757e917afc SHA512 b97d2a303a218622587e08a369e5971d4df4502f0088b10746d97ed4950a44460e5856d51ad90f787975d701a0166b0f15718e8e05b35755e4a4b9b92d0bcab0
+AUX stm32flash-0.6-fix-i2c-erase-b079cd0.patch 3165 BLAKE2B a3a6c78bfae85e3fad0c8e4d8a7f2b0759d5baac7c1001c5f45dac012258f9fa05f1c8191e58a424e3462d6b24a8dacf4ca761ccb952522e4d8eade93a2824f5 SHA512 a1619ab49943047b47a6e96137a9157dffbeb43d06b801642c6c822427cd86ea6025dfea4d202d7998c062309f33a04802d08e8c13fbeae059de979e80a2d7d6
+DIST stm32flash-0.6.tar.gz 376186 BLAKE2B 82e479b4fad2c3ff832aea9d0d62d556500fd8c0530e879690b9b83cdf05f078b0051e1e104e7cb64b9c360ef84415904639ee67ee147045ce8e15ca3f6c61e1 SHA512 2d92ecf4f82b8a702b596cbf3c4ff594f67083f7dcec82c064555f73b47834b41a918efa1846e47fc8740ae63fa818b16dfb5b38fa242c17f465666a651eee3a
+EBUILD stm32flash-0.6.ebuild 658 BLAKE2B 0d049260fd53fc849f8397a0206acfa29f73b0fda1dca319cc42ff8f1693ace469c78db663615b5e844f0a390affad7e689a8b2081c2c6c5828d4beae7b8692f SHA512 084e3b2e0874a7a0fb31f12fd9a056bbc9e1add8f4d28d045f93e191e74dc567c0918b3955cc882ff9184e597050d3ff552f6529a17000872f2243afc7c03b0d
MISC metadata.xml 167 BLAKE2B 868e3b584722eaacf68273db062bb773d8c7e5d7ab2b81ca7e8397643bf7cc106c3a1033594401c99c54f667bb45d6b73f9048fc335580bbd44b4589ad26a832 SHA512 30caadd1496c3b9969136038239a1d8e01f236726b4022c2d7e19ca7575f25f735e556835e581afbf44fbd3e4104c40f2b5ef5fa70118d75c881fdf871962d0a
diff --git a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-01fbb65.patch b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-01fbb65.patch
new file mode 100644
index 000000000000..c4c7a2a7fedc
--- /dev/null
+++ b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-01fbb65.patch
@@ -0,0 +1,28 @@
+From 01fbb65d4626e1c122e329075526bd6035cb0be6 Mon Sep 17 00:00:00 2001
+From: Tormod Volden <debian.tormod@gmail.com>
+Date: Thu, 2 Sep 2021 16:25:57 +0200
+Subject: [PATCH 06/15] stm32: Fix typo from recent commit
+
+Oops, I got this wrong while amending commit b079cd09.
+
+Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
+---
+ stm32.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/stm32.c b/stm32.c
+index 6e2e402..0edaf01 100644
+--- a/stm32.c
++++ b/stm32.c
+@@ -851,7 +851,7 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
+ buf[i++] = pages - 1;
+ cs ^= (pages-1);
+ /* For I2C send a checksum after the number of pages (AN4221) */
+- if (port->flags && PORT_NPAG_CSUM) {
++ if (port->flags & PORT_NPAG_CSUM) {
+ buf[i++] = cs;
+ p_err = port->write(port, buf, i);
+ if (p_err != PORT_ERR_OK) {
+--
+2.33.0.309.g3052b89438-goog
+
diff --git a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-17a24f8.patch b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-17a24f8.patch
new file mode 100644
index 000000000000..e0b519c48413
--- /dev/null
+++ b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-17a24f8.patch
@@ -0,0 +1,65 @@
+From 17a24f873122b96481adefaadc128bd1abba594f Mon Sep 17 00:00:00 2001
+From: Tormod Volden <debian.tormod@gmail.com>
+Date: Sat, 21 Aug 2021 13:06:34 +0200
+Subject: [PATCH 02/15] stm32: Consistent and unique erase error messages
+
+Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
+---
+ stm32.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/stm32.c b/stm32.c
+index 82fa26a..e071905 100644
+--- a/stm32.c
++++ b/stm32.c
+@@ -797,7 +797,7 @@ static stm32_err_t stm32_mass_erase(const stm32_t *stm)
+ return STM32_ERR_OK;
+ }
+
+- /* extended erase */
++ /* extended erase (0x44 or 0x45) */
+ buf[0] = 0xFF; /* 0xFFFF the magic number for mass erase */
+ buf[1] = 0xFF;
+ buf[2] = 0x00; /* checksum */
+@@ -870,11 +870,12 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
+ p_err = port->write(port, buf, i);
+ free(buf);
+ if (p_err != PORT_ERR_OK) {
+- fprintf(stderr, "Erase failed.\n");
++ fprintf(stderr, "Erase failed sending list of pages.\n");
+ return STM32_ERR_UNKNOWN;
+ }
+ s_err = stm32_get_ack_timeout(stm, pages * STM32_PAGEERASE_TIMEOUT);
+ if (s_err != STM32_ERR_OK) {
++ fprintf(stderr, "Erase failed.\n");
+ if (port->flags & PORT_STRETCH_W)
+ stm32_warn_stretching("erase");
+ return STM32_ERR_UNKNOWN;
+@@ -882,7 +883,7 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
+ return STM32_ERR_OK;
+ }
+
+- /* extended erase */
++ /* extended erase (0x44 or 0x45) */
+ buf = malloc(2 + 2 * pages + 1);
+ if (!buf)
+ return STM32_ERR_UNKNOWN;
+@@ -925,13 +926,13 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
+ p_err = port->write(port, buf, i);
+ free(buf);
+ if (p_err != PORT_ERR_OK) {
+- fprintf(stderr, "Page-by-page erase error.\n");
++ fprintf(stderr, "Extended erase failed sending list of pages.\n");
+ return STM32_ERR_UNKNOWN;
+ }
+
+ s_err = stm32_get_ack_timeout(stm, pages * STM32_PAGEERASE_TIMEOUT);
+ if (s_err != STM32_ERR_OK) {
+- fprintf(stderr, "Page-by-page erase failed. Check the maximum pages your device supports.\n");
++ fprintf(stderr, "Extended erase failed. Check the maximum pages your device supports.\n");
+ if ((port->flags & PORT_STRETCH_W)
+ && stm->cmd->er != STM32_CMD_EE_NS)
+ stm32_warn_stretching("erase");
+--
+2.33.0.309.g3052b89438-goog
+
diff --git a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-b079cd0.patch b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-b079cd0.patch
new file mode 100644
index 000000000000..dcd7299570c5
--- /dev/null
+++ b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-b079cd0.patch
@@ -0,0 +1,103 @@
+From b079cd09bc942b4a489cad29524418441a44fc82 Mon Sep 17 00:00:00 2001
+From: Yann Sionneau <ysionneau@kalray.eu>
+Date: Wed, 28 Apr 2021 14:16:01 +0200
+Subject: [PATCH 01/15] Follow bootloader protocol for page-by-page erase over
+ I2C
+
+For I2C the protocol is slighly different than for USART,
+requiring a checksum after the number of pages.
+
+https://sourceforge.net/p/stm32flash/tickets/98/
+
+Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
+[Tormod: Add port flag, no wait, amend messages]
+Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
+---
+ i2c.c | 2 +-
+ port.h | 1 +
+ stm32.c | 37 +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 39 insertions(+), 1 deletion(-)
+
+diff --git a/i2c.c b/i2c.c
+index bb99545..8425b41 100644
+--- a/i2c.c
++++ b/i2c.c
+@@ -204,7 +204,7 @@ static port_err_t i2c_flush(struct port_interface __unused *port)
+
+ struct port_interface port_i2c = {
+ .name = "i2c",
+- .flags = PORT_STRETCH_W,
++ .flags = PORT_STRETCH_W | PORT_NPAG_CSUM,
+ .open = i2c_open,
+ .close = i2c_close,
+ .flush = i2c_flush,
+diff --git a/port.h b/port.h
+index 4e728d7..1a28dc6 100644
+--- a/port.h
++++ b/port.h
+@@ -34,6 +34,7 @@ typedef enum {
+ #define PORT_CMD_INIT (1 << 2) /* use INIT cmd to autodetect speed */
+ #define PORT_RETRY (1 << 3) /* allowed read() retry after timeout */
+ #define PORT_STRETCH_W (1 << 4) /* warning for no-stretching commands */
++#define PORT_NPAG_CSUM (1 << 5) /* checksum after number of pages to erase */
+
+ /* all options and flags used to open and configure an interface */
+ struct port_options {
+diff --git a/stm32.c b/stm32.c
+index 966048b..82fa26a 100644
+--- a/stm32.c
++++ b/stm32.c
+@@ -843,6 +843,25 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
+
+ buf[i++] = pages - 1;
+ cs ^= (pages-1);
++ /* For I2C send a checksum after the number of pages (AN4221) */
++ if (port->flags && PORT_NPAG_CSUM) {
++ buf[i++] = cs;
++ p_err = port->write(port, buf, i);
++ if (p_err != PORT_ERR_OK) {
++ fprintf(stderr, "Erase failed sending number of pages.");
++ free(buf);
++ return STM32_ERR_UNKNOWN;
++ }
++ s_err = stm32_get_ack(stm);
++ if (s_err != STM32_ERR_OK) {
++ fprintf(stderr, "Erase failed, no ack after number of pages.");
++ free(buf);
++ return STM32_ERR_UNKNOWN;
++ }
++ cs = 0;
++ i = 0;
++ }
++
+ for (pg_num = spage; pg_num < (pages + spage); pg_num++) {
+ buf[i++] = pg_num;
+ cs ^= pg_num;
+@@ -876,6 +895,24 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
+ buf[i++] = pg_byte;
+ cs ^= pg_byte;
+
++ if (port->flags & PORT_NPAG_CSUM) {
++ buf[i++] = cs;
++ p_err = port->write(port, buf, i);
++ if (p_err != PORT_ERR_OK) {
++ fprintf(stderr, "Extended erase failed sending number of pages.");
++ free(buf);
++ return STM32_ERR_UNKNOWN;
++ }
++ s_err = stm32_get_ack(stm);
++ if (s_err != STM32_ERR_OK) {
++ fprintf(stderr, "Extended erase failed, no ack after number of pages.");
++ free(buf);
++ return STM32_ERR_UNKNOWN;
++ }
++ cs = 0;
++ i = 0;
++ }
++
+ for (pg_num = spage; pg_num < spage + pages; pg_num++) {
+ pg_byte = pg_num >> 8;
+ cs ^= pg_byte;
+--
+2.33.0.309.g3052b89438-goog
+
diff --git a/dev-embedded/stm32flash/stm32flash-0.5.ebuild b/dev-embedded/stm32flash/stm32flash-0.6.ebuild
index c1e17f12ab38..48e734463267 100644
--- a/dev-embedded/stm32flash/stm32flash-0.5.ebuild
+++ b/dev-embedded/stm32flash/stm32flash-0.6.ebuild
@@ -1,7 +1,8 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
+
inherit toolchain-funcs
DESCRIPTION="Open source flash program for STM32 using the ST serial bootloader"
@@ -12,7 +13,11 @@ LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-S=${WORKDIR}/${PN}
+PATCHES=(
+ "${FILESDIR}/stm32flash-0.6-fix-i2c-erase-b079cd0.patch"
+ "${FILESDIR}/stm32flash-0.6-fix-i2c-erase-17a24f8.patch"
+ "${FILESDIR}/stm32flash-0.6-fix-i2c-erase-01fbb65.patch"
+)
src_prepare() {
default
diff --git a/dev-embedded/usbprog/Manifest b/dev-embedded/usbprog/Manifest
index 404a1941f1b3..58e1c7bf0207 100644
--- a/dev-embedded/usbprog/Manifest
+++ b/dev-embedded/usbprog/Manifest
@@ -1,3 +1,4 @@
+AUX usbprog-0.3.0_p20140828_versions.xml.patch 837 BLAKE2B b3b13f0292dbaa245c3a43894e66034c5de697c4afac16689658bbf43ecb410590cd59f03607f0dcabf957e4bbe54ef60b25b20f0ba20f17442c8cf4999f83a0 SHA512 d863f34f8e7542f8783030016c7be003af73b6e85aa533b210b4cda61975b17f56ca516b4971c9c8133cbda31ef1e6ea8eb153697acf0b62fb1c584ea17a43da
DIST usbprog-0.3.0_p20140828.tar.bz2 4211124 BLAKE2B b0b1341e34f6f8c5b59925d115be0c45ce12d69d57a330fd111ce41a8f584f68548485f713ee6386e01facd4b7bf7c86e397194c4202ceda226bf912d94ab079 SHA512 fbc4e4edda36c5633f8459723d147bc02a211ef35d409b9a412ce901f3be1ac59f8183caf2a4f93cbe51b9807f7012986e12274167102fb5d84246f23712cca2
-EBUILD usbprog-0.3.0_p20140828.ebuild 1017 BLAKE2B 7cdc6b7415189f9b6e3867dc4f0b1448c12f2f696bd51ef259e415505a54dcb69b18070b4d7fa6bd4a948e05c7837a5b7b784a47a94a484a46ec73ba750eb50b SHA512 d39e058faf3d664a70ae4d3323fd693bc889d4fa79c69e27f1af3ce33df9448e02e0504faf5250f12de5b6bef86ddbc7fa7f2dd3301697e71d69f29657968759
+EBUILD usbprog-0.3.0_p20140828-r1.ebuild 1179 BLAKE2B 2b557db72401710dcda13ab428ff89a3ad762b005e9baa0902f1d2965dc14d9aae74cccd1ea90f023d0e6082cce54d0060249de88e3ff414c25a3b23e3de4476 SHA512 e6221d731929f4519dbc7cf29935409a413e4e635485179acfe93689b73ac1863f3069a3aa1ac02fec5167e78cc68d92076663fb4e22d222e88983b7b9e64f64
MISC metadata.xml 333 BLAKE2B 2a5f58a2a0d8672b8aebf5533a0f938ca904f3029bdb82e7de9f8468b36376fe6757c770860fd752659ca52b86028831c2356351767f36fb1c9e82732ceb5285 SHA512 b5992d9c2011333c6ca95a607aabb9ce00e912b1427aed6008f411fc55fe48bbaf33b9649fcc07a69970b64a09b631381baa812af180112151e7118e8cabe74a
diff --git a/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828_versions.xml.patch b/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828_versions.xml.patch
new file mode 100644
index 000000000000..dd3a002d825a
--- /dev/null
+++ b/dev-embedded/usbprog/files/usbprog-0.3.0_p20140828_versions.xml.patch
@@ -0,0 +1,28 @@
+From 031cc8495ef5008e744bc3bf1e970e894083d1a1 Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Mon, 26 Jul 2021 19:50:25 +0300
+Subject: [PATCH] Replace URL for versions.xml
+
+Replace versions.xml URL to
+http://www.aaabbb.de/FirmwareUsbprog/versions.xml as only one viable
+source for firmwares.
+---
+ usbprog/usbprog.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usbprog/usbprog.h b/usbprog/usbprog.h
+index 38d069e..35dc86b 100644
+--- a/usbprog/usbprog.h
++++ b/usbprog/usbprog.h
+@@ -26,7 +26,7 @@ namespace usbprog {
+
+ /* Preprocessor definitions {{{ */
+
+-#define DEFAULT_INDEX_URL "http://www.ixbat.de/usbprog/versions.xml"
++#define DEFAULT_INDEX_URL "http://www.aaabbb.de/FirmwareUsbprog/versions.xml"
+ #define AUTO_NOT_UPDATE_TIME 10
+
+ /* }}} */
+--
+2.31.1
+
diff --git a/dev-embedded/usbprog/usbprog-0.3.0_p20140828.ebuild b/dev-embedded/usbprog/usbprog-0.3.0_p20140828-r1.ebuild
index fe1b71567d2e..93073fc987fa 100644
--- a/dev-embedded/usbprog/usbprog-0.3.0_p20140828.ebuild
+++ b/dev-embedded/usbprog/usbprog-0.3.0_p20140828-r1.ebuild
@@ -8,34 +8,41 @@ inherit cmake readme.gentoo-r1
REV="293d559bac55"
DESCRIPTION="flashtool for the multi purpose programming adapter usbprog"
-HOMEPAGE="http://bwalle.de/website/usbprog.html https://bitbucket.org/bwalle/usbprog-tools/src/master/"
+HOMEPAGE="http://www.aaabbb.de/FirmwareUsbprog/FirmwareUsbprog_en.php https://bitbucket.org/bwalle/usbprog-tools/src/master/"
SRC_URI="https://bitbucket.org/bwalle/usbprog-tools/get/${REV}.tar.bz2 -> ${P}.tar.bz2"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="qt5"
+IUSE="+gui minimal"
-RDEPEND="qt5? (
+RDEPEND="
+ !minimal? (
+ gui? ( dev-qt/qtwidgets:5 )
dev-qt/qtcore:5
dev-qt/qtnetwork:5
dev-qt/qtxml:5
+ sys-libs/ncurses:=
+ sys-libs/readline:=
)
- sys-libs/ncurses:=
- sys-libs/readline:=
virtual/libusb:1
"
DEPEND="${RDEPEND}"
S="${WORKDIR}/bwalle-usbprog-tools-${REV}"
+PATCHES=(
+ "${FILESDIR}/${P}_versions.xml.patch"
+)
+
DOC_CONTENTS="
Please visit http://www.aaabbb.de/FirmwareUsbprog/FirmwareUsbprog_en.php
-for version.xml.
+for additional info.
"
src_configure() {
local mycmakeargs=(
- -DBUILD_GUI=$(usex qt5)
+ -DBUILD_ONLY_CORE=$(usex minimal)
+ -DBUILD_GUI=$(usex gui)
-DUSE_QT5=ON
)
cmake_src_configure