summaryrefslogtreecommitdiff
path: root/package/busybox
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-09-17 15:29:05 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-09-17 15:29:05 +0200
commitb2e4bbd4e62982852b8a7da8f618d01d2013641e (patch)
tree968e7998c78e750162e60c747ab039f78d2f8289 /package/busybox
parent1a2a22729ff0256725a3561e46f465efc18801f7 (diff)
parentd6aaf0be5bfa8e5944d9ae44cf175f9388564ac6 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Conflicts: package/binutils/Makefile
Diffstat (limited to 'package/busybox')
-rw-r--r--package/busybox/Makefile28
-rw-r--r--package/busybox/config/Config.in4
-rw-r--r--package/busybox/config/coreutils/Config.in20
-rw-r--r--package/busybox/config/debianutils/Config.in2
-rw-r--r--package/busybox/config/editors/Config.in2
-rw-r--r--package/busybox/patches/006-od-bloat.patch214
6 files changed, 236 insertions, 34 deletions
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index cdd0d8538..efae99f2a 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -14,13 +14,14 @@ PKG_SITES:= http://www.busybox.net/downloads/
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
-PKG_DESCR_UDHCPD:= uDHCPD meta package
-PKG_SECTION_UDHCPD:= net
+PKG_SUBPKGS:= BUSYBOX UDHCPD
+PKGSD_UDHCPD:= uDHCPD meta package
+PKGSC_UDHCPD:= net
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,BUSYBOX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-$(eval $(call PKG_template,UDHCPD,udhcpd,${PKG_VERSION}-${PKG_RELEASE},busybox,${PKG_DESCR_UDHCPD},${PKG_SECTION_UDHCPD}))
+$(eval $(call PKG_template,UDHCPD,udhcpd,${PKG_VERSION}-${PKG_RELEASE},busybox,${PKGSD_UDHCPD},${PKGSC_UDHCPD}))
SUB_INSTALLS-y:=
SUB_INSTALLS-m:=
@@ -30,15 +31,10 @@ CONFIG_STYLE:= manual
BUILD_STYLE:= manual
INSTALL_STYLE:= manual
-${TOPDIR}/.busyboxcfg: ${TOPDIR}/.config
+do-configure:
grep BUSYBOX_ $(TOPDIR)/.config|sed -e 's/BUSYBOX_/CONFIG_/' > \
- ${TOPDIR}/.busyboxcfg
-
-${WRKBUILD}/.config: ${TOPDIR}/.busyboxcfg
- cp $(TOPDIR)/.busyboxcfg ${WRKBUILD}/.config
+ ${WRKBUILD}/.config
$(SED) 's;@IDIR@;${WRKINST};' ${WRKBUILD}/.config
-
-do-configure: ${WRKBUILD}/.config
ifeq ($(ADK_NATIVE),y)
yes '' | \
$(MAKE) V=1 \
@@ -51,7 +47,7 @@ else
ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) oldconfig $(MAKE_TRACE)
endif
-do-build: do-configure
+do-build:
ifeq ($(ADK_NATIVE),y)
$(MAKE) V=1 \
IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
@@ -60,7 +56,7 @@ else
IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) busybox
endif
-do-install: ${WRKBUILD}/.config ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
+do-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
ifeq ($(ADK_NATIVE),y)
$(MAKE) V=1 \
IPKG_ARCH="$(CPU_ARCH)" ARCH="$(ARCH)" HOSTCC="$(HOSTCC)" -C $(WRKBUILD) install $(MAKE_TRACE)
@@ -81,12 +77,4 @@ udhcpd-install:
${INSTALL_DIR} ${IDIR_UDHCPD}/etc/
${INSTALL_DATA} ./files/udhcpd.conf ${IDIR_UDHCPD}/etc/
-rebuild:
- @if [ -f ${TOPDIR}/.rebuild.${PKG_NAME} ];then \
- rm ${WRKBUILD}/.build_done; \
- rm ${TOPDIR}/.rebuild.${PKG_NAME}; \
- fi
-
-fake: rebuild
-
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in
index 2aaf7ee9f..bf0d9d8c0 100644
--- a/package/busybox/config/Config.in
+++ b/package/busybox/config/Config.in
@@ -369,7 +369,7 @@ config BUSYBOX_BUILD_LIBBUSYBOX
config BUSYBOX_FEATURE_INDIVIDUAL
bool "Produce a binary for each applet, linked against libbusybox"
- default y
+ default n
depends on BUSYBOX_BUILD_LIBBUSYBOX
help
If your CPU architecture doesn't allow for sharing text/rodata
@@ -387,7 +387,7 @@ config BUSYBOX_FEATURE_INDIVIDUAL
config BUSYBOX_FEATURE_SHARED_BUSYBOX
bool "Produce additional busybox binary linked against libbusybox"
- default y
+ default n
depends on BUSYBOX_BUILD_LIBBUSYBOX
help
Build busybox, dynamically linked against libbusybox.so.N.N.N.
diff --git a/package/busybox/config/coreutils/Config.in b/package/busybox/config/coreutils/Config.in
index 85d4342e5..75130fcad 100644
--- a/package/busybox/config/coreutils/Config.in
+++ b/package/busybox/config/coreutils/Config.in
@@ -74,7 +74,7 @@ config BUSYBOX_CKSUM
config BUSYBOX_COMM
bool "comm"
- default n
+ default y
help
comm is used to compare two files line by line and return
a three-column output.
@@ -263,7 +263,7 @@ config BUSYBOX_FEATURE_EXPAND_LONG_OPTIONS
config BUSYBOX_EXPR
bool "expr"
- default n
+ default y
help
expr is used to calculate numbers and print the result
to standard output.
@@ -324,7 +324,7 @@ config BUSYBOX_ID
config BUSYBOX_INSTALL
bool "install"
- default n
+ default y
help
Copy files and set attributes.
@@ -479,7 +479,7 @@ config BUSYBOX_NOHUP
config BUSYBOX_OD
bool "od"
- default n
+ default y
help
od is used to dump binary files in octal and other formats.
@@ -531,7 +531,7 @@ config BUSYBOX_RM
config BUSYBOX_RMDIR
bool "rmdir"
- default n
+ default y
help
rmdir is used to remove empty directories.
@@ -615,7 +615,7 @@ config BUSYBOX_FEATURE_SORT_BIG
config BUSYBOX_SPLIT
bool "split"
- default n
+ default y
help
split a file into pieces.
@@ -663,7 +663,7 @@ config BUSYBOX_SYNC
config BUSYBOX_TAC
bool "tac"
- default n
+ default y
help
tac is used to concatenate and print files in reverse.
@@ -684,7 +684,7 @@ config BUSYBOX_FEATURE_FANCY_TAIL
config BUSYBOX_TEE
bool "tee"
- default n
+ default y
help
tee is used to read from standard input and write
to standard output and files.
@@ -746,7 +746,7 @@ config BUSYBOX_FEATURE_TR_EQUIV
config BUSYBOX_TRUE
bool "true"
- default n
+ default y
help
true returns an exit code of TRUE (0).
@@ -830,7 +830,7 @@ config BUSYBOX_WHOAMI
config BUSYBOX_YES
bool "yes"
- default n
+ default y
help
yes is used to repeatedly output a specific string, or
the default string `y'.
diff --git a/package/busybox/config/debianutils/Config.in b/package/busybox/config/debianutils/Config.in
index 9246370ca..891d194e0 100644
--- a/package/busybox/config/debianutils/Config.in
+++ b/package/busybox/config/debianutils/Config.in
@@ -7,7 +7,7 @@ menu "Debian Utilities"
config BUSYBOX_MKTEMP
bool "mktemp"
- default n
+ default y
help
mktemp is used to create unique temporary files
diff --git a/package/busybox/config/editors/Config.in b/package/busybox/config/editors/Config.in
index 598514d95..52594b0ef 100644
--- a/package/busybox/config/editors/Config.in
+++ b/package/busybox/config/editors/Config.in
@@ -22,7 +22,7 @@ config BUSYBOX_FEATURE_AWK_LIBM
config BUSYBOX_CMP
bool "cmp"
- default n
+ default y
help
cmp is used to compare two files and returns the result
to standard output.
diff --git a/package/busybox/patches/006-od-bloat.patch b/package/busybox/patches/006-od-bloat.patch
new file mode 100644
index 000000000..8c608ca87
--- /dev/null
+++ b/package/busybox/patches/006-od-bloat.patch
@@ -0,0 +1,214 @@
+diff -Nur busybox-1.17.1.orig/coreutils/od.c busybox-1.17.1/coreutils/od.c
+--- busybox-1.17.1.orig/coreutils/od.c 2010-07-06 04:25:53.000000000 +0200
++++ busybox-1.17.1/coreutils/od.c 2010-08-15 12:50:31.000000000 +0200
+@@ -13,210 +13,5 @@
+
+
+ #include "libbb.h"
+-#if ENABLE_DESKTOP
+ /* This one provides -t (busybox's own build script needs it) */
+ #include "od_bloaty.c"
+-#else
+-
+-#include "dump.h"
+-
+-static void
+-odoffset(dumper_t *dumper, int argc, char ***argvp)
+-{
+- char *num, *p;
+- int base;
+- char *end;
+-
+- /*
+- * The offset syntax of od(1) was genuinely bizarre. First, if
+- * it started with a plus it had to be an offset. Otherwise, if
+- * there were at least two arguments, a number or lower-case 'x'
+- * followed by a number makes it an offset. By default it was
+- * octal; if it started with 'x' or '0x' it was hex. If it ended
+- * in a '.', it was decimal. If a 'b' or 'B' was appended, it
+- * multiplied the number by 512 or 1024 byte units. There was
+- * no way to assign a block count to a hex offset.
+- *
+- * We assumes it's a file if the offset is bad.
+- */
+- p = **argvp;
+-
+- if (!p) {
+- /* hey someone is probably piping to us ... */
+- return;
+- }
+-
+- if ((*p != '+')
+- && (argc < 2
+- || (!isdigit(p[0])
+- && ((p[0] != 'x') || !isxdigit(p[1])))))
+- return;
+-
+- base = 0;
+- /*
+- * skip over leading '+', 'x[0-9a-fA-f]' or '0x', and
+- * set base.
+- */
+- if (p[0] == '+')
+- ++p;
+- if (p[0] == 'x' && isxdigit(p[1])) {
+- ++p;
+- base = 16;
+- } else if (p[0] == '0' && p[1] == 'x') {
+- p += 2;
+- base = 16;
+- }
+-
+- /* skip over the number */
+- if (base == 16)
+- for (num = p; isxdigit(*p); ++p)
+- continue;
+- else
+- for (num = p; isdigit(*p); ++p)
+- continue;
+-
+- /* check for no number */
+- if (num == p)
+- return;
+-
+- /* if terminates with a '.', base is decimal */
+- if (*p == '.') {
+- if (base)
+- return;
+- base = 10;
+- }
+-
+- dumper->dump_skip = strtol(num, &end, base ? base : 8);
+-
+- /* if end isn't the same as p, we got a non-octal digit */
+- if (end != p)
+- dumper->dump_skip = 0;
+- else {
+- if (*p) {
+- if (*p == 'b') {
+- dumper->dump_skip *= 512;
+- ++p;
+- } else if (*p == 'B') {
+- dumper->dump_skip *= 1024;
+- ++p;
+- }
+- }
+- if (*p)
+- dumper->dump_skip = 0;
+- else {
+- ++*argvp;
+- /*
+- * If the offset uses a non-octal base, the base of
+- * the offset is changed as well. This isn't pretty,
+- * but it's easy.
+- */
+-#define TYPE_OFFSET 7
+- {
+- char x_or_d;
+- if (base == 16) {
+- x_or_d = 'x';
+- goto DO_X_OR_D;
+- }
+- if (base == 10) {
+- x_or_d = 'd';
+- DO_X_OR_D:
+- dumper->fshead->nextfu->fmt[TYPE_OFFSET]
+- = dumper->fshead->nextfs->nextfu->fmt[TYPE_OFFSET]
+- = x_or_d;
+- }
+- }
+- }
+- }
+-}
+-
+-static const char *const add_strings[] = {
+- "16/1 \"%3_u \" \"\\n\"", /* a */
+- "8/2 \" %06o \" \"\\n\"", /* B, o */
+- "16/1 \"%03o \" \"\\n\"", /* b */
+- "16/1 \"%3_c \" \"\\n\"", /* c */
+- "8/2 \" %05u \" \"\\n\"", /* d */
+- "4/4 \" %010u \" \"\\n\"", /* D */
+- "2/8 \" %21.14e \" \"\\n\"", /* e (undocumented in od), F */
+- "4/4 \" %14.7e \" \"\\n\"", /* f */
+- "4/4 \" %08x \" \"\\n\"", /* H, X */
+- "8/2 \" %04x \" \"\\n\"", /* h, x */
+- "4/4 \" %11d \" \"\\n\"", /* I, L, l */
+- "8/2 \" %6d \" \"\\n\"", /* i */
+- "4/4 \" %011o \" \"\\n\"", /* O */
+-};
+-
+-static const char od_opts[] ALIGN1 = "aBbcDdeFfHhIiLlOoXxv";
+-
+-static const char od_o2si[] ALIGN1 = {
+- 0, 1, 2, 3, 5,
+- 4, 6, 6, 7, 8,
+- 9, 0xa, 0xb, 0xa, 0xa,
+- 0xb, 1, 8, 9,
+-};
+-
+-int od_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+-int od_main(int argc, char **argv)
+-{
+- int ch;
+- int first = 1;
+- char *p;
+- dumper_t *dumper = alloc_dumper();
+-
+- while ((ch = getopt(argc, argv, od_opts)) > 0) {
+- if (ch == 'v') {
+- dumper->dump_vflag = ALL;
+- } else if (((p = strchr(od_opts, ch)) != NULL) && (*p != '\0')) {
+- if (first) {
+- first = 0;
+- bb_dump_add(dumper, "\"%07.7_Ao\n\"");
+- bb_dump_add(dumper, "\"%07.7_ao \"");
+- } else {
+- bb_dump_add(dumper, "\" \"");
+- }
+- bb_dump_add(dumper, add_strings[(int)od_o2si[(p - od_opts)]]);
+- } else { /* P, p, s, w, or other unhandled */
+- bb_show_usage();
+- }
+- }
+- if (!dumper->fshead) {
+- bb_dump_add(dumper, "\"%07.7_Ao\n\"");
+- bb_dump_add(dumper, "\"%07.7_ao \" 8/2 \"%06o \" \"\\n\"");
+- }
+-
+- argc -= optind;
+- argv += optind;
+-
+- odoffset(dumper, argc, &argv);
+-
+- return bb_dump_dump(dumper, argv);
+-}
+-#endif /* ENABLE_DESKTOP */
+-
+-/*-
+- * Copyright (c) 1990 The Regents of the University of California.
+- * All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- * 1. Redistributions of source code must retain the above copyright
+- * notice, this list of conditions and the following disclaimer.
+- * 2. Redistributions in binary form must reproduce the above copyright
+- * notice, this list of conditions and the following disclaimer in the
+- * documentation and/or other materials provided with the distribution.
+- * 3. Neither the name of the University nor the names of its contributors
+- * may be used to endorse or promote products derived from this software
+- * without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+- * SUCH DAMAGE.
+- */