Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -0,0 +1,52 @@
Tools to help hacking Allwinner A10 (aka sun4i) based devices and possibly
it's successors, that's why the 'x' in the package name.
fexc:
`.fex` file (de)compiler
Usage: ./fexc [-vq] [-I <infmt>] [-O <outfmt>] [<input> [<output>]]
infmt: fex, bin (default:fex)
outfmt: fex, bin (default:bin)
bin2fex:
compatibility shortcut to call `fexc` to decompile an script.bin
blob back into `.fex` format used by allwinner's SDK to configure
the boards.
fex2bin:
compatiblity shortcut to call `fexc` to compile a `.fex` file into
the binary form used by the sun4i kernel.
fel:
script interface for talking to the FEL USB handler built in to
th CPU. You activate FEL mode by pushing the usboot/recovery
button at poweron. See http://linux-sunxi.org/FEL/USBBoot for
a detailed usage guide.
fel-gpio:
Simple wrapper around fel-pio and fel to allow GPIO manipulations
via FEL
fel-sdboot:
ARM native sdcard bootloader forcing the device into FEL mode
fel-pio:
ARM native helper for fel-gpio
pio:
Manipulate PIO register dumps
jtag-loop.sunxi:
ARM native boot helper to force the SD port into JTAG
and then stop, to ease debugging of bootloaders.
bootinfo:
Dump information from Allwinner boot files (boot0/boot1)
--type=sd include SD boot info
--type=nand include NAND boot info (not implemented)
phoenix_info:
gives information about a phoenix image created by the
phoenixcard utility and optionally extracts the embedded boot
code & firmware file from their hidden partitions.

View File

@@ -0,0 +1,36 @@
# $NetBSD: Makefile,v 1.3 2015/10/25 09:05:23 bouyer Exp $
#
VERSION= 20150915
DISTNAME= sunxi-tools-${VERSION}
PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=linux-sunxi/}
GITHUB_PROJECT= sunxi-tools
GITHUB_TAG= 568c7a0e81fc5d52189710c6d832677aa8770b16
MAINTAINER= bouyer@NetBSD.org
HOMEPAGE= http://linux-sunxi.org/
COMMENT= Tools to help hacking Allwinner A10 (and successors) devices
LICENSE= gnu-gpl-v2
USE_TOOLS+= gmake pkg-config
INSTALLATION_DIRS= bin libdata/sunxi-tools
do-install:
.for f in fexc fel pio bootinfo phoenix_info
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/bin/${f}
.endfor
.for f in bin2fex fex2bin
${LN} ${DESTDIR}${PREFIX}/bin/fexc ${DESTDIR}${PREFIX}/bin/${f}
.endfor
.for f in fel-gpio
${INSTALL_SCRIPT} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/bin/${f}
.endfor
.for f in fel-pio.bin fel-sdboot.sunxi ramboot.scr fel-pio.nm jtag-loop.sunxi ramboot.uboot-sh
${INSTALL_DATA} ${WRKSRC}/bin/${f} ${DESTDIR}${PREFIX}/libdata/sunxi-tools/${f}
.endfor
.include "../../devel/libusb1/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,15 @@
@comment $NetBSD: PLIST,v 1.2 2015/10/25 09:05:23 bouyer Exp $
bin/fexc
bin/bin2fex
bin/fex2bin
bin/fel
bin/fel-gpio
bin/pio
bin/bootinfo
bin/phoenix_info
libdata/sunxi-tools/fel-pio.bin
libdata/sunxi-tools/fel-sdboot.sunxi
libdata/sunxi-tools/ramboot.scr
libdata/sunxi-tools/fel-pio.nm
libdata/sunxi-tools/jtag-loop.sunxi
libdata/sunxi-tools/ramboot.uboot-sh

View File

@@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.3 2015/11/04 01:32:32 agc Exp $
SHA1 (sunxi-tools-20150915-568c7a0e81fc5d52189710c6d832677aa8770b16.tar.gz) = 294576067bea1d7d1c66148870b1a4767881762b
RMD160 (sunxi-tools-20150915-568c7a0e81fc5d52189710c6d832677aa8770b16.tar.gz) = 6e1318bfea20bd57c740e13b14b1059530df073f
SHA512 (sunxi-tools-20150915-568c7a0e81fc5d52189710c6d832677aa8770b16.tar.gz) = 85f5c53a6d4a01e979a2765c48a01339623747efa00336c250e4589ce00a94a1ab644dea6da02c536da2871243a150f40fc44d0e42064e6fb9bc4df2428da02e
Size (sunxi-tools-20150915-568c7a0e81fc5d52189710c6d832677aa8770b16.tar.gz) = 51232 bytes
SHA1 (patch-Makefile) = e4e54571315dd6614ecab75321586dbecae89a06
SHA1 (patch-include_endian_compat.h) = f2e6fd1305c25a9b34f26fe70ad223ec5156211b
SHA1 (patch-phoenix_info.c) = 824a1237dd5652fdd336b1d09eac03f2d3db9209

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-Makefile,v 1.2 2015/10/25 09:05:23 bouyer Exp $
--- Makefile.orig 2015-09-13 22:56:46.000000000 +0200
+++ Makefile 2015-10-25 09:55:26.000000000 +0100
@@ -18,11 +18,11 @@
CC = gcc
CFLAGS = -g -O0 -Wall -Wextra
-CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200112L
+CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE
CFLAGS += -Iinclude/
TOOLS = fexc bin2fex fex2bin bootinfo fel pio
-TOOLS += nand-part
+#TOOLS += nand-part
MISC_TOOLS = phoenix_info
@@ -30,7 +30,7 @@
.PHONY: all clean
-all: $(TOOLS)
+all: $(TOOLS) $(MISC_TOOLS)
misc: $(MISC_TOOLS)

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-include_endian_compat.h,v 1.2 2015/10/25 09:05:23 bouyer Exp $
--- include/endian_compat.h.orig 2015-10-01 16:09:19.000000000 +0200
+++ include/endian_compat.h 2015-10-01 16:20:48.000000000 +0200
@@ -29,6 +29,8 @@
#define le32toh(x) CFSwapInt32LittleToHost(x)
#define htole16(x) CFSwapInt16HostToLittle(x)
#define le16toh(x) CFSwapInt16LittleToHost(x)
+#elif defined(__NetBSD__)
+#include <sys/endian.h>
#else
#include <endian.h>
#endif

View File

@@ -0,0 +1,23 @@
$NetBSD: patch-phoenix_info.c,v 1.1 2015/10/25 09:05:23 bouyer Exp $
fix uninitialised variable use
--- phoenix_info.c.orig 2015-10-24 23:20:32.000000000 +0200
+++ phoenix_info.c 2015-10-24 23:22:06.000000000 +0200
@@ -45,7 +45,7 @@
{
int l = strlen(dest) + 16;
char outname[l];
- FILE *out;
+ FILE *out = NULL;
char *buf = NULL;
int ret = 0;
snprintf(outname, l, dest, part);
@@ -72,7 +72,7 @@
_exit:
if (buf)
free(buf);
- if (out != stdout)
+ if (out != NULL && out != stdout)
fclose(out);
return ret;
err: