diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-09-04 15:03:08 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-09-04 15:03:08 +0200 |
commit | 48f9dc2b6a35cf2872613d74821d6e40379b984e (patch) | |
tree | ad82cc56b5e1566016b0f334eecdba31f7b619da | |
parent | 209f4dc115344db63035020f79096b0cfc299335 (diff) |
busybox oldconfig, busybox klogd [+] syslogd, initscript launches klogd [+] syslogd, udhcpc log to syslog
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | config/busybox.config | 44 | ||||
-rw-r--r-- | scripts/init.rootfs | 13 |
3 files changed, 36 insertions, 24 deletions
@@ -120,6 +120,9 @@ $(BUSYBOX_TARGET): make -C '$(BUSYBOX_BUILD_DIR)' oldconfig make -C '$(BUSYBOX_BUILD_DIR)' -j$(BUILDJOBS) ARCH='$(ARCH)' V=1 all make -C '$(BUSYBOX_BUILD_DIR)' -j$(BUILDJOBS) ARCH='$(ARCH)' install + sed -i 's,^\(CONFIG_EXTRA_CFLAGS[ ]*=\).*,\1"",g' '$(BUSYBOX_BUILD_DIR)/.config' + sed -i 's,^\(CONFIG_EXTRA_LDFLAGS[ ]*=\).*,\1"",g' '$(BUSYBOX_BUILD_DIR)/.config' + sed -i 's,^\(CONFIG_PREFIX[ ]*=\).*,\1"./_install",g' '$(BUSYBOX_BUILD_DIR)/.config' build: extract $(LINUX_TARGET) $(MUSL_TARGET) $(BUSYBOX_TARGET) diff --git a/config/busybox.config b/config/busybox.config index 5687b3d..356f128 100644 --- a/config/busybox.config +++ b/config/busybox.config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Busybox version: 1.29.2 -# Mon Aug 27 02:37:47 2018 +# Tue Sep 4 15:00:12 2018 # CONFIG_HAVE_DOT_CONFIG=y @@ -479,23 +479,23 @@ CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE=y CONFIG_BOOTCHARTD=y CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y -CONFIG_HALT=y +# CONFIG_HALT is not set CONFIG_POWEROFF=y CONFIG_REBOOT=y CONFIG_FEATURE_WAIT_FOR_INIT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" -CONFIG_INIT=y -CONFIG_LINUXRC=y -CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_CALL_TELINIT=y +CONFIG_TELINIT_PATH="/sbin/telinit" +# CONFIG_INIT is not set +# CONFIG_LINUXRC is not set +# CONFIG_FEATURE_USE_INITTAB is not set # CONFIG_FEATURE_KILL_REMOVED is not set CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_INIT_QUIET=y +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_INIT_SYSLOG is not set +# CONFIG_FEATURE_INIT_QUIET is not set # CONFIG_FEATURE_INIT_COREDUMPS is not set -CONFIG_INIT_TERMINAL_TYPE="linux" -CONFIG_FEATURE_INIT_MODIFY_CMDLINE=y +CONFIG_INIT_TERMINAL_TYPE="" +# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set # # Login/Password Management Utilities @@ -542,7 +542,7 @@ CONFIG_VLOCK=y CONFIG_CHATTR=y CONFIG_FSCK=y CONFIG_LSATTR=y -# CONFIG_TUNE2FS is not set +CONFIG_TUNE2FS=y # # Linux Module Utilities @@ -825,7 +825,7 @@ CONFIG_WATCHDOG=y CONFIG_FEATURE_IPV6=y # CONFIG_FEATURE_UNIX_LOCAL is not set CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +CONFIG_VERBOSE_RESOLUTION_ERRORS=y CONFIG_ARP=y CONFIG_ARPING=y CONFIG_BRCTL=y @@ -900,7 +900,7 @@ CONFIG_NAMEIF=y CONFIG_FEATURE_NAMEIF_EXTENDED=y CONFIG_NBDCLIENT=y CONFIG_NC=y -# CONFIG_NETCAT is not set +CONFIG_NETCAT=y CONFIG_NC_SERVER=y CONFIG_NC_EXTRA=y CONFIG_NC_110_COMPAT=y @@ -969,11 +969,11 @@ CONFIG_UDHCPC=y CONFIG_FEATURE_UDHCPC_ARPING=y CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -# CONFIG_UDHCPC6 is not set -# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set -# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set -# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set -# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set +CONFIG_UDHCPC6=y +CONFIG_FEATURE_UDHCPC6_RFC3646=y +CONFIG_FEATURE_UDHCPC6_RFC4704=y +CONFIG_FEATURE_UDHCPC6_RFC4833=y +CONFIG_FEATURE_UDHCPC6_RFC5970=y # # Common options for DHCP applets @@ -1089,7 +1089,7 @@ CONFIG_ASH=y CONFIG_ASH_OPTIMIZE_FOR_SIZE=y CONFIG_ASH_INTERNAL_GLOB=y CONFIG_ASH_BASH_COMPAT=y -# CONFIG_ASH_BASH_SOURCE_CURDIR is not set +CONFIG_ASH_BASH_SOURCE_CURDIR=y CONFIG_ASH_BASH_NOT_FOUND_HOOK=y CONFIG_ASH_JOB_CONTROL=y CONFIG_ASH_ALIAS=y @@ -1108,7 +1108,7 @@ CONFIG_HUSH=y CONFIG_HUSH_BASH_COMPAT=y CONFIG_HUSH_BRACE_EXPANSION=y CONFIG_HUSH_LINENO_VAR=y -# CONFIG_HUSH_BASH_SOURCE_CURDIR is not set +CONFIG_HUSH_BASH_SOURCE_CURDIR=y CONFIG_HUSH_INTERACTIVE=y CONFIG_HUSH_SAVEHISTORY=y CONFIG_HUSH_JOB=y diff --git a/scripts/init.rootfs b/scripts/init.rootfs index 76933c9..651acef 100644 --- a/scripts/init.rootfs +++ b/scripts/init.rootfs @@ -1,6 +1,7 @@ #!/bin/sh export PATH="/bin:/sbin:/usr/bin:/usr/sbin" export PS1='\w \h\$ ' +UDHCPC_ARGS= mkdir -p /dev /proc /sys mount -t devtmpfs none /dev @@ -8,6 +9,14 @@ mount -t proc none /proc mount -t sysfs none /sys mount -t debugfs nodev /sys/kernel/debug +if [ x"$(command -v klogd)" != x ]; then + $(command -v klogd) +fi +if [ x"$(command -v syslogd)" != x ]; then + $(command -v syslogd) -C + UDHCPC_ARGS='-S' +fi + echo '4 4 1 7' >/proc/sys/kernel/printk cat <<! @@ -33,12 +42,12 @@ for arg in $(cat /proc/cmdline | tr '[:upper:]' '[:lower:]'); do done for arg in $(cat /proc/cmdline | tr '[:upper:]' '[:lower:]'); do - if [ x"${arg}" = xnet ]; then + if [ x"$(command -v udhcpc)" != x -a x"${arg}" = xnet ]; then echo '*** INIT NETWORK ***' for netif in $(ls /sys/class/net); do ifconfig ${netif} 0.0.0.0 up done - udhcpc -R + $(command -v udhcpc) -R ${UDHCPC_ARGS} fi done |