summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-30 15:55:20 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-30 15:55:20 +0200
commit8aed1fcd443b550c15a21ddbf1b1d3899803120a (patch)
treece7c0a22c1d5ed7d437198b4447a3aa2fd578665 /tools
parent12c9d74bb923174117e28186e4a7698e623803a2 (diff)
rework hosttools building, add tools into package stuff
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile57
-rw-r--r--tools/addpattern/Makefile4
-rw-r--r--tools/addpattern/addpattern.c252
-rw-r--r--tools/adk/Makefile17
-rw-r--r--tools/adk/depmaker.c313
-rw-r--r--tools/adk/dkgetsz.c95
-rw-r--r--tools/adk/pkgmaker.c1194
-rw-r--r--tools/adk/pkgrebuild.c273
-rw-r--r--tools/adk/sortfile.c153
-rw-r--r--tools/adk/sortfile.h1
-rw-r--r--tools/adk/strmap.c510
-rw-r--r--tools/adk/strmap.h350
-rw-r--r--tools/bc/Makefile25
-rw-r--r--tools/bzip2/Makefile24
-rw-r--r--tools/ccache/Makefile25
-rw-r--r--tools/cdrtools/Makefile25
-rw-r--r--tools/cpio/Makefile32
-rw-r--r--tools/cpio/src/_alloca.h27
-rw-r--r--tools/cpio/src/_malloc.h26
-rw-r--r--tools/cpio/src/_utmpx.h89
-rw-r--r--tools/cpio/src/asciitype.c59
-rw-r--r--tools/cpio/src/asciitype.h60
-rw-r--r--tools/cpio/src/atoll.h8
-rw-r--r--tools/cpio/src/blank.h38
-rw-r--r--tools/cpio/src/blast.c449
-rw-r--r--tools/cpio/src/blast.h76
-rw-r--r--tools/cpio/src/cpio.1943
-rw-r--r--tools/cpio/src/cpio.c7172
-rw-r--r--tools/cpio/src/cpio.h232
-rw-r--r--tools/cpio/src/crc32.c115
-rw-r--r--tools/cpio/src/expand.c193
-rw-r--r--tools/cpio/src/explode.c1138
-rw-r--r--tools/cpio/src/flags.c257
-rw-r--r--tools/cpio/src/getdir.c197
-rw-r--r--tools/cpio/src/getdir.h33
-rw-r--r--tools/cpio/src/getopt.c141
-rw-r--r--tools/cpio/src/gmatch.c136
-rw-r--r--tools/cpio/src/ib_alloc.c60
-rw-r--r--tools/cpio/src/ib_close.c36
-rw-r--r--tools/cpio/src/ib_free.c33
-rw-r--r--tools/cpio/src/ib_getlin.c78
-rw-r--r--tools/cpio/src/ib_getw.c81
-rw-r--r--tools/cpio/src/ib_open.c48
-rw-r--r--tools/cpio/src/ib_popen.c87
-rw-r--r--tools/cpio/src/ib_read.c51
-rw-r--r--tools/cpio/src/ib_seek.c53
-rw-r--r--tools/cpio/src/iblok.h135
-rw-r--r--tools/cpio/src/inflate.c991
-rw-r--r--tools/cpio/src/mbtowi.h22
-rw-r--r--tools/cpio/src/memalign.c51
-rw-r--r--tools/cpio/src/memalign.h35
-rw-r--r--tools/cpio/src/msgselect.h30
-rw-r--r--tools/cpio/src/nonpax.c55
-rw-r--r--tools/cpio/src/oblok.c260
-rw-r--r--tools/cpio/src/oblok.h96
-rw-r--r--tools/cpio/src/pathconf.c51
-rw-r--r--tools/cpio/src/pathconf.h29
-rw-r--r--tools/cpio/src/pax.1919
-rw-r--r--tools/cpio/src/pax.c757
-rw-r--r--tools/cpio/src/pfmt.c39
-rw-r--r--tools/cpio/src/pfmt.h46
-rw-r--r--tools/cpio/src/pfmt_label.c1
-rw-r--r--tools/cpio/src/regexp.h1211
-rw-r--r--tools/cpio/src/regexpr.c90
-rw-r--r--tools/cpio/src/regexpr.h53
-rw-r--r--tools/cpio/src/setlabel.c40
-rw-r--r--tools/cpio/src/setuxlabel.c47
-rw-r--r--tools/cpio/src/sfile.c99
-rw-r--r--tools/cpio/src/sfile.h40
-rw-r--r--tools/cpio/src/sighold.c42
-rw-r--r--tools/cpio/src/sigignore.c45
-rw-r--r--tools/cpio/src/signal.c46
-rw-r--r--tools/cpio/src/sigpause.c48
-rw-r--r--tools/cpio/src/sigrelse.c42
-rw-r--r--tools/cpio/src/sigset.c57
-rw-r--r--tools/cpio/src/sigset.h40
-rw-r--r--tools/cpio/src/strtol.c117
-rw-r--r--tools/cpio/src/unshrink.c307
-rw-r--r--tools/cpio/src/unzip.h121
-rw-r--r--tools/cpio/src/utmpx.c252
-rw-r--r--tools/cpio/src/version.c26
-rw-r--r--tools/cpio/src/vpfmt.c90
-rw-r--r--tools/flex/Makefile25
-rw-r--r--tools/genext2fs/Makefile25
-rw-r--r--tools/lzma/Makefile25
-rw-r--r--tools/lzo/Makefile28
-rw-r--r--tools/lzop/Makefile30
-rw-r--r--tools/m4/Makefile25
-rw-r--r--tools/mkcrypt/Makefile11
-rw-r--r--tools/mkcrypt/mkcrypt.c441
-rw-r--r--tools/mkfimage/Makefile4
-rw-r--r--tools/mkfimage/mkfimage.c72
-rw-r--r--tools/mkimage/Makefile11
-rw-r--r--tools/mkimage/crc32.c200
-rw-r--r--tools/mkimage/image.h161
-rwxr-xr-xtools/mkimage/mkimagebin23424 -> 0 bytes
-rw-r--r--tools/mkimage/mkimage.c755
-rw-r--r--tools/mksh/Makefile29
-rw-r--r--tools/mtd-utils/Makefile24
-rw-r--r--tools/mtd-utils/patches/darwin.patch261
-rw-r--r--tools/mtd-utils/patches/lzo.patch88
-rw-r--r--tools/pcre/Makefile30
-rw-r--r--tools/rules.mk7
-rw-r--r--tools/squashfs/Makefile29
-rw-r--r--tools/squashfs/patches/cppflags.patch12
-rw-r--r--tools/squashfs/patches/darwin.patch88
-rw-r--r--tools/srec2bin/Makefile4
-rw-r--r--tools/srec2bin/srec2bin.c521
-rw-r--r--tools/syslinux/Makefile37
-rw-r--r--tools/trx/Makefile4
-rw-r--r--tools/trx/trx.c366
-rw-r--r--tools/xz/Makefile28
112 files changed, 0 insertions, 24937 deletions
diff --git a/tools/Makefile b/tools/Makefile
deleted file mode 100644
index bfed325e0..000000000
--- a/tools/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-include $(TOPDIR)/rules.mk
-
-TARGETS:=adk mksh mkcrypt cpio m4 flex bc bzip2 xz
-
-ifeq ($(ADK_HOST_NEED_GENEXT2FS),y)
-TARGETS+=genext2fs
-endif
-ifeq ($(ADK_HOST_NEED_MKIMAGE),y)
-TARGETS+=mkimage
-endif
-ifeq ($(ADK_HOST_NEED_MKISOFS),y)
-TARGETS+=cdrtools
-endif
-ifeq ($(ADK_HOST_NEED_SYSLINUX),y)
-TARGETS+=syslinux
-endif
-ifeq ($(ADK_HOST_NEED_JFFS2),y)
-TARGETS+=mtd-utils
-endif
-ifeq ($(ADK_HOST_NEED_SQUASHFS),y)
-TARGETS+=squashfs
-endif
-ifeq ($(ADK_HOST_NEED_LZOP),y)
-TARGETS+=lzo lzop
-endif
-ifeq ($(ADK_HOST_NEED_LZMA),y)
-TARGETS+=lzma
-endif
-ifeq ($(ADK_HOST_NEED_CCACHE),y)
-TARGETS+=ccache
-endif
-ifeq ($(ADK_HOST_NEED_PCRE),y)
-TARGETS+=pcre
-endif
-
-TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
-TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
-
-all: install
-compile:
-install: $(TARGETS_INSTALL)
-clean: $(TARGETS_CLEAN)
-
-%-compile: $(TOOLS_BUILD_DIR)
- $(TRACE) "tools/$(patsubst %-compile,%,$@)/compile "
- $(MAKE) -C $(patsubst %-compile,%,$@) compile $(MAKE_TRACE)
-
-%-install:
- $(TRACE) "tools/$(patsubst %-install,%,$@)/install "
- $(MAKE) -C $(patsubst %-install,%,$@) install $(MAKE_TRACE)
-
-%-clean:
- $(TRACE) "tools/$(patsubst %-clean,%,$@)/clean "
- $(MAKE) -C $(patsubst %-clean,%,$@) clean
diff --git a/tools/addpattern/Makefile b/tools/addpattern/Makefile
deleted file mode 100644
index 10ba05933..000000000
--- a/tools/addpattern/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-all: addpattern.c
- $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -o ${STAGING_HOST_DIR}/usr/bin/addpattern addpattern.c
diff --git a/tools/addpattern/addpattern.c b/tools/addpattern/addpattern.c
deleted file mode 100644
index 8133bf26e..000000000
--- a/tools/addpattern/addpattern.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/* July 29, 2004
- *
- * This is a hacked replacement for the 'addpattern' utility used to
- * create wrt54g .bin firmware files. It isn't pretty, but it does
- * the job for me.
- *
- * Extensions:
- * -v allows setting the version string on the command line.
- * -{0|1} sets the (currently ignored) hw_ver flag in the header
- * to 0 or 1 respectively.
- */
-
-/* January 12, 2005
- *
- * Modified by rodent at rodent dot za dot net
- * Support added for the new WRT54G v2.2 and WRT54GS v1.1 "flags"
- * Without the flags set to 0x7, the above units will refuse to flash.
- *
- * Extensions:
- * -{0|1|2} sets {0|1} sets hw_ver flag to 0/1. {2} sets hw_ver to 1
- * and adds the new hardware "flags" for the v2.2/v1.1 units
-*/
-
-/* January 1, 2007
- *
- * Modified by juan.i.gonzalez at subdown dot net
- * Support added for the AG241v2 and similar
- *
- * Extensions:
- * -r #.# adds revision hardware flags. AG241v2 and similar.
- *
- * AG241V2 firmware sets the hw_ver to 0x44.
- *
- * Example: -r 2.0
- *
- * Convert 2.0 to 20 to be an integer, and add 0x30 to skip special ASCII
- * #define HW_Version ((HW_REV * 10) + 0x30) -> from cyutils.h
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
-/**********************************************************************/
-
-#define CODE_ID "U2ND" /* from code_pattern.h */
-#define CODE_PATTERN "W54S" /* from code_pattern.h */
-#define PBOT_PATTERN "PBOT"
-
-#define CYBERTAN_VERSION "v3.37.2" /* from cyutils.h */
-
-/* WRT54G v2.2 and WRT54GS v1.1 "flags" (from 3.37.32 firmware cyutils.h) */
-#define SUPPORT_4712_CHIP 0x0001
-#define SUPPORT_INTEL_FLASH 0x0002
-#define SUPPORT_5325E_SWITCH 0x0004
-
-struct code_header { /* from cyutils.h */
- char magic[4];
- char res1[4]; /* for extra magic */
- char fwdate[3];
- char fwvern[3];
- char id[4]; /* U2ND */
- char hw_ver; /* 0: for 4702, 1: for 4712 -- new in 2.04.3 */
- char unused;
- unsigned char flags[2]; /* SUPPORT_ flags new for 3.37.2 (WRT54G v2.2 and WRT54GS v1.1) */
- unsigned char res2[10];
-} ;
-
-/**********************************************************************/
-
-void usage(void) __attribute__ (( __noreturn__ ));
-
-void usage(void)
-{
- fprintf(stderr, "Usage: addpattern [-i trxfile] [-o binfile] [-p pattern] [-g] [-b] [-v v#.#.#] [-r #.#] [-{0|1|2|4}] -h\n");
- exit(EXIT_FAILURE);
-}
-
-int main(int argc, char **argv)
-{
- char buf[1024]; /* keep this at 1k or adjust garbage calc below */
- struct code_header *hdr;
- FILE *in = stdin;
- FILE *out = stdout;
- char *ifn = NULL;
- char *ofn = NULL;
- char *pattern = CODE_PATTERN;
- char *pbotpat = PBOT_PATTERN;
- char *version = CYBERTAN_VERSION;
- int gflag = 0;
- int pbotflag = 0;
- int c;
- int v0, v1, v2;
- size_t off, n;
- time_t t;
- struct tm *ptm;
-
- hdr = (struct code_header *) buf;
- memset(hdr, 0, sizeof(struct code_header));
-
- while ((c = getopt(argc, argv, "i:o:p:gbv:0124hr:")) != -1) {
- switch (c) {
- case 'i':
- ifn = optarg;
- break;
- case 'o':
- ofn = optarg;
- break;
- case 'p':
- pattern = optarg;
- break;
- case 'g':
- gflag = 1;
- break;
- case 'b':
- pbotflag = 1;
- break;
- case 'v': /* extension to allow setting version */
- version = optarg;
- break;
- case '0':
- hdr->hw_ver = 0;
- break;
- case '1':
- hdr->hw_ver = 1;
- break;
- case '2': /* new 54G v2.2 and 54GS v1.1 flags */
- hdr->hw_ver = 1;
- hdr->flags[0] |= SUPPORT_4712_CHIP;
- hdr->flags[0] |= SUPPORT_INTEL_FLASH;
- hdr->flags[0] |= SUPPORT_5325E_SWITCH;
- break;
- case '4':
- /* V4 firmware sets the flags to 0x1f */
- hdr->hw_ver = 0;
- hdr->flags[0] = 0x1f;
- break;
- case 'r':
- hdr->hw_ver = (char)(atof(optarg)*10)+0x30;
- break;
-
- case 'h':
- default:
- usage();
- }
- }
-
- if (optind != argc || optind == 1) {
- fprintf(stderr, "illegal arg \"%s\"\n", argv[optind]);
- usage();
- }
-
- if (strlen(pattern) != 4) {
- fprintf(stderr, "illegal pattern \"%s\": length != 4\n", pattern);
- usage();
- }
-
- if (ifn && !(in = fopen(ifn, "r"))) {