unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. openocd: Update to 0.10.0
@ 2017-07-13  9:59 Theodoros Foradis
  2017-07-23  0:12 ` Leo Famulari
  0 siblings, 1 reply; 10+ messages in thread
From: Theodoros Foradis @ 2017-07-13  9:59 UTC (permalink / raw)
  To: 27683

* gnu/packages/embedded.scm (libjaylink): Update to commit 699b700.
* gnu/packages/embedded.scm (openocd): Update to 0.10.0.
[arguments] <configure-flags>: Add "--enable-sysfsgpio" flag.
Remove "--enable-oocd_trace" flag.
[arguments] <phases>: Add phase "change-udev-group".
Add phase "install-udev-rules".
* gnu/packages/patches/openocd-nrf52.patch: Modify to apply on 0.10.0.
---
 gnu/packages/embedded.scm                | 119 ++++++++++++++++---------------
 gnu/packages/patches/openocd-nrf52.patch |  64 +++++++----------
 2 files changed, 87 insertions(+), 96 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index e509647ea..b9aa52cba 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
+;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -290,8 +290,8 @@ languages are C and C++.")
 
 (define-public libjaylink
   ;; No release tarballs available.
-  (let ((commit "faa2a433fdd3de211728f3da5921133214af9dd3")
-        (revision "1"))
+  (let ((commit "699b7001d34a79c8e7064503dde1bede786fd7f0")
+        (revision "2"))
     (package
       (name "libjaylink")
       (version (string-append "0.1.0-" revision "."
@@ -304,7 +304,7 @@ languages are C and C++.")
                 (file-name (string-append name "-" version "-checkout"))
                 (sha256
                  (base32
-                  "02crr56csz8whq3q4mrmdzzgwp5b0qvxm0fb18drclc3zj44yxl2"))))
+                  "034872d44myycnzn67v5b8ixrgmg8sk32aqalvm5x7108w2byww1"))))
       (build-system gnu-build-system)
       (native-inputs
        `(("autoconf" ,autoconf)
@@ -355,59 +355,66 @@ language.")
     (license license:bsd-2)))
 
 (define-public openocd
-  ;; FIXME: Use tarball release after nrf52 patch is merged.
-  (let ((commit "674141e8a7a6413cb803d90c2a20150260015f81")
-        (revision "1"))
-    (package
-      (name "openocd")
-      (version (string-append "0.9.0-" revision "."
-                              (string-take commit 7)))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "git://git.code.sf.net/p/openocd/code.git")
-                      (commit commit)))
-                (sha256
-                 (base32
-                  "1i86jp0wawq78d73z8hp7q1pn7lmlvhjjr19f7299h4w40a5jf8j"))
-                (file-name (string-append name "-" version "-checkout"))
-                (patches
-                 (search-patches "openocd-nrf52.patch"))))
-      (build-system gnu-build-system)
-      (native-inputs
-       `(("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("libtool" ,libtool)
-         ("pkg-config" ,pkg-config)))
-      (inputs
-       `(("hidapi" ,hidapi)
-         ("jimtcl" ,jimtcl)
-         ("libftdi" ,libftdi)
-         ("libjaylink" ,libjaylink)
-         ("libusb-compat" ,libusb-compat)))
-      (arguments
-       '(#:configure-flags
-         (append (list "--disable-werror"
-                       "--disable-internal-jimtcl"
-                       "--disable-internal-libjaylink")
-                 (map (lambda (programmer)
-                        (string-append "--enable-" programmer))
-                      '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
-                        "gw16012" "jlink" "oocd_trace" "opendous" "osbdm"
-                        "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
-                        "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
-                        "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
-                        "presto" "openjtag")))
-         #:phases
-         (modify-phases %standard-phases
-           (add-before 'configure 'autoreconf
-             (lambda _
-               (zero? (system* "autoreconf" "-vfi")))))))
-      (home-page "http://openocd.org")
-      (synopsis "On-Chip Debugger")
-      (description "OpenOCD provides on-chip programming and debugging support
+  (package
+    (name "openocd")
+    (version "0.10.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/openocd/openocd/"
+                                  version "/openocd-" version ".tar.gz"))
+              (sha256
+               (base32
+                "09p57y3c2spqx4vjjlz1ljm1lcd0j9q8g76ywxqgn3yc34wv18zd"))
+              ;; FIXME: Remove after nrf52 patch is merged.
+              (patches
+               (search-patches "openocd-nrf52.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("hidapi" ,hidapi)
+       ("jimtcl" ,jimtcl)
+       ("libftdi" ,libftdi)
+       ("libjaylink" ,libjaylink)
+       ("libusb-compat" ,libusb-compat)))
+    (arguments
+     '(#:configure-flags
+       (append (list "--disable-werror"
+                     "--enable-sysfsgpio"
+                     "--disable-internal-jimtcl"
+                     "--disable-internal-libjaylink")
+               (map (lambda (programmer)
+                      (string-append "--enable-" programmer))
+                    '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
+                      "gw16012" "jlink" "opendous" "osbdm"
+                      "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
+                      "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
+                      "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
+                      "presto" "openjtag")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autoreconf
+           (lambda _
+             (zero? (system* "autoreconf" "-vfi"))))
+         (add-after 'autoreconf 'change-udev-group
+           (lambda _
+             (substitute* "contrib/60-openocd.rules"
+               (("plugdev") "dialout"))
+             #t))
+         (add-after 'install 'install-udev-rules
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "contrib/60-openocd.rules"
+                           (string-append
+                            (assoc-ref outputs "out")
+                            "/lib/udev/rules.d/")))))))
+    (home-page "http://openocd.org")
+    (synopsis "On-Chip Debugger")
+    (description "OpenOCD provides on-chip programming and debugging support
 with a layered architecture of JTAG interface and TAP support.")
-      (license license:gpl2+))))
+    (license license:gpl2+)))
 
 ;; The commits for all propeller tools are the latest versions as published
 ;; here: https://github.com/dbetz/propeller-gcc
diff --git a/gnu/packages/patches/openocd-nrf52.patch b/gnu/packages/patches/openocd-nrf52.patch
index 792575df7..0ec4348cb 100644
--- a/gnu/packages/patches/openocd-nrf52.patch
+++ b/gnu/packages/patches/openocd-nrf52.patch
@@ -21,19 +21,19 @@ Signed-off-by: Michael Dietz <mjdietzx@gmail.com>
 ---
 
 diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am
-index c167e8f..b6a2be3 100644
+index 727e4f2..839667c 100644
 --- a/src/flash/nor/Makefile.am
 +++ b/src/flash/nor/Makefile.am
-@@ -37,6 +37,7 @@ NOR_DRIVERS = \
- 	niietcm4.c \
- 	non_cfi.c \
- 	nrf51.c \
-+	nrf52.c \
- 	numicro.c \
- 	ocl.c \
- 	pic32mx.c \
+@@ -36,6 +36,7 @@ NOR_DRIVERS = \
+ 	%D%/niietcm4.c \
+ 	%D%/non_cfi.c \
+ 	%D%/nrf51.c \
++	%D%/nrf52.c \
+ 	%D%/numicro.c \
+ 	%D%/ocl.c \
+ 	%D%/pic32mx.c \
 diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
-index 56a5cb2..3e071bd 100644
+index 56a5cb2..071273e 100644
 --- a/src/flash/nor/drivers.c
 +++ b/src/flash/nor/drivers.c
 @@ -48,6 +48,7 @@ extern struct flash_driver mdr_flash;
@@ -48,7 +48,7 @@ index 56a5cb2..3e071bd 100644
  	&mrvlqspi_flash,
  	&niietcm4_flash,
  	&nrf51_flash,
-+	&nrf52_flash,
++       &nrf52_flash,
  	&numicro_flash,
  	&ocl_flash,
  	&pic32mx_flash,
@@ -792,47 +792,31 @@ index 0000000..7f2bd35
 +	.protect_check	= nrf52_protect_check,
 +};
 diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg
-index c1cbf1a..a2567ff 100644
+index c1cbf1a..41a22ff 100644
 --- a/tcl/target/nrf52.cfg
 +++ b/tcl/target/nrf52.cfg
-@@ -5,15 +5,22 @@
- source [find target/swj-dp.tcl]
+@@ -10,6 +10,13 @@ if { [info exists CHIPNAME] } {
+ 	set _CHIPNAME nrf52
+ }
  
- if { [info exists CHIPNAME] } {
--	set _CHIPNAME $CHIPNAME
-+   set _CHIPNAME $CHIPNAME
- } else {
--	set _CHIPNAME nrf52
-+   set _CHIPNAME nrf52
-+}
-+
 +# Work-area is a space in RAM used for flash programming, by default use 16kB.
 +if { [info exists WORKAREASIZE] } {
-+   set _WORKAREASIZE $WORKAREASIZE
++        set _WORKAREASIZE $WORKAREASIZE
 +} else {
-+   set _WORKAREASIZE 0x4000
- }
- 
++        set _WORKAREASIZE 0x4000
++}
++
  if { [info exists CPUTAPID] } {
--	set _CPUTAPID $CPUTAPID
-+   set _CPUTAPID $CPUTAPID
+ 	set _CPUTAPID $CPUTAPID
  } else {
--	set _CPUTAPID 0x2ba01477
-+   set _CPUTAPID 0x2ba01477
- }
- 
- swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
-@@ -21,8 +28,15 @@ swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
- set _TARGETNAME $_CHIPNAME.cpu
+@@ -22,7 +29,15 @@ set _TARGETNAME $_CHIPNAME.cpu
  target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
  
--adapter_khz 10000
+ adapter_khz 10000
 +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
  
--if { ![using_hla] } {
--	cortex_m reset_config sysresetreq
-+if {![using_hla]} {
-+   cortex_m reset_config sysresetreq
+ if { ![using_hla] } {
+ 	cortex_m reset_config sysresetreq
  }
 +
 +flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. openocd: Update to 0.10.0
  2017-07-13  9:59 [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. openocd: Update to 0.10.0 Theodoros Foradis
@ 2017-07-23  0:12 ` Leo Famulari
  2017-07-25 15:48   ` Theodoros Foradis
  2017-09-26 18:42   ` [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. " Theodoros Foradis
  0 siblings, 2 replies; 10+ messages in thread
From: Leo Famulari @ 2017-07-23  0:12 UTC (permalink / raw)
  To: Theodoros Foradis; +Cc: 27683

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

On Thu, Jul 13, 2017 at 12:59:23PM +0300, Theodoros Foradis wrote:

Hi Theodoros, 

> * gnu/packages/embedded.scm (libjaylink): Update to commit 699b700.
> * gnu/packages/embedded.scm (openocd): Update to 0.10.0.
> [arguments] <configure-flags>: Add "--enable-sysfsgpio" flag.
> Remove "--enable-oocd_trace" flag.
> [arguments] <phases>: Add phase "change-udev-group".
> Add phase "install-udev-rules".
> * gnu/packages/patches/openocd-nrf52.patch: Modify to apply on 0.10.0.

Thanks for this patch and sorry for the slow response.

Overall the changes look good to me, but can you clarify if they need to
be applied in the same commit like this?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. openocd: Update to 0.10.0
  2017-07-23  0:12 ` Leo Famulari
@ 2017-07-25 15:48   ` Theodoros Foradis
  2017-07-25 20:52     ` Marius Bakke
  2017-09-26 18:42   ` [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. " Theodoros Foradis
  1 sibling, 1 reply; 10+ messages in thread
From: Theodoros Foradis @ 2017-07-25 15:48 UTC (permalink / raw)
  To: 27683

Hello Leo,

> Overall the changes look good to me, but can you clarify if they need to
> be applied in the same commit like this?

I remember reading somewhere (irc or mailing list probably), that a
package should not break between commits (to be able to bisect). That
would be the case with openocd, if libjaylink is updated before openocd.

If this concern is not valid, I can split the commit in two and resubmit
the patches.

Regards,
-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. openocd: Update to 0.10.0
  2017-07-25 15:48   ` Theodoros Foradis
@ 2017-07-25 20:52     ` Marius Bakke
  2017-07-29 18:31       ` [bug#27683] [PATCH v2 1/2] gnu: libjaylink: Update to commit 699b700 Theodoros Foradis
  0 siblings, 1 reply; 10+ messages in thread
From: Marius Bakke @ 2017-07-25 20:52 UTC (permalink / raw)
  To: Theodoros Foradis, 27683

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

Theodoros Foradis <theodoros.for@openmailbox.org> writes:

> Hello Leo,
>
>> Overall the changes look good to me, but can you clarify if they need to
>> be applied in the same commit like this?
>
> I remember reading somewhere (irc or mailing list probably), that a
> package should not break between commits (to be able to bisect). That
> would be the case with openocd, if libjaylink is updated before openocd.
>
> If this concern is not valid, I can split the commit in two and resubmit
> the patches.

There are certain cases where updating together make a lot of sense,
such as the gstreamer- or qt-family packages. But for mostly-unrelated
programs it's better to have the patches in bite-sized chunks.

I agree that they should be updated separately. We often break packages
in commits, wittingly or not ;-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27683] [PATCH v2 1/2] gnu: libjaylink: Update to commit 699b700.
  2017-07-25 20:52     ` Marius Bakke
@ 2017-07-29 18:31       ` Theodoros Foradis
  2017-07-29 18:31         ` [bug#27683] [PATCH v2 2/2] gnu: openocd: Update to 0.10.0 Theodoros Foradis
  0 siblings, 1 reply; 10+ messages in thread
From: Theodoros Foradis @ 2017-07-29 18:31 UTC (permalink / raw)
  To: 27683

* gnu/packages/embedded.scm (libjaylink): Update to commit 699b700.
---
 gnu/packages/embedded.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index e509647ea..6ccbef659 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
+;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros.for@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -290,8 +290,8 @@ languages are C and C++.")
 
 (define-public libjaylink
   ;; No release tarballs available.
-  (let ((commit "faa2a433fdd3de211728f3da5921133214af9dd3")
-        (revision "1"))
+  (let ((commit "699b7001d34a79c8e7064503dde1bede786fd7f0")
+        (revision "2"))
     (package
       (name "libjaylink")
       (version (string-append "0.1.0-" revision "."
@@ -304,7 +304,7 @@ languages are C and C++.")
                 (file-name (string-append name "-" version "-checkout"))
                 (sha256
                  (base32
-                  "02crr56csz8whq3q4mrmdzzgwp5b0qvxm0fb18drclc3zj44yxl2"))))
+                  "034872d44myycnzn67v5b8ixrgmg8sk32aqalvm5x7108w2byww1"))))
       (build-system gnu-build-system)
       (native-inputs
        `(("autoconf" ,autoconf)
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#27683] [PATCH v2 2/2] gnu: openocd: Update to 0.10.0
  2017-07-29 18:31       ` [bug#27683] [PATCH v2 1/2] gnu: libjaylink: Update to commit 699b700 Theodoros Foradis
@ 2017-07-29 18:31         ` Theodoros Foradis
  0 siblings, 0 replies; 10+ messages in thread
From: Theodoros Foradis @ 2017-07-29 18:31 UTC (permalink / raw)
  To: 27683

* gnu/packages/embedded.scm (openocd): Update to 0.10.0.
[arguments] <configure-flags>: Add "--enable-sysfsgpio" flag.
Remove "--enable-oocd_trace" flag.
[arguments] <phases>: Add phase "change-udev-group".
Add phase "install-udev-rules".
* gnu/packages/patches/openocd-nrf52.patch: Modify to apply on 0.10.0.
---
 gnu/packages/embedded.scm                | 111 ++++++++++++++++---------------
 gnu/packages/patches/openocd-nrf52.patch |  64 +++++++-----------
 2 files changed, 83 insertions(+), 92 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 6ccbef659..b9aa52cba 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -355,59 +355,66 @@ language.")
     (license license:bsd-2)))
 
 (define-public openocd
-  ;; FIXME: Use tarball release after nrf52 patch is merged.
-  (let ((commit "674141e8a7a6413cb803d90c2a20150260015f81")
-        (revision "1"))
-    (package
-      (name "openocd")
-      (version (string-append "0.9.0-" revision "."
-                              (string-take commit 7)))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "git://git.code.sf.net/p/openocd/code.git")
-                      (commit commit)))
-                (sha256
-                 (base32
-                  "1i86jp0wawq78d73z8hp7q1pn7lmlvhjjr19f7299h4w40a5jf8j"))
-                (file-name (string-append name "-" version "-checkout"))
-                (patches
-                 (search-patches "openocd-nrf52.patch"))))
-      (build-system gnu-build-system)
-      (native-inputs
-       `(("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("libtool" ,libtool)
-         ("pkg-config" ,pkg-config)))
-      (inputs
-       `(("hidapi" ,hidapi)
-         ("jimtcl" ,jimtcl)
-         ("libftdi" ,libftdi)
-         ("libjaylink" ,libjaylink)
-         ("libusb-compat" ,libusb-compat)))
-      (arguments
-       '(#:configure-flags
-         (append (list "--disable-werror"
-                       "--disable-internal-jimtcl"
-                       "--disable-internal-libjaylink")
-                 (map (lambda (programmer)
-                        (string-append "--enable-" programmer))
-                      '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
-                        "gw16012" "jlink" "oocd_trace" "opendous" "osbdm"
-                        "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
-                        "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
-                        "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
-                        "presto" "openjtag")))
-         #:phases
-         (modify-phases %standard-phases
-           (add-before 'configure 'autoreconf
-             (lambda _
-               (zero? (system* "autoreconf" "-vfi")))))))
-      (home-page "http://openocd.org")
-      (synopsis "On-Chip Debugger")
-      (description "OpenOCD provides on-chip programming and debugging support
+  (package
+    (name "openocd")
+    (version "0.10.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/openocd/openocd/"
+                                  version "/openocd-" version ".tar.gz"))
+              (sha256
+               (base32
+                "09p57y3c2spqx4vjjlz1ljm1lcd0j9q8g76ywxqgn3yc34wv18zd"))
+              ;; FIXME: Remove after nrf52 patch is merged.
+              (patches
+               (search-patches "openocd-nrf52.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("hidapi" ,hidapi)
+       ("jimtcl" ,jimtcl)
+       ("libftdi" ,libftdi)
+       ("libjaylink" ,libjaylink)
+       ("libusb-compat" ,libusb-compat)))
+    (arguments
+     '(#:configure-flags
+       (append (list "--disable-werror"
+                     "--enable-sysfsgpio"
+                     "--disable-internal-jimtcl"
+                     "--disable-internal-libjaylink")
+               (map (lambda (programmer)
+                      (string-append "--enable-" programmer))
+                    '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
+                      "gw16012" "jlink" "opendous" "osbdm"
+                      "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
+                      "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
+                      "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
+                      "presto" "openjtag")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autoreconf
+           (lambda _
+             (zero? (system* "autoreconf" "-vfi"))))
+         (add-after 'autoreconf 'change-udev-group
+           (lambda _
+             (substitute* "contrib/60-openocd.rules"
+               (("plugdev") "dialout"))
+             #t))
+         (add-after 'install 'install-udev-rules
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "contrib/60-openocd.rules"
+                           (string-append
+                            (assoc-ref outputs "out")
+                            "/lib/udev/rules.d/")))))))
+    (home-page "http://openocd.org")
+    (synopsis "On-Chip Debugger")
+    (description "OpenOCD provides on-chip programming and debugging support
 with a layered architecture of JTAG interface and TAP support.")
-      (license license:gpl2+))))
+    (license license:gpl2+)))
 
 ;; The commits for all propeller tools are the latest versions as published
 ;; here: https://github.com/dbetz/propeller-gcc
diff --git a/gnu/packages/patches/openocd-nrf52.patch b/gnu/packages/patches/openocd-nrf52.patch
index 792575df7..0ec4348cb 100644
--- a/gnu/packages/patches/openocd-nrf52.patch
+++ b/gnu/packages/patches/openocd-nrf52.patch
@@ -21,19 +21,19 @@ Signed-off-by: Michael Dietz <mjdietzx@gmail.com>
 ---
 
 diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am
-index c167e8f..b6a2be3 100644
+index 727e4f2..839667c 100644
 --- a/src/flash/nor/Makefile.am
 +++ b/src/flash/nor/Makefile.am
-@@ -37,6 +37,7 @@ NOR_DRIVERS = \
- 	niietcm4.c \
- 	non_cfi.c \
- 	nrf51.c \
-+	nrf52.c \
- 	numicro.c \
- 	ocl.c \
- 	pic32mx.c \
+@@ -36,6 +36,7 @@ NOR_DRIVERS = \
+ 	%D%/niietcm4.c \
+ 	%D%/non_cfi.c \
+ 	%D%/nrf51.c \
++	%D%/nrf52.c \
+ 	%D%/numicro.c \
+ 	%D%/ocl.c \
+ 	%D%/pic32mx.c \
 diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
-index 56a5cb2..3e071bd 100644
+index 56a5cb2..071273e 100644
 --- a/src/flash/nor/drivers.c
 +++ b/src/flash/nor/drivers.c
 @@ -48,6 +48,7 @@ extern struct flash_driver mdr_flash;
@@ -48,7 +48,7 @@ index 56a5cb2..3e071bd 100644
  	&mrvlqspi_flash,
  	&niietcm4_flash,
  	&nrf51_flash,
-+	&nrf52_flash,
++       &nrf52_flash,
  	&numicro_flash,
  	&ocl_flash,
  	&pic32mx_flash,
@@ -792,47 +792,31 @@ index 0000000..7f2bd35
 +	.protect_check	= nrf52_protect_check,
 +};
 diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg
-index c1cbf1a..a2567ff 100644
+index c1cbf1a..41a22ff 100644
 --- a/tcl/target/nrf52.cfg
 +++ b/tcl/target/nrf52.cfg
-@@ -5,15 +5,22 @@
- source [find target/swj-dp.tcl]
+@@ -10,6 +10,13 @@ if { [info exists CHIPNAME] } {
+ 	set _CHIPNAME nrf52
+ }
  
- if { [info exists CHIPNAME] } {
--	set _CHIPNAME $CHIPNAME
-+   set _CHIPNAME $CHIPNAME
- } else {
--	set _CHIPNAME nrf52
-+   set _CHIPNAME nrf52
-+}
-+
 +# Work-area is a space in RAM used for flash programming, by default use 16kB.
 +if { [info exists WORKAREASIZE] } {
-+   set _WORKAREASIZE $WORKAREASIZE
++        set _WORKAREASIZE $WORKAREASIZE
 +} else {
-+   set _WORKAREASIZE 0x4000
- }
- 
++        set _WORKAREASIZE 0x4000
++}
++
  if { [info exists CPUTAPID] } {
--	set _CPUTAPID $CPUTAPID
-+   set _CPUTAPID $CPUTAPID
+ 	set _CPUTAPID $CPUTAPID
  } else {
--	set _CPUTAPID 0x2ba01477
-+   set _CPUTAPID 0x2ba01477
- }
- 
- swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
-@@ -21,8 +28,15 @@ swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
- set _TARGETNAME $_CHIPNAME.cpu
+@@ -22,7 +29,15 @@ set _TARGETNAME $_CHIPNAME.cpu
  target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
  
--adapter_khz 10000
+ adapter_khz 10000
 +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
  
