summaryrefslogtreecommitdiff
path: root/target/tools
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-01-24 14:04:43 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2011-01-24 14:04:43 +0100
commit573b06af740b3f1966aa2ea190494d9c87270786 (patch)
treed2f5dd29803ad5bbca171bfff9b1ece4ef3d5b3c /target/tools
parent42ed8eb00eba8691994588b7fca5dbd04d92a59c (diff)
parent3953de124e87ce3b594fd861b6f111b2df706753 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'target/tools')
-rw-r--r--target/tools/addpattern/Makefile4
-rw-r--r--target/tools/addpattern/addpattern.c3
-rw-r--r--target/tools/e100boot/Makefile4
-rw-r--r--target/tools/mkfimage/Makefile4
-rw-r--r--target/tools/squashfs/Makefile7
-rw-r--r--target/tools/squashfs/patches/honour-cflags.patch2
-rw-r--r--target/tools/srec2bin/Makefile4
-rw-r--r--target/tools/srec2bin/srec2bin.c7
-rw-r--r--target/tools/trx/Makefile4
-rw-r--r--target/tools/trx/trx.c10
-rw-r--r--target/tools/uboot-mkimage/Makefile4
11 files changed, 24 insertions, 29 deletions
diff --git a/target/tools/addpattern/Makefile b/target/tools/addpattern/Makefile
index c60561ccf..596daeb52 100644
--- a/target/tools/addpattern/Makefile
+++ b/target/tools/addpattern/Makefile
@@ -1,4 +1,4 @@
include $(TOPDIR)/rules.mk
-all:
- $(HOSTCC) ${HOSTCFLAGS} -o ${STAGING_HOST_DIR}/bin/addpattern addpattern.c
+all: addpattern.c
+ $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -o ${STAGING_HOST_DIR}/bin/addpattern addpattern.c
diff --git a/target/tools/addpattern/addpattern.c b/target/tools/addpattern/addpattern.c
index 6f2a036c0..8133bf26e 100644
--- a/target/tools/addpattern/addpattern.c
+++ b/target/tools/addpattern/addpattern.c
@@ -116,8 +116,6 @@ int main(int argc, char **argv)
time_t t;
struct tm *ptm;
- fprintf(stderr, "mjn3's addpattern replacement - v0.81\n");
-
hdr = (struct code_header *) buf;
memset(hdr, 0, sizeof(struct code_header));
@@ -229,7 +227,6 @@ int main(int argc, char **argv)
if (gflag) {
gflag = sizeof(buf) - n;
memset(buf + n, 0xff, gflag);
- fprintf(stderr, "adding %d bytes of garbage\n", gflag);
n = sizeof(buf);
}
}
diff --git a/target/tools/e100boot/Makefile b/target/tools/e100boot/Makefile
index bec2b4302..2cdf28837 100644
--- a/target/tools/e100boot/Makefile
+++ b/target/tools/e100boot/Makefile
@@ -13,6 +13,8 @@ WRKDIST= ${WRKDIR}/${PKG_NAME}
include ../rules.mk
+all: $(BIN_DIR)/etrax100boot
+
$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
$(MAKE) -C $(WRKBUILD)
touch $@
@@ -20,6 +22,4 @@ $(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
$(BIN_DIR)/etrax100boot: $(WRKBUILD)/.compiled
$(INSTALL_BIN) $(WRKBUILD)/sbl/e100boot.stripped $(BIN_DIR)/etrax100boot
-install: $(BIN_DIR)/etrax100boot
-
include $(TOPDIR)/mk/tools.mk
diff --git a/target/tools/mkfimage/Makefile b/target/tools/mkfimage/Makefile
index 82e645285..a72cfdff1 100644
--- a/target/tools/mkfimage/Makefile
+++ b/target/tools/mkfimage/Makefile
@@ -1,4 +1,4 @@
include $(TOPDIR)/rules.mk
-all:
- $(HOSTCC) ${HOSTCFLAGS} -o ${STAGING_HOST_DIR}/bin/mkfimage mkfimage.c
+all: mkfimage.c
+ $(CC_FOR_BUILD) ${FLAGS_FOR_BUILD} -o ${STAGING_HOST_DIR}/bin/mkfimage mkfimage.c
diff --git a/target/tools/squashfs/Makefile b/target/tools/squashfs/Makefile
index cfe4a5339..bcc966274 100644
--- a/target/tools/squashfs/Makefile
+++ b/target/tools/squashfs/Makefile
@@ -8,19 +8,20 @@ PKG_VERSION:= 4.0
PKG_RELEASE:= 2
PKG_MD5SUM:= a3c23391da4ebab0ac4a75021ddabf96
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=squashfs/}
+
DISTFILES:= ${PKG_NAME}${PKG_VERSION}.tar.gz
WRKDIST= ${WRKDIR}/$(PKG_NAME)${PKG_VERSION}
include ../rules.mk
+all: ${STAGING_HOST_DIR}/bin/mksquashfs
+
$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- ${MAKE} -C ${WRKBUILD}/squashfs-tools CC='${HOSTCC}'
+ ${MAKE} -C ${WRKBUILD}/squashfs-tools CC='${CC_FOR_BUILD}'
touch $@
${STAGING_HOST_DIR}/bin/mksquashfs: $(WRKBUILD)/.compiled
$(INSTALL_BIN) $(WRKBUILD)/squashfs-tools/mksquashfs \
${STAGING_HOST_DIR}/bin
-install: ${STAGING_HOST_DIR}/bin/mksquashfs
-
include $(TOPDIR)/mk/tools.mk
diff --git a/target/tools/squashfs/patches/honour-cflags.patch b/target/tools/squashfs/patches/honour-cflags.patch
index 2ee7de909..a50d94263 100644
--- a/target/tools/squashfs/patches/honour-cflags.patch
+++ b/target/tools/squashfs/patches/honour-cflags.patch
@@ -5,7 +5,7 @@
INCLUDEDIR = .
-CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
-+CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 ${HOSTCFLAGS}
++CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 ${CFLAGS_FOR_BUILD}
all: mksquashfs unsquashfs
diff --git a/target/tools/srec2bin/Makefile b/target/tools/srec2bin/Makefile
index 9ffb27f3f..f48f8f939 100644
--- a/target/tools/srec2bin/Makefile
+++ b/target/tools/srec2bin/Makefile
@@ -1,4 +1,4 @@
include $(TOPDIR)/rules.mk
-all:
- $(HOSTCC) ${HOSTCFLAGS} -o ${STAGING_HOST_DIR}/bin/srec2bin srec2bin.c
+all: srec2bin.c
+ $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -o ${STAGING_HOST_DIR}/bin/srec2bin srec2bin.c
diff --git a/target/tools/srec2bin/srec2bin.c b/target/tools/srec2bin/srec2bin.c
index 1cffbaed9..8ba4387e6 100644
--- a/target/tools/srec2bin/srec2bin.c
+++ b/target/tools/srec2bin/srec2bin.c
@@ -433,9 +433,8 @@ int srecLine(char *pSrecLine)
int srec2bin(int argc,char *argv[],int verbose)
{
- int i,rlen,sts;
+ int rlen,sts;
FILE *fp;
- char ac;
char buff[256];
bit32u TAG_BIG = 0xDEADBE42;
bit32u TAG_LITTLE = 0xFEEDFA42;
@@ -513,12 +512,10 @@ int srec2bin(int argc,char *argv[],int verbose)
return(1);
}
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
- debug = TRUE;
debug = FALSE;
verbose = FALSE;
srec2bin(argc,argv,verbose);
return 0;
}
-
diff --git a/target/tools/trx/Makefile b/target/tools/trx/Makefile
index 2def53424..d1832ee8c 100644
--- a/target/tools/trx/Makefile
+++ b/target/tools/trx/Makefile
@@ -1,4 +1,4 @@
include $(TOPDIR)/rules.mk
-all:
- $(HOSTCC) ${HOSTCFLAGS} -o ${STAGING_HOST_DIR}/bin/trx trx.c
+all: trx.c
+ $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -o ${STAGING_HOST_DIR}/bin/trx trx.c
diff --git a/target/tools/trx/trx.c b/target/tools/trx/trx.c
index 1c3a8701e..9e4d521ca 100644
--- a/target/tools/trx/trx.c
+++ b/target/tools/trx/trx.c
@@ -2,7 +2,7 @@
* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
* Copyright (C) 2005 Konstantin A. Klubnichkin and Oleg I. Vdovikin
* Copyright (C) 2006 OpenWrt developers <openwrt-developers@openwrt.org>
- * Copyright (C) 2006 Waldemar Brodkorb <wbx@freewrt.org>
+ * Copyright (C) 2011 Waldemar Brodkorb <wbx@openadk.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
@@ -52,7 +52,7 @@ void usage(void) __attribute__ (( __noreturn__ ));
void usage(void)
{
- fprintf(stderr, "Usage: trx [-p product_id] [-v version] [-o outfile] [-m maxlen] [-a align] [-b offset] file [file [file]]\n");
+ fprintf(stderr, "Usage: trx [-p product_id] [-v version] [-o outfile] [-m maxlen] [-a align] [-b offset] -f file [-f file [-f file]]\n");
exit(EXIT_FAILURE);
}
@@ -94,9 +94,9 @@ int main(int argc, char **argv)
in = NULL;
i = 0;
- while ((c = getopt(argc, argv, "-:o:p:v:m:a:b:")) != -1) {
+ while ((c = getopt(argc, argv, "-:o:p:v:m:a:b:f:")) != -1) {
switch (c) {
- case 1:
+ case 'f':
p->offsets[i++] = cur_len;
if (!(in = fopen(optarg, "r"))) {
@@ -209,7 +209,7 @@ int main(int argc, char **argv)
}
if (!in) {
- fprintf(stderr, "we require atleast one filename\n");
+ fprintf(stderr, "we require at least one filename\n");
usage();
}
diff --git a/target/tools/uboot-mkimage/Makefile b/target/tools/uboot-mkimage/Makefile
index c9d85a28e..e93964ff2 100644
--- a/target/tools/uboot-mkimage/Makefile
+++ b/target/tools/uboot-mkimage/Makefile
@@ -1,4 +1,4 @@
include $(TOPDIR)/rules.mk
-all:
- $(HOSTCC) ${HOSTCFLAGS} -o ${STAGING_HOST_DIR}/bin/mkimage mkimage.c crc32.c
+all: mkimage.c crc32.c
+ $(CC_FOR_BUILD) ${FLAGS_FOR_BUILD} -o ${STAGING_HOST_DIR}/bin/mkimage mkimage.c crc32.c