From afab289b265ff987c3f62393b3ef707c2650704f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 16 Sep 2010 13:05:46 +0200 Subject: add some native build fixes (tested on Lemote notebook) - enable busybox applets needed for natvie builds - add header packages for expat and libnl - remove rtl8187b driver, use kernel included driver (needs more testing) --- package/busybox/config/Config.in | 4 +- package/busybox/config/coreutils/Config.in | 20 +-- package/busybox/config/debianutils/Config.in | 2 +- package/busybox/config/editors/Config.in | 2 +- package/busybox/patches/006-od-bloat.patch | 214 +++++++++++++++++++++++++++ 5 files changed, 228 insertions(+), 14 deletions(-) create mode 100644 package/busybox/patches/006-od-bloat.patch (limited to 'package/busybox') 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. +- */ -- cgit v1.2.3