Compare commits

..

No commits in common. "rawhide" and "f30" have entirely different histories.

5 changed files with 70 additions and 109 deletions

3
.gitignore vendored
View file

@ -2,6 +2,3 @@
/urjtag-20171020-git-49a4f5b5.tar.bz2
/urjtag-2017.10.tar.xz
/urjtag-2018.06.tar.xz
/urjtag-2018.09.tar.xz
/urjtag-2019.12.tar.xz
/urjtag-2021.03.tar.xz

View file

@ -0,0 +1,48 @@
From 84eeef108d36c7aa725e6b8098960937c5d1b38e Mon Sep 17 00:00:00 2001
From: Scott Tsai <scottt.tw@gmail.com>
Date: Fri, 16 Dec 2011 05:56:39 +0800
Subject: [PATCH] svf: guard against chain->cable being NULL
While processing:
cable ft2232 vid=0x0403 pid=0x6011
bsdl path .
detect
svf ./orpsoc_top.svf stop progress
quit
If the specified cable isn't present, jtag would SEGFAULT with this backtrace:
#0 urj_tap_cable_get_frequency (cable=0x0) at cable.c:529
#1 0x00007fefd4f4803a in urj_svf_run (chain=0x20562a0, SVF_FILE=0x20567b0, stop_on_mismatch=1, ref_freq=0) at svf.c:1117
#2 0x00007fefd4f40681 in cmd_svf_run (chain=0x20562a0, params=0x20565a0) at cmd_svf.c:83
#3 0x00007fefd4f3e9ad in urj_cmd_run (chain=0x20562a0, params=0x20565a0) at cmd_cmd.c:276
#4 0x00007fefd4f4438d in urj_parse_line (chain=0x20562a0, line=0x2056520 "svf ./orpsoc_top.svf stop progress") at parse.c:165
#5 0x00007fefd4f44447 in urj_parse_stream (chain=0x20562a0, f=0x20562e0) at parse.c:207
#6 0x00007fefd4f4456b in urj_parse_file (chain=0x20562a0, filename=0x7fff90576b92 "./program_fpga.jtag") at parse.c:235
#7 0x00000000004016c1 in main (argc=2, argv=<optimized out>) at jtag.c:486
This patch changes urj_svf_run to guard against chain->cable being NULL.
---
urjtag/src/svf/svf.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/urjtag/src/svf/svf.c b/urjtag/src/svf/svf.c
index 9552a6d..2282c77 100644
--- a/urjtag/src/svf/svf.c
+++ b/urjtag/src/svf/svf.c
@@ -1114,7 +1114,12 @@ urj_svf_run (urj_chain_t *chain, FILE *SVF_FILE, int stop_on_mismatch,
urj_svf_parser_priv_t priv;
int c = ~EOF;
int num_lines;
- uint32_t old_frequency = urj_tap_cable_get_frequency (chain->cable);
+ uint32_t old_frequency;
+
+ if (chain == NULL || chain->cable == NULL)
+ return URJ_STATUS_FAIL;
+
+ old_frequency = urj_tap_cable_get_frequency (chain->cable);
/* get number of lines in svf file so we can give user some feedback on long
files or slow cables */
--
1.7.7.5

View file

@ -1 +1 @@
SHA512 (urjtag-2021.03.tar.xz) = baf203e556d1d41437539d3f5c018b35fbb496f71391c2bec2786ffa47bff33d38654b3e7d106e38bcf36d075d86fc02b18eaaf634cdb65e2840ff50ca0da8b2
SHA512 (urjtag-2018.06.tar.xz) = d999d8d84b64e27f978947d8f2b16026bf41080f0fc64ebd775d0933bc3d1745219deca810ca8e4470ade3507f702c44ad2b3d829f6f0804f30f010a6fadb780

16
urjtag-fixftdi.patch Normal file
View file

@ -0,0 +1,16 @@
--- urjtag-20111215-git-e1a4227/urjtag/configure.ac.orig 2016-12-09 11:56:56.978518212 +0100
+++ urjtag-20111215-git-e1a4227/urjtag/configure.ac 2016-12-09 11:57:07.681363295 +0100
@@ -241,10 +241,10 @@
save_CPPFLAGS=$CPPFLAGS
PKG_CHECK_MODULES(LIBFTDI, libftdi, [:;], [dnl
AS_IF([test "x$with_libftdi" != xyes -a "x$with_libftdi" != xcheck], [
- LIBFTDI_LIBS="-L$with_libftdi -lftdi"
- LIBFTDI_CFLAGS="-I$with_libftdi"
+ LIBFTDI_LIBS="-L$with_libftdi1 -lftdi1"
+ LIBFTDI_CFLAGS="-I$with_libftdi1"
],[
- AC_PATH_TOOL(LIBFTDI_CONFIG, libftdi-config, no)
+ AC_PATH_TOOL(LIBFTDI_CONFIG, libftdi1-config, no)
AS_IF([test "$LIBFTDI_CONFIG" != "no"],[
LIBFTDI_LIBS=`$LIBFTDI_CONFIG --libs`
LIBFTDI_CFLAGS=`$LIBFTDI_CONFIG --cflags`

View file

@ -5,23 +5,19 @@
%endif
Name: urjtag
Version: 2021.03
Release: 23%{?dist}
Version: 2018.06
Release: 5%{?dist}
Summary: A tool for communicating over JTAG with flash chips and CPUs
# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later
License: GPLv2+
URL: http://urjtag.org
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz
Source0: %{name}-%{version}.tar.xz
Patch0: %{name}-fixarm.patch
%global py3_prefix python3
BuildRequires: make
BuildRequires: gcc
BuildRequires: libftdi-devel
BuildRequires: (python3-setuptools if python3-devel >= 3.12)
BuildRequires: readline-devel
BuildRequires: swig
%if 0%{?rhel} || 0%{?centos}
BuildRequires: %{py3_prefix}4-devel
@ -58,7 +54,7 @@ Python bindings and examples for %{name}.
%prep
%setup -q
%patch -P0 -p2 -b .armfix
%patch0 -p2 -b .armfix
%build
%configure --enable-jedec-exp --enable-stapl --enable-bsdl --enable-svf --disable-static --enable-shared
@ -104,102 +100,6 @@ pushd bindings/python/
%doc bindings/python/t_srst.py
%changelog
* Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 2021.03-23
- Rebuilt for Python 3.15.0b4 ABI change
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Thu Jun 04 2026 Python Maint <python-maint@redhat.com> - 2021.03-21
- Rebuilt for Python 3.15
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 2021.03-19
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 2021.03-18
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 2021.03-16
- Rebuilt for Python 3.14
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Jul 26 2024 Miroslav Suchý <msuchy@redhat.com> - 2021.03-14
- convert license to SPDX
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 2021.03-12
- Rebuilt for Python 3.13
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jul 30 2023 Filipe Rosset <rosset.filipe@gmail.com> - 2021.03-10
- Fix FTBFS rhbz#2226495 rhbz#2220616 rhbz#2175186 and rhbz#1785878
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2021.03-8
- Rebuilt for Python 3.12
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 2021.03-5
- Rebuilt for Python 3.11
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2021.03-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2021.03-2
- Rebuilt for Python 3.10
* Sat Apr 10 2021 Jiri Kastner <jkastner@fedoraproject.org> - 2021.03-1
- update to 2021.03
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2019.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.12-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2019.12-4
- Rebuilt for Python 3.9
* Thu Feb 13 2020 Dan Horák <dan[at]danny.cz> - 2019.12-3
- fix FTBFS with gcc10 (#1793499)
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Dec 21 2019 Dan Horák <dan[at]danny.cz> - 2019.12-1
- update to 2019.12
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2018.09-2
- Rebuilt for Python 3.8
* Wed Jul 31 2019 Dan Horák <dan[at]danny.cz> - 2018.09-1
- update to 2018.09
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.06-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.06-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild