From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH v3] gnu: Add sunxi-tools. Date: Wed, 5 Oct 2016 05:03:20 +0200 Message-ID: <20161005030320.6074-1-dannym@scratchpost.org> References: <87vax88dc4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.10.0" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brcUb-0004bh-Hl for guix-devel@gnu.org; Tue, 04 Oct 2016 23:03:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brcUW-0002nt-D8 for guix-devel@gnu.org; Tue, 04 Oct 2016 23:03:36 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:55013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brcUW-0002nO-2x for guix-devel@gnu.org; Tue, 04 Oct 2016 23:03:32 -0400 In-Reply-To: <87vax88dc4.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org This is a multi-part message in MIME format. --------------2.10.0 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable * gnu/packages/admin.scm (sunxi-tools): New variable. --- gnu/packages/admin.scm | 56 ++++++++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 56 insertions(+) --------------2.10.0 Content-Type: text/x-patch; name="0001-gnu-Add-sunxi-tools.patch" Content-Disposition: attachment; filename="0001-gnu-Add-sunxi-tools.patch" Content-Transfer-Encoding: quoted-printable diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 4fcc05a..c5e67b0 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1865,3 +1865,59 @@ Kerberos and Heimdal and FAST is supported with re= cent MIT Kerberos.") (license license:gpl1+))) =20 ;;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")) + (modules '((guix build utils))) + (snippet + ;; Remove binaries contained in the tarball which are only for t= he + ;; target and can be regenerated anyway. + '(delete-file-recursively "bin")))) + (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=3D" + (assoc-ref %outputs "out")) + "TARGET_TOOLS=3Dsunxi-pio sunxi-meminfo" + "CROSS_COMPILE=3D") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-Makefile + (lambda _ + (substitute* "Makefile" + ;; Upstream adds Makefile and config.h as dependencies + ;; of all their tools which means $^ would pass them to g= cc. + ;; gcc won't know what to do with a Makefile. + (("-o [$][@] [$]\\^") "-o $@ meminfo.c")) + #t)) + (delete 'configure)))) + (home-page "https://github.com/linux-sunxi/sunxi-tools") + (synopsis "Hardware management tools for Allwinner computers") + (description "This package contains tools for Allwinner devices: +@enumerate +@item @command{sunxi-fexc}, @command{bin2fex}, @command{fex2bin}: Compil= e +a textual description of a board (.fex) to a binary representation (.bin= ). +@item @command{sunxi-fel}: Puts an Allwinner device into FEL mode which +makes it register as a special USB device (rather than USB host). +You can then connect it to another computer and flash it from there. +@item @command{sunxi-nand-part}: Partitions NAND flash. +@item @command{sunxi-bootinfo}: Reads out boot0 and boot1 (Allwinner +bootloader) parameters. +@item @command{sunxi-pio}: Sets GPIO parameters and oscillates a GPIO +in order to be able to find it. +@item @command{sunxi-meminfo}: Prints memory bus settings. +@end enumerate") + (license license:gpl2+))) --------------2.10.0--