diff mbox

gnu: Add sunxi-tools.

Message ID 20160929110204.23556-1-dannym@scratchpost.org
State New
Headers show

Commit Message

Danny Milosavljevic Sept. 29, 2016, 11:02 a.m. UTC
* gnu/packages/admin.scm (sunxi-tools): New variable.
---
 gnu/packages/admin.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Leo Famulari Oct. 2, 2016, 1:54 a.m. UTC | #1
On Thu, Sep 29, 2016 at 01:02:04PM +0200, Danny Milosavljevic wrote:
> 
> * gnu/packages/admin.scm (sunxi-tools): New variable.

What's the story with the 'bin/' [0] directory? I'm not familiar with
these file types.

The tarball includes:

bin/fel-pio.bin
bin/fel-pio.nm
bin/fel-sdboot.sunxi
bin/jtag-loop.sunxi
bin/ramboot.scr
bin/ramboot.uboot-sh

[0]
https://github.com/linux-sunxi/sunxi-tools/tree/master/bin
Danny Milosavljevic Oct. 2, 2016, 9:54 a.m. UTC | #2
Hi Leo,

On Sat, 1 Oct 2016 21:54:41 -0400
Leo Famulari <leo@famulari.name> wrote:
> On Thu, Sep 29, 2016 at 01:02:04PM +0200, Danny Milosavljevic wrote:
> > 
> > * gnu/packages/admin.scm (sunxi-tools): New variable.  
> 
> What's the story with the 'bin/' [0] directory? I'm not familiar with
> these file types.

According to https://github.com/linux-sunxi/sunxi-tools/tree/master/bin they added these in order to avoid cross compilation...

http://linux-sunxi.org/Sunxi-tools describes what they are.

They don't seem to be installed in the first place - so I'd just remove them. 

bin/fel-pio.bin : ARM binary to be put on the SD card on the target
bin/fel-pio.nm : symbols
bin/fel-sdboot.sunxi : ARM binary to be put on the SD card on the target
bin/jtag-loop.sunxi : ARM binary to be put on the SD card on the target
bin/ramboot.scr : a u-boot configuration binary (created by mkimage) for the target
bin/ramboot.uboot-sh : not actually a binary; for the target

There are also build instructions how to build those contained in the source code as comment at the top, for example in https://github.com/linux-sunxi/sunxi-tools/blob/master/fel-pio.c which is included. I don't think a normal user needs those (and I never needed those). I'd just omit them.
Vincent Legoll Oct. 2, 2016, 9:57 a.m. UTC | #3
Hello,

> There are also build instructions how to build those contained
> in the source code as comment at the top, for example in  which
> is included. I don't think a normal user needs those (and I never
> needed those). I'd just omit them.

Maybe just add a quick note in the package description telling
those are missing, to avoid people wondering
Danny Milosavljevic Oct. 2, 2016, 10:01 a.m. UTC | #4
Hi,

On Sun, 2 Oct 2016 11:57:38 +0200
Vincent Legoll <vincent.legoll@gmail.com> wrote:
> Maybe just add a quick note in the package description telling
> those are missing, to avoid people wondering

To be clear: these were not installed in the first place. They are (debug) images you can put on an SD card to boot the target with. Then you can use FEL mode to send the actual stuff you want to run over USB.
diff mbox

Patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 6981242..ae2408b 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1846,3 +1846,31 @@  Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.")
     (license license:gpl1+)))
 
 ;;http://archives.eyrie.org/software/kerberos/pam-krb5-4.7.tar.xz
+
+(define-public sunxi-tools
+  (package
+    (name "sunxi-tools")
+    (version "1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/linux-sunxi/"
+                           "sunxi-tools/archive/v" version ".tar.gz"))
+       (sha256
+        (base32 "1iazm28gws1i8sls3gxwc5p108n56ags287zmh1rpvkn2k1az81a"))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libusb" ,libusb)))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests exist
+       #:make-flags (list (string-append "PREFIX="
+                                         (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "https://github.com/linux-sunxi/sunxi-tools")
+    (synopsis "Tools to help manage Allwinner A10 devices")
+    (description "This package contains tools for Allwinner A10 devices (for FEX, FEL USB, PIO, NAND, JTAG, RAM)")
+    (license license:gpl2+)))