Move all to deprecated folder.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
From d4fec31889ad660a58dab633c511221feb66e817 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Sat, 5 Oct 2013 15:55:06 +0200
|
||||
Subject: [PATCH] networking/libiproute: use <linux/if_packet.h> instead of
|
||||
<net/if_packet.h>
|
||||
|
||||
The musl C library doesn't provide the <net/if_packet.h> since the
|
||||
corresponding kernel headers <linux/if_packet.h> already provides the
|
||||
necessary definitions. Replacing <net/if_packet.h> by
|
||||
<linux/if_packet.h> also removes the need to include
|
||||
<netpacket/packet.h>
|
||||
|
||||
This commit fixes the build of iplink with the musl C library.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
[Gustavo: update for busybox 1.22.0]
|
||||
|
||||
diff -Nura busybox-1.22.0.orig/networking/libiproute/iplink.c busybox-1.22.0/networking/libiproute/iplink.c
|
||||
--- busybox-1.22.0.orig/networking/libiproute/iplink.c 2014-01-01 09:42:40.301137882 -0300
|
||||
+++ busybox-1.22.0/networking/libiproute/iplink.c 2014-01-01 09:43:01.282827700 -0300
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#include <net/if.h>
|
||||
/*#include <net/if_packet.h> - not needed? */
|
||||
-#include <netpacket/packet.h>
|
||||
+#include <linux/if_packet.h>
|
||||
#include <netinet/if_ether.h>
|
||||
|
||||
#include <linux/if_vlan.h>
|
||||
111
deprecated/firmware/buildroot/package/busybox/0002-unzip.patch
Normal file
111
deprecated/firmware/buildroot/package/busybox/0002-unzip.patch
Normal file
@@ -0,0 +1,111 @@
|
||||
From 1de25a6e87e0e627aa34298105a3d17c60a1f44e Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Date: Mon, 26 Oct 2015 19:33:05 +0100
|
||||
Subject: [PATCH] unzip: test for bad archive SEGVing
|
||||
|
||||
function old new delta
|
||||
huft_build 1296 1300 +4
|
||||
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
---
|
||||
archival/libarchive/decompress_gunzip.c | 11 +++++++----
|
||||
testsuite/unzip.tests | 23 ++++++++++++++++++++++-
|
||||
2 files changed, 29 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
|
||||
index 7b6f459..30bf451 100644
|
||||
--- a/archival/libarchive/decompress_gunzip.c
|
||||
+++ b/archival/libarchive/decompress_gunzip.c
|
||||
@@ -305,11 +305,12 @@ static int huft_build(const unsigned *b, const unsigned n,
|
||||
unsigned i; /* counter, current code */
|
||||
unsigned j; /* counter */
|
||||
int k; /* number of bits in current code */
|
||||
- unsigned *p; /* pointer into c[], b[], or v[] */
|
||||
+ const unsigned *p; /* pointer into c[], b[], or v[] */
|
||||
huft_t *q; /* points to current table */
|
||||
huft_t r; /* table entry for structure assignment */
|
||||
huft_t *u[BMAX]; /* table stack */
|
||||
unsigned v[N_MAX]; /* values in order of bit length */
|
||||
+ unsigned v_end;
|
||||
int ws[BMAX + 1]; /* bits decoded stack */
|
||||
int w; /* bits decoded */
|
||||
unsigned x[BMAX + 1]; /* bit offsets, then code stack */
|
||||
@@ -324,7 +325,7 @@ static int huft_build(const unsigned *b, const unsigned n,
|
||||
|
||||
/* Generate counts for each bit length */
|
||||
memset(c, 0, sizeof(c));
|
||||
- p = (unsigned *) b; /* cast allows us to reuse p for pointing to b */
|
||||
+ p = b;
|
||||
i = n;
|
||||
do {
|
||||
c[*p]++; /* assume all entries <= BMAX */
|
||||
@@ -365,12 +366,14 @@ static int huft_build(const unsigned *b, const unsigned n,
|
||||
}
|
||||
|
||||
/* Make a table of values in order of bit lengths */
|
||||
- p = (unsigned *) b;
|
||||
+ p = b;
|
||||
i = 0;
|
||||
+ v_end = 0;
|
||||
do {
|
||||
j = *p++;
|
||||
if (j != 0) {
|
||||
v[x[j]++] = i;
|
||||
+ v_end = x[j];
|
||||
}
|
||||
} while (++i < n);
|
||||
|
||||
@@ -432,7 +435,7 @@ static int huft_build(const unsigned *b, const unsigned n,
|
||||
|
||||
/* set up table entry in r */
|
||||
r.b = (unsigned char) (k - w);
|
||||
- if (p >= v + n) {
|
||||
+ if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
|
||||
r.e = 99; /* out of values--invalid code */
|
||||
} else if (*p < s) {
|
||||
r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
|
||||
diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
|
||||
index 8677a03..ca0a458 100755
|
||||
--- a/testsuite/unzip.tests
|
||||
+++ b/testsuite/unzip.tests
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
. ./testing.sh
|
||||
|
||||
-# testing "test name" "options" "expected result" "file input" "stdin"
|
||||
+# testing "test name" "commands" "expected result" "file input" "stdin"
|
||||
# file input will be file called "input"
|
||||
# test can create a file "actual" instead of writing to stdout
|
||||
|
||||
@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f
|
||||
rmdir foo
|
||||
rm foo.zip
|
||||
|
||||
+# File containing some damaged encrypted stream
|
||||
+testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
|
||||
+"Archive: bad.zip
|
||||
+ inflating: ]3j½r«IK-%Ix
|
||||
+unzip: inflate error
|
||||
+1
|
||||
+" \
|
||||
+"" "\
|
||||
+begin-base64 644 bad.zip
|
||||
+UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ
|
||||
+eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA
|
||||
+AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA
|
||||
+oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst
|
||||
+JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA
|
||||
+BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW
|
||||
+NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
|
||||
+====
|
||||
+"
|
||||
+
|
||||
+rm *
|
||||
+
|
||||
# Clean up scratch directory.
|
||||
|
||||
cd ..
|
||||
--
|
||||
2.6.2
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
From 6bd3fff51aa74e2ee2d87887b12182a3b09792ef Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Date: Fri, 30 Oct 2015 23:41:53 +0100
|
||||
Subject: [PATCH] [g]unzip: fix recent breakage.
|
||||
|
||||
Also, do emit error message we so painstakingly pass from gzip internals
|
||||
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
|
||||
---
|
||||
archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
|
||||
testsuite/unzip.tests | 1 +
|
||||
2 files changed, 22 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
|
||||
index 30bf451..20e4d9a 100644
|
||||
--- a/archival/libarchive/decompress_gunzip.c
|
||||
+++ b/archival/libarchive/decompress_gunzip.c
|
||||
@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
|
||||
huft_t *q; /* points to current table */
|
||||
huft_t r; /* table entry for structure assignment */
|
||||
huft_t *u[BMAX]; /* table stack */
|
||||
- unsigned v[N_MAX]; /* values in order of bit length */
|
||||
- unsigned v_end;
|
||||
+ unsigned v[N_MAX + 1]; /* values in order of bit length. last v[] is never used */
|
||||
int ws[BMAX + 1]; /* bits decoded stack */
|
||||
int w; /* bits decoded */
|
||||
unsigned x[BMAX + 1]; /* bit offsets, then code stack */
|
||||
@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned n,
|
||||
*xp++ = j;
|
||||
}
|
||||
|
||||
- /* Make a table of values in order of bit lengths */
|
||||
+ /* Make a table of values in order of bit lengths.
|
||||
+ * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
|
||||
+ * In particular, last v[i] is never filled and must not be accessed.
|
||||
+ */
|
||||
+ memset(v, 0xff, sizeof(v));
|
||||
p = b;
|
||||
i = 0;
|
||||
- v_end = 0;
|
||||
do {
|
||||
j = *p++;
|
||||
if (j != 0) {
|
||||
v[x[j]++] = i;
|
||||
- v_end = x[j];
|
||||
}
|
||||
} while (++i < n);
|
||||
|
||||
@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
|
||||
|
||||
/* set up table entry in r */
|
||||
r.b = (unsigned char) (k - w);
|
||||
- if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
|
||||
+ if (/*p >= v + n || -- redundant, caught by the second check: */
|
||||
+ *p == UINT_MAX /* do we access uninited v[i]? (see memset(v))*/
|
||||
+ ) {
|
||||
r.e = 99; /* out of values--invalid code */
|
||||
} else if (*p < s) {
|
||||
r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
|
||||
@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
|
||||
e = t->e;
|
||||
if (e > 16)
|
||||
do {
|
||||
- if (e == 99)
|
||||
- abort_unzip(PASS_STATE_ONLY);;
|
||||
+ if (e == 99) {
|
||||
+ abort_unzip(PASS_STATE_ONLY);
|
||||
+ }
|
||||
bb >>= t->b;
|
||||
k -= t->b;
|
||||
e -= 16;
|
||||
@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
|
||||
e = t->e;
|
||||
if (e > 16)
|
||||
do {
|
||||
- if (e == 99)
|
||||
+ if (e == 99) {
|
||||
abort_unzip(PASS_STATE_ONLY);
|
||||
+ }
|
||||
bb >>= t->b;
|
||||
k -= t->b;
|
||||
e -= 16;
|
||||
@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
|
||||
|
||||
b_dynamic >>= 4;
|
||||
k_dynamic -= 4;
|
||||
- if (nl > 286 || nd > 30)
|
||||
+ if (nl > 286 || nd > 30) {
|
||||
abort_unzip(PASS_STATE_ONLY); /* bad lengths */
|
||||
+ }
|
||||
|
||||
/* read in bit-length-code lengths */
|
||||
for (j = 0; j < nb; j++) {
|
||||
@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
|
||||
bl = lbits;
|
||||
|
||||
i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, &bl);
|
||||
- if (i != 0)
|
||||
+ if (i != 0) {
|
||||
abort_unzip(PASS_STATE_ONLY);
|
||||
+ }
|
||||
bd = dbits;
|
||||
i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &inflate_codes_td, &bd);
|
||||
- if (i != 0)
|
||||
+ if (i != 0) {
|
||||
abort_unzip(PASS_STATE_ONLY);
|
||||
+ }
|
||||
|
||||
/* set up data for inflate_codes() */
|
||||
inflate_codes_setup(PASS_STATE bl, bd);
|
||||
@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
|
||||
error_msg = "corrupted data";
|
||||
if (setjmp(error_jmp)) {
|
||||
/* Error from deep inside zip machinery */
|
||||
+ bb_error_msg(error_msg);
|
||||
n = -1;
|
||||
goto ret;
|
||||
}
|
||||
diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
|
||||
index ca0a458..d8738a3 100755
|
||||
--- a/testsuite/unzip.tests
|
||||
+++ b/testsuite/unzip.tests
|
||||
@@ -34,6 +34,7 @@ rm foo.zip
|
||||
testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
|
||||
"Archive: bad.zip
|
||||
inflating: ]3j½r«IK-%Ix
|
||||
+unzip: corrupted data
|
||||
unzip: inflate error
|
||||
1
|
||||
" \
|
||||
--
|
||||
2.6.2
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
From be729c1d3b5c923f10871dd68ea94156d0f8c803 Mon Sep 17 00:00:00 2001
|
||||
From: Ari Sundholm <ari@tuxera.com>
|
||||
Date: Mon, 4 Jan 2016 15:40:37 +0200
|
||||
Subject: [PATCH] truncate: always set mode when opening file to avoid fortify
|
||||
errors
|
||||
|
||||
Busybox crashes due to no mode being given when opening:
|
||||
$ ./busybox truncate -s 1M foo
|
||||
*** invalid open64 call: O_CREAT without mode ***: ./busybox terminated
|
||||
======= Backtrace: =========
|
||||
/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f66d921338f]
|
||||
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f66d92aac9c]
|
||||
/lib/x86_64-linux-gnu/libc.so.6(+0xeb6aa)[0x7f66d928b6aa]
|
||||
./busybox[0x4899f9]
|
||||
======= Memory map: ========
|
||||
00400000-004d0000 r-xp 00000000 00:1a 137559 /home/ari/busybox/busybox
|
||||
006cf000-006d0000 r--p 000cf000 00:1a 137559 /home/ari/busybox/busybox
|
||||
006d0000-006d1000 rw-p 000d0000 00:1a 137559 /home/ari/busybox/busybox
|
||||
006d1000-006d4000 rw-p 00000000 00:00 0
|
||||
014e7000-01508000 rw-p 00000000 00:00 0 [heap]
|
||||
7f66d8f8a000-7f66d8fa0000 r-xp 00000000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
|
||||
7f66d8fa0000-7f66d919f000 ---p 00016000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
|
||||
7f66d919f000-7f66d91a0000 rw-p 00015000 08:07 1579008 /lib/x86_64-linux-gnu/libgcc_s.so.1
|
||||
7f66d91a0000-7f66d935b000 r-xp 00000000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
|
||||
7f66d935b000-7f66d955a000 ---p 001bb000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
|
||||
7f66d955a000-7f66d955e000 r--p 001ba000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
|
||||
7f66d955e000-7f66d9560000 rw-p 001be000 08:07 1578994 /lib/x86_64-linux-gnu/libc-2.19.so
|
||||
7f66d9560000-7f66d9565000 rw-p 00000000 00:00 0
|
||||
7f66d9565000-7f66d966a000 r-xp 00000000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
|
||||
7f66d966a000-7f66d9869000 ---p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
|
||||
7f66d9869000-7f66d986a000 r--p 00104000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
|
||||
7f66d986a000-7f66d986b000 rw-p 00105000 08:07 1579020 /lib/x86_64-linux-gnu/libm-2.19.so
|
||||
7f66d986b000-7f66d988e000 r-xp 00000000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
|
||||
7f66d9a64000-7f66d9a67000 rw-p 00000000 00:00 0
|
||||
7f66d9a8a000-7f66d9a8d000 rw-p 00000000 00:00 0
|
||||
7f66d9a8d000-7f66d9a8e000 r--p 00022000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
|
||||
7f66d9a8e000-7f66d9a8f000 rw-p 00023000 08:07 1578981 /lib/x86_64-linux-gnu/ld-2.19.so
|
||||
7f66d9a8f000-7f66d9a90000 rw-p 00000000 00:00 0
|
||||
7ffc47761000-7ffc47782000 rw-p 00000000 00:00 0 [stack]
|
||||
7ffc477ab000-7ffc477ad000 r-xp 00000000 00:00 0 [vdso]
|
||||
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
|
||||
Aborted (core dumped)
|
||||
$
|
||||
|
||||
Fix this by simply always setting the mode, as it doesn't hurt even
|
||||
when O_CREAT is not specified.
|
||||
|
||||
This bug is a regression introduced in fc3e40e, as xopen(), which
|
||||
was originally used, would automatically set the mode.
|
||||
|
||||
Signed-off-by: Ari Sundholm <ari@tuxera.com>
|
||||
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||||
(cherry picked from commit e111a1640494fe87fc913f94fae3bb805de0fc99)
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
---
|
||||
coreutils/truncate.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/coreutils/truncate.c b/coreutils/truncate.c
|
||||
index e5fa656..4c997bf 100644
|
||||
--- a/coreutils/truncate.c
|
||||
+++ b/coreutils/truncate.c
|
||||
@@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
argv += optind;
|
||||
while (*argv) {
|
||||
- int fd = open(*argv, flags);
|
||||
+ int fd = open(*argv, flags, 0666);
|
||||
if (fd < 0) {
|
||||
if (errno != ENOENT || !(opts & OPT_NOCREATE)) {
|
||||
bb_perror_msg("%s: open", *argv);
|
||||
--
|
||||
2.6.2
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 67eb23d2be8aba3c474dac81a15b0fa11e5847b7 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Mon, 25 Nov 2013 22:51:53 +0100
|
||||
Subject: [PATCH] Makefile.flags: strip non -l arguments returned by pkg-config
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
Makefile.flags | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.flags b/Makefile.flags
|
||||
index 307afa7..885e323 100644
|
||||
--- a/Makefile.flags
|
||||
+++ b/Makefile.flags
|
||||
@@ -141,7 +141,9 @@ ifeq ($(CONFIG_SELINUX),y)
|
||||
SELINUX_PC_MODULES = libselinux libsepol
|
||||
$(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES)))
|
||||
CPPFLAGS += $(SELINUX_CFLAGS)
|
||||
-LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
|
||||
+LDLIBS += $(if $(SELINUX_LIBS),\
|
||||
+ $(patsubst -l%,%,$(filter -l%,$(SELINUX_LIBS))),\
|
||||
+ $(SELINUX_PC_MODULES:lib%=%))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_EFENCE),y)
|
||||
--
|
||||
1.8.1.2
|
||||
|
||||
81
deprecated/firmware/buildroot/package/busybox/Config.in
Normal file
81
deprecated/firmware/buildroot/package/busybox/Config.in
Normal file
@@ -0,0 +1,81 @@
|
||||
config BR2_PACKAGE_BUSYBOX
|
||||
bool "BusyBox"
|
||||
default y
|
||||
help
|
||||
The Swiss Army Knife of embedded Linux. It slices, it dices, it
|
||||
makes Julian Fries.
|
||||
|
||||
http://busybox.net/
|
||||
|
||||
Most people will answer Y.
|
||||
|
||||
if BR2_PACKAGE_BUSYBOX
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_CONFIG
|
||||
string "BusyBox configuration file to use?"
|
||||
default "package/busybox/busybox.config"
|
||||
help
|
||||
Some people may wish to use their own modified BusyBox configuration
|
||||
file, and will specify their config file location with this option.
|
||||
|
||||
Most people will just use the default BusyBox configuration file.
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES
|
||||
string "Additional BusyBox configuration fragment files"
|
||||
help
|
||||
A space-separated list of configuration fragment files,
|
||||
that will be merged to the main BusyBox configuration file.
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
bool "Show packages that are also provided by busybox"
|
||||
help
|
||||
Show packages in menuconfig that are potentially also provided
|
||||
by busybox.
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_SELINUX
|
||||
select BR2_PACKAGE_LIBSELINUX
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on !BR2_arc
|
||||
bool "Enable SELinux support"
|
||||
help
|
||||
Enable SELinux support in BusyBox. Please note that
|
||||
depending on your BusyBox configuration and the SELinux
|
||||
policy implementation, you may want to also enable
|
||||
BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES.
|
||||
|
||||
For instance, if your BusyBox configuration only uses a
|
||||
couple of minor BusyBox features, such as simple command
|
||||
line utilities, the symlinked version of BusyBox can be used
|
||||
to save space. If BusyBox provides more features, such as
|
||||
crond, then individual binaries have to be enabled for the
|
||||
SELinux type transitions to occur properly.
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_WATCHDOG
|
||||
bool "Install the watchdog daemon startup script"
|
||||
help
|
||||
Install the watchdog daemon startup script,
|
||||
that just start at the boot the busybox watchdog daemon.
|
||||
|
||||
if BR2_PACKAGE_BUSYBOX_WATCHDOG
|
||||
|
||||
config BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD
|
||||
string "Delay between reset"
|
||||
default "5"
|
||||
help
|
||||
Select the number of seconds between each
|
||||
reset of the watchdog (default 5)
|
||||
|
||||
Use ms suffix to specify milliseconds (e.g. 500ms)
|
||||
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else
|
||||
|
||||
# add dummy config so the stuff with busybox alternatives are shown
|
||||
# when busybox is disabled
|
||||
config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
default y
|
||||
endif
|
||||
36
deprecated/firmware/buildroot/package/busybox/S01logging
Normal file
36
deprecated/firmware/buildroot/package/busybox/S01logging
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start logging
|
||||
#
|
||||
|
||||
start() {
|
||||
printf "Starting logging: "
|
||||
start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n
|
||||
start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping logging: "
|
||||
start-stop-daemon -K -q -p /var/run/syslogd.pid
|
||||
start-stop-daemon -K -q -p /var/run/klogd.pid
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
21
deprecated/firmware/buildroot/package/busybox/S10mdev
Normal file
21
deprecated/firmware/buildroot/package/busybox/S10mdev
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start mdev....
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting mdev..."
|
||||
echo /sbin/mdev >/proc/sys/kernel/hotplug
|
||||
/sbin/mdev -s
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
restart|reload)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
20
deprecated/firmware/buildroot/package/busybox/S15watchdog
Normal file
20
deprecated/firmware/buildroot/package/busybox/S15watchdog
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start watchdog
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting watchdog..."
|
||||
watchdog -t PERIOD /dev/watchdog
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
restart|reload)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
36
deprecated/firmware/buildroot/package/busybox/S50telnet
Executable file
36
deprecated/firmware/buildroot/package/busybox/S50telnet
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start telnet....
|
||||
#
|
||||
|
||||
start() {
|
||||
printf "Starting telnetd: "
|
||||
start-stop-daemon -S -q -m -b -p /var/run/telnetd.pid \
|
||||
-x /usr/sbin/telnetd -- -F
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping telnetd: "
|
||||
start-stop-daemon -K -q -p /var/run/telnetd.pid \
|
||||
-x /usr/sbin/telnetd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
1055
deprecated/firmware/buildroot/package/busybox/busybox.config
Normal file
1055
deprecated/firmware/buildroot/package/busybox/busybox.config
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
# From http://busybox.net/downloads/busybox-1.24.1.tar.bz2.sign
|
||||
md5 be98a40cadf84ce2d6b05fa41a275c6a busybox-1.24.1.tar.bz2
|
||||
sha1 157d14d24748b4505b1a418535688706a2b81680 busybox-1.24.1.tar.bz2
|
||||
265
deprecated/firmware/buildroot/package/busybox/busybox.mk
Normal file
265
deprecated/firmware/buildroot/package/busybox/busybox.mk
Normal file
@@ -0,0 +1,265 @@
|
||||
################################################################################
|
||||
#
|
||||
# busybox
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BUSYBOX_VERSION = 1.24.1
|
||||
BUSYBOX_SITE = http://www.busybox.net/downloads
|
||||
BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
|
||||
BUSYBOX_LICENSE = GPLv2
|
||||
BUSYBOX_LICENSE_FILES = LICENSE
|
||||
|
||||
BUSYBOX_CFLAGS = \
|
||||
$(TARGET_CFLAGS)
|
||||
|
||||
BUSYBOX_LDFLAGS = \
|
||||
$(TARGET_LDFLAGS)
|
||||
|
||||
# Link against libtirpc if available so that we can leverage its RPC
|
||||
# support for NFS mounting with BusyBox
|
||||
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
||||
BUSYBOX_DEPENDENCIES += libtirpc host-pkgconf
|
||||
BUSYBOX_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`"
|
||||
# Don't use LDFLAGS for -ltirpc, because LDFLAGS is used for
|
||||
# the non-final link of modules as well.
|
||||
BUSYBOX_CFLAGS_busybox += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
|
||||
endif
|
||||
|
||||
BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config
|
||||
# Allows the build system to tweak CFLAGS
|
||||
BUSYBOX_MAKE_ENV = \
|
||||
$(TARGET_MAKE_ENV) \
|
||||
CFLAGS="$(BUSYBOX_CFLAGS)" \
|
||||
CFLAGS_busybox="$(BUSYBOX_CFLAGS_busybox)"
|
||||
BUSYBOX_MAKE_OPTS = \
|
||||
CC="$(TARGET_CC)" \
|
||||
ARCH=$(KERNEL_ARCH) \
|
||||
PREFIX="$(TARGET_DIR)" \
|
||||
EXTRA_LDFLAGS="$(BUSYBOX_LDFLAGS)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CONFIG_PREFIX="$(TARGET_DIR)" \
|
||||
SKIP_STRIP=y
|
||||
|
||||
ifndef BUSYBOX_CONFIG_FILE
|
||||
BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
|
||||
endif
|
||||
|
||||
BUSYBOX_KCONFIG_FILE = $(BUSYBOX_CONFIG_FILE)
|
||||
BUSYBOX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES))
|
||||
BUSYBOX_KCONFIG_EDITORS = menuconfig xconfig gconfig
|
||||
BUSYBOX_KCONFIG_OPTS = $(BUSYBOX_MAKE_OPTS)
|
||||
|
||||
define BUSYBOX_PERMISSIONS
|
||||
/bin/busybox f 4755 0 0 - - - - -
|
||||
endef
|
||||
|
||||
# If mdev will be used for device creation enable it and copy S10mdev to /etc/init.d
|
||||
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y)
|
||||
define BUSYBOX_INSTALL_MDEV_SCRIPT
|
||||
$(INSTALL) -D -m 0755 package/busybox/S10mdev \
|
||||
$(TARGET_DIR)/etc/init.d/S10mdev
|
||||
endef
|
||||
define BUSYBOX_INSTALL_MDEV_CONF
|
||||
$(INSTALL) -D -m 0644 package/busybox/mdev.conf \
|
||||
$(TARGET_DIR)/etc/mdev.conf
|
||||
endef
|
||||
define BUSYBOX_SET_MDEV
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MDEV,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_CONF,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_EXEC,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_LOAD_FIRMWARE,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
# sha passwords need USE_BB_CRYPT_SHA
|
||||
ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
|
||||
define BUSYBOX_SET_CRYPT_SHA
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_CRYPT_SHA,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_USE_MMU),y)
|
||||
define BUSYBOX_SET_MMU
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
else
|
||||
define BUSYBOX_SET_MMU
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_SWAPONOFF,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_ASH,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_BASH_COMPAT,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_BRACE_EXPANSION,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_HELP,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_INTERACTIVE,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_SAVEHISTORY,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_JOB,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_TICK,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_IF,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_LOOPS,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_CASE,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_FUNCTIONS,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_LOCAL,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_RANDOM_SUPPORT,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_EXPORT_N,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_MODE_X,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
define BUSYBOX_SET_LARGEFILE
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_LFS,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FDISK_SUPPORT_LARGE_DISKS,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
|
||||
define BUSYBOX_SET_IPV6
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_IPV6,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_IFUPDOWN_IPV6,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
|
||||
# If we're using static libs do the same for busybox
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
define BUSYBOX_PREFER_STATIC
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_STATIC,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
# Disable shadow passwords support if unsupported by the C library
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS),)
|
||||
define BUSYBOX_INTERNAL_SHADOW_PASSWORDS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_PWD_GRP,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_SHADOW,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
# We also need to use internal shadow password functions when using
|
||||
# the musl C library, since some of them are not yet implemented by
|
||||
# musl.
|
||||
#
|
||||
# Do not use utmp/wmtp support. wmtp support is not available in musl,
|
||||
# and utmp support is not sufficient for Busybox.
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
||||
define BUSYBOX_MUSL_TWEAKS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_PWD_GRP,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_SHADOW,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_UTMP,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_WTMP,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
define BUSYBOX_INSTALL_UDHCPC_SCRIPT
|
||||
if grep -q CONFIG_UDHCPC=y $(@D)/.config; then \
|
||||
$(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
|
||||
$(TARGET_DIR)/usr/share/udhcpc/default.script; \
|
||||
$(INSTALL) -m 0755 -d \
|
||||
$(TARGET_DIR)/usr/share/udhcpc/default.script.d; \
|
||||
fi
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_INIT_BUSYBOX),y)
|
||||
define BUSYBOX_SET_INIT
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_INIT,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX_SELINUX),y)
|
||||
BUSYBOX_DEPENDENCIES += host-pkgconf libselinux libsepol
|
||||
define BUSYBOX_SET_SELINUX
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SELINUX,$(BUSYBOX_BUILD_CONFIG))
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SELINUXENABLED,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
endif
|
||||
|
||||
define BUSYBOX_INSTALL_LOGGING_SCRIPT
|
||||
if grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \
|
||||
$(INSTALL) -m 0755 -D package/busybox/S01logging \
|
||||
$(TARGET_DIR)/etc/init.d/S01logging; \
|
||||
else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_INIT_BUSYBOX),y)
|
||||
define BUSYBOX_INSTALL_INITTAB
|
||||
$(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y)
|
||||
define BUSYBOX_SET_WATCHDOG
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
|
||||
$(INSTALL) -D -m 0755 package/busybox/S15watchdog \
|
||||
$(TARGET_DIR)/etc/init.d/S15watchdog
|
||||
$(SED) s/PERIOD/$(call qstrip,$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD))/ \
|
||||
$(TARGET_DIR)/etc/init.d/S15watchdog
|
||||
endef
|
||||
endif
|
||||
|
||||
# PAM support requires thread support in the toolchain
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
|
||||
define BUSYBOX_LINUX_PAM
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG))
|
||||
endef
|
||||
BUSYBOX_DEPENDENCIES += linux-pam
|
||||
endif
|
||||
|
||||
# Telnet support
|
||||
define BUSYBOX_INSTALL_TELNET_SCRIPT
|
||||
if grep -q CONFIG_FEATURE_TELNETD_STANDALONE=y $(@D)/.config; then \
|
||||
$(INSTALL) -m 0755 -D package/busybox/S50telnet \
|
||||
$(TARGET_DIR)/etc/init.d/S50telnet ; \
|
||||
fi
|
||||
endef
|
||||
|
||||
# Enable "noclobber" in install.sh, to prevent BusyBox from overwriting any
|
||||
# full-blown versions of apps installed by other packages with sym/hard links.
|
||||
define BUSYBOX_NOCLOBBER_INSTALL
|
||||
$(SED) 's/^noclobber="0"$$/noclobber="1"/' $(@D)/applets/install.sh
|
||||
endef
|
||||
|
||||
define BUSYBOX_KCONFIG_FIXUP_CMDS
|
||||
$(BUSYBOX_SET_MMU)
|
||||
$(BUSYBOX_SET_LARGEFILE)
|
||||
$(BUSYBOX_SET_IPV6)
|
||||
$(BUSYBOX_PREFER_STATIC)
|
||||
$(BUSYBOX_SET_MDEV)
|
||||
$(BUSYBOX_SET_CRYPT_SHA)
|
||||
$(BUSYBOX_LINUX_PAM)
|
||||
$(BUSYBOX_INTERNAL_SHADOW_PASSWORDS)
|
||||
$(BUSYBOX_SET_INIT)
|
||||
$(BUSYBOX_SET_WATCHDOG)
|
||||
$(BUSYBOX_SET_SELINUX)
|
||||
$(BUSYBOX_MUSL_TWEAKS)
|
||||
endef
|
||||
|
||||
define BUSYBOX_CONFIGURE_CMDS
|
||||
$(BUSYBOX_NOCLOBBER_INSTALL)
|
||||
endef
|
||||
|
||||
define BUSYBOX_BUILD_CMDS
|
||||
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D)
|
||||
endef
|
||||
|
||||
define BUSYBOX_INSTALL_TARGET_CMDS
|
||||
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install
|
||||
$(BUSYBOX_INSTALL_INITTAB)
|
||||
$(BUSYBOX_INSTALL_UDHCPC_SCRIPT)
|
||||
$(BUSYBOX_INSTALL_MDEV_CONF)
|
||||
endef
|
||||
|
||||
define BUSYBOX_INSTALL_INIT_SYSV
|
||||
$(BUSYBOX_INSTALL_MDEV_SCRIPT)
|
||||
$(BUSYBOX_INSTALL_LOGGING_SCRIPT)
|
||||
$(BUSYBOX_INSTALL_WATCHDOG_SCRIPT)
|
||||
$(BUSYBOX_INSTALL_TELNET_SCRIPT)
|
||||
endef
|
||||
|
||||
# Checks to give errors that the user can understand
|
||||
# Must be before we call to kconfig-package
|
||||
ifeq ($(BR2_PACKAGE_BUSYBOX)$(BR_BUILDING),yy)
|
||||
ifeq ($(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG)),)
|
||||
$(error No BusyBox configuration file specified, check your BR2_PACKAGE_BUSYBOX_CONFIG setting)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(kconfig-package))
|
||||
35
deprecated/firmware/buildroot/package/busybox/inittab
Normal file
35
deprecated/firmware/buildroot/package/busybox/inittab
Normal file
@@ -0,0 +1,35 @@
|
||||
# /etc/inittab
|
||||
#
|
||||
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Note: BusyBox init doesn't support runlevels. The runlevels field is
|
||||
# completely ignored by BusyBox init. If you want runlevels, use
|
||||
# sysvinit.
|
||||
#
|
||||
# Format for each entry: <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
# id == tty to run on, or empty for /dev/console
|
||||
# runlevels == ignored
|
||||
# action == one of sysinit, respawn, askfirst, wait, and once
|
||||
# process == program to run
|
||||
|
||||
# Startup the system
|
||||
::sysinit:/bin/mount -t proc proc /proc
|
||||
::sysinit:/bin/mount -o remount,rw /
|
||||
::sysinit:/bin/mkdir -p /dev/pts
|
||||
::sysinit:/bin/mkdir -p /dev/shm
|
||||
::sysinit:/bin/mount -a
|
||||
::sysinit:/bin/hostname -F /etc/hostname
|
||||
# now run any rc scripts
|
||||
::sysinit:/etc/init.d/rcS
|
||||
|
||||
# Put a getty on the serial port
|
||||
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
#::ctrlaltdel:/sbin/reboot
|
||||
|
||||
# Stuff to do before rebooting
|
||||
::shutdown:/etc/init.d/rcK
|
||||
::shutdown:/sbin/swapoff -a
|
||||
::shutdown:/bin/umount -a -r
|
||||
35
deprecated/firmware/buildroot/package/busybox/mdev.conf
Normal file
35
deprecated/firmware/buildroot/package/busybox/mdev.conf
Normal file
@@ -0,0 +1,35 @@
|
||||
# null may already exist; therefore ownership has to be changed with command
|
||||
null root:root 666 @chmod 666 $MDEV
|
||||
zero root:root 666
|
||||
full root:root 666
|
||||
random root:root 444
|
||||
urandom root:root 444
|
||||
hwrandom root:root 444
|
||||
grsec root:root 660
|
||||
|
||||
kmem root:root 640
|
||||
mem root:root 640
|
||||
port root:root 640
|
||||
# console may already exist; therefore ownership has to be changed with command
|
||||
console root:tty 600 @chmod 600 $MDEV
|
||||
ptmx root:tty 666
|
||||
pty.* root:tty 660
|
||||
|
||||
# Typical devices
|
||||
tty root:tty 666
|
||||
tty[0-9]* root:tty 660
|
||||
vcsa*[0-9]* root:tty 660
|
||||
ttyS[0-9]* root:root 660
|
||||
|
||||
# alsa sound devices
|
||||
pcm.* root:audio 660 =snd/
|
||||
control.* root:audio 660 =snd/
|
||||
midi.* root:audio 660 =snd/
|
||||
seq root:audio 660 =snd/
|
||||
timer root:audio 660 =snd/
|
||||
|
||||
# input stuff
|
||||
event[0-9]+ root:root 640 =input/
|
||||
mice root:root 640 =input/
|
||||
mouse[0-9] root:root 640 =input/
|
||||
ts[0-9] root:root 600 =input/
|
||||
73
deprecated/firmware/buildroot/package/busybox/udhcpc.script
Executable file
73
deprecated/firmware/buildroot/package/busybox/udhcpc.script
Executable file
@@ -0,0 +1,73 @@
|
||||
#!/bin/sh
|
||||
|
||||
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
|
||||
|
||||
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
|
||||
|
||||
RESOLV_CONF="/etc/resolv.conf"
|
||||
[ -e $RESOLV_CONF ] || touch $RESOLV_CONF
|
||||
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
||||
[ -n "$subnet" ] && NETMASK="netmask $subnet"
|
||||
|
||||
case "$1" in
|
||||
deconfig)
|
||||
/sbin/ifconfig $interface up
|
||||
/sbin/ifconfig $interface 0.0.0.0
|
||||
|
||||
# drop info from this interface
|
||||
# resolv.conf may be a symlink to /tmp/, so take care
|
||||
TMPFILE=$(mktemp)
|
||||
grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE
|
||||
cat $TMPFILE > $RESOLV_CONF
|
||||
rm -f $TMPFILE
|
||||
|
||||
if [ -x /usr/sbin/avahi-autoipd ]; then
|
||||
/usr/sbin/avahi-autoipd -k $interface
|
||||
fi
|
||||
;;
|
||||
|
||||
leasefail|nak)
|
||||
if [ -x /usr/sbin/avahi-autoipd ]; then
|
||||
/usr/sbin/avahi-autoipd -wD $interface --no-chroot
|
||||
fi
|
||||
;;
|
||||
|
||||
renew|bound)
|
||||
if [ -x /usr/sbin/avahi-autoipd ]; then
|
||||
/usr/sbin/avahi-autoipd -k $interface
|
||||
fi
|
||||
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
|
||||
|
||||
if [ -n "$router" ] ; then
|
||||
echo "deleting routers"
|
||||
while route del default gw 0.0.0.0 dev $interface 2> /dev/null; do
|
||||
:
|
||||
done
|
||||
|
||||
for i in $router ; do
|
||||
route add default gw $i dev $interface
|
||||
done
|
||||
fi
|
||||
|
||||
# drop info from this interface
|
||||
# resolv.conf may be a symlink to /tmp/, so take care
|
||||
TMPFILE=$(mktemp)
|
||||
grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE
|
||||
cat $TMPFILE > $RESOLV_CONF
|
||||
rm -f $TMPFILE
|
||||
|
||||
[ -n "$domain" ] && echo "search $domain # $interface" >> $RESOLV_CONF
|
||||
for i in $dns ; do
|
||||
echo adding dns $i
|
||||
echo "nameserver $i # $interface" >> $RESOLV_CONF
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
HOOK_DIR="$0.d"
|
||||
for hook in "${HOOK_DIR}/"*; do
|
||||
[ -f "${hook}" -a -x "${hook}" ] || continue
|
||||
"${hook}" "${@}"
|
||||
done
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user