--if { ![using_hla] } {
--	cortex_m reset_config sysresetreq
-+if {![using_hla]} {
-+   cortex_m reset_config sysresetreq
+ if { ![using_hla] } {
+ 	cortex_m reset_config sysresetreq
  }
 +
 +flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. openocd: Update to 0.10.0
  2017-07-23  0:12 ` Leo Famulari
  2017-07-25 15:48   ` Theodoros Foradis
@ 2017-09-26 18:42   ` Theodoros Foradis
  2017-09-26 18:46     ` [bug#27683] [PATCH v3 1/2] gnu: libjaylink: Update to commit 699b700 Theodoros Foradis
  2017-09-28 12:24     ` bug#27683: [PATCH] gnu: libjaylink: Update to 699b700. " Ludovic Courtès
  1 sibling, 2 replies; 10+ messages in thread
From: Theodoros Foradis @ 2017-09-26 18:42 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 27683

Hello,

> Overall the changes look good to me, but can you clarify if they need to
> be applied in the same commit like this?

It has been some time since I submitted version 2 of the patch,
splitting it in two.

I revisited the patch and it wouldn't apply on master, so I reply with
the rebased patch that applies on current master.

Regards,
-- 
Theodoros Foradis

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#27683] [PATCH v3 1/2] gnu: libjaylink: Update to commit 699b700.
  2017-09-26 18:42   ` [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. " Theodoros Foradis
@ 2017-09-26 18:46     ` Theodoros Foradis
  2017-09-26 18:46       ` [bug#27683] [PATCH v3 2/2] gnu: openocd: Update to 0.10.0 Theodoros Foradis
  2017-09-28 12:24     ` bug#27683: [PATCH] gnu: libjaylink: Update to 699b700. " Ludovic Courtès
  1 sibling, 1 reply; 10+ messages in thread
From: Theodoros Foradis @ 2017-09-26 18:46 UTC (permalink / raw)
  To: 27683

* gnu/packages/embedded.scm (libjaylink): Update to commit 699b700.
---
 gnu/packages/embedded.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 2a298dca9..f99b17614 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
+;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -290,8 +290,8 @@ languages are C and C++.")
 
 (define-public libjaylink
   ;; No release tarballs available.
-  (let ((commit "faa2a433fdd3de211728f3da5921133214af9dd3")
-        (revision "1"))
+  (let ((commit "699b7001d34a79c8e7064503dde1bede786fd7f0")
+        (revision "2"))
     (package
       (name "libjaylink")
       (version (string-append "0.1.0-" revision "."
@@ -304,7 +304,7 @@ languages are C and C++.")
                 (file-name (string-append name "-" version "-checkout"))
                 (sha256
                  (base32
-                  "02crr56csz8whq3q4mrmdzzgwp5b0qvxm0fb18drclc3zj44yxl2"))))
+                  "034872d44myycnzn67v5b8ixrgmg8sk32aqalvm5x7108w2byww1"))))
       (build-system gnu-build-system)
       (native-inputs
        `(("autoconf" ,autoconf)
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#27683] [PATCH v3 2/2] gnu: openocd: Update to 0.10.0
  2017-09-26 18:46     ` [bug#27683] [PATCH v3 1/2] gnu: libjaylink: Update to commit 699b700 Theodoros Foradis
@ 2017-09-26 18:46       ` Theodoros Foradis
  0 siblings, 0 replies; 10+ messages in thread
From: Theodoros Foradis @ 2017-09-26 18:46 UTC (permalink / raw)
  To: 27683

* gnu/packages/embedded.scm (openocd): Update to 0.10.0.
[arguments] <configure-flags>: Add "--enable-sysfsgpio" flag.
Remove "--enable-oocd_trace" flag.
[arguments] <phases>: Add phase "change-udev-group".
Add phase "install-udev-rules".
* gnu/packages/patches/openocd-nrf52.patch: Modify to apply on 0.10.0.
---
 gnu/packages/embedded.scm                | 111 ++++++++++++++++---------------
 gnu/packages/patches/openocd-nrf52.patch |  64 +++++++-----------
 2 files changed, 83 insertions(+), 92 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index f99b17614..91c600353 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -355,59 +355,66 @@ language.")
     (license license:bsd-2)))
 
 (define-public openocd
-  ;; FIXME: Use tarball release after nrf52 patch is merged.
-  (let ((commit "674141e8a7a6413cb803d90c2a20150260015f81")
-        (revision "1"))
-    (package
-      (name "openocd")
-      (version (string-append "0.9.0-" revision "."
-                              (string-take commit 7)))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://git.code.sf.net/p/openocd/code.git")
-                      (commit commit)))
-                (sha256
-                 (base32
-                  "1i86jp0wawq78d73z8hp7q1pn7lmlvhjjr19f7299h4w40a5jf8j"))
-                (file-name (string-append name "-" version "-checkout"))
-                (patches
-                 (search-patches "openocd-nrf52.patch"))))
-      (build-system gnu-build-system)
-      (native-inputs
-       `(("autoconf" ,autoconf)
-         ("automake" ,automake)
-         ("libtool" ,libtool)
-         ("pkg-config" ,pkg-config)))
-      (inputs
-       `(("hidapi" ,hidapi)
-         ("jimtcl" ,jimtcl)
-         ("libftdi" ,libftdi)
-         ("libjaylink" ,libjaylink)
-         ("libusb-compat" ,libusb-compat)))
-      (arguments
-       '(#:configure-flags
-         (append (list "--disable-werror"
-                       "--disable-internal-jimtcl"
-                       "--disable-internal-libjaylink")
-                 (map (lambda (programmer)
-                        (string-append "--enable-" programmer))
-                      '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
-                        "gw16012" "jlink" "oocd_trace" "opendous" "osbdm"
-                        "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
-                        "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
-                        "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
-                        "presto" "openjtag")))
-         #:phases
-         (modify-phases %standard-phases
-           (add-after 'unpack 'autoreconf
-             (lambda _
-               (zero? (system* "autoreconf" "-vfi")))))))
-      (home-page "http://openocd.org")
-      (synopsis "On-Chip Debugger")
-      (description "OpenOCD provides on-chip programming and debugging support
+  (package
+    (name "openocd")
+    (version "0.10.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/openocd/openocd/"
+                                  version "/openocd-" version ".tar.gz"))
+              (sha256
+               (base32
+                "09p57y3c2spqx4vjjlz1ljm1lcd0j9q8g76ywxqgn3yc34wv18zd"))
+              ;; FIXME: Remove after nrf52 patch is merged.
+              (patches
+               (search-patches "openocd-nrf52.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("hidapi" ,hidapi)
+       ("jimtcl" ,jimtcl)
+       ("libftdi" ,libftdi)
+       ("libjaylink" ,libjaylink)
+       ("libusb-compat" ,libusb-compat)))
+    (arguments
+     '(#:configure-flags
+       (append (list "--disable-werror"
+                     "--enable-sysfsgpio"
+                     "--disable-internal-jimtcl"
+                     "--disable-internal-libjaylink")
+               (map (lambda (programmer)
+                      (string-append "--enable-" programmer))
+                    '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
+                      "gw16012" "jlink" "opendous" "osbdm"
+                      "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
+                      "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
+                      "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
+                      "presto" "openjtag")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autoreconf
+           (lambda _
+             (zero? (system* "autoreconf" "-vfi"))))
+         (add-after 'autoreconf 'change-udev-group
+           (lambda _
+             (substitute* "contrib/60-openocd.rules"
+               (("plugdev") "dialout"))
+             #t))
+         (add-after 'install 'install-udev-rules
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "contrib/60-openocd.rules"
+                           (string-append
+                            (assoc-ref outputs "out")
+                            "/lib/udev/rules.d/")))))))
+    (home-page "http://openocd.org")
+    (synopsis "On-Chip Debugger")
+    (description "OpenOCD provides on-chip programming and debugging support
 with a layered architecture of JTAG interface and TAP support.")
-      (license license:gpl2+))))
+    (license license:gpl2+)))
 
 ;; The commits for all propeller tools are the latest versions as published
 ;; here: https://github.com/dbetz/propeller-gcc
