mirror of https://github.com/OpenIPC/firmware.git
remove shadowing busybox package
parent
13c9f63071
commit
080303c99f
|
@ -1,29 +0,0 @@
|
||||||
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>
|
|
|
@ -1,30 +0,0 @@
|
||||||
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>
|
|
||||||
[yann.morin.1998@free.fr: refresh for 1.29.0]
|
|
||||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
||||||
---
|
|
||||||
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
|
|
||||||
@@ -153,7 +153,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_FEATURE_NSLOOKUP_BIG),y)
|
|
||||||
--
|
|
||||||
1.8.1.2
|
|
||||||
|
|
|
@ -1,103 +0,0 @@
|
||||||
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.
|
|
||||||
|
|
||||||
# This option is not an option of Busybox, it can be selected even
|
|
||||||
# if Busybox is not enabled.
|
|
||||||
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
|
|
||||||
bool "Enable SELinux support"
|
|
||||||
default y
|
|
||||||
depends on BR2_PACKAGE_LIBSELINUX
|
|
||||||
select BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES
|
|
||||||
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_INDIVIDUAL_BINARIES
|
|
||||||
bool "Individual binaries"
|
|
||||||
depends on !BR2_STATIC_LIBS
|
|
||||||
help
|
|
||||||
By default (i.e with this option disabled), Busybox is
|
|
||||||
installed as a single binary in /bin/busybox and all applets
|
|
||||||
are a symbolic link to /bin/busybox.
|
|
||||||
|
|
||||||
With this option enabled, each applet is a separate binary,
|
|
||||||
which is needed for proper operation with SELinux.
|
|
||||||
|
|
||||||
comment "Busybox individual binaries need a toolchain w/ dynamic library"
|
|
||||||
depends on BR2_STATIC_LIBS
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
comment "You may need to enable other packages to get a working system"
|
|
||||||
comment "You better know what you're doing!"
|
|
||||||
|
|
||||||
# This option is not an option of Busybox, it can be selected even if
|
|
||||||
# Busybox is not enabled. This dummy option ensures that packages that
|
|
||||||
# depend on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS are visible when Busybox
|
|
||||||
# is disabled.
|
|
||||||
config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
|
||||||
default y
|
|
||||||
endif
|
|
|
@ -1,55 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
DAEMON="syslogd"
|
|
||||||
PIDFILE="/var/run/$DAEMON.pid"
|
|
||||||
|
|
||||||
SYSLOGD_ARGS=""
|
|
||||||
|
|
||||||
# shellcheck source=/dev/null
|
|
||||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
|
||||||
|
|
||||||
# BusyBox' syslogd does not create a pidfile, so pass "-n" in the command line
|
|
||||||
# and use "-m" to instruct start-stop-daemon to create one.
|
|
||||||
start() {
|
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
|
|
||||||
-- -n $SYSLOGD_ARGS
|
|
||||||
status=$?
|
|
||||||
if [ "$status" -eq 0 ]; then
|
|
||||||
echo "OK"
|
|
||||||
else
|
|
||||||
echo "FAIL"
|
|
||||||
fi
|
|
||||||
return "$status"
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
printf 'Stopping %s: ' "$DAEMON"
|
|
||||||
start-stop-daemon -K -q -p "$PIDFILE"
|
|
||||||
status=$?
|
|
||||||
if [ "$status" -eq 0 ]; then
|
|
||||||
rm -f "$PIDFILE"
|
|
||||||
echo "OK"
|
|
||||||
else
|
|
||||||
echo "FAIL"
|
|
||||||
fi
|
|
||||||
return "$status"
|
|
||||||
}
|
|
||||||
|
|
||||||
restart() {
|
|
||||||
stop
|
|
||||||
sleep 1
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start|stop|restart)
|
|
||||||
"$1";;
|
|
||||||
reload)
|
|
||||||
# Restart, since there is no true "reload" feature.
|
|
||||||
restart;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop|restart|reload}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
|
@ -1,55 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
DAEMON="klogd"
|
|
||||||
PIDFILE="/var/run/$DAEMON.pid"
|
|
||||||
|
|
||||||
KLOGD_ARGS=""
|
|
||||||
|
|
||||||
# shellcheck source=/dev/null
|
|
||||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
|
||||||
|
|
||||||
# BusyBox' klogd does not create a pidfile, so pass "-n" in the command line
|
|
||||||
# and use "-m" to instruct start-stop-daemon to create one.
|
|
||||||
start() {
|
|
||||||
printf 'Starting %s: ' "$DAEMON"
|
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
|
||||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
|
|
||||||
-- -n $KLOGD_ARGS
|
|
||||||
status=$?
|
|
||||||
if [ "$status" -eq 0 ]; then
|
|
||||||
echo "OK"
|
|
||||||
else
|
|
||||||
echo "FAIL"
|
|
||||||
fi
|
|
||||||
return "$status"
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
printf 'Stopping %s: ' "$DAEMON"
|
|
||||||
start-stop-daemon -K -q -p "$PIDFILE"
|
|
||||||
status=$?
|
|
||||||
if [ "$status" -eq 0 ]; then
|
|
||||||
rm -f "$PIDFILE"
|
|
||||||
echo "OK"
|
|
||||||
else
|
|
||||||
echo "FAIL"
|
|
||||||
fi
|
|
||||||
return "$status"
|
|
||||||
}
|
|
||||||
|
|
||||||
restart() {
|
|
||||||
stop
|
|
||||||
sleep 1
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start|stop|restart)
|
|
||||||
"$1";;
|
|
||||||
reload)
|
|
||||||
# Restart, since there is no true "reload" feature.
|
|
||||||
restart;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop|restart|reload}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
|
@ -1,66 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PROGRAM="sysctl"
|
|
||||||
|
|
||||||
SYSCTL_ARGS=""
|
|
||||||
|
|
||||||
# shellcheck source=/dev/null
|
|
||||||
[ -r "/etc/default/$PROGRAM" ] && . "/etc/default/$PROGRAM"
|
|
||||||
|
|
||||||
# Files are read from directories in the SYSCTL_SOURCES list, in the given
|
|
||||||
# order. A file may be used more than once, since there can be multiple
|
|
||||||
# symlinks to it. No attempt is made to prevent this.
|
|
||||||
SYSCTL_SOURCES="/etc/sysctl.d/ /usr/local/lib/sysctl.d/ /usr/lib/sysctl.d/ /lib/sysctl.d/ /etc/sysctl.conf"
|
|
||||||
|
|
||||||
# Use some scripting to mimic the --system option of the sysctl provided by
|
|
||||||
# procps-ng but still reporting errors. Users not interested on error report
|
|
||||||
# can put "-e" in SYSCTL_ARGS.
|
|
||||||
#
|
|
||||||
# The file redirections do the following:
|
|
||||||
#
|
|
||||||
# - stdout is redirected to syslog with facility.level "kern.info"
|
|
||||||
# - stderr is redirected to syslog with facility.level "kern.err"
|
|
||||||
# - file dscriptor 4 is used to pass the result to the "start" function.
|
|
||||||
#
|
|
||||||
# Testing the sysctl exit code is fruitless, as at the moment, since it ends
|
|
||||||
# with status zero even if errors happen. Hopefully this will be fixed in a
|
|
||||||
# future version of Busybox.
|
|
||||||
#
|
|
||||||
run_program() {
|
|
||||||
# shellcheck disable=SC2086 # we need the word splitting
|
|
||||||
find $SYSCTL_SOURCES -maxdepth 1 -name '*.conf' -print0 2> /dev/null | \
|
|
||||||
xargs -0 -r -n 1 readlink -f | {
|
|
||||||
prog_status="OK"
|
|
||||||
while :; do
|
|
||||||
read -r file
|
|
||||||
if [ -z "$file" ]; then
|
|
||||||
echo "$prog_status" >&4
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
echo "* Applying $file ..."
|
|
||||||
/sbin/sysctl -p "$file" $SYSCTL_ARGS || prog_status="FAIL"
|
|
||||||
done 2>&1 >&3 | /usr/bin/logger -t sysctl -p kern.err
|
|
||||||
} 3>&1 | /usr/bin/logger -t sysctl -p kern.info
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
printf '%s %s: ' "$1" "$PROGRAM"
|
|
||||||
status=$(run_program 4>&1)
|
|
||||||
echo "$status"
|
|
||||||
if [ "$status" = "OK" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
start "Running";;
|
|
||||||
restart|reload)
|
|
||||||
start "Rerunning";;
|
|
||||||
stop)
|
|
||||||
:;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop|restart|reload}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
|
@ -1,42 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Run the mdev daemon
|
|
||||||
#
|
|
||||||
|
|
||||||
DAEMON="mdev"
|
|
||||||
PIDFILE="/var/run/$DAEMON.pid"
|
|
||||||
|
|
||||||
|
|
||||||
start() {
|
|
||||||
echo -n "Starting $DAEMON... "
|
|
||||||
start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/mdev -- -df
|
|
||||||
[ $? -eq 0 ] && echo "OK" || echo "ERROR"
|
|
||||||
|
|
||||||
# coldplug modules
|
|
||||||
find /sys/ -name modalias -print0 | \
|
|
||||||
xargs -0 sort -u | \
|
|
||||||
tr '\n' '\0' | \
|
|
||||||
xargs -0 modprobe -abq
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
echo -n "Stopping $DAEMON... "
|
|
||||||
start-stop-daemon -K -p $PIDFILE
|
|
||||||
[ $? -eq 0 ] && echo "OK" || echo "ERROR"
|
|
||||||
}
|
|
||||||
|
|
||||||
restart() {
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start|stop|restart)
|
|
||||||
"$1"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop|restart}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $?
|
|
|
@ -1,20 +0,0 @@
|
||||||
#!/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 $?
|
|
|
@ -1,39 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Start telnet....
|
|
||||||
#
|
|
||||||
|
|
||||||
TELNETD_ARGS=-F
|
|
||||||
[ -r /etc/default/telnet ] && . /etc/default/telnet
|
|
||||||
|
|
||||||
start() {
|
|
||||||
printf "Starting telnetd: "
|
|
||||||
start-stop-daemon -S -q -m -b -p /var/run/telnetd.pid \
|
|
||||||
-x /usr/sbin/telnetd -- $TELNETD_ARGS
|
|
||||||
[ $? = 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 $?
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +0,0 @@
|
||||||
# From https://busybox.net/downloads/busybox-1.31.1.tar.bz2.sha256
|
|
||||||
sha256 d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a998 busybox-1.31.1.tar.bz2
|
|
||||||
# Locally computed
|
|
||||||
sha256 bbfc9843646d483c334664f651c208b9839626891d8f17604db2146962f43548 LICENSE
|
|
||||||
sha256 b5a136ed67798e51fe2e0ca0b2a21cb01b904ff0c9f7d563a6292e276607e58f archival/libarchive/bz/LICENSE
|
|
|
@ -1,387 +0,0 @@
|
||||||
################################################################################
|
|
||||||
#
|
|
||||||
# busybox
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
BUSYBOX_VERSION = 1.31.1
|
|
||||||
BUSYBOX_SITE = http://www.busybox.net/downloads
|
|
||||||
BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
|
|
||||||
BUSYBOX_LICENSE = GPL-2.0, bzip2-1.0.4
|
|
||||||
BUSYBOX_LICENSE_FILES = LICENSE archival/libarchive/bz/LICENSE
|
|
||||||
|
|
||||||
define BUSYBOX_HELP_CMDS
|
|
||||||
@echo ' busybox-menuconfig - Run BusyBox menuconfig'
|
|
||||||
endef
|
|
||||||
|
|
||||||
BUSYBOX_CFLAGS = \
|
|
||||||
$(TARGET_CFLAGS)
|
|
||||||
|
|
||||||
BUSYBOX_LDFLAGS = \
|
|
||||||
$(TARGET_LDFLAGS)
|
|
||||||
|
|
||||||
# Packages that provide commands that may also be busybox applets:
|
|
||||||
BUSYBOX_DEPENDENCIES = \
|
|
||||||
$(if $(BR2_PACKAGE_ATTR),attr) \
|
|
||||||
$(if $(BR2_PACKAGE_BASH),bash) \
|
|
||||||
$(if $(BR2_PACKAGE_BC),bc) \
|
|
||||||
$(if $(BR2_PACKAGE_BINUTILS),binutils) \
|
|
||||||
$(if $(BR2_PACKAGE_COREUTILS),coreutils) \
|
|
||||||
$(if $(BR2_PACKAGE_CPIO),cpio) \
|
|
||||||
$(if $(BR2_PACKAGE_DCRON),dcron) \
|
|
||||||
$(if $(BR2_PACKAGE_DEBIANUTILS),debianutils) \
|
|
||||||
$(if $(BR2_PACKAGE_DIFFUTILS),diffutils) \
|
|
||||||
$(if $(BR2_PACKAGE_DOS2UNIX),dos2unix) \
|
|
||||||
$(if $(BR2_PACKAGE_DOSFSTOOLS),dosfstools) \
|
|
||||||
$(if $(BR2_PACKAGE_E2FSPROGS),e2fsprogs) \
|
|
||||||
$(if $(BR2_PACKAGE_FBSET),fbset) \
|
|
||||||
$(if $(BR2_PACKAGE_GAWK),gawk) \
|
|
||||||
$(if $(BR2_PACKAGE_GREP),grep) \
|
|
||||||
$(if $(BR2_PACKAGE_GZIP),gzip) \
|
|
||||||
$(if $(BR2_PACKAGE_I2C_TOOLS),i2c-tools) \
|
|
||||||
$(if $(BR2_PACKAGE_IFENSLAVE),ifenslave) \
|
|
||||||
$(if $(BR2_PACKAGE_IFPLUGD),ifplugd) \
|
|
||||||
$(if $(BR2_PACKAGE_IFUPDOWN),ifupdown) \
|
|
||||||
$(if $(BR2_PACKAGE_IPROUTE2),iproute2) \
|
|
||||||
$(if $(BR2_PACKAGE_IPUTILS),iputils) \
|
|
||||||
$(if $(BR2_PACKAGE_KMOD),kmod) \
|
|
||||||
$(if $(BR2_PACKAGE_LESS),less) \
|
|
||||||
$(if $(BR2_PACKAGE_LSOF),lsof) \
|
|
||||||
$(if $(BR2_PACKAGE_MTD),mtd) \
|
|
||||||
$(if $(BR2_PACKAGE_NET_TOOLS),net-tools) \
|
|
||||||
$(if $(BR2_PACKAGE_NETCAT),netcat) \
|
|
||||||
$(if $(BR2_PACKAGE_NETCAT_OPENSBSD),netcat-openbsd) \
|
|
||||||
$(if $(BR2_PACKAGE_NMAP),nmap) \
|
|
||||||
$(if $(BR2_PACKAGE_NTP),ntp) \
|
|
||||||
$(if $(BR2_PACKAGE_PCIUTILS),pciutils) \
|
|
||||||
$(if $(BR2_PACKAGE_PROCPS_NG),procps-ng) \
|
|
||||||
$(if $(BR2_PACKAGE_PSMISC),psmisc) \
|
|
||||||
$(if $(BR2_PACKAGE_START_STOP_DAEMON),start-stop-daemon) \
|
|
||||||
$(if $(BR2_PACKAGE_SYSKLOGD),sysklogd) \
|
|
||||||
$(if $(BR2_PACKAGE_SYSTEMD),systemd) \
|
|
||||||
$(if $(BR2_PACKAGE_SYSVINIT),sysvinit) \
|
|
||||||
$(if $(BR2_PACKAGE_TAR),tar) \
|
|
||||||
$(if $(BR2_PACKAGE_TFTPD),tftpd) \
|
|
||||||
$(if $(BR2_PACKAGE_TRACEROUTE),traceroute) \
|
|
||||||
$(if $(BR2_PACKAGE_UNZIP),unzip) \
|
|
||||||
$(if $(BR2_PACKAGE_USBUTILS),usbutils) \
|
|
||||||
$(if $(BR2_PACKAGE_UTIL_LINUX),util-linux) \
|
|
||||||
$(if $(BR2_PACKAGE_VIM),vim) \
|
|
||||||
$(if $(BR2_PACKAGE_WGET),wget) \
|
|
||||||
$(if $(BR2_PACKAGE_WHOIS),whois)
|
|
||||||
|
|
||||||
# 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)"
|
|
||||||
|
|
||||||
ifeq ($(BR2_REPRODUCIBLE),y)
|
|
||||||
BUSYBOX_MAKE_ENV += \
|
|
||||||
KCONFIG_NOTIMESTAMP=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES),y)
|
|
||||||
define BUSYBOX_PERMISSIONS
|
|
||||||
# Set permissions on all applets with BB_SUID_REQUIRE and BB_SUID_MAYBE.
|
|
||||||
# 12 Applets are pulled from applets.h using grep command :
|
|
||||||
# grep -r -e "APPLET.*BB_SUID_REQUIRE\|APPLET.*BB_SUID_MAYBE" \
|
|
||||||
# $(@D)/include/applets.h
|
|
||||||
# These applets are added to the device table and the makedev file
|
|
||||||
# ignores the files with type 'F' ( optional files).
|
|
||||||
/usr/bin/wall F 4755 0 0 - - - - -
|
|
||||||
/bin/ping F 4755 0 0 - - - - -
|
|
||||||
/bin/ping6 F 4755 0 0 - - - - -
|
|
||||||
/usr/bin/crontab F 4755 0 0 - - - - -
|
|
||||||
/sbin/findfs F 4755 0 0 - - - - -
|
|
||||||
/bin/login F 4755 0 0 - - - - -
|
|
||||||
/bin/mount F 4755 0 0 - - - - -
|
|
||||||
/usr/bin/passwd F 4755 0 0 - - - - -
|
|
||||||
/bin/su F 4755 0 0 - - - - -
|
|
||||||
/usr/bin/traceroute F 4755 0 0 - - - - -
|
|
||||||
/usr/bin/traceroute6 F 4755 0 0 - - - - -
|
|
||||||
/usr/bin/vlock F 4755 0 0 - - - - -
|
|
||||||
endef
|
|
||||||
else
|
|
||||||
define BUSYBOX_PERMISSIONS
|
|
||||||
/bin/busybox f 4755 0 0 - - - - -
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
# 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_SWAPON,$(BUSYBOX_BUILD_CONFIG))
|
|
||||||
$(call KCONFIG_DISABLE_OPT,CONFIG_SWAPOFF,$(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
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
|
|
||||||
define BUSYBOX_SET_GETTY
|
|
||||||
$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(SYSTEM_GETTY_PORT)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \
|
|
||||||
$(TARGET_DIR)/etc/inittab
|
|
||||||
endef
|
|
||||||
else
|
|
||||||
define BUSYBOX_SET_GETTY
|
|
||||||
$(SED) '/# GENERIC_SERIAL$$/s~^.*#~#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 #~' $(TARGET_DIR)/etc/inittab
|
|
||||||
endef
|
|
||||||
endif # BR2_TARGET_GENERIC_GETTY
|
|
||||||
BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY
|
|
||||||
|
|
||||||
BUSYBOX_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB
|
|
||||||
|
|
||||||
endif # BR2_INIT_BUSYBOX
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# enable relevant options to allow the Busybox less applet to be used
|
|
||||||
# as a systemd pager
|
|
||||||
ifeq ($(BR2_PACKAGE_SYSTEMD):$(BR2_PACKAGE_LESS),y:)
|
|
||||||
define BUSYBOX_SET_LESS_FLAGS
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_LESS_DASHCMD)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_LESS_RAW)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_LESS_TRUNCATE)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_LESS_FLAGS)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_LESS_ENV)
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES),y)
|
|
||||||
define BUSYBOX_SET_INDIVIDUAL_BINARIES
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BUILD_LIBBUSYBOX,$(BUSYBOX_BUILD_CONFIG))
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_INDIVIDUAL,$(BUSYBOX_BUILD_CONFIG))
|
|
||||||
endef
|
|
||||||
|
|
||||||
define BUSYBOX_INSTALL_INDIVIDUAL_BINARIES
|
|
||||||
rm -f $(TARGET_DIR)/bin/busybox
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Only install our logging scripts if no other package does it.
|
|
||||||
ifeq ($(BR2_PACKAGE_SYSKLOGD)$(BR2_PACKAGE_RSYSLOG)$(BR2_PACKAGE_SYSLOG_NG),)
|
|
||||||
define BUSYBOX_INSTALL_LOGGING_SCRIPT
|
|
||||||
if grep -q CONFIG_SYSLOGD=y $(@D)/.config; \
|
|
||||||
then \
|
|
||||||
$(INSTALL) -m 0755 -D package/busybox/S01syslogd \
|
|
||||||
$(TARGET_DIR)/etc/init.d/S01syslogd; \
|
|
||||||
fi; \
|
|
||||||
if grep -q CONFIG_KLOGD=y $(@D)/.config; \
|
|
||||||
then \
|
|
||||||
$(INSTALL) -m 0755 -D package/busybox/S02klogd \
|
|
||||||
$(TARGET_DIR)/etc/init.d/S02klogd; \
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Only install our sysctl scripts if no other package does it.
|
|
||||||
ifeq ($(BR2_PACKAGE_PROCPS_NG),)
|
|
||||||
define BUSYBOX_INSTALL_SYSCTL_SCRIPT
|
|
||||||
if grep -q CONFIG_BB_SYSCTL=y $(@D)/.config; \
|
|
||||||
then \
|
|
||||||
$(INSTALL) -m 0755 -D package/busybox/S02sysctl \
|
|
||||||
$(TARGET_DIR)/etc/init.d/S02sysctl ; \
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(BR2_INIT_BUSYBOX),y)
|
|
||||||
define BUSYBOX_INSTALL_INITTAB
|
|
||||||
if test ! -e $(TARGET_DIR)/etc/inittab; then \
|
|
||||||
$(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab; \
|
|
||||||
fi
|
|
||||||
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
|
|
||||||
else
|
|
||||||
define BUSYBOX_LINUX_PAM
|
|
||||||
$(call KCONFIG_DISABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG))
|
|
||||||
endef
|
|
||||||
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
|
|
||||||
|
|
||||||
# Add /bin/{a,hu}sh to /etc/shells otherwise some login tools like dropbear
|
|
||||||
# can reject the user connection. See man shells.
|
|
||||||
define BUSYBOX_INSTALL_ADD_TO_SHELLS
|
|
||||||
if grep -q CONFIG_ASH=y $(BUSYBOX_DIR)/.config; then \
|
|
||||||
grep -qsE '^/bin/ash$$' $(TARGET_DIR)/etc/shells \
|
|
||||||
|| echo "/bin/ash" >> $(TARGET_DIR)/etc/shells; \
|
|
||||||
fi
|
|
||||||
if grep -q CONFIG_HUSH=y $(BUSYBOX_DIR)/.config; then \
|
|
||||||
grep -qsE '^/bin/hush$$' $(TARGET_DIR)/etc/shells \
|
|
||||||
|| echo "/bin/hush" >> $(TARGET_DIR)/etc/shells; \
|
|
||||||
fi
|
|
||||||
endef
|
|
||||||
BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_INSTALL_ADD_TO_SHELLS
|
|
||||||
|
|
||||||
define BUSYBOX_KCONFIG_FIXUP_CMDS
|
|
||||||
$(BUSYBOX_SET_MMU)
|
|
||||||
$(BUSYBOX_PREFER_STATIC)
|
|
||||||
$(BUSYBOX_SET_MDEV)
|
|
||||||
$(BUSYBOX_SET_CRYPT_SHA)
|
|
||||||
$(BUSYBOX_LINUX_PAM)
|
|
||||||
$(BUSYBOX_SET_INIT)
|
|
||||||
$(BUSYBOX_SET_WATCHDOG)
|
|
||||||
$(BUSYBOX_SET_SELINUX)
|
|
||||||
$(BUSYBOX_SET_LESS_FLAGS)
|
|
||||||
$(BUSYBOX_SET_INDIVIDUAL_BINARIES)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define BUSYBOX_BUILD_CMDS
|
|
||||||
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define BUSYBOX_INSTALL_TARGET_CMDS
|
|
||||||
# Use the 'noclobber' install rule, to prevent BusyBox from overwriting
|
|
||||||
# any full-blown versions of apps installed by other packages.
|
|
||||||
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install-noclobber
|
|
||||||
$(BUSYBOX_INSTALL_INDIVIDUAL_BINARIES)
|
|
||||||
$(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_SYSCTL_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))
|
|
|
@ -1,39 +0,0 @@
|
||||||
# /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 /dev/shm
|
|
||||||
::sysinit:/bin/mount -a
|
|
||||||
::sysinit:/sbin/swapon -a
|
|
||||||
null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd
|
|
||||||
null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin
|
|
||||||
null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
|
|
||||||
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
|
|
||||||
::sysinit:/bin/hostname -F /etc/hostname
|
|
||||||
# now run any rc scripts
|
|
||||||
::sysinit:/etc/init.d/rcS
|
|
||||||
|
|
||||||
# Put a getty on the serial port
|
|
||||||
console::respawn:/sbin/getty -L console 0 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 -f
|
|
|
@ -1,39 +0,0 @@
|
||||||
# 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
|
|
||||||
ttyUSB[0-9]* root:root 660
|
|
||||||
|
|
||||||
# alsa sound devices
|
|
||||||
snd/pcm.* root:audio 660
|
|
||||||
snd/control.* root:audio 660
|
|
||||||
snd/midi.* root:audio 660
|
|
||||||
snd/seq root:audio 660
|
|
||||||
snd/timer root:audio 660
|
|
||||||
|
|
||||||
# input stuff
|
|
||||||
input/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
|
|
||||||
|
|
||||||
# load modules
|
|
||||||
$MODALIAS=.* root:root 660 @modprobe "$MODALIAS"
|
|
|
@ -1,105 +0,0 @@
|
||||||
#!/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"
|
|
||||||
# Handle stateful DHCPv6 like DHCPv4
|
|
||||||
[ -n "$ipv6" ] && ip="$ipv6/128"
|
|
||||||
|
|
||||||
if [ -z "${IF_WAIT_DELAY}" ]; then
|
|
||||||
IF_WAIT_DELAY=10
|
|
||||||
fi
|
|
||||||
|
|
||||||
wait_for_ipv6_default_route() {
|
|
||||||
printf "Waiting for IPv6 default route to appear"
|
|
||||||
while [ $IF_WAIT_DELAY -gt 0 ]; do
|
|
||||||
if ip -6 route list | grep -q default; then
|
|
||||||
printf "\n"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
printf "."
|
|
||||||
: $((IF_WAIT_DELAY -= 1))
|
|
||||||
done
|
|
||||||
printf " timeout!\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
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 -c $interface && /usr/sbin/avahi-autoipd -k $interface
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
leasefail|nak)
|
|
||||||
if [ -x /usr/sbin/avahi-autoipd ]; then
|
|
||||||
/usr/sbin/avahi-autoipd -c $interface || /usr/sbin/avahi-autoipd -wD $interface --no-chroot
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
renew|bound)
|
|
||||||
if [ -x /usr/sbin/avahi-autoipd ]; then
|
|
||||||
/usr/sbin/avahi-autoipd -c $interface && /usr/sbin/avahi-autoipd -k $interface
|
|
||||||
fi
|
|
||||||
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
|
|
||||||
if [ -n "$ipv6" ] ; then
|
|
||||||
wait_for_ipv6_default_route
|
|
||||||
fi
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# prefer rfc3397 domain search list (option 119) if available
|
|
||||||
if [ -n "$search" ]; then
|
|
||||||
search_list=$search
|
|
||||||
elif [ -n "$domain" ]; then
|
|
||||||
search_list=$domain
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -n "$search_list" ] &&
|
|
||||||
echo "search $search_list" >> $RESOLV_CONF
|
|
||||||
|
|
||||||
for i in $dns ; do
|
|
||||||
echo adding dns $i
|
|
||||||
echo "nameserver $i" >> $RESOLV_CONF
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
HOOK_DIR="$0.d"
|
|
||||||
for hook in "${HOOK_DIR}/"*; do
|
|
||||||
[ -f "${hook}" -a -x "${hook}" ] || continue
|
|
||||||
"${hook}" "${@}"
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 0
|
|
Loading…
Reference in New Issue