diff --git a/gnu/packages/patches/openocd-nrf52.patch b/gnu/packages/patches/openocd-nrf52.patch
index 792575df7..0ec4348cb 100644
--- a/gnu/packages/patches/openocd-nrf52.patch
+++ b/gnu/packages/patches/openocd-nrf52.patch
@@ -21,19 +21,19 @@ Signed-off-by: Michael Dietz <mjdietzx@gmail.com>
 ---
 
 diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am
-index c167e8f..b6a2be3 100644
+index 727e4f2..839667c 100644
 --- a/src/flash/nor/Makefile.am
 +++ b/src/flash/nor/Makefile.am
-@@ -37,6 +37,7 @@ NOR_DRIVERS = \
- 	niietcm4.c \
- 	non_cfi.c \
- 	nrf51.c \
-+	nrf52.c \
- 	numicro.c \
- 	ocl.c \
- 	pic32mx.c \
+@@ -36,6 +36,7 @@ NOR_DRIVERS = \
+ 	%D%/niietcm4.c \
+ 	%D%/non_cfi.c \
+ 	%D%/nrf51.c \
++	%D%/nrf52.c \
+ 	%D%/numicro.c \
+ 	%D%/ocl.c \
+ 	%D%/pic32mx.c \
 diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
-index 56a5cb2..3e071bd 100644
+index 56a5cb2..071273e 100644
 --- a/src/flash/nor/drivers.c
 +++ b/src/flash/nor/drivers.c
 @@ -48,6 +48,7 @@ extern struct flash_driver mdr_flash;
@@ -48,7 +48,7 @@ index 56a5cb2..3e071bd 100644
  	&mrvlqspi_flash,
  	&niietcm4_flash,
  	&nrf51_flash,
-+	&nrf52_flash,
++       &nrf52_flash,
  	&numicro_flash,
  	&ocl_flash,
  	&pic32mx_flash,
@@ -792,47 +792,31 @@ index 0000000..7f2bd35
 +	.protect_check	= nrf52_protect_check,
 +};
 diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg
-index c1cbf1a..a2567ff 100644
+index c1cbf1a..41a22ff 100644
 --- a/tcl/target/nrf52.cfg
 +++ b/tcl/target/nrf52.cfg
-@@ -5,15 +5,22 @@
- source [find target/swj-dp.tcl]
+@@ -10,6 +10,13 @@ if { [info exists CHIPNAME] } {
+ 	set _CHIPNAME nrf52
+ }
  
- if { [info exists CHIPNAME] } {
--	set _CHIPNAME $CHIPNAME
-+   set _CHIPNAME $CHIPNAME
- } else {
--	set _CHIPNAME nrf52
-+   set _CHIPNAME nrf52
-+}
-+
 +# Work-area is a space in RAM used for flash programming, by default use 16kB.
 +if { [info exists WORKAREASIZE] } {
-+   set _WORKAREASIZE $WORKAREASIZE
++        set _WORKAREASIZE $WORKAREASIZE
 +} else {
-+   set _WORKAREASIZE 0x4000
- }
- 
++        set _WORKAREASIZE 0x4000
++}
++
  if { [info exists CPUTAPID] } {
--	set _CPUTAPID $CPUTAPID
-+   set _CPUTAPID $CPUTAPID
+ 	set _CPUTAPID $CPUTAPID
  } else {
--	set _CPUTAPID 0x2ba01477
-+   set _CPUTAPID 0x2ba01477
- }
- 
- swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
-@@ -21,8 +28,15 @@ swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
- set _TARGETNAME $_CHIPNAME.cpu
+@@ -22,7 +29,15 @@ set _TARGETNAME $_CHIPNAME.cpu
  target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
  
--adapter_khz 10000
+ adapter_khz 10000
 +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
  
--if { ![using_hla] } {
--	cortex_m reset_config sysresetreq
-+if {![using_hla]} {
-+   cortex_m reset_config sysresetreq
+ if { ![using_hla] } {
+ 	cortex_m reset_config sysresetreq
  }
 +
 +flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#27683: [PATCH] gnu: libjaylink: Update to 699b700. openocd: Update to 0.10.0
  2017-09-26 18:42   ` [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. " Theodoros Foradis
  2017-09-26 18:46     ` [bug#27683] [PATCH v3 1/2] gnu: libjaylink: Update to commit 699b700 Theodoros Foradis
@ 2017-09-28 12:24     ` Ludovic Courtès
  1 sibling, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2017-09-28 12:24 UTC (permalink / raw)
  To: Theodoros Foradis; +Cc: 27683-done

Hi Theodoros,

Theodoros Foradis <theodoros@foradis.org> skribis:

>> Overall the changes look good to me, but can you clarify if they need to
>> be applied in the same commit like this?
>
> It has been some time since I submitted version 2 of the patch,
> splitting it in two.
>
> I revisited the patch and it wouldn't apply on master, so I reply with
> the rebased patch that applies on current master.

I went ahead and applied both.  Sorry that it took so long!

Thank you,
Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-28 12:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-13  9:59 [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. openocd: Update to 0.10.0 Theodoros Foradis
2017-07-23  0:12 ` Leo Famulari
2017-07-25 15:48   ` Theodoros Foradis
2017-07-25 20:52     ` Marius Bakke
2017-07-29 18:31       ` [bug#27683] [PATCH v2 1/2] gnu: libjaylink: Update to commit 699b700 Theodoros Foradis
2017-07-29 18:31         ` [bug#27683] [PATCH v2 2/2] gnu: openocd: Update to 0.10.0 Theodoros Foradis
2017-09-26 18:42   ` [bug#27683] [PATCH] gnu: libjaylink: Update to 699b700. " Theodoros Foradis
2017-09-26 18:46     ` [bug#27683] [PATCH v3 1/2] gnu: libjaylink: Update to commit 699b700 Theodoros Foradis
2017-09-26 18:46       ` [bug#27683] [PATCH v3 2/2] gnu: openocd: Update to 0.10.0 Theodoros Foradis
2017-09-28 12:24     ` bug#27683: [PATCH] gnu: libjaylink: Update to 699b700. " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).