Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
54
package/utils/adb/Makefile
Normal file
54
package/utils/adb/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
#Based on adb package from AUR https://aur.archlinux.org/packages/adb/ , reused Makefile
|
||||
|
||||
PKG_NAME:=adb
|
||||
PKG_VERSION:=android.5.0.2_r1
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://android.googlesource.com/platform/system/core
|
||||
PKG_SOURCE_VERSION:=6fe92d1a3fb17545d82d020a3c995f32e6b71f9d
|
||||
PKG_MIRROR_HASH:=a9b4b86602dfc0d4fc9e1d0f78dc83e648a931fb04f5a4be9b1f0054a8cebf7e
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
PKG_MAINTAINER:=Henryk Heisig <hyniu@o2.pl>
|
||||
PKG_CPE_ID:=cpe:/a:google:android_debug_bridge
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_BIG_ENDIAN),y)
|
||||
TARGET_CFLAGS+= -DHAVE_BIG_ENDIAN=1
|
||||
endif
|
||||
TARGET_CFLAGS+= -D_GNU_SOURCE
|
||||
|
||||
define Package/adb
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Android Debug Bridge CLI tool
|
||||
URL:=http://tools.android.com/
|
||||
DEPENDS:=+zlib +libopenssl +libpthread
|
||||
endef
|
||||
|
||||
define Package/adb/description
|
||||
Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device.
|
||||
endef
|
||||
|
||||
# Nothing just to be sure
|
||||
#define Build/Configure
|
||||
#endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/adb/ \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
TARGET=Linux \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
endef
|
||||
|
||||
define Package/adb/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/adb/adb $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,adb))
|
||||
45
package/utils/adb/patches/001-create_Makefile.patch
Normal file
45
package/utils/adb/patches/001-create_Makefile.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
--- /dev/null
|
||||
+++ b/adb/Makefile
|
||||
@@ -0,0 +1,42 @@
|
||||
+SRCS+= adb.c
|
||||
+SRCS+= adb_auth_host.c
|
||||
+SRCS+= adb_client.c
|
||||
+SRCS+= commandline.c
|
||||
+SRCS+= console.c
|
||||
+SRCS+= fdevent.c
|
||||
+SRCS+= file_sync_client.c
|
||||
+SRCS+= get_my_path_linux.c
|
||||
+SRCS+= services.c
|
||||
+SRCS+= sockets.c
|
||||
+SRCS+= transport.c
|
||||
+SRCS+= transport_local.c
|
||||
+SRCS+= transport_usb.c
|
||||
+SRCS+= usb_linux.c
|
||||
+
|
||||
+VPATH+= ../libcutils
|
||||
+SRCS+= load_file.c
|
||||
+SRCS+= socket_inaddr_any_server.c
|
||||
+SRCS+= socket_local_client.c
|
||||
+SRCS+= socket_local_server.c
|
||||
+SRCS+= socket_loopback_client.c
|
||||
+SRCS+= socket_loopback_server.c
|
||||
+SRCS+= socket_network_client.c
|
||||
+
|
||||
+VPATH+= ../libzipfile
|
||||
+SRCS+= centraldir.c
|
||||
+SRCS+= zipfile.c
|
||||
+
|
||||
+CPPFLAGS+= -DADB_HOST=1
|
||||
+CPPFLAGS+= -DHAVE_FORKEXEC=1
|
||||
+CPPFLAGS+= -I.
|
||||
+CPPFLAGS+= -I../include
|
||||
+CPPFLAGS+= -D_FILE_OFFSET_BITS=64
|
||||
+
|
||||
+LIBS+= -lcrypto -lpthread -lz
|
||||
+
|
||||
+OBJS= $(SRCS:.c=.o)
|
||||
+
|
||||
+all: adb
|
||||
+
|
||||
+adb: $(OBJS)
|
||||
+ $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
||||
10
package/utils/adb/patches/003-fix-musl-build.patch
Normal file
10
package/utils/adb/patches/003-fix-musl-build.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/adb/usb_linux.c
|
||||
+++ b/adb/usb_linux.c
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <sys/time.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
28
package/utils/adb/patches/010-openssl-1.1.patch
Normal file
28
package/utils/adb/patches/010-openssl-1.1.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
--- a/adb/adb_auth_host.c
|
||||
+++ b/adb/adb_auth_host.c
|
||||
@@ -83,7 +83,13 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
|
||||
}
|
||||
|
||||
BN_set_bit(r32, 32);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+ const BIGNUM *rsa_n, *rsa_e;
|
||||
+ RSA_get0_key(rsa, &rsa_n, &rsa_e, NULL);
|
||||
+ BN_copy(n, rsa_n);
|
||||
+#else
|
||||
BN_copy(n, rsa->n);
|
||||
+#endif
|
||||
BN_set_bit(r, RSANUMWORDS * 32);
|
||||
BN_mod_sqr(rr, r, n, ctx);
|
||||
BN_div(NULL, rem, n, r32, ctx);
|
||||
@@ -97,7 +103,11 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
|
||||
BN_div(n, rem, n, r32, ctx);
|
||||
pkey->n[i] = BN_get_word(rem);
|
||||
}
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+ pkey->exponent = BN_get_word(rsa_e);
|
||||
+#else
|
||||
pkey->exponent = BN_get_word(rsa->e);
|
||||
+#endif
|
||||
|
||||
out:
|
||||
BN_free(n0inv);
|
||||
@@ -0,0 +1,39 @@
|
||||
From 58b01e01875e2f6ae593ded197430bc23713dd0a Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Rohloff <lundril@gmx.de>
|
||||
Date: Fri, 16 May 2014 21:51:41 +0200
|
||||
Subject: [PATCH] ADB on linux: Handle USB SuperSpeed extra Descriptors
|
||||
|
||||
Under Linux, ADB manually parses USB Descriptors to check for
|
||||
possible ADB USB Interfaces. USB Devices connected with SuperSpeed
|
||||
will exhibit extra USB SuperSpeed Endpoint Companion Descriptors.
|
||||
This patch handles these USB SuperSpeed specific USB Descriptors.
|
||||
|
||||
Change-Id: Icd1e5fdde0b324c7df4f933583499f2c52a922f3
|
||||
Signed-off-by: Ingo Rohloff <lundril@gmx.de>
|
||||
---
|
||||
adb/usb_linux.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
--- a/adb/usb_linux.c
|
||||
+++ b/adb/usb_linux.c
|
||||
@@ -238,8 +238,20 @@ static void find_usb_device(const char *
|
||||
// looks like ADB...
|
||||
ep1 = (struct usb_endpoint_descriptor *)bufptr;
|
||||
bufptr += USB_DT_ENDPOINT_SIZE;
|
||||
+ // For USB 3.0 SuperSpeed devices, skip potential
|
||||
+ // USB 3.0 SuperSpeed Endpoint Companion descriptor
|
||||
+ if (bufptr+2 <= devdesc + desclength &&
|
||||
+ bufptr[0] == USB_DT_SS_EP_COMP_SIZE &&
|
||||
+ bufptr[1] == USB_DT_SS_ENDPOINT_COMP) {
|
||||
+ bufptr += USB_DT_SS_EP_COMP_SIZE;
|
||||
+ }
|
||||
ep2 = (struct usb_endpoint_descriptor *)bufptr;
|
||||
bufptr += USB_DT_ENDPOINT_SIZE;
|
||||
+ if (bufptr+2 <= devdesc + desclength &&
|
||||
+ bufptr[0] == USB_DT_SS_EP_COMP_SIZE &&
|
||||
+ bufptr[1] == USB_DT_SS_ENDPOINT_COMP) {
|
||||
+ bufptr += USB_DT_SS_EP_COMP_SIZE;
|
||||
+ }
|
||||
|
||||
if (bufptr > devdesc + desclength ||
|
||||
ep1->bLength != USB_DT_ENDPOINT_SIZE ||
|
||||
184
package/utils/audit/Makefile
Normal file
184
package/utils/audit/Makefile
Normal file
@@ -0,0 +1,184 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=audit-userspace
|
||||
PKG_VERSION:=3.1.4
|
||||
PKG_RELEASE:=2
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/linux-audit/audit-userspace/archive/refs/tags/v$(PKG_VERSION).tar.gz?
|
||||
PKG_HASH:=aec501760acd13ebbe00e78b9b59f795d16a430b1d673628e346cd18905c594b
|
||||
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:linux_audit_project:linux_audit
|
||||
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_KERNEL_IO_URING
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/audit/Default
|
||||
TITLE:=Audit
|
||||
URL:=https://github.com/linux-audit/
|
||||
endef
|
||||
|
||||
define Package/audit/Default/description
|
||||
The audit package contains the user space utilities for
|
||||
storing and searching the audit records generated by
|
||||
the audit subsystem in the kernel.
|
||||
endef
|
||||
|
||||
define Package/libaudit
|
||||
$(call Package/audit/Default)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE+= (libaudit)
|
||||
endef
|
||||
|
||||
define Package/libaudit/description
|
||||
$(call Package/audit/Default/description)
|
||||
This package contains the audit shared library.
|
||||
endef
|
||||
|
||||
define Package/libauparse
|
||||
$(call Package/audit/Default)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE+= (libauparse)
|
||||
DEPENDS:= +libaudit
|
||||
endef
|
||||
|
||||
define Package/libauparse/description
|
||||
$(call Package/audit/Default/description)
|
||||
This package contains the audit parsing shared library.
|
||||
endef
|
||||
|
||||
define Package/audit-utils
|
||||
$(call Package/audit/Default)
|
||||
SECTION:=admin
|
||||
CATEGORY:=Administration
|
||||
TITLE+= (utilities)
|
||||
DEPENDS:= +libaudit +libauparse
|
||||
endef
|
||||
|
||||
define Package/audit-utils/description
|
||||
$(call Package/audit/Default/description)
|
||||
This package contains the audit utilities.
|
||||
endef
|
||||
|
||||
define Package/auditd
|
||||
$(call Package/audit/Default)
|
||||
SECTION:=admin
|
||||
CATEGORY:=Administration
|
||||
TITLE+= (daemon)
|
||||
DEPENDS:= +libaudit +libauparse +audit-utils +libev
|
||||
endef
|
||||
|
||||
define Package/auditd/description
|
||||
$(call Package/audit/Default/description)
|
||||
This package contains the audit daemon.
|
||||
endef
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
|
||||
CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
|
||||
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
|
||||
CC_FOR_BUILD="$(HOSTCC)"
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-debug \
|
||||
--disable-systemd \
|
||||
--disable-zos-remote \
|
||||
--disable-gssapi-krb5 \
|
||||
--without-libcap-ng \
|
||||
--without-python \
|
||||
--without-python3 \
|
||||
--without-golang
|
||||
|
||||
ifeq ($(ARCH),aarch64)
|
||||
CONFIGURE_ARGS += --with-aarch64
|
||||
else ifeq ($(ARCH),arm)
|
||||
CONFIGURE_ARGS += --with-arm
|
||||
endif
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--disable-systemd \
|
||||
--disable-zos-remote \
|
||||
--disable-gssapi-krb5 \
|
||||
--without-libcap-ng \
|
||||
--without-python \
|
||||
--without-python3 \
|
||||
--without-golang
|
||||
|
||||
define Host/Install
|
||||
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib $(HOST_MAKE_FLAGS) install
|
||||
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/init.d $(HOST_MAKE_FLAGS) install
|
||||
endef
|
||||
|
||||
# We can't use the default, as the default passes $(MAKE_ARGS), which
|
||||
# overrides CC, CFLAGS, etc. and defeats the *_FOR_BUILD definitions
|
||||
# passed in CONFIGURE_VARS
|
||||
define Build/Compile
|
||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib $(MAKE_INSTALL_FLAGS) install
|
||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/init.d $(MAKE_INSTALL_FLAGS) install
|
||||
$(call Build/Install/Default,install)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libaudit/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libaudit.so* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/libaudit.conf $(1)/etc/
|
||||
endef
|
||||
|
||||
define Package/libauparse/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libauparse.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/audit-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/sbin/{audisp-remote,audisp-syslog,auditctl,augenrules,aureport,ausearch,autrace} \
|
||||
$(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/auditd/install
|
||||
$(INSTALL_DIR) $(1)/etc/audit
|
||||
$(CP) $(PKG_INSTALL_DIR)/etc/audit/* $(1)/etc/audit/
|
||||
# af_unix plugin is not installed. Remove it's .conf.
|
||||
if [[ -f $(1)/etc/audit/plugins.d/af_unix.conf ]] ; then rm $(1)/etc/audit/plugins.d/af_unix.conf ; fi
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/audit.init $(1)/etc/init.d/audit
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/auditd $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,libaudit))
|
||||
$(eval $(call BuildPackage,libauparse))
|
||||
$(eval $(call BuildPackage,audit-utils))
|
||||
$(eval $(call BuildPackage,auditd))
|
||||
16
package/utils/audit/files/audit.init
Normal file
16
package/utils/audit/files/audit.init
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (c) 2014 OpenWrt.org
|
||||
|
||||
START=11
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/auditd
|
||||
|
||||
start_service() {
|
||||
mkdir -p /var/log/audit
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -n
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
test -f /etc/audit/rules.d/audit.rules && /usr/sbin/auditctl -R /etc/audit/rules.d/audit.rules
|
||||
}
|
||||
@@ -0,0 +1,615 @@
|
||||
From 429d031edd52566eeba03c3b3af32ad6e103fd94 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Grubb <ausearch.1@gmail.com>
|
||||
Date: Fri, 3 May 2024 17:33:39 -0400
|
||||
Subject: [PATCH] Implicit builtin functions
|
||||
|
||||
Correct a number of places where printf is being used without a prototype.
|
||||
All cases are in libraries which should not be using printf. Change them
|
||||
to return an error rather than communicate the problem.
|
||||
|
||||
This is a backport of 8c7eaa7
|
||||
---
|
||||
audisp/audispd-llist.c | 10 +++++-----
|
||||
audisp/audispd-llist.h | 4 ++--
|
||||
auparse/normalize-llist.c | 12 ++++++------
|
||||
auparse/normalize-llist.h | 4 ++--
|
||||
auparse/normalize.c | 14 +++++++++-----
|
||||
src/auditctl-llist.c | 18 +++++++++---------
|
||||
src/auditctl-llist.h | 4 ++--
|
||||
src/ausearch-avc.c | 16 ++++++++--------
|
||||
src/ausearch-avc.h | 4 ++--
|
||||
src/ausearch-int.c | 12 ++++++------
|
||||
src/ausearch-int.h | 4 ++--
|
||||
src/ausearch-llist.c | 14 +++++++-------
|
||||
src/ausearch-llist.h | 2 +-
|
||||
src/ausearch-nvpair.c | 12 ++++++------
|
||||
src/ausearch-nvpair.h | 4 ++--
|
||||
src/ausearch-string.c | 10 +++++-----
|
||||
src/ausearch-string.h | 2 +-
|
||||
tools/aulastlog/aulastlog-llist.c | 18 +++++++++---------
|
||||
tools/aulastlog/aulastlog-llist.h | 4 ++--
|
||||
19 files changed, 86 insertions(+), 82 deletions(-)
|
||||
|
||||
--- a/audisp/audispd-llist.c
|
||||
+++ b/audisp/audispd-llist.c
|
||||
@@ -69,15 +69,13 @@ unsigned int plist_count_active(const co
|
||||
return cnt;
|
||||
}
|
||||
|
||||
-void plist_append(conf_llist *l, plugin_conf_t *p)
|
||||
+int plist_append(conf_llist *l, plugin_conf_t *p)
|
||||
{
|
||||
lnode* newnode;
|
||||
|
||||
newnode = malloc(sizeof(lnode));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
if (p) {
|
||||
void *pp = malloc(sizeof(struct plugin_conf));
|
||||
@@ -98,6 +96,8 @@ void plist_append(conf_llist *l, plugin_
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void plist_clear(conf_llist* l)
|
||||
--- a/audisp/audispd-llist.h
|
||||
+++ b/audisp/audispd-llist.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* audispd-llist.h - Header file for ausearch-conf_llist.c
|
||||
-* Copyright (c) 2007,2013 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2007,2013 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
@@ -51,7 +51,7 @@ unsigned int plist_count_active(const co
|
||||
void plist_last(conf_llist *l);
|
||||
lnode *plist_next(conf_llist *l);
|
||||
static inline lnode *plist_get_cur(conf_llist *l) { return l->cur; }
|
||||
-void plist_append(conf_llist *l, plugin_conf_t *p);
|
||||
+int plist_append(conf_llist *l, plugin_conf_t *p);
|
||||
void plist_clear(conf_llist* l);
|
||||
void plist_mark_all_unchecked(conf_llist* l);
|
||||
lnode *plist_find_unchecked(conf_llist* l);
|
||||
--- a/auparse/normalize-llist.c
|
||||
+++ b/auparse/normalize-llist.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* normalize-llist.c - Minimal linked list library
|
||||
- * Copyright (c) 2016-17 Red Hat Inc., Durham, North Carolina.
|
||||
+ * Copyright (c) 2016-17 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -61,15 +61,14 @@ data_node *cllist_next(cllist *l)
|
||||
return l->cur;
|
||||
}
|
||||
|
||||
-void cllist_append(cllist *l, uint32_t num, void *data)
|
||||
+// Returns 0 on success and 1 on error
|
||||
+int cllist_append(cllist *l, uint32_t num, void *data)
|
||||
{
|
||||
data_node *newnode;
|
||||
|
||||
newnode = malloc(sizeof(data_node));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
newnode->num = num;
|
||||
newnode->data = data;
|
||||
@@ -84,5 +83,6 @@ void cllist_append(cllist *l, uint32_t n
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
--- a/auparse/normalize-llist.h
|
||||
+++ b/auparse/normalize-llist.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* normalize-llist.h - Header file for normalize-llist.c
|
||||
- * Copyright (c) 2016-17 Red Hat Inc., Durham, North Carolina.
|
||||
+ * Copyright (c) 2016-17 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -53,7 +53,7 @@ AUDIT_HIDDEN_START
|
||||
void cllist_create(cllist *l, void (*cleanup)(void *));
|
||||
void cllist_clear(cllist* l);
|
||||
data_node *cllist_next(cllist *l);
|
||||
-void cllist_append(cllist *l, uint32_t num, void *data);
|
||||
+int cllist_append(cllist *l, uint32_t num, void *data);
|
||||
|
||||
AUDIT_HIDDEN_END
|
||||
|
||||
--- a/auparse/normalize.c
|
||||
+++ b/auparse/normalize.c
|
||||
@@ -179,7 +179,8 @@ static unsigned int add_subj_attr(aupars
|
||||
if ((auparse_find_field(au, str))) {
|
||||
attr = set_record(0, rnum);
|
||||
attr = set_field(attr, auparse_get_field_num(au));
|
||||
- cllist_append(&D.actor.attr, attr, NULL);
|
||||
+ if (cllist_append(&D.actor.attr, attr, NULL))
|
||||
+ return 1;
|
||||
return 0;
|
||||
} else
|
||||
auparse_goto_record_num(au, rnum);
|
||||
@@ -224,7 +225,8 @@ static unsigned int add_obj_attr(auparse
|
||||
if ((auparse_find_field(au, str))) {
|
||||
attr = set_record(0, rnum);
|
||||
attr = set_field(attr, auparse_get_field_num(au));
|
||||
- cllist_append(&D.thing.attr, attr, NULL);
|
||||
+ if (cllist_append(&D.thing.attr, attr, NULL))
|
||||
+ return 1;
|
||||
return 0;
|
||||
} else
|
||||
auparse_goto_record_num(au, rnum);
|
||||
@@ -360,21 +362,23 @@ static void collect_id_obj2(auparse_stat
|
||||
}
|
||||
}
|
||||
|
||||
-static void collect_path_attrs(auparse_state_t *au)
|
||||
+static int collect_path_attrs(auparse_state_t *au)
|
||||
{
|
||||
value_t attr;
|
||||
unsigned int rnum = auparse_get_record_num(au);
|
||||
|
||||
auparse_first_field(au);
|
||||
if (add_obj_attr(au, "mode", rnum))
|
||||
- return; // Failed opens don't have anything else
|
||||
+ return 1; // Failed opens don't have anything else
|
||||
|
||||
// All the rest of the fields matter
|
||||
while ((auparse_next_field(au))) {
|
||||
attr = set_record(0, rnum);
|
||||
attr = set_field(attr, auparse_get_field_num(au));
|
||||
- cllist_append(&D.thing.attr, attr, NULL);
|
||||
+ if (cllist_append(&D.thing.attr, attr, NULL))
|
||||
+ return 1;
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static void collect_cwd_attrs(auparse_state_t *au)
|
||||
--- a/src/auditctl-llist.c
|
||||
+++ b/src/auditctl-llist.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ausearch-llist.c - Minimal linked list library
|
||||
-* Copyright (c) 2005 Red Hat Inc., Durham, North Carolina.
|
||||
-* All Rights Reserved.
|
||||
+* Copyright (c) 2005 Red Hat Inc.
|
||||
+* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
* terms of the GNU General Public License as published by the Free
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to the
|
||||
-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
|
||||
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1335, USA.
|
||||
*
|
||||
* Authors:
|
||||
@@ -59,19 +59,17 @@ lnode *list_next(llist *l)
|
||||
return l->cur;
|
||||
}
|
||||
|
||||
-void list_append(llist *l, struct audit_rule_data *r, size_t sz)
|
||||
+int list_append(llist *l, struct audit_rule_data *r, size_t sz)
|
||||
{
|
||||
lnode* newnode;
|
||||
|
||||
newnode = malloc(sizeof(lnode));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
if (r) {
|
||||
void *rr = malloc(sz);
|
||||
- if (rr)
|
||||
+ if (rr)
|
||||
memcpy(rr, r, sz);
|
||||
newnode->r = rr;
|
||||
} else
|
||||
@@ -89,6 +87,8 @@ void list_append(llist *l, struct audit_
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void list_clear(llist* l)
|
||||
--- a/src/auditctl-llist.h
|
||||
+++ b/src/auditctl-llist.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* auditctl-llist.h - Header file for ausearch-llist.c
|
||||
-* Copyright (c) 2005 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2005 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
@@ -50,7 +50,7 @@ void list_first(llist *l);
|
||||
void list_last(llist *l);
|
||||
lnode *list_next(llist *l);
|
||||
static inline lnode *list_get_cur(llist *l) { return l->cur; }
|
||||
-void list_append(llist *l, struct audit_rule_data *r, size_t sz);
|
||||
+int list_append(llist *l, struct audit_rule_data *r, size_t sz);
|
||||
void list_clear(llist* l);
|
||||
|
||||
#endif
|
||||
--- a/src/ausearch-avc.c
|
||||
+++ b/src/ausearch-avc.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ausearch-avc.c - Minimal linked list library for avcs
|
||||
-* Copyright (c) 2006,2008,2014 Red Hat Inc., Durham, North Carolina.
|
||||
-* All Rights Reserved.
|
||||
+* Copyright (c) 2006,2008,2014 Red Hat Inc.
|
||||
+* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
* terms of the GNU General Public License as published by the Free
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to the
|
||||
-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
|
||||
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1335, USA.
|
||||
*
|
||||
* Authors:
|
||||
@@ -62,15 +62,13 @@ static void alist_last(alist *l)
|
||||
l->cur = cur;
|
||||
}
|
||||
|
||||
-void alist_append(alist *l, anode *node)
|
||||
+int alist_append(alist *l, anode *node)
|
||||
{
|
||||
anode* newnode;
|
||||
|
||||
newnode = malloc(sizeof(anode));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
if (node->scontext)
|
||||
newnode->scontext = node->scontext;
|
||||
@@ -108,6 +106,8 @@ void alist_append(alist *l, anode *node)
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int alist_find_subj(alist *l)
|
||||
--- a/src/ausearch-avc.h
|
||||
+++ b/src/ausearch-avc.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ausearch-avc.h - Header file for ausearch-string.c
|
||||
-* Copyright (c) 2006,2008 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2006,2008 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
@@ -54,7 +54,7 @@ void alist_create(alist *l);
|
||||
static inline void alist_first(alist *l) { l->cur = l->head; }
|
||||
anode *alist_next(alist *l);
|
||||
static inline anode *alist_get_cur(alist *l) { return l->cur; }
|
||||
-void alist_append(alist *l, anode *node);
|
||||
+int alist_append(alist *l, anode *node);
|
||||
void anode_init(anode *an);
|
||||
void anode_clear(anode *an);
|
||||
void alist_clear(alist* l);
|
||||
--- a/src/ausearch-int.c
|
||||
+++ b/src/ausearch-int.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ausearch-int.c - Minimal linked list library for integers
|
||||
-* Copyright (c) 2005,2008 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2005,2008 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
@@ -41,15 +41,13 @@ int_node *ilist_next(ilist *l)
|
||||
return l->cur;
|
||||
}
|
||||
|
||||
-void ilist_append(ilist *l, int num, unsigned int hits, int aux)
|
||||
+int ilist_append(ilist *l, int num, unsigned int hits, int aux)
|
||||
{
|
||||
int_node* newnode;
|
||||
|
||||
newnode = malloc(sizeof(int_node));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
newnode->num = num;
|
||||
newnode->hits = hits;
|
||||
@@ -65,6 +63,8 @@ void ilist_append(ilist *l, int num, uns
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void ilist_clear(ilist* l)
|
||||
--- a/src/ausearch-int.h
|
||||
+++ b/src/ausearch-int.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ausearch-int.h - Header file for ausearch-int.c
|
||||
-* Copyright (c) 2005,2008 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2005,2008 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
@@ -48,7 +48,7 @@ void ilist_create(ilist *l);
|
||||
static inline void ilist_first(ilist *l) { l->cur = l->head; }
|
||||
int_node *ilist_next(ilist *l);
|
||||
static inline int_node *ilist_get_cur(ilist *l) { return l->cur; }
|
||||
-void ilist_append(ilist *l, int num, unsigned int hits, int aux);
|
||||
+int ilist_append(ilist *l, int num, unsigned int hits, int aux);
|
||||
void ilist_clear(ilist* l);
|
||||
|
||||
/* append a number if its not already on the list */
|
||||
--- a/src/ausearch-llist.c
|
||||
+++ b/src/ausearch-llist.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ausearch-llist.c - Minimal linked list library
|
||||
-* Copyright (c) 2005-2008,2011,2016 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2005-2008,2011,2016 Red Hat Inc.
|
||||
* Copyright (c) 2011 IBM Corp.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
@@ -102,15 +102,13 @@ lnode *list_prev(llist *l)
|
||||
return l->cur;
|
||||
}
|
||||
|
||||
-void list_append(llist *l, lnode *node)
|
||||
+int list_append(llist *l, lnode *node)
|
||||
{
|
||||
lnode* newnode;
|
||||
|
||||
newnode = malloc(sizeof(lnode));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
if (node->message)
|
||||
newnode->message = node->message;
|
||||
@@ -123,7 +121,7 @@ void list_append(llist *l, lnode *node)
|
||||
newnode->type = node->type;
|
||||
newnode->a0 = node->a0;
|
||||
newnode->a1 = node->a1;
|
||||
- newnode->item = l->cnt;
|
||||
+ newnode->item = l->cnt;
|
||||
newnode->next = NULL;
|
||||
|
||||
// if we are at top, fix this up
|
||||
@@ -135,6 +133,8 @@ void list_append(llist *l, lnode *node)
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int list_find_item(llist *l, unsigned int i)
|
||||
--- a/src/ausearch-llist.h
|
||||
+++ b/src/ausearch-llist.h
|
||||
@@ -107,7 +107,7 @@ void list_last(llist *l);
|
||||
lnode *list_next(llist *l);
|
||||
lnode *list_prev(llist *l);
|
||||
static inline lnode *list_get_cur(llist *l) { return l->cur; }
|
||||
-void list_append(llist *l, lnode *node);
|
||||
+int list_append(llist *l, lnode *node);
|
||||
void list_clear(llist* l);
|
||||
int list_get_event(llist* l, event *e);
|
||||
|
||||
--- a/src/ausearch-nvpair.c
|
||||
+++ b/src/ausearch-nvpair.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ausearch-nvpair.c - Minimal linked list library for name-value pairs
|
||||
-* Copyright (c) 2006-08 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2006-08 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
@@ -42,13 +42,11 @@ nvnode *search_list_next(nvlist *l)
|
||||
return l->cur;
|
||||
}
|
||||
|
||||
-void search_list_append(nvlist *l, nvnode *node)
|
||||
+int search_list_append(nvlist *l, nvnode *node)
|
||||
{
|
||||
nvnode* newnode = malloc(sizeof(nvnode));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
newnode->name = node->name;
|
||||
newnode->val = node->val;
|
||||
@@ -66,6 +64,8 @@ void search_list_append(nvlist *l, nvnod
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int search_list_find_val(nvlist *l, long val)
|
||||
--- a/src/ausearch-nvpair.h
|
||||
+++ b/src/ausearch-nvpair.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ausearch-nvpair.h - Header file for ausearch-nvpair.c
|
||||
-* Copyright (c) 2006-08 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2006-08 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
@@ -48,7 +48,7 @@ void search_list_create(nvlist *l);
|
||||
static inline void search_list_first(nvlist *l) { l->cur = l->head; }
|
||||
nvnode *search_list_next(nvlist *l);
|
||||
static inline nvnode *search_list_get_cur(nvlist *l) { return l->cur; }
|
||||
-void search_list_append(nvlist *l, nvnode *node);
|
||||
+int search_list_append(nvlist *l, nvnode *node);
|
||||
void search_list_clear(nvlist* l);
|
||||
|
||||
/* Given a numeric index, find that record. */
|
||||
--- a/src/ausearch-string.c
|
||||
+++ b/src/ausearch-string.c
|
||||
@@ -44,15 +44,13 @@ snode *slist_next(slist *l)
|
||||
return l->cur;
|
||||
}
|
||||
|
||||
-void slist_append(slist *l, snode *node)
|
||||
+int slist_append(slist *l, snode *node)
|
||||
{
|
||||
snode* newnode;
|
||||
|
||||
newnode = malloc(sizeof(snode));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
if (node->str)
|
||||
newnode->str = node->str;
|
||||
@@ -79,6 +77,8 @@ void slist_append(slist *l, snode *node)
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void slist_clear(slist* l)
|
||||
--- a/src/ausearch-string.h
|
||||
+++ b/src/ausearch-string.h
|
||||
@@ -49,7 +49,7 @@ void slist_create(slist *l);
|
||||
static inline void slist_first(slist *l) { l->cur = l->head; }
|
||||
snode *slist_next(slist *l);
|
||||
static inline snode *slist_get_cur(slist *l) { return l->cur; }
|
||||
-void slist_append(slist *l, snode *node);
|
||||
+int slist_append(slist *l, snode *node);
|
||||
void slist_clear(slist* l);
|
||||
|
||||
/* append a string if its not already on the list */
|
||||
--- a/tools/aulastlog/aulastlog-llist.c
|
||||
+++ b/tools/aulastlog/aulastlog-llist.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* aulastlog-llist.c - Minimal linked list library
|
||||
-* Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
|
||||
-* All Rights Reserved.
|
||||
+* Copyright (c) 2008 Red Hat Inc..
|
||||
+* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
* terms of the GNU General Public License as published by the Free
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to the
|
||||
-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
|
||||
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1335, USA.
|
||||
*
|
||||
* Authors:
|
||||
@@ -41,15 +41,13 @@ lnode *list_next(llist *l)
|
||||
return l->cur;
|
||||
}
|
||||
|
||||
-void list_append(llist *l, lnode *node)
|
||||
+int list_append(llist *l, lnode *node)
|
||||
{
|
||||
lnode* newnode;
|
||||
|
||||
newnode = malloc(sizeof(lnode));
|
||||
- if (newnode == NULL) {
|
||||
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
|
||||
- return;
|
||||
- }
|
||||
+ if (newnode == NULL)
|
||||
+ return 1;
|
||||
|
||||
newnode->sec = node->sec;
|
||||
newnode->uid = node->uid;
|
||||
@@ -62,7 +60,7 @@ void list_append(llist *l, lnode *node)
|
||||
newnode->term = strdup(node->term);
|
||||
else
|
||||
newnode->term = NULL;
|
||||
- newnode->item = l->cnt;
|
||||
+ newnode->item = l->cnt;
|
||||
newnode->next = NULL;
|
||||
|
||||
// if we are at top, fix this up
|
||||
@@ -74,6 +72,8 @@ void list_append(llist *l, lnode *node)
|
||||
// make newnode current
|
||||
l->cur = newnode;
|
||||
l->cnt++;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void list_clear(llist* l)
|
||||
--- a/tools/aulastlog/aulastlog-llist.h
|
||||
+++ b/tools/aulastlog/aulastlog-llist.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* aulastlog-llist.h - Header file for aulastlog-llist.c
|
||||
-* Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
|
||||
+* Copyright (c) 2008 Red Hat Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be freely redistributed and/or modified under the
|
||||
@@ -53,7 +53,7 @@ static inline void list_first(llist *l)
|
||||
lnode *list_next(llist *l);
|
||||
static inline lnode *list_get_cur(llist *l) { return l->cur; }
|
||||
static inline unsigned int list_get_cnt(llist *l) { return l->cnt; }
|
||||
-void list_append(llist *l, lnode *node);
|
||||
+int list_append(llist *l, lnode *node);
|
||||
void list_clear(llist* l);
|
||||
int list_update_login(llist* l, time_t t);
|
||||
int list_update_host(llist* l, const char *h);
|
||||
64
package/utils/bcm27xx-utils/Makefile
Normal file
64
package/utils/bcm27xx-utils/Makefile
Normal file
@@ -0,0 +1,64 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bcm27xx-utils
|
||||
PKG_VERSION:=2024-04-24
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
|
||||
PKG_SOURCE_VERSION:=451b9881b72cb994c102724b5a7d9b93f97dc315
|
||||
PKG_MIRROR_HASH:=b453976171187e0ffe7cacfdcab36cec6b5d02db8b6d978cb9afbbcafcfcff9d
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
PKG_BUILD_FLAGS:=no-lto
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENCE
|
||||
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/bcm27xx-utils
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=@TARGET_bcm27xx +libfdt
|
||||
TITLE:=BCM27xx scripts and simple applications
|
||||
PROVIDES:=bcm27xx-userland
|
||||
endef
|
||||
|
||||
define Package/bcm27xx-utils/description
|
||||
BCM27xx scripts and simple applications.
|
||||
Replaces bcm27xx-userland scripts and applications.
|
||||
endef
|
||||
|
||||
define Package/bcm27xx-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepdump $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepflash.sh $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepmake $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/otpset $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck $(1)/usr/bin
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck_exclusions.txt $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ovmerge $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pinctrl $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspinfo $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vclog $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,bcm27xx-utils))
|
||||
@@ -0,0 +1,255 @@
|
||||
From 0db3fb3119eda8c2360454c2a01f84602a879c38 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Tue, 16 Jan 2024 15:32:12 +0100
|
||||
Subject: [PATCH] raspinfo: adapt to OpenWrt
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
raspinfo/raspinfo | 186 ++++------------------------------------------
|
||||
1 file changed, 13 insertions(+), 173 deletions(-)
|
||||
|
||||
--- a/raspinfo/raspinfo
|
||||
+++ b/raspinfo/raspinfo
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
# Some of the regex's used in sed
|
||||
# Catch basic IP6 address "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g"
|
||||
@@ -6,147 +6,6 @@
|
||||
# IP4 d.d.d.d decimal "s/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}/x.x.x.x/g"
|
||||
# mac address "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"
|
||||
|
||||
-
|
||||
-display_info_drm() {
|
||||
- # If running X then can use xrandr, otherwise
|
||||
- # dump the /sys/class entries for the displays
|
||||
- if command -v xrandr > /dev/null &&
|
||||
- DISPLAY=${DISPLAY:-:0} xrandr --listmonitors &>/dev/null;
|
||||
- then
|
||||
- echo "Running (F)KMS and X"
|
||||
- echo
|
||||
-
|
||||
- DISPLAY=${DISPLAY:-:0} xrandr --verbose
|
||||
- else
|
||||
- echo "Running (F)KMS, console"
|
||||
- echo
|
||||
-
|
||||
- for card in /sys/class/drm/card[0-9]-*;
|
||||
- do
|
||||
- echo $card
|
||||
-
|
||||
- # if kmsprint isn't installed print basic mode info
|
||||
- if ! command -v kmsprint > /dev/null; then
|
||||
- if [ -f $card/modes ];
|
||||
- then
|
||||
- cat $card/modes
|
||||
- else
|
||||
- echo "No modes found"
|
||||
- fi
|
||||
- fi
|
||||
-
|
||||
- if [ -f $card/edid ];
|
||||
- then
|
||||
- base64 $card/edid
|
||||
- else
|
||||
- echo "No EDID found"
|
||||
- fi
|
||||
- echo
|
||||
- done
|
||||
- fi
|
||||
-
|
||||
- # kmsprint is more useful, but not always installed
|
||||
- echo
|
||||
- if command -v kmsprint > /dev/null; then
|
||||
- kmsprint
|
||||
- echo
|
||||
- kmsprint -m
|
||||
- else
|
||||
- echo "kmsprint is not installed. Install with: sudo apt install kms++-utils"
|
||||
- fi
|
||||
-
|
||||
- echo
|
||||
-
|
||||
- # dump the /sys/class entries for the displays
|
||||
- cardfound=0
|
||||
- for card in `seq 0 9`;
|
||||
- do
|
||||
- if sudo test -f "/sys/kernel/debug/dri/${card}/state";
|
||||
- then
|
||||
- for hdmi in 0 1;
|
||||
- do
|
||||
- if sudo test -f "/sys/kernel/debug/dri/${card}/hdmi${hdmi}_regs";
|
||||
- then
|
||||
- echo "HDMI${hdmi}: $(sudo cat /sys/kernel/debug/dri/$card/hdmi${hdmi}_regs | grep HOTPLUG)"
|
||||
- fi
|
||||
- done
|
||||
- echo
|
||||
- echo "/sys/kernel/debug/dri/$card/state:"
|
||||
- sudo cat "/sys/kernel/debug/dri/$card/state"
|
||||
- echo
|
||||
- cardfound=1
|
||||
- fi
|
||||
- done
|
||||
- if [ "$cardfound" == "0" ];
|
||||
- then
|
||||
- echo "kms state not found"
|
||||
- fi
|
||||
- echo
|
||||
-
|
||||
-}
|
||||
-
|
||||
-display_info_legacy() {
|
||||
- # Legacy mode
|
||||
- echo "Running Legacy framebuffer"
|
||||
- echo
|
||||
-
|
||||
- for card in `seq 0 9`;
|
||||
- do
|
||||
- F="/dev/fb${card}"
|
||||
- if test -e $F;
|
||||
- then
|
||||
- echo Framebuffer: $F
|
||||
- fbset -s -fb $F
|
||||
- fi
|
||||
- done
|
||||
-
|
||||
- disps=`tvservice -l | awk '/Display Number/{print substr($3,1,1)}'`
|
||||
-
|
||||
- tmp=$(mktemp)
|
||||
-
|
||||
- for display in $disps
|
||||
- do
|
||||
- echo
|
||||
- echo "Display: " $display
|
||||
-
|
||||
- tvservice -v $display -s
|
||||
- tvservice -v $display -n
|
||||
- tvservice -v $display -m CEA
|
||||
- tvservice -v $display -m DMT
|
||||
-
|
||||
- echo
|
||||
- tvservice -v $display -d $tmp > /dev/null
|
||||
- base64 $tmp
|
||||
- done
|
||||
-
|
||||
- rm $tmp
|
||||
-}
|
||||
-
|
||||
-display_info() {
|
||||
- # Check if we are running a KMS/DRM system
|
||||
-
|
||||
- if [ -d "/dev/dri" ];
|
||||
- then
|
||||
- display_info_drm
|
||||
- else
|
||||
- display_info_legacy
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
-audio_info() {
|
||||
- aplay -l
|
||||
- echo
|
||||
- aplay -L
|
||||
- echo
|
||||
- systemctl --user status pipewire.socket pipewire.service pulseaudio.service pulseaudio.socket
|
||||
- echo
|
||||
- if command -v pactl > /dev/null; then
|
||||
- pactl info
|
||||
- else
|
||||
- echo pactl not installed
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
OUT=raspinfo.txt
|
||||
|
||||
rm -f $OUT
|
||||
@@ -163,8 +22,6 @@ echo
|
||||
cat /etc/os-release | head -4
|
||||
echo
|
||||
|
||||
-cat /etc/rpi-issue
|
||||
-echo
|
||||
uname -a
|
||||
|
||||
cat /proc/cpuinfo | tail -3
|
||||
@@ -190,17 +47,6 @@ echo
|
||||
cat /proc/swaps
|
||||
|
||||
echo
|
||||
-echo "Package version information"
|
||||
-echo "---------------------------"
|
||||
-
|
||||
-apt-cache policy raspberrypi-ui-mods | head -2
|
||||
-apt-cache policy raspberrypi-sys-mods | head -2
|
||||
-apt-cache policy openbox | head -2
|
||||
-apt-cache policy lxpanel | head -2
|
||||
-apt-cache policy pcmanfm | head -2
|
||||
-apt-cache policy rpd-plym-splash | head -2
|
||||
-
|
||||
-echo
|
||||
echo "Networking Information"
|
||||
echo "----------------------"
|
||||
echo
|
||||
@@ -212,21 +58,11 @@ echo "USB Information"
|
||||
echo "---------------"
|
||||
echo
|
||||
|
||||
-lsusb -t
|
||||
-
|
||||
-echo
|
||||
-echo "Display Information"
|
||||
-echo "-------------------"
|
||||
-echo
|
||||
-
|
||||
-display_info
|
||||
-
|
||||
-echo
|
||||
-echo "Audio Information"
|
||||
-echo "-------------------"
|
||||
-echo
|
||||
-
|
||||
-audio_info
|
||||
+if command -v lsusb > /dev/null; then
|
||||
+ lsusb -t
|
||||
+else
|
||||
+ echo usbutils not installed
|
||||
+fi
|
||||
|
||||
echo
|
||||
echo "config.txt"
|
||||
@@ -250,7 +86,7 @@ echo "-----------------"
|
||||
echo
|
||||
|
||||
if command -v pinctrl > /dev/null; then
|
||||
- sudo pinctrl 2>&1
|
||||
+ pinctrl 2>&1
|
||||
elif command -v raspi-gpio > /dev/null; then
|
||||
raspi-gpio get 2>&1
|
||||
else
|
||||
@@ -263,9 +99,9 @@ echo "------------------"
|
||||
echo
|
||||
|
||||
if command -v vcdbg > /dev/null; then
|
||||
- sudo vcdbg log msg 2>&1
|
||||
+ vcdbg log msg 2>&1
|
||||
elif command -v vclog > /dev/null; then
|
||||
- sudo vclog --msg 2>&1
|
||||
+ vclog --msg 2>&1
|
||||
else
|
||||
echo "vcdbg not found"
|
||||
fi
|
||||
@@ -284,5 +120,9 @@ echo
|
||||
echo "EEPROM"
|
||||
echo "------"
|
||||
echo
|
||||
-sudo rpi-eeprom-update
|
||||
+if command -v rpi-eeprom-update > /dev/null; then
|
||||
+ rpi-eeprom-update
|
||||
+else
|
||||
+ echo bcm27xx-eeprom not installed
|
||||
+fi
|
||||
fi
|
||||
54
package/utils/bcm4908img/Makefile
Normal file
54
package/utils/bcm4908img/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bcm4908img
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
PKG_BUILD_DEPENDS := bcm4908img/host
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/bcm4908img
|
||||
SECTION:=utils
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Utility handling BCM4908 images
|
||||
MAINTAINER:=Rafał Miłecki <rafal@milecki.pl>
|
||||
DEPENDS:=@TARGET_bcm4908
|
||||
endef
|
||||
|
||||
define Package/bcm4908img/description
|
||||
CFE bootloader for BCM4908 uses custom image format. It consists of:
|
||||
1. Optional cferom image
|
||||
2. bootfs JFFS2 partition (cferam, kernel, DTB and optional helper files)
|
||||
3. padding
|
||||
4. rootfs simply appended to the bootfs + padding
|
||||
5. tail with checksum and basic device info
|
||||
|
||||
This util allows creating, modifying and extracting from BCM4908 images.
|
||||
endef
|
||||
|
||||
define Host/Prepare
|
||||
$(CP) ./src/* $(HOST_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall"
|
||||
endef
|
||||
|
||||
define Package/bcm4908img/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bcm4908img $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/bcm4908img $(STAGING_DIR_HOST)/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,bcm4908img))
|
||||
$(eval $(call HostBuild))
|
||||
7
package/utils/bcm4908img/src/Makefile
Normal file
7
package/utils/bcm4908img/src/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
all: bcm4908img
|
||||
|
||||
bcm4908img:
|
||||
$(CC) $(CFLAGS) -o $@ bcm4908img.c -Wall
|
||||
|
||||
clean:
|
||||
rm -f bcm4908img
|
||||
1022
package/utils/bcm4908img/src/bcm4908img.c
Normal file
1022
package/utils/bcm4908img/src/bcm4908img.c
Normal file
File diff suppressed because it is too large
Load Diff
80
package/utils/bsdiff/Makefile
Normal file
80
package/utils/bsdiff/Makefile
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# Copyright (C) 2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bsdiff
|
||||
PKG_VERSION:=4.3
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://www.daemonology.net/bsdiff/
|
||||
PKG_HASH:=18821588b2dc5bf159aa37d3bcb7b885d85ffd1e19f23a0c57a58723fea85f48
|
||||
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
|
||||
HOST_BUILD_DEPENDS:=bzip2/host
|
||||
|
||||
PKG_LICENSE:=BSD-2-Clause
|
||||
PKG_CPE_ID:=cpe:/a:daemonology:bsdiff
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/bsdiff
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libbz2
|
||||
TITLE:=Binary diff tool
|
||||
URL:=https://www.daemonology.net/bsdiff/
|
||||
endef
|
||||
|
||||
define Package/bspatch
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libbz2
|
||||
TITLE:=Binary patch tool
|
||||
URL:=https://www.daemonology.net/bsdiff/
|
||||
endef
|
||||
|
||||
|
||||
define Build/Compile
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
|
||||
-o $(PKG_BUILD_DIR)/bsdiff \
|
||||
$(PKG_BUILD_DIR)/bsdiff.c -lbz2
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
|
||||
-o $(PKG_BUILD_DIR)/bspatch \
|
||||
$(PKG_BUILD_DIR)/bspatch.c -lbz2
|
||||
endef
|
||||
|
||||
define Package/bsdiff/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bsdiff $(1)/usr/bin/bsdiff
|
||||
endef
|
||||
|
||||
define Package/bspatch/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bspatch $(1)/usr/bin/bspatch
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) PREFIX=$(STAGING_DIR_HOSTPKG)/ install
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
|
||||
-o $(HOST_BUILD_DIR)/bsdiff \
|
||||
$(HOST_BUILD_DIR)/bsdiff.c -lbz2
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/bsdiff $(STAGING_DIR_HOSTPKG)/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
||||
$(eval $(call BuildPackage,bsdiff))
|
||||
$(eval $(call BuildPackage,bspatch))
|
||||
84
package/utils/bsdiff/patches/001-musl.patch
Normal file
84
package/utils/bsdiff/patches/001-musl.patch
Normal file
@@ -0,0 +1,84 @@
|
||||
--- a/bsdiff.c
|
||||
+++ b/bsdiff.c
|
||||
@@ -101,7 +101,7 @@ static void split(off_t *I,off_t *V,off_
|
||||
if(start+len>kk) split(I,V,kk,start+len-kk,h);
|
||||
}
|
||||
|
||||
-static void qsufsort(off_t *I,off_t *V,u_char *old,off_t oldsize)
|
||||
+static void qsufsort(off_t *I,off_t *V,unsigned char *old,off_t oldsize)
|
||||
{
|
||||
off_t buckets[256];
|
||||
off_t i,h,len;
|
||||
@@ -139,7 +139,7 @@ static void qsufsort(off_t *I,off_t *V,u
|
||||
for(i=0;i<oldsize+1;i++) I[V[i]]=i;
|
||||
}
|
||||
|
||||
-static off_t matchlen(u_char *old,off_t oldsize,u_char *new,off_t newsize)
|
||||
+static off_t matchlen(unsigned char *old,off_t oldsize,unsigned char *new,off_t newsize)
|
||||
{
|
||||
off_t i;
|
||||
|
||||
@@ -149,8 +149,8 @@ static off_t matchlen(u_char *old,off_t
|
||||
return i;
|
||||
}
|
||||
|
||||
-static off_t search(off_t *I,u_char *old,off_t oldsize,
|
||||
- u_char *new,off_t newsize,off_t st,off_t en,off_t *pos)
|
||||
+static off_t search(off_t *I,unsigned char *old,off_t oldsize,
|
||||
+ unsigned char *new,off_t newsize,off_t st,off_t en,off_t *pos)
|
||||
{
|
||||
off_t x,y;
|
||||
|
||||
@@ -175,7 +175,7 @@ static off_t search(off_t *I,u_char *old
|
||||
};
|
||||
}
|
||||
|
||||
-static void offtout(off_t x,u_char *buf)
|
||||
+static void offtout(off_t x,unsigned char *buf)
|
||||
{
|
||||
off_t y;
|
||||
|
||||
@@ -196,7 +196,7 @@ static void offtout(off_t x,u_char *buf)
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
int fd;
|
||||
- u_char *old,*new;
|
||||
+ unsigned char *old,*new;
|
||||
off_t oldsize,newsize;
|
||||
off_t *I,*V;
|
||||
off_t scan,pos,len;
|
||||
@@ -206,9 +206,9 @@ int main(int argc,char *argv[])
|
||||
off_t overlap,Ss,lens;
|
||||
off_t i;
|
||||
off_t dblen,eblen;
|
||||
- u_char *db,*eb;
|
||||
- u_char buf[8];
|
||||
- u_char header[32];
|
||||
+ unsigned char *db,*eb;
|
||||
+ unsigned char buf[8];
|
||||
+ unsigned char header[32];
|
||||
FILE * pf;
|
||||
BZFILE * pfbz2;
|
||||
int bz2err;
|
||||
--- a/bspatch.c
|
||||
+++ b/bspatch.c
|
||||
@@ -36,7 +36,7 @@ __FBSDID("$FreeBSD: src/usr.bin/bsdiff/b
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
-static off_t offtin(u_char *buf)
|
||||
+static off_t offtin(unsigned char *buf)
|
||||
{
|
||||
off_t y;
|
||||
|
||||
@@ -62,8 +62,8 @@ int main(int argc,char * argv[])
|
||||
int fd;
|
||||
ssize_t oldsize,newsize;
|
||||
ssize_t bzctrllen,bzdatalen;
|
||||
- u_char header[32],buf[8];
|
||||
- u_char *old, *new;
|
||||
+ unsigned char header[32],buf[8];
|
||||
+ unsigned char *old, *new;
|
||||
off_t oldpos,newpos;
|
||||
off_t ctrl[3];
|
||||
off_t lenread;
|
||||
37
package/utils/bsdiff/patches/020-CVE-2014-9862.patch
Normal file
37
package/utils/bsdiff/patches/020-CVE-2014-9862.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From: The FreeBSD Project
|
||||
Bug: https://security-tracker.debian.org/tracker/CVE-2014-9862
|
||||
Subject: CVE-2014-9862 - check for a negative value on numbers of bytes
|
||||
The implementation of bspatch does not check for a negative value on numbers
|
||||
of bytes read from the diff and extra streams, allowing an attacker who
|
||||
can control the patch file to write at arbitrary locations in the heap.
|
||||
.
|
||||
bspatch's main loop reads three numbers from the "control" stream in
|
||||
the patch: X, Y and Z. The first two are the number of bytes to read
|
||||
from "diff" and "extra" (and thus only non-negative), while the
|
||||
third one could be positive or negative and moves the oldpos pointer
|
||||
on the source image. These 3 values are 64bits signed ints (encoded
|
||||
somehow on the file) that are later passed the function that reads
|
||||
from the streams, but those values are not verified to be
|
||||
non-negative.
|
||||
.
|
||||
Official report https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9862
|
||||
The patch was downloaded from a link pointed by
|
||||
https://security.freebsd.org/advisories/FreeBSD-SA-16:25.bsp
|
||||
|
||||
---
|
||||
bspatch.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/bspatch.c
|
||||
+++ b/bspatch.c
|
||||
@@ -152,6 +152,10 @@ int main(int argc,char * argv[])
|
||||
};
|
||||
|
||||
/* Sanity-check */
|
||||
+ if ((ctrl[0] < 0) || (ctrl[1] < 0))
|
||||
+ errx(1,"Corrupt patch\n");
|
||||
+
|
||||
+ /* Sanity-check */
|
||||
if(newpos+ctrl[0]>newsize)
|
||||
errx(1,"Corrupt patch\n");
|
||||
|
||||
383
package/utils/bsdiff/patches/033-CVE-2020-14315.patch
Normal file
383
package/utils/bsdiff/patches/033-CVE-2020-14315.patch
Normal file
@@ -0,0 +1,383 @@
|
||||
Description: patch for CVE-2020-14315
|
||||
A memory corruption vulnerability is present in bspatch as shipped in
|
||||
Colin Percival’s bsdiff tools version 4.3. Insufficient checks when
|
||||
handling external inputs allows an attacker to bypass the sanity checks
|
||||
in place and write out of a dynamically allocated buffer boundaries.
|
||||
Source: https://svnweb.freebsd.org/base/head/usr.bin/bsdiff/bspatch/bspatch.c?revision=352742&view=co
|
||||
Author: tony mancill <tmancill@debian.org>
|
||||
Comment: The patch was created by comparing the Debian sources to the
|
||||
"Confirmed Patched Version" [1] documented in the
|
||||
X41 D-SEC GmbH Security Advisory: X41-2020-006 [2].
|
||||
References to FreeBSD capsicum have been dropped. Definitions for
|
||||
TYPE_MINIMUM and TYPE_MAXIMUM have been borrowed from the Debian
|
||||
coreutils package sources but originate in gnulib [3] and are used to
|
||||
define OFF_MIN and OFF_MAX (limits of off_t). Whitespace changes from
|
||||
the confirmed patched version are also included and keep the difference
|
||||
between the Debian sources and the confirmed patched version minimal.
|
||||
.
|
||||
[1] https://svnweb.freebsd.org/base/head/usr.bin/bsdiff/bspatch/bspatch.c?revision=352742&view=co
|
||||
[2] https://www.openwall.com/lists/oss-security/2020/07/09/2
|
||||
[3] https://www.gnu.org/software/gnulib/
|
||||
Last-Update: 2021-04-03
|
||||
Forwarded: not-needed
|
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964796
|
||||
|
||||
--- a/bspatch.c
|
||||
+++ b/bspatch.c
|
||||
@@ -1,4 +1,6 @@
|
||||
/*-
|
||||
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
+ *
|
||||
* Copyright 2003-2005 Colin Percival
|
||||
* All rights reserved
|
||||
*
|
||||
@@ -25,55 +27,147 @@
|
||||
*/
|
||||
|
||||
#if 0
|
||||
-__FBSDID("$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.c,v 1.1 2005/08/06 01:59:06 cperciva Exp $");
|
||||
+__FBSDID("$FreeBSD$");
|
||||
#endif
|
||||
|
||||
#include <bzlib.h>
|
||||
-#include <stdlib.h>
|
||||
+#include <err.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <libgen.h>
|
||||
+#include <limits.h>
|
||||
+#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <err.h>
|
||||
#include <unistd.h>
|
||||
-#include <fcntl.h>
|
||||
+
|
||||
+#ifndef O_BINARY
|
||||
+#define O_BINARY 0
|
||||
+#endif
|
||||
+#define HEADER_SIZE 32
|
||||
+
|
||||
+/* TYPE_MINIMUM and TYPE_MAXIMUM taken from coreutils */
|
||||
+#ifndef TYPE_MINIMUM
|
||||
+#define TYPE_MINIMUM(t) \
|
||||
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
|
||||
+#endif
|
||||
+#ifndef TYPE_MAXIMUM
|
||||
+#define TYPE_MAXIMUM(t) \
|
||||
+ ((t) ((t) 0 < (t) -1 \
|
||||
+ ? (t) -1 \
|
||||
+ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
|
||||
+#endif
|
||||
+
|
||||
+#ifndef OFF_MAX
|
||||
+#define OFF_MAX TYPE_MAXIMUM(off_t)
|
||||
+#endif
|
||||
+
|
||||
+#ifndef OFF_MIN
|
||||
+#define OFF_MIN TYPE_MINIMUM(off_t)
|
||||
+#endif
|
||||
+
|
||||
+static char *newfile;
|
||||
+static int dirfd = -1;
|
||||
+
|
||||
+static void
|
||||
+exit_cleanup(void)
|
||||
+{
|
||||
+
|
||||
+ if (dirfd != -1 && newfile != NULL)
|
||||
+ if (unlinkat(dirfd, newfile, 0))
|
||||
+ warn("unlinkat");
|
||||
+}
|
||||
+
|
||||
+static inline off_t
|
||||
+add_off_t(off_t a, off_t b)
|
||||
+{
|
||||
+ off_t result;
|
||||
+
|
||||
+#if __GNUC__ >= 5 || \
|
||||
+ (defined(__has_builtin) && __has_builtin(__builtin_add_overflow))
|
||||
+ if (__builtin_add_overflow(a, b, &result))
|
||||
+ errx(1, "Corrupt patch");
|
||||
+#else
|
||||
+ if ((b > 0 && a > OFF_MAX - b) || (b < 0 && a < OFF_MIN - b))
|
||||
+ errx(1, "Corrupt patch");
|
||||
+ result = a + b;
|
||||
+#endif
|
||||
+ return result;
|
||||
+}
|
||||
|
||||
static off_t offtin(unsigned char *buf)
|
||||
{
|
||||
off_t y;
|
||||
|
||||
- y=buf[7]&0x7F;
|
||||
- y=y*256;y+=buf[6];
|
||||
- y=y*256;y+=buf[5];
|
||||
- y=y*256;y+=buf[4];
|
||||
- y=y*256;y+=buf[3];
|
||||
- y=y*256;y+=buf[2];
|
||||
- y=y*256;y+=buf[1];
|
||||
- y=y*256;y+=buf[0];
|
||||
+ y = buf[7] & 0x7F;
|
||||
+ y = y * 256; y += buf[6];
|
||||
+ y = y * 256; y += buf[5];
|
||||
+ y = y * 256; y += buf[4];
|
||||
+ y = y * 256; y += buf[3];
|
||||
+ y = y * 256; y += buf[2];
|
||||
+ y = y * 256; y += buf[1];
|
||||
+ y = y * 256; y += buf[0];
|
||||
|
||||
- if(buf[7]&0x80) y=-y;
|
||||
+ if (buf[7] & 0x80)
|
||||
+ y = -y;
|
||||
|
||||
- return y;
|
||||
+ return (y);
|
||||
}
|
||||
|
||||
-int main(int argc,char * argv[])
|
||||
+static void
|
||||
+usage(void)
|
||||
{
|
||||
- FILE * f, * cpf, * dpf, * epf;
|
||||
- BZFILE * cpfbz2, * dpfbz2, * epfbz2;
|
||||
+
|
||||
+ fprintf(stderr, "usage: bspatch oldfile newfile patchfile\n");
|
||||
+ exit(1);
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char *argv[])
|
||||
+{
|
||||
+ FILE *f, *cpf, *dpf, *epf;
|
||||
+ BZFILE *cpfbz2, *dpfbz2, *epfbz2;
|
||||
+ char *directory, *namebuf;
|
||||
int cbz2err, dbz2err, ebz2err;
|
||||
- int fd;
|
||||
- ssize_t oldsize,newsize;
|
||||
- ssize_t bzctrllen,bzdatalen;
|
||||
- unsigned char header[32],buf[8];
|
||||
+ int newfd, oldfd;
|
||||
+ off_t oldsize, newsize;
|
||||
+ off_t bzctrllen, bzdatalen;
|
||||
+ unsigned char header[HEADER_SIZE], buf[8];
|
||||
unsigned char *old, *new;
|
||||
- off_t oldpos,newpos;
|
||||
+ off_t oldpos, newpos;
|
||||
off_t ctrl[3];
|
||||
- off_t lenread;
|
||||
- off_t i;
|
||||
+ off_t i, lenread, offset;
|
||||
|
||||
- if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]);
|
||||
+ if (argc != 4)
|
||||
+ usage();
|
||||
|
||||
/* Open patch file */
|
||||
- if ((f = fopen(argv[3], "r")) == NULL)
|
||||
+ if ((f = fopen(argv[3], "rb")) == NULL)
|
||||
+ err(1, "fopen(%s)", argv[3]);
|
||||
+ /* Open patch file for control block */
|
||||
+ if ((cpf = fopen(argv[3], "rb")) == NULL)
|
||||
+ err(1, "fopen(%s)", argv[3]);
|
||||
+ /* open patch file for diff block */
|
||||
+ if ((dpf = fopen(argv[3], "rb")) == NULL)
|
||||
err(1, "fopen(%s)", argv[3]);
|
||||
+ /* open patch file for extra block */
|
||||
+ if ((epf = fopen(argv[3], "rb")) == NULL)
|
||||
+ err(1, "fopen(%s)", argv[3]);
|
||||
+ /* open oldfile */
|
||||
+ if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0)
|
||||
+ err(1, "open(%s)", argv[1]);
|
||||
+ /* open directory where we'll write newfile */
|
||||
+ if ((namebuf = strdup(argv[2])) == NULL ||
|
||||
+ (directory = dirname(namebuf)) == NULL ||
|
||||
+ (dirfd = open(directory, O_DIRECTORY)) < 0)
|
||||
+ err(1, "open %s", argv[2]);
|
||||
+ free(namebuf);
|
||||
+ if ((newfile = basename(argv[2])) == NULL)
|
||||
+ err(1, "basename");
|
||||
+ /* open newfile */
|
||||
+ if ((newfd = openat(dirfd, newfile,
|
||||
+ O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0666)) < 0)
|
||||
+ err(1, "open(%s)", argv[2]);
|
||||
+ atexit(exit_cleanup);
|
||||
|
||||
/*
|
||||
File format:
|
||||
@@ -90,104 +184,104 @@ int main(int argc,char * argv[])
|
||||
*/
|
||||
|
||||
/* Read header */
|
||||
- if (fread(header, 1, 32, f) < 32) {
|
||||
+ if (fread(header, 1, HEADER_SIZE, f) < HEADER_SIZE) {
|
||||
if (feof(f))
|
||||
- errx(1, "Corrupt patch\n");
|
||||
+ errx(1, "Corrupt patch");
|
||||
err(1, "fread(%s)", argv[3]);
|
||||
}
|
||||
|
||||
/* Check for appropriate magic */
|
||||
if (memcmp(header, "BSDIFF40", 8) != 0)
|
||||
- errx(1, "Corrupt patch\n");
|
||||
+ errx(1, "Corrupt patch");
|
||||
|
||||
/* Read lengths from header */
|
||||
- bzctrllen=offtin(header+8);
|
||||
- bzdatalen=offtin(header+16);
|
||||
- newsize=offtin(header+24);
|
||||
- if((bzctrllen<0) || (bzdatalen<0) || (newsize<0))
|
||||
- errx(1,"Corrupt patch\n");
|
||||
+ bzctrllen = offtin(header + 8);
|
||||
+ bzdatalen = offtin(header + 16);
|
||||
+ newsize = offtin(header + 24);
|
||||
+ if (bzctrllen < 0 || bzctrllen > OFF_MAX - HEADER_SIZE ||
|
||||
+ bzdatalen < 0 || bzctrllen + HEADER_SIZE > OFF_MAX - bzdatalen ||
|
||||
+ newsize < 0 || newsize > SSIZE_MAX)
|
||||
+ errx(1, "Corrupt patch");
|
||||
|
||||
/* Close patch file and re-open it via libbzip2 at the right places */
|
||||
if (fclose(f))
|
||||
err(1, "fclose(%s)", argv[3]);
|
||||
- if ((cpf = fopen(argv[3], "r")) == NULL)
|
||||
- err(1, "fopen(%s)", argv[3]);
|
||||
- if (fseeko(cpf, 32, SEEK_SET))
|
||||
- err(1, "fseeko(%s, %lld)", argv[3],
|
||||
- (long long)32);
|
||||
+ offset = HEADER_SIZE;
|
||||
+ if (fseeko(cpf, offset, SEEK_SET))
|
||||
+ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
|
||||
if ((cpfbz2 = BZ2_bzReadOpen(&cbz2err, cpf, 0, 0, NULL, 0)) == NULL)
|
||||
errx(1, "BZ2_bzReadOpen, bz2err = %d", cbz2err);
|
||||
- if ((dpf = fopen(argv[3], "r")) == NULL)
|
||||
- err(1, "fopen(%s)", argv[3]);
|
||||
- if (fseeko(dpf, 32 + bzctrllen, SEEK_SET))
|
||||
- err(1, "fseeko(%s, %lld)", argv[3],
|
||||
- (long long)(32 + bzctrllen));
|
||||
+ offset = add_off_t(offset, bzctrllen);
|
||||
+ if (fseeko(dpf, offset, SEEK_SET))
|
||||
+ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
|
||||
if ((dpfbz2 = BZ2_bzReadOpen(&dbz2err, dpf, 0, 0, NULL, 0)) == NULL)
|
||||
errx(1, "BZ2_bzReadOpen, bz2err = %d", dbz2err);
|
||||
- if ((epf = fopen(argv[3], "r")) == NULL)
|
||||
- err(1, "fopen(%s)", argv[3]);
|
||||
- if (fseeko(epf, 32 + bzctrllen + bzdatalen, SEEK_SET))
|
||||
- err(1, "fseeko(%s, %lld)", argv[3],
|
||||
- (long long)(32 + bzctrllen + bzdatalen));
|
||||
+ offset = add_off_t(offset, bzdatalen);
|
||||
+ if (fseeko(epf, offset, SEEK_SET))
|
||||
+ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
|
||||
if ((epfbz2 = BZ2_bzReadOpen(&ebz2err, epf, 0, 0, NULL, 0)) == NULL)
|
||||
errx(1, "BZ2_bzReadOpen, bz2err = %d", ebz2err);
|
||||
|
||||
- if(((fd=open(argv[1],O_RDONLY,0))<0) ||
|
||||
- ((oldsize=lseek(fd,0,SEEK_END))==-1) ||
|
||||
- ((old=malloc(oldsize+1))==NULL) ||
|
||||
- (lseek(fd,0,SEEK_SET)!=0) ||
|
||||
- (read(fd,old,oldsize)!=oldsize) ||
|
||||
- (close(fd)==-1)) err(1,"%s",argv[1]);
|
||||
- if((new=malloc(newsize+1))==NULL) err(1,NULL);
|
||||
-
|
||||
- oldpos=0;newpos=0;
|
||||
- while(newpos<newsize) {
|
||||
+ if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 ||
|
||||
+ oldsize > SSIZE_MAX ||
|
||||
+ (old = malloc(oldsize)) == NULL ||
|
||||
+ lseek(oldfd, 0, SEEK_SET) != 0 ||
|
||||
+ read(oldfd, old, oldsize) != oldsize ||
|
||||
+ close(oldfd) == -1)
|
||||
+ err(1, "%s", argv[1]);
|
||||
+ if ((new = malloc(newsize)) == NULL)
|
||||
+ err(1, NULL);
|
||||
+
|
||||
+ oldpos = 0;
|
||||
+ newpos = 0;
|
||||
+ while (newpos < newsize) {
|
||||
/* Read control data */
|
||||
- for(i=0;i<=2;i++) {
|
||||
+ for (i = 0; i <= 2; i++) {
|
||||
lenread = BZ2_bzRead(&cbz2err, cpfbz2, buf, 8);
|
||||
if ((lenread < 8) || ((cbz2err != BZ_OK) &&
|
||||
(cbz2err != BZ_STREAM_END)))
|
||||
- errx(1, "Corrupt patch\n");
|
||||
- ctrl[i]=offtin(buf);
|
||||
- };
|
||||
+ errx(1, "Corrupt patch");
|
||||
+ ctrl[i] = offtin(buf);
|
||||
+ }
|
||||
|
||||
/* Sanity-check */
|
||||
- if ((ctrl[0] < 0) || (ctrl[1] < 0))
|
||||
- errx(1,"Corrupt patch\n");
|
||||
+ if (ctrl[0] < 0 || ctrl[0] > INT_MAX ||
|
||||
+ ctrl[1] < 0 || ctrl[1] > INT_MAX)
|
||||
+ errx(1, "Corrupt patch");
|
||||
|
||||
/* Sanity-check */
|
||||
- if(newpos+ctrl[0]>newsize)
|
||||
- errx(1,"Corrupt patch\n");
|
||||
+ if (add_off_t(newpos, ctrl[0]) > newsize)
|
||||
+ errx(1, "Corrupt patch");
|
||||
|
||||
/* Read diff string */
|
||||
lenread = BZ2_bzRead(&dbz2err, dpfbz2, new + newpos, ctrl[0]);
|
||||
if ((lenread < ctrl[0]) ||
|
||||
((dbz2err != BZ_OK) && (dbz2err != BZ_STREAM_END)))
|
||||
- errx(1, "Corrupt patch\n");
|
||||
+ errx(1, "Corrupt patch");
|
||||
|
||||
/* Add old data to diff string */
|
||||
- for(i=0;i<ctrl[0];i++)
|
||||
- if((oldpos+i>=0) && (oldpos+i<oldsize))
|
||||
- new[newpos+i]+=old[oldpos+i];
|
||||
+ for (i = 0; i < ctrl[0]; i++)
|
||||
+ if (add_off_t(oldpos, i) < oldsize)
|
||||
+ new[newpos + i] += old[oldpos + i];
|
||||
|
||||
/* Adjust pointers */
|
||||
- newpos+=ctrl[0];
|
||||
- oldpos+=ctrl[0];
|
||||
+ newpos = add_off_t(newpos, ctrl[0]);
|
||||
+ oldpos = add_off_t(oldpos, ctrl[0]);
|
||||
|
||||
/* Sanity-check */
|
||||
- if(newpos+ctrl[1]>newsize)
|
||||
- errx(1,"Corrupt patch\n");
|
||||
+ if (add_off_t(newpos, ctrl[1]) > newsize)
|
||||
+ errx(1, "Corrupt patch");
|
||||
|
||||
/* Read extra string */
|
||||
lenread = BZ2_bzRead(&ebz2err, epfbz2, new + newpos, ctrl[1]);
|
||||
if ((lenread < ctrl[1]) ||
|
||||
((ebz2err != BZ_OK) && (ebz2err != BZ_STREAM_END)))
|
||||
- errx(1, "Corrupt patch\n");
|
||||
+ errx(1, "Corrupt patch");
|
||||
|
||||
/* Adjust pointers */
|
||||
- newpos+=ctrl[1];
|
||||
- oldpos+=ctrl[2];
|
||||
- };
|
||||
+ newpos = add_off_t(newpos, ctrl[1]);
|
||||
+ oldpos = add_off_t(oldpos, ctrl[2]);
|
||||
+ }
|
||||
|
||||
/* Clean up the bzip2 reads */
|
||||
BZ2_bzReadClose(&cbz2err, cpfbz2);
|
||||
@@ -197,12 +291,13 @@ int main(int argc,char * argv[])
|
||||
err(1, "fclose(%s)", argv[3]);
|
||||
|
||||
/* Write the new file */
|
||||
- if(((fd=open(argv[2],O_CREAT|O_TRUNC|O_WRONLY,0666))<0) ||
|
||||
- (write(fd,new,newsize)!=newsize) || (close(fd)==-1))
|
||||
- err(1,"%s",argv[2]);
|
||||
+ if (write(newfd, new, newsize) != newsize || close(newfd) == -1)
|
||||
+ err(1, "%s", argv[2]);
|
||||
+ /* Disable atexit cleanup */
|
||||
+ newfile = NULL;
|
||||
|
||||
free(new);
|
||||
free(old);
|
||||
|
||||
- return 0;
|
||||
+ return (0);
|
||||
}
|
||||
3242
package/utils/busybox/Config-defaults.in
Normal file
3242
package/utils/busybox/Config-defaults.in
Normal file
File diff suppressed because it is too large
Load Diff
21
package/utils/busybox/Config.in
Normal file
21
package/utils/busybox/Config.in
Normal file
@@ -0,0 +1,21 @@
|
||||
if PACKAGE_busybox || PACKAGE_busybox-selinux
|
||||
|
||||
config BUSYBOX_CUSTOM
|
||||
bool "Customize busybox options"
|
||||
default n
|
||||
help
|
||||
Enabling this allows full customization of busybox settings.
|
||||
Note that there are many options here that can result in a build
|
||||
that doesn't work properly. Enabling customization will mark your
|
||||
build as "tainted" for the purpose of bug reports.
|
||||
See the variables written to /etc/openwrt_release
|
||||
|
||||
Unless you know what you are doing, you should leave this as 'n'
|
||||
|
||||
source "Config-defaults.in"
|
||||
|
||||
if BUSYBOX_CUSTOM
|
||||
source "config/Config.in"
|
||||
endif
|
||||
|
||||
endif
|
||||
162
package/utils/busybox/Makefile
Normal file
162
package/utils/busybox/Makefile
Normal file
@@ -0,0 +1,162 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# Copyright (C) 2006-2021 OpenWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=busybox
|
||||
PKG_VERSION:=1.36.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_FLAGS:=essential
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://www.busybox.net/downloads \
|
||||
http://sources.buildroot.net
|
||||
PKG_HASH:=b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314
|
||||
|
||||
PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=lto
|
||||
PKG_CHECK_FORMAT_SECURITY:=0
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE archival/libarchive/bz/LICENSE
|
||||
PKG_CPE_ID:=cpe:/a:busybox:busybox
|
||||
|
||||
BUSYBOX_SYM=$(if $(CONFIG_BUSYBOX_CUSTOM),CONFIG,DEFAULT)
|
||||
BUSYBOX_IF_ENABLED=$(if $(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_$(1)),$(2))
|
||||
|
||||
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SUID),)
|
||||
PKG_FILE_MODES:=/bin/busybox:root:root:4755
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | $(MKHASH) md5)
|
||||
endif
|
||||
|
||||
# All files provided by busybox will serve as fallback alternatives by opkg.
|
||||
# There should be no need to enumerate ALTERNATIVES entries here
|
||||
define Package/busybox/Default
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
TITLE:=Core utilities for embedded Linux
|
||||
URL:=http://busybox.net/
|
||||
DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter
|
||||
USERID:=ntp=123:ntp=123
|
||||
endef
|
||||
|
||||
define Package/busybox
|
||||
$(call Package/busybox/Default)
|
||||
CONFLICTS:=busybox-selinux
|
||||
VARIANT:=default
|
||||
endef
|
||||
|
||||
define Package/busybox-selinux
|
||||
$(call Package/busybox/Default)
|
||||
TITLE += with SELinux support
|
||||
DEPENDS += +libselinux
|
||||
VARIANT:=selinux
|
||||
PROVIDES:=busybox
|
||||
endef
|
||||
|
||||
define Package/busybox/description
|
||||
The Swiss Army Knife of embedded Linux.
|
||||
It slices, it dices, it makes Julian Fries.
|
||||
endef
|
||||
|
||||
define Package/busybox/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SYSLOG)$(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SYSLOGD_CFG),)
|
||||
define Package/busybox/conffiles/syslog
|
||||
/etc/syslog.conf
|
||||
endef
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_CROND),)
|
||||
define Package/busybox/conffiles/crond
|
||||
/etc/crontabs/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/busybox/conffiles
|
||||
$(Package/busybox/conffiles/syslog)
|
||||
$(Package/busybox/conffiles/crond)
|
||||
endef
|
||||
|
||||
Package/busybox-selinux/conffiles = $(Package/busybox/conffiles)
|
||||
|
||||
ifndef CONFIG_USE_MUSL
|
||||
LDLIBS:=m crypt
|
||||
endif
|
||||
|
||||
LDLIBS += $(call BUSYBOX_IF_ENABLED,PAM,pam pam_misc pthread)
|
||||
|
||||
ifeq ($(CONFIG_USE_GLIBC),y)
|
||||
LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP,resolv)
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),selinux)
|
||||
LDLIBS += selinux sepol
|
||||
endif
|
||||
|
||||
MAKE_VARS :=
|
||||
MAKE_FLAGS += \
|
||||
EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
||||
EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
LDLIBS="$(LDLIBS)" \
|
||||
LD="$(TARGET_CC)" \
|
||||
SKIP_STRIP=y
|
||||
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
||||
MAKE_FLAGS += V=1
|
||||
endif
|
||||
|
||||
define Build/Configure
|
||||
rm -f $(PKG_BUILD_DIR)/.config
|
||||
touch $(PKG_BUILD_DIR)/.config
|
||||
ifeq ($(DEVICE_TYPE),nas)
|
||||
echo "CONFIG_HDPARM=y" >> $(PKG_BUILD_DIR)/.config
|
||||
endif
|
||||
ifeq ($(BUILD_VARIANT),selinux)
|
||||
cat $(TOPDIR)/$(SOURCE)/selinux.config >> $(PKG_BUILD_DIR)/.config
|
||||
endif
|
||||
grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" >> $(PKG_BUILD_DIR)/.config
|
||||
yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) oldconfig
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/Default, \
|
||||
CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \
|
||||
all install \
|
||||
)
|
||||
endef
|
||||
|
||||
define Package/busybox/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
|
||||
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SYSLOG)$(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_SYSLOGD_CFG),)
|
||||
touch $(1)/etc/syslog.conf
|
||||
endif
|
||||
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_CROND),)
|
||||
$(INSTALL_BIN) ./files/cron $(1)/etc/init.d/cron
|
||||
$(INSTALL_DIR) $(1)/etc/crontabs
|
||||
endif
|
||||
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_NTPD),)
|
||||
$(INSTALL_BIN) ./files/sysntpd $(1)/etc/init.d/sysntpd
|
||||
$(INSTALL_BIN) ./files/ntpd-hotplug $(1)/usr/sbin/ntpd-hotplug
|
||||
$(INSTALL_DIR) $(1)/etc/capabilities $(1)/usr/share/acl.d
|
||||
$(INSTALL_DATA) ./files/ntpd.capabilities $(1)/etc/capabilities/ntpd.json
|
||||
$(INSTALL_DATA) ./files/ntpd_acl.json $(1)/usr/share/acl.d/ntpd.json
|
||||
endif
|
||||
-rm -rf $(1)/lib64
|
||||
endef
|
||||
|
||||
Package/busybox-selinux/install = $(Package/busybox/install)
|
||||
|
||||
$(eval $(call BuildPackage,busybox))
|
||||
$(eval $(call BuildPackage,busybox-selinux))
|
||||
741
package/utils/busybox/config/Config.in
Normal file
741
package/utils/busybox/config/Config.in
Normal file
@@ -0,0 +1,741 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
|
||||
config BUSYBOX_CONFIG_HAVE_DOT_CONFIG
|
||||
bool
|
||||
default BUSYBOX_DEFAULT_HAVE_DOT_CONFIG
|
||||
|
||||
menu "Settings"
|
||||
|
||||
config BUSYBOX_CONFIG_DESKTOP
|
||||
bool "Enable compatibility for full-blown desktop systems (8kb)"
|
||||
default BUSYBOX_DEFAULT_DESKTOP
|
||||
help
|
||||
Enable applet options and features which are not essential.
|
||||
Many applet options have dedicated config options to (de)select them
|
||||
under that applet; this options enables those options which have no
|
||||
individual config item for them.
|
||||
|
||||
Select this if you plan to use busybox on full-blown desktop machine
|
||||
with common Linux distro, which needs higher level of command-line
|
||||
compatibility.
|
||||
|
||||
If you are preparing your build to be used on an embedded box
|
||||
where you have tighter control over the entire set of userspace
|
||||
tools, you can unselect this option for smaller code size.
|
||||
|
||||
config BUSYBOX_CONFIG_EXTRA_COMPAT
|
||||
bool "Provide compatible behavior for rare corner cases (bigger code)"
|
||||
default BUSYBOX_DEFAULT_EXTRA_COMPAT
|
||||
help
|
||||
This option makes grep, sed etc handle rare corner cases
|
||||
(embedded NUL bytes and such). This makes code bigger and uses
|
||||
some GNU extensions in libc. You probably only need this option
|
||||
if you plan to run busybox on desktop.
|
||||
|
||||
config BUSYBOX_CONFIG_FEDORA_COMPAT
|
||||
bool "Building for Fedora distribution"
|
||||
default BUSYBOX_DEFAULT_FEDORA_COMPAT
|
||||
help
|
||||
This option makes some tools behave like they do on Fedora.
|
||||
|
||||
At the time of this writing (2017-08) this only affects uname:
|
||||
normally, uname -p (processor) and uname -i (platform)
|
||||
are shown as "unknown", but with this option uname -p
|
||||
shows the same string as uname -m (machine type),
|
||||
and so does uname -i unless machine type is i486/i586/i686 -
|
||||
then uname -i shows "i386".
|
||||
|
||||
config BUSYBOX_CONFIG_INCLUDE_SUSv2
|
||||
bool "Enable obsolete features removed before SUSv3"
|
||||
default BUSYBOX_DEFAULT_INCLUDE_SUSv2
|
||||
help
|
||||
This option will enable backwards compatibility with SuSv2,
|
||||
specifically, old-style numeric options ('command -1 <file>')
|
||||
will be supported in head, tail, and fold. (Note: should
|
||||
affect renice too.)
|
||||
|
||||
config BUSYBOX_CONFIG_LONG_OPTS
|
||||
bool "Support --long-options"
|
||||
default BUSYBOX_DEFAULT_LONG_OPTS
|
||||
help
|
||||
Enable this if you want busybox applets to use the gnu --long-option
|
||||
style, in addition to single character -a -b -c style options.
|
||||
|
||||
config BUSYBOX_CONFIG_SHOW_USAGE
|
||||
bool "Show applet usage messages"
|
||||
default BUSYBOX_DEFAULT_SHOW_USAGE
|
||||
help
|
||||
Enabling this option, applets will show terse help messages
|
||||
when invoked with wrong arguments.
|
||||
If you do not want to show any (helpful) usage message when
|
||||
issuing wrong command syntax, you can say 'N' here,
|
||||
saving approximately 7k.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE
|
||||
bool "Show verbose applet usage messages"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VERBOSE_USAGE
|
||||
depends on BUSYBOX_CONFIG_SHOW_USAGE
|
||||
help
|
||||
All applets will show verbose help messages when invoked with --help.
|
||||
This will add a lot of text to the binary.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE
|
||||
bool "Store applet usage messages in compressed form"
|
||||
default BUSYBOX_DEFAULT_FEATURE_COMPRESS_USAGE
|
||||
depends on BUSYBOX_CONFIG_SHOW_USAGE
|
||||
help
|
||||
Store usage messages in .bz2 compressed form, uncompress them
|
||||
on-the-fly when "APPLET --help" is run.
|
||||
|
||||
If you have a really tiny busybox with few applets enabled (and
|
||||
bunzip2 isn't one of them), the overhead of the decompressor might
|
||||
be noticeable. Also, if you run executables directly from ROM
|
||||
and have very little memory, this might not be a win. Otherwise,
|
||||
you probably want this.
|
||||
|
||||
config BUSYBOX_CONFIG_LFS
|
||||
bool
|
||||
default BUSYBOX_DEFAULT_LFS
|
||||
help
|
||||
If you need to work with large files, enable this option.
|
||||
This will have no effect if your kernel or your C
|
||||
library lacks large file support for large files. Some of the
|
||||
programs that can benefit from large file support include dd, gzip,
|
||||
cp, mount, tar.
|
||||
|
||||
config BUSYBOX_CONFIG_PAM
|
||||
bool "Support PAM (Pluggable Authentication Modules)"
|
||||
default BUSYBOX_DEFAULT_PAM
|
||||
help
|
||||
Use PAM in some applets (currently login and httpd) instead
|
||||
of direct access to password database.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DEVPTS
|
||||
bool "Use the devpts filesystem for Unix98 PTYs"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DEVPTS
|
||||
help
|
||||
Enable if you want to use Unix98 PTY support. If enabled,
|
||||
busybox will use /dev/ptmx for the master side of the pseudoterminal
|
||||
and /dev/pts/<number> for the slave side. Otherwise, BSD style
|
||||
/dev/ttyp<number> will be used. To use this option, you should have
|
||||
devpts mounted.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UTMP
|
||||
bool "Support utmp file"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UTMP
|
||||
help
|
||||
The file /var/run/utmp is used to track who is currently logged in.
|
||||
With this option on, certain applets (getty, login, telnetd etc)
|
||||
will create and delete entries there.
|
||||
"who" applet requires this option.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_WTMP
|
||||
bool "Support wtmp file"
|
||||
default BUSYBOX_DEFAULT_FEATURE_WTMP
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UTMP
|
||||
help
|
||||
The file /var/run/wtmp is used to track when users have logged into
|
||||
and logged out of the system.
|
||||
With this option on, certain applets (getty, login, telnetd etc)
|
||||
will append new entries there.
|
||||
"last" applet requires this option.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PIDFILE
|
||||
bool "Support writing pidfiles"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PIDFILE
|
||||
help
|
||||
This option makes some applets (e.g. crond, syslogd, inetd) write
|
||||
a pidfile at the configured PID_FILE_PATH. It has no effect
|
||||
on applets which require pidfiles to run.
|
||||
|
||||
config BUSYBOX_CONFIG_PID_FILE_PATH
|
||||
string "Directory for pidfiles"
|
||||
default BUSYBOX_DEFAULT_PID_FILE_PATH
|
||||
depends on BUSYBOX_CONFIG_FEATURE_PIDFILE || BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES
|
||||
help
|
||||
This is the default path where pidfiles are created. Applets which
|
||||
allow you to set the pidfile path on the command line will override
|
||||
this value. The option has no effect on applets that require you to
|
||||
specify a pidfile path. When crond has the 'Support special times'
|
||||
option enabled, the 'crond.reboot' file is also stored here.
|
||||
|
||||
config BUSYBOX_CONFIG_BUSYBOX
|
||||
bool "Include busybox applet"
|
||||
default BUSYBOX_DEFAULT_BUSYBOX
|
||||
help
|
||||
The busybox applet provides general help message and allows
|
||||
the included applets to be listed. It also provides
|
||||
optional --install command to create applet links. If you unselect
|
||||
this option, running busybox without any arguments will give
|
||||
just a cryptic error message:
|
||||
|
||||
$ busybox
|
||||
busybox: applet not found
|
||||
|
||||
Running "busybox APPLET [ARGS...]" will still work, of course.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SHOW_SCRIPT
|
||||
bool "Support --show SCRIPT"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SHOW_SCRIPT
|
||||
depends on BUSYBOX_CONFIG_BUSYBOX
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INSTALLER
|
||||
bool "Support --install [-s] to install applet links at runtime"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INSTALLER
|
||||
depends on BUSYBOX_CONFIG_BUSYBOX
|
||||
help
|
||||
Enable 'busybox --install [-s]' support. This will allow you to use
|
||||
busybox at runtime to create hard links or symlinks for all the
|
||||
applets that are compiled into busybox.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_NO_USR
|
||||
bool "Don't use /usr"
|
||||
default BUSYBOX_DEFAULT_INSTALL_NO_USR
|
||||
help
|
||||
Disable use of /usr. "busybox --install" and "make install"
|
||||
will install applets only to /bin and /sbin,
|
||||
never to /usr/bin or /usr/sbin.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SUID
|
||||
bool "Drop SUID state for most applets"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SUID
|
||||
help
|
||||
With this option you can install the busybox binary belonging
|
||||
to root with the suid bit set, enabling some applets to perform
|
||||
root-level operations even when run by ordinary users
|
||||
(for example, mounting of user mounts in fstab needs this).
|
||||
|
||||
With this option enabled, busybox drops privileges for applets
|
||||
that don't need root access, before entering their main() function.
|
||||
|
||||
If you are really paranoid and don't want even initial busybox code
|
||||
to run under root for every applet, build two busybox binaries with
|
||||
different applets in them (and the appropriate symlinks pointing
|
||||
to each binary), and only set the suid bit on the one that needs it.
|
||||
|
||||
Some applets which require root rights (need suid bit on the binary
|
||||
or to be run by root) and will refuse to execute otherwise:
|
||||
crontab, login, passwd, su, vlock, wall.
|
||||
|
||||
The applets which will use root rights if they have them
|
||||
(via suid bit, or because run by root), but would try to work
|
||||
without root right nevertheless:
|
||||
findfs, ping[6], traceroute[6], mount.
|
||||
|
||||
Note that if you DO NOT select this option, but DO make busybox
|
||||
suid root, ALL applets will run under root, which is a huge
|
||||
security hole (think "cp /some/file /etc/passwd").
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG
|
||||
bool "Enable SUID configuration via /etc/busybox.conf"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SUID_CONFIG
|
||||
depends on BUSYBOX_CONFIG_FEATURE_SUID
|
||||
help
|
||||
Allow the SUID/SGID state of an applet to be determined at runtime
|
||||
by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
|
||||
The format of this file is as follows:
|
||||
|
||||
APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
|
||||
|
||||
s: USER or GROUP is allowed to execute APPLET.
|
||||
APPLET will run under USER or GROUP
|
||||
(regardless of who's running it).
|
||||
S: USER or GROUP is NOT allowed to execute APPLET.
|
||||
APPLET will run under USER or GROUP.
|
||||
This option is not very sensical.
|
||||
x: USER/GROUP/others are allowed to execute APPLET.
|
||||
No UID/GID change will be done when it is run.
|
||||
-: USER/GROUP/others are not allowed to execute APPLET.
|
||||
|
||||
An example might help:
|
||||
|
||||
|[SUID]
|
||||
|su = ssx root.0 # applet su can be run by anyone and runs with
|
||||
| # euid=0,egid=0
|
||||
|su = ssx # exactly the same
|
||||
|
|
||||
|mount = sx- root.disk # applet mount can be run by root and members
|
||||
| # of group disk (but not anyone else)
|
||||
| # and runs with euid=0 (egid is not changed)
|
||||
|
|
||||
|cp = --- # disable applet cp for everyone
|
||||
|
||||
The file has to be owned by user root, group root and has to be
|
||||
writeable only by root:
|
||||
(chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
|
||||
The busybox executable has to be owned by user root, group
|
||||
root and has to be setuid root for this to work:
|
||||
(chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
|
||||
|
||||
Robert 'sandman' Griebl has more information here:
|
||||
<url: http://www.softforge.de/bb/suid.html >.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SUID_CONFIG_QUIET
|
||||
bool "Suppress warning message if /etc/busybox.conf is not readable"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SUID_CONFIG_QUIET
|
||||
depends on BUSYBOX_CONFIG_FEATURE_SUID_CONFIG
|
||||
help
|
||||
/etc/busybox.conf should be readable by the user needing the SUID,
|
||||
check this option to avoid users to be notified about missing
|
||||
permissions.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
|
||||
bool "exec prefers applets"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PREFER_APPLETS
|
||||
help
|
||||
This is an experimental option which directs applets about to
|
||||
call 'exec' to try and find an applicable busybox applet before
|
||||
searching the PATH. This is typically done by exec'ing
|
||||
/proc/self/exe.
|
||||
|
||||
This may affect shell, find -exec, xargs and similar applets.
|
||||
They will use applets even if /bin/APPLET -> busybox link
|
||||
is missing (or is not a link to busybox). However, this causes
|
||||
problems in chroot jails without mounted /proc and with ps/top
|
||||
(command name can be shown as 'exe' for applets started this way).
|
||||
|
||||
config BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH
|
||||
string "Path to busybox executable"
|
||||
default BUSYBOX_DEFAULT_BUSYBOX_EXEC_PATH
|
||||
help
|
||||
When applets need to run other applets, busybox
|
||||
sometimes needs to exec() itself. When the /proc filesystem is
|
||||
mounted, /proc/self/exe always points to the currently running
|
||||
executable. If you haven't got /proc, set this to wherever you
|
||||
want to run busybox from.
|
||||
|
||||
config BUSYBOX_CONFIG_SELINUX
|
||||
bool "Support NSA Security Enhanced Linux"
|
||||
default BUSYBOX_DEFAULT_SELINUX
|
||||
help
|
||||
Enable support for SELinux in applets ls, ps, and id. Also provide
|
||||
the option of compiling in SELinux applets.
|
||||
|
||||
If you do not have a complete SELinux userland installed, this stuff
|
||||
will not compile. Specifially, libselinux 1.28 or better is
|
||||
directly required by busybox. If the installation is located in a
|
||||
non-standard directory, provide it by invoking make as follows:
|
||||
|
||||
CFLAGS=-I<libselinux-include-path> \
|
||||
LDFLAGS=-L<libselinux-lib-path> \
|
||||
make
|
||||
|
||||
Most people will leave this set to 'N'.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CLEAN_UP
|
||||
bool "Clean up all memory before exiting (usually not needed)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CLEAN_UP
|
||||
help
|
||||
As a size optimization, busybox normally exits without explicitly
|
||||
freeing dynamically allocated memory or closing files. This saves
|
||||
space since the OS will clean up for us, but it can confuse debuggers
|
||||
like valgrind, which report tons of memory and resource leaks.
|
||||
|
||||
Don't enable this unless you have a really good reason to clean
|
||||
things up manually.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SYSLOG_INFO
|
||||
bool "Support LOG_INFO level syslog messages"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SYSLOG_INFO
|
||||
depends on BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
Applets which send their output to syslog use either LOG_INFO or
|
||||
LOG_ERR log levels, but by disabling this option all messages will
|
||||
be logged at the LOG_ERR level, saving just under 200 bytes.
|
||||
|
||||
# These are auto-selected by other options
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
bool #No description makes it a hidden option
|
||||
default BUSYBOX_DEFAULT_FEATURE_SYSLOG
|
||||
#help
|
||||
#This option is auto-selected when you select any applet which may
|
||||
#send its output to syslog. You do not need to select it manually.
|
||||
|
||||
comment 'Build Options'
|
||||
|
||||
config BUSYBOX_CONFIG_STATIC
|
||||
bool "Build static binary (no shared libs)"
|
||||
default BUSYBOX_DEFAULT_STATIC
|
||||
help
|
||||
If you want to build a static binary, which does not use
|
||||
or require any shared libraries, enable this option.
|
||||
Static binaries are larger, but do not require functioning
|
||||
dynamic libraries to be present, which is important if used
|
||||
as a system rescue tool.
|
||||
|
||||
config BUSYBOX_CONFIG_PIE
|
||||
bool "Build position independent executable"
|
||||
default BUSYBOX_DEFAULT_PIE
|
||||
depends on !BUSYBOX_CONFIG_STATIC
|
||||
help
|
||||
Hardened code option. PIE binaries are loaded at a different
|
||||
address at each invocation. This has some overhead,
|
||||
particularly on x86-32 which is short on registers.
|
||||
|
||||
Most people will leave this set to 'N'.
|
||||
|
||||
config BUSYBOX_CONFIG_NOMMU
|
||||
bool "Force NOMMU build"
|
||||
default BUSYBOX_DEFAULT_NOMMU
|
||||
help
|
||||
Busybox tries to detect whether architecture it is being
|
||||
built against supports MMU or not. If this detection fails,
|
||||
or if you want to build NOMMU version of busybox for testing,
|
||||
you may force NOMMU build here.
|
||||
|
||||
Most people will leave this set to 'N'.
|
||||
|
||||
# PIE can be made to work with BUILD_LIBBUSYBOX, but currently
|
||||
# build system does not support that
|
||||
config BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
|
||||
bool "Build shared libbusybox"
|
||||
default BUSYBOX_DEFAULT_BUILD_LIBBUSYBOX
|
||||
depends on !BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS && !BUSYBOX_CONFIG_PIE && !BUSYBOX_CONFIG_STATIC
|
||||
help
|
||||
Build a shared library libbusybox.so.N.N.N which contains all
|
||||
busybox code.
|
||||
|
||||
This feature allows every applet to be built as a really tiny
|
||||
separate executable linked against the library:
|
||||
|$ size 0_lib/l*
|
||||
| text data bss dec hex filename
|
||||
| 939 212 28 1179 49b 0_lib/last
|
||||
| 939 212 28 1179 49b 0_lib/less
|
||||
| 919138 8328 1556 929022 e2cfe 0_lib/libbusybox.so.1.N.M
|
||||
|
||||
This is useful on NOMMU systems which are not capable
|
||||
of sharing executables, but are capable of sharing code
|
||||
in dynamic libraries.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LIBBUSYBOX_STATIC
|
||||
bool "Pull in all external references into libbusybox"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LIBBUSYBOX_STATIC
|
||||
depends on BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
|
||||
help
|
||||
Make libbusybox library independent, not using or requiring
|
||||
any other shared libraries.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INDIVIDUAL
|
||||
bool "Produce a binary for each applet, linked against libbusybox"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INDIVIDUAL
|
||||
depends on BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
|
||||
help
|
||||
If your CPU architecture doesn't allow for sharing text/rodata
|
||||
sections of running binaries, but allows for runtime dynamic
|
||||
libraries, this option will allow you to reduce memory footprint
|
||||
when you have many different applets running at once.
|
||||
|
||||
If your CPU architecture allows for sharing text/rodata,
|
||||
having single binary is more optimal.
|
||||
|
||||
Each applet will be a tiny program, dynamically linked
|
||||
against libbusybox.so.N.N.N.
|
||||
|
||||
You need to have a working dynamic linker.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SHARED_BUSYBOX
|
||||
bool "Produce additional busybox binary linked against libbusybox"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SHARED_BUSYBOX
|
||||
depends on BUSYBOX_CONFIG_BUILD_LIBBUSYBOX
|
||||
help
|
||||
Build busybox, dynamically linked against libbusybox.so.N.N.N.
|
||||
|
||||
You need to have a working dynamic linker.
|
||||
|
||||
### config BUILD_AT_ONCE
|
||||
### bool "Compile all sources at once"
|
||||
### default n
|
||||
### help
|
||||
### Normally each source-file is compiled with one invocation of
|
||||
### the compiler.
|
||||
### If you set this option, all sources are compiled at once.
|
||||
### This gives the compiler more opportunities to optimize which can
|
||||
### result in smaller and/or faster binaries.
|
||||
###
|
||||
### Setting this option will consume alot of memory, e.g. if you
|
||||
### enable all applets with all features, gcc uses more than 300MB
|
||||
### RAM during compilation of busybox.
|
||||
###
|
||||
### This option is most likely only beneficial for newer compilers
|
||||
### such as gcc-4.1 and above.
|
||||
###
|
||||
### Say 'N' unless you know what you are doing.
|
||||
|
||||
config BUSYBOX_CONFIG_CROSS_COMPILER_PREFIX
|
||||
string "Cross compiler prefix"
|
||||
default BUSYBOX_DEFAULT_CROSS_COMPILER_PREFIX
|
||||
help
|
||||
If you want to build busybox with a cross compiler, then you
|
||||
will need to set this to the cross-compiler prefix, for example,
|
||||
"i386-uclibc-".
|
||||
|
||||
Note that CROSS_COMPILE environment variable or
|
||||
"make CROSS_COMPILE=xxx ..." will override this selection.
|
||||
|
||||
Native builds leave this empty.
|
||||
|
||||
config BUSYBOX_CONFIG_SYSROOT
|
||||
string "Path to sysroot"
|
||||
default BUSYBOX_DEFAULT_SYSROOT
|
||||
help
|
||||
If you want to build busybox with a cross compiler, then you
|
||||
might also need to specify where /usr/include and /usr/lib
|
||||
will be found.
|
||||
|
||||
For example, busybox can be built against an installed
|
||||
Android NDK, platform version 9, for ARM ABI with
|
||||
|
||||
CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
|
||||
|
||||
Native builds leave this empty.
|
||||
|
||||
config BUSYBOX_CONFIG_EXTRA_CFLAGS
|
||||
string "Additional CFLAGS"
|
||||
default BUSYBOX_DEFAULT_EXTRA_CFLAGS
|
||||
help
|
||||
Additional CFLAGS to pass to the compiler verbatim.
|
||||
|
||||
config BUSYBOX_CONFIG_EXTRA_LDFLAGS
|
||||
string "Additional LDFLAGS"
|
||||
default BUSYBOX_DEFAULT_EXTRA_LDFLAGS
|
||||
help
|
||||
Additional LDFLAGS to pass to the linker verbatim.
|
||||
|
||||
config BUSYBOX_CONFIG_EXTRA_LDLIBS
|
||||
string "Additional LDLIBS"
|
||||
default BUSYBOX_DEFAULT_EXTRA_LDLIBS
|
||||
help
|
||||
Additional LDLIBS to pass to the linker with -l.
|
||||
|
||||
config BUSYBOX_CONFIG_USE_PORTABLE_CODE
|
||||
bool "Avoid using GCC-specific code constructs"
|
||||
default BUSYBOX_DEFAULT_USE_PORTABLE_CODE
|
||||
help
|
||||
Use this option if you are trying to compile busybox with
|
||||
compiler other than gcc.
|
||||
If you do use gcc, this option may needlessly increase code size.
|
||||
|
||||
config BUSYBOX_CONFIG_STACK_OPTIMIZATION_386
|
||||
bool "Use -mpreferred-stack-boundary=2 on i386 arch"
|
||||
default BUSYBOX_DEFAULT_STACK_OPTIMIZATION_386
|
||||
help
|
||||
This option makes for smaller code, but some libc versions
|
||||
do not work with it (they use SSE instructions without
|
||||
ensuring stack alignment).
|
||||
|
||||
config BUSYBOX_CONFIG_STATIC_LIBGCC
|
||||
bool "Use -static-libgcc"
|
||||
default BUSYBOX_DEFAULT_STATIC_LIBGCC
|
||||
help
|
||||
This option instructs gcc to link in a static version of its
|
||||
support library, libgcc. This means that the binary will require
|
||||
one fewer dynamic library at run time.
|
||||
|
||||
comment 'Installation Options ("make install" behavior)'
|
||||
|
||||
choice
|
||||
prompt "What kind of applet links to install"
|
||||
default BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
|
||||
help
|
||||
Choose what kind of links to applets are created by "make install".
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS
|
||||
bool "as soft-links"
|
||||
help
|
||||
Install applets as soft-links to the busybox binary. This needs some
|
||||
free inodes on the filesystem, but might help with filesystem
|
||||
generators that can't cope with hard-links.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS
|
||||
bool "as hard-links"
|
||||
help
|
||||
Install applets as hard-links to the busybox binary. This might
|
||||
count on a filesystem with few inodes.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
|
||||
bool "as script wrappers"
|
||||
help
|
||||
Install applets as script wrappers that call the busybox binary.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_APPLET_DONT
|
||||
bool "not installed"
|
||||
help
|
||||
Do not install applet links. Useful when you plan to use
|
||||
busybox --install for installing links, or plan to use
|
||||
a standalone shell and thus don't need applet links.
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "/bin/sh applet link"
|
||||
default BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
|
||||
depends on BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS
|
||||
help
|
||||
Choose how you install /bin/sh applet link.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SYMLINK
|
||||
bool "as soft-link"
|
||||
help
|
||||
Install /bin/sh applet as soft-link to the busybox binary.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_SH_APPLET_HARDLINK
|
||||
bool "as hard-link"
|
||||
help
|
||||
Install /bin/sh applet as hard-link to the busybox binary.
|
||||
|
||||
config BUSYBOX_CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER
|
||||
bool "as script wrapper"
|
||||
help
|
||||
Install /bin/sh applet as script wrapper that calls
|
||||
the busybox binary.
|
||||
|
||||
endchoice
|
||||
|
||||
config BUSYBOX_CONFIG_PREFIX
|
||||
string "Destination path for 'make install'"
|
||||
default BUSYBOX_DEFAULT_PREFIX
|
||||
help
|
||||
Where "make install" should install busybox binary and links.
|
||||
|
||||
comment 'Debugging Options'
|
||||
|
||||
config BUSYBOX_CONFIG_DEBUG
|
||||
bool "Build with debug information"
|
||||
default BUSYBOX_DEFAULT_DEBUG
|
||||
help
|
||||
Say Y here to compile with debug information.
|
||||
This increases the size of the binary considerably, and
|
||||
should only be used when doing development.
|
||||
|
||||
This adds -g option to gcc command line.
|
||||
|
||||
Most people should answer N.
|
||||
|
||||
config BUSYBOX_CONFIG_DEBUG_PESSIMIZE
|
||||
bool "Disable compiler optimizations"
|
||||
default BUSYBOX_DEFAULT_DEBUG_PESSIMIZE
|
||||
depends on BUSYBOX_CONFIG_DEBUG
|
||||
help
|
||||
The compiler's optimization of source code can eliminate and reorder
|
||||
code, resulting in an executable that's hard to understand when
|
||||
stepping through it with a debugger. This switches it off, resulting
|
||||
in a much bigger executable that more closely matches the source
|
||||
code.
|
||||
|
||||
This replaces -Os/-O2 with -O0 in gcc command line.
|
||||
|
||||
config BUSYBOX_CONFIG_DEBUG_SANITIZE
|
||||
bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
|
||||
default BUSYBOX_DEFAULT_DEBUG_SANITIZE
|
||||
help
|
||||
Say Y here if you want to enable runtime sanitizers. These help
|
||||
catch bad memory accesses (e.g. buffer overflows), but will make
|
||||
the executable larger and slow down runtime a bit.
|
||||
|
||||
This adds -fsanitize=foo options to gcc command line.
|
||||
|
||||
If you aren't developing/testing busybox, say N here.
|
||||
|
||||
config BUSYBOX_CONFIG_UNIT_TEST
|
||||
bool "Build unit tests"
|
||||
default BUSYBOX_DEFAULT_UNIT_TEST
|
||||
help
|
||||
Say Y here if you want to build unit tests (both the framework and
|
||||
test cases) as an applet. This results in bigger code, so you
|
||||
probably don't want this option in production builds.
|
||||
|
||||
config BUSYBOX_CONFIG_WERROR
|
||||
bool "Abort compilation on any warning"
|
||||
default BUSYBOX_DEFAULT_WERROR
|
||||
help
|
||||
This adds -Werror to gcc command line.
|
||||
|
||||
Most people should answer N.
|
||||
|
||||
config BUSYBOX_CONFIG_WARN_SIMPLE_MSG
|
||||
bool "Warn about single parameter bb_xx_msg calls"
|
||||
default BUSYBOX_DEFAULT_WARN_SIMPLE_MSG
|
||||
help
|
||||
This will cause warnings to be shown for any instances of
|
||||
bb_error_msg(), bb_error_msg_and_die(), bb_perror_msg(),
|
||||
bb_perror_msg_and_die(), bb_herror_msg() or bb_herror_msg_and_die()
|
||||
being called with a single parameter. In these cases the equivalent
|
||||
bb_simple_xx_msg function should be used instead.
|
||||
Note that use of STRERROR_FMT may give false positives.
|
||||
|
||||
If you aren't developing busybox, say N here.
|
||||
|
||||
choice
|
||||
prompt "Additional debugging library"
|
||||
default BUSYBOX_CONFIG_NO_DEBUG_LIB
|
||||
help
|
||||
Using an additional debugging library will make busybox become
|
||||
considerably larger and will cause it to run more slowly. You
|
||||
should always leave this option disabled for production use.
|
||||
|
||||
dmalloc support:
|
||||
----------------
|
||||
This enables compiling with dmalloc ( http://dmalloc.com/ )
|
||||
which is an excellent public domain mem leak and malloc problem
|
||||
detector. To enable dmalloc, before running busybox you will
|
||||
want to properly set your environment, for example:
|
||||
export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
|
||||
The 'debug=' value is generated using the following command
|
||||
dmalloc -p log-stats -p log-non-free -p log-bad-space \
|
||||
-p log-elapsed-time -p check-fence -p check-heap \
|
||||
-p check-lists -p check-blank -p check-funcs -p realloc-copy \
|
||||
-p allow-free-null
|
||||
|
||||
Electric-fence support:
|
||||
-----------------------
|
||||
This enables compiling with Electric-fence support. Electric
|
||||
fence is another very useful malloc debugging library which uses
|
||||
your computer's virtual memory hardware to detect illegal memory
|
||||
accesses. This support will make busybox be considerably larger
|
||||
and run slower, so you should leave this option disabled unless
|
||||
you are hunting a hard to find memory problem.
|
||||
|
||||
|
||||
config BUSYBOX_CONFIG_NO_DEBUG_LIB
|
||||
bool "None"
|
||||
|
||||
config BUSYBOX_CONFIG_DMALLOC
|
||||
bool "Dmalloc"
|
||||
|
||||
config BUSYBOX_CONFIG_EFENCE
|
||||
bool "Electric-fence"
|
||||
|
||||
endchoice
|
||||
|
||||
source "libbb/Config.in"
|
||||
|
||||
endmenu
|
||||
|
||||
comment "Applets"
|
||||
|
||||
source "archival/Config.in"
|
||||
source "coreutils/Config.in"
|
||||
source "console-tools/Config.in"
|
||||
source "debianutils/Config.in"
|
||||
source "klibc-utils/Config.in"
|
||||
source "editors/Config.in"
|
||||
source "findutils/Config.in"
|
||||
source "init/Config.in"
|
||||
source "loginutils/Config.in"
|
||||
source "e2fsprogs/Config.in"
|
||||
source "modutils/Config.in"
|
||||
source "util-linux/Config.in"
|
||||
source "miscutils/Config.in"
|
||||
source "networking/Config.in"
|
||||
source "printutils/Config.in"
|
||||
source "mailutils/Config.in"
|
||||
source "procps/Config.in"
|
||||
source "runit/Config.in"
|
||||
source "selinux/Config.in"
|
||||
source "shell/Config.in"
|
||||
source "sysklogd/Config.in"
|
||||
450
package/utils/busybox/config/archival/Config.in
Normal file
450
package/utils/busybox/config/archival/Config.in
Normal file
@@ -0,0 +1,450 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Archival Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ
|
||||
bool "Make tar, rpm, modprobe etc understand .xz data"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SEAMLESS_LZMA
|
||||
bool "Make tar, rpm, modprobe etc understand .lzma data"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_LZMA
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SEAMLESS_BZ2
|
||||
bool "Make tar, rpm, modprobe etc understand .bz2 data"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_BZ2
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
|
||||
bool "Make tar, rpm, modprobe etc understand .gz data"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_GZ
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z
|
||||
bool "Make tar, rpm, modprobe etc understand .Z data"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SEAMLESS_Z # it is ancient
|
||||
|
||||
config BUSYBOX_CONFIG_AR
|
||||
bool "ar (9.5 kb)"
|
||||
default BUSYBOX_DEFAULT_AR # needs to be improved to be able to replace binutils ar
|
||||
help
|
||||
ar is an archival utility program used to create, modify, and
|
||||
extract contents from archives. In practice, it is used exclusively
|
||||
for object module archives used by compilers.
|
||||
|
||||
Unless you have a specific application which requires ar, you should
|
||||
probably say N here: most compilers come with their own ar utility.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_AR_LONG_FILENAMES
|
||||
bool "Support long filenames (not needed for debs)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_AR_LONG_FILENAMES
|
||||
depends on BUSYBOX_CONFIG_AR
|
||||
help
|
||||
By default the ar format can only store the first 15 characters
|
||||
of the filename, this option removes that limitation.
|
||||
It supports the GNU ar long filename method which moves multiple long
|
||||
filenames into a the data section of a new ar entry.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_AR_CREATE
|
||||
bool "Support archive creation"
|
||||
default BUSYBOX_DEFAULT_FEATURE_AR_CREATE
|
||||
depends on BUSYBOX_CONFIG_AR
|
||||
help
|
||||
This enables archive creation (-c and -r) with busybox ar.
|
||||
config BUSYBOX_CONFIG_UNCOMPRESS
|
||||
bool "uncompress (7.1 kb)"
|
||||
default BUSYBOX_DEFAULT_UNCOMPRESS # ancient
|
||||
help
|
||||
uncompress is used to decompress archives created by compress.
|
||||
Not much used anymore, replaced by gzip/gunzip.
|
||||
config BUSYBOX_CONFIG_GUNZIP
|
||||
bool "gunzip (11 kb)"
|
||||
default BUSYBOX_DEFAULT_GUNZIP
|
||||
select BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS
|
||||
help
|
||||
gunzip is used to decompress archives created by gzip.
|
||||
You can use the '-t' option to test the integrity of
|
||||
an archive, without decompressing it.
|
||||
|
||||
config BUSYBOX_CONFIG_ZCAT
|
||||
bool "zcat (24 kb)"
|
||||
default BUSYBOX_DEFAULT_ZCAT
|
||||
select BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS
|
||||
help
|
||||
Alias to "gunzip -c".
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_GUNZIP_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS
|
||||
depends on (BUSYBOX_CONFIG_GUNZIP || BUSYBOX_CONFIG_ZCAT) && BUSYBOX_CONFIG_LONG_OPTS
|
||||
config BUSYBOX_CONFIG_BUNZIP2
|
||||
bool "bunzip2 (8.7 kb)"
|
||||
default BUSYBOX_DEFAULT_BUNZIP2
|
||||
select BUSYBOX_CONFIG_FEATURE_BZIP2_DECOMPRESS
|
||||
help
|
||||
bunzip2 is a compression utility using the Burrows-Wheeler block
|
||||
sorting text compression algorithm, and Huffman coding. Compression
|
||||
is generally considerably better than that achieved by more
|
||||
conventional LZ77/LZ78-based compressors, and approaches the
|
||||
performance of the PPM family of statistical compressors.
|
||||
|
||||
Unless you have a specific application which requires bunzip2, you
|
||||
should probably say N here.
|
||||
|
||||
config BUSYBOX_CONFIG_BZCAT
|
||||
bool "bzcat (8.7 kb)"
|
||||
default BUSYBOX_DEFAULT_BZCAT
|
||||
select BUSYBOX_CONFIG_FEATURE_BZIP2_DECOMPRESS
|
||||
help
|
||||
Alias to "bunzip2 -c".
|
||||
config BUSYBOX_CONFIG_UNLZMA
|
||||
bool "unlzma (7.5 kb)"
|
||||
default BUSYBOX_DEFAULT_UNLZMA
|
||||
help
|
||||
unlzma is a compression utility using the Lempel-Ziv-Markov chain
|
||||
compression algorithm, and range coding. Compression
|
||||
is generally considerably better than that achieved by the bzip2
|
||||
compressors.
|
||||
|
||||
config BUSYBOX_CONFIG_LZCAT
|
||||
bool "lzcat (7.5 kb)"
|
||||
default BUSYBOX_DEFAULT_LZCAT
|
||||
help
|
||||
Alias to "unlzma -c".
|
||||
|
||||
config BUSYBOX_CONFIG_LZMA
|
||||
bool "lzma -d"
|
||||
default BUSYBOX_DEFAULT_LZMA
|
||||
help
|
||||
Enable this option if you want commands like "lzma -d" to work.
|
||||
IOW: you'll get lzma applet, but it will always require -d option.
|
||||
config BUSYBOX_CONFIG_UNXZ
|
||||
bool "unxz (13 kb)"
|
||||
default BUSYBOX_DEFAULT_UNXZ
|
||||
help
|
||||
unxz is a unlzma successor.
|
||||
|
||||
config BUSYBOX_CONFIG_XZCAT
|
||||
bool "xzcat (13 kb)"
|
||||
default BUSYBOX_DEFAULT_XZCAT
|
||||
help
|
||||
Alias to "unxz -c".
|
||||
|
||||
config BUSYBOX_CONFIG_XZ
|
||||
bool "xz -d"
|
||||
default BUSYBOX_DEFAULT_XZ
|
||||
help
|
||||
Enable this option if you want commands like "xz -d" to work.
|
||||
IOW: you'll get xz applet, but it will always require -d option.
|
||||
config BUSYBOX_CONFIG_BZIP2
|
||||
bool "bzip2 (16 kb)"
|
||||
default BUSYBOX_DEFAULT_BZIP2
|
||||
help
|
||||
bzip2 is a compression utility using the Burrows-Wheeler block
|
||||
sorting text compression algorithm, and Huffman coding. Compression
|
||||
is generally considerably better than that achieved by more
|
||||
conventional LZ77/LZ78-based compressors, and approaches the
|
||||
performance of the PPM family of statistical compressors.
|
||||
|
||||
Unless you have a specific application which requires bzip2, you
|
||||
should probably say N here.
|
||||
|
||||
config BUSYBOX_CONFIG_BZIP2_SMALL
|
||||
int "Trade bytes for speed (0:fast, 9:small)"
|
||||
default BUSYBOX_DEFAULT_BZIP2_SMALL # all "fast or small" options default to small
|
||||
range 0 9
|
||||
depends on BUSYBOX_CONFIG_BZIP2
|
||||
help
|
||||
Trade code size versus speed.
|
||||
Approximate values with gcc-6.3.0 "bzip -9" compressing
|
||||
linux-4.15.tar were:
|
||||
value time (sec) code size (386)
|
||||
9 (smallest) 70.11 7687
|
||||
8 67.93 8091
|
||||
7 67.88 8405
|
||||
6 67.78 8624
|
||||
5 67.05 9427
|
||||
4-0 (fastest) 64.14 12083
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BZIP2_DECOMPRESS
|
||||
bool "Enable decompression"
|
||||
default BUSYBOX_DEFAULT_FEATURE_BZIP2_DECOMPRESS
|
||||
depends on BUSYBOX_CONFIG_BZIP2 || BUSYBOX_CONFIG_BUNZIP2 || BUSYBOX_CONFIG_BZCAT
|
||||
help
|
||||
Enable -d (--decompress) and -t (--test) options for bzip2.
|
||||
This will be automatically selected if bunzip2 or bzcat is
|
||||
enabled.
|
||||
config BUSYBOX_CONFIG_CPIO
|
||||
bool "cpio (15 kb)"
|
||||
default BUSYBOX_DEFAULT_CPIO
|
||||
help
|
||||
cpio is an archival utility program used to create, modify, and
|
||||
extract contents from archives.
|
||||
cpio has 110 bytes of overheads for every stored file.
|
||||
|
||||
This implementation of cpio can extract cpio archives created in the
|
||||
"newc" or "crc" format.
|
||||
|
||||
Unless you have a specific application which requires cpio, you
|
||||
should probably say N here.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CPIO_O
|
||||
bool "Support archive creation"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CPIO_O
|
||||
depends on BUSYBOX_CONFIG_CPIO
|
||||
help
|
||||
This implementation of cpio can create cpio archives in the "newc"
|
||||
format only.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CPIO_P
|
||||
bool "Support passthrough mode"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CPIO_P
|
||||
depends on BUSYBOX_CONFIG_FEATURE_CPIO_O
|
||||
help
|
||||
Passthrough mode. Rarely used.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CPIO_IGNORE_DEVNO
|
||||
bool "Support --ignore-devno like GNU cpio"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CPIO_IGNORE_DEVNO
|
||||
depends on BUSYBOX_CONFIG_FEATURE_CPIO_O && BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Optionally ignore device numbers when creating archives.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CPIO_RENUMBER_INODES
|
||||
bool "Support --renumber-inodes like GNU cpio"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CPIO_RENUMBER_INODES
|
||||
depends on BUSYBOX_CONFIG_FEATURE_CPIO_O && BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Optionally renumber inodes when creating archives.
|
||||
config BUSYBOX_CONFIG_DPKG
|
||||
bool "dpkg (43 kb)"
|
||||
default BUSYBOX_DEFAULT_DPKG
|
||||
select BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
|
||||
help
|
||||
dpkg is a medium-level tool to install, build, remove and manage
|
||||
Debian packages.
|
||||
|
||||
This implementation of dpkg has a number of limitations,
|
||||
you should use the official dpkg if possible.
|
||||
config BUSYBOX_CONFIG_DPKG_DEB
|
||||
bool "dpkg-deb (30 kb)"
|
||||
default BUSYBOX_DEFAULT_DPKG_DEB
|
||||
select BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ
|
||||
help
|
||||
dpkg-deb unpacks and provides information about Debian archives.
|
||||
|
||||
This implementation of dpkg-deb cannot pack archives.
|
||||
|
||||
Unless you have a specific application which requires dpkg-deb,
|
||||
say N here.
|
||||
config BUSYBOX_CONFIG_GZIP
|
||||
bool "gzip (17 kb)"
|
||||
default BUSYBOX_DEFAULT_GZIP
|
||||
help
|
||||
gzip is used to compress files.
|
||||
It's probably the most widely used UNIX compression program.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_GZIP_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_GZIP_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_GZIP && BUSYBOX_CONFIG_LONG_OPTS
|
||||
|
||||
config BUSYBOX_CONFIG_GZIP_FAST
|
||||
int "Trade memory for speed (0:small,slow - 2:fast,big)"
|
||||
default BUSYBOX_DEFAULT_GZIP_FAST
|
||||
range 0 2
|
||||
depends on BUSYBOX_CONFIG_GZIP
|
||||
help
|
||||
Enable big memory options for gzip.
|
||||
0: small buffers, small hash-tables
|
||||
1: larger buffers, larger hash-tables
|
||||
2: larger buffers, largest hash-tables
|
||||
Larger models may give slightly better compression
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_GZIP_LEVELS
|
||||
bool "Enable compression levels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_GZIP_LEVELS
|
||||
depends on BUSYBOX_CONFIG_GZIP
|
||||
help
|
||||
Enable support for compression levels 4-9. The default level
|
||||
is 6. If levels 1-3 are specified, 4 is used.
|
||||
If this option is not selected, -N options are ignored and -6
|
||||
is used.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS
|
||||
bool "Enable decompression"
|
||||
default BUSYBOX_DEFAULT_FEATURE_GZIP_DECOMPRESS
|
||||
depends on BUSYBOX_CONFIG_GZIP || BUSYBOX_CONFIG_GUNZIP || BUSYBOX_CONFIG_ZCAT
|
||||
help
|
||||
Enable -d (--decompress) and -t (--test) options for gzip.
|
||||
This will be automatically selected if gunzip or zcat is
|
||||
enabled.
|
||||
config BUSYBOX_CONFIG_LZOP
|
||||
bool "lzop (12 kb)"
|
||||
default BUSYBOX_DEFAULT_LZOP
|
||||
help
|
||||
Lzop compression/decompresion.
|
||||
|
||||
config BUSYBOX_CONFIG_UNLZOP
|
||||
bool "unlzop (13 kb)"
|
||||
default BUSYBOX_DEFAULT_UNLZOP # INCOMPAT: upstream lzop does not provide such tool
|
||||
help
|
||||
Lzop decompresion.
|
||||
|
||||
config BUSYBOX_CONFIG_LZOPCAT
|
||||
bool "lzopcat (13 kb)"
|
||||
default BUSYBOX_DEFAULT_LZOPCAT # INCOMPAT: upstream lzop does not provide such tool
|
||||
help
|
||||
Alias to "lzop -dc".
|
||||
|
||||
config BUSYBOX_CONFIG_LZOP_COMPR_HIGH
|
||||
bool "lzop compression levels 7,8,9 (not very useful)"
|
||||
default BUSYBOX_DEFAULT_LZOP_COMPR_HIGH
|
||||
depends on BUSYBOX_CONFIG_LZOP || BUSYBOX_CONFIG_UNLZOP || BUSYBOX_CONFIG_LZOPCAT
|
||||
help
|
||||
High levels (7,8,9) of lzop compression. These levels
|
||||
are actually slower than gzip at equivalent compression ratios
|
||||
and take up 3.2K of code.
|
||||
config BUSYBOX_CONFIG_RPM
|
||||
bool "rpm (32 kb)"
|
||||
default BUSYBOX_DEFAULT_RPM
|
||||
help
|
||||
Mini RPM applet - queries and extracts RPM packages.
|
||||
config BUSYBOX_CONFIG_RPM2CPIO
|
||||
bool "rpm2cpio (21 kb)"
|
||||
default BUSYBOX_DEFAULT_RPM2CPIO
|
||||
help
|
||||
Converts a RPM file into a CPIO archive.
|
||||
config BUSYBOX_CONFIG_TAR
|
||||
bool "tar (39 kb)"
|
||||
default BUSYBOX_DEFAULT_TAR
|
||||
help
|
||||
tar is an archiving program. It's commonly used with gzip to
|
||||
create compressed archives. It's probably the most widely used
|
||||
UNIX archive program.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_LONG_OPTS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_CREATE
|
||||
bool "Enable -c (archive creation)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_CREATE
|
||||
depends on BUSYBOX_CONFIG_TAR
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_AUTODETECT
|
||||
bool "Autodetect compressed tarballs"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_AUTODETECT
|
||||
depends on BUSYBOX_CONFIG_TAR && (BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z || BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ || BUSYBOX_CONFIG_FEATURE_SEAMLESS_BZ2 || BUSYBOX_CONFIG_FEATURE_SEAMLESS_LZMA || BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ)
|
||||
help
|
||||
With this option tar can automatically detect compressed
|
||||
tarballs. Currently it works only on files (not pipes etc).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_FROM
|
||||
bool "Enable -X (exclude from) and -T (include from) options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_FROM
|
||||
depends on BUSYBOX_CONFIG_TAR
|
||||
help
|
||||
If you enable this option you'll be able to specify
|
||||
a list of files to include or exclude from an archive.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY
|
||||
bool "Support old tar header format"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_OLDGNU_COMPATIBILITY
|
||||
depends on BUSYBOX_CONFIG_TAR || BUSYBOX_CONFIG_DPKG
|
||||
help
|
||||
This option is required to unpack archives created in
|
||||
the old GNU format; help to kill this old format by
|
||||
repacking your ancient archives with the new format.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY
|
||||
bool "Enable untarring of tarballs with checksums produced by buggy Sun tar"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_OLDSUN_COMPATIBILITY
|
||||
depends on BUSYBOX_CONFIG_TAR || BUSYBOX_CONFIG_DPKG
|
||||
help
|
||||
This option is required to unpack archives created by some old
|
||||
version of Sun's tar (it was calculating checksum using signed
|
||||
arithmetic). It is said to be fixed in newer Sun tar, but "old"
|
||||
tarballs still exist.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS
|
||||
bool "Support GNU tar extensions (long filenames)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_GNU_EXTENSIONS
|
||||
depends on BUSYBOX_CONFIG_TAR || BUSYBOX_CONFIG_DPKG
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_TO_COMMAND
|
||||
bool "Support writing to an external program (--to-command)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_TO_COMMAND
|
||||
depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS
|
||||
help
|
||||
If you enable this option you'll be able to instruct tar to send
|
||||
the contents of each extracted file to the standard input of an
|
||||
external program.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_UNAME_GNAME
|
||||
bool "Enable use of user and group names"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_UNAME_GNAME
|
||||
depends on BUSYBOX_CONFIG_TAR
|
||||
help
|
||||
Enable use of user and group names in tar. This affects contents
|
||||
listings (-t) and preserving permissions when unpacking (-p).
|
||||
+200 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_NOPRESERVE_TIME
|
||||
bool "Enable -m (do not preserve time) GNU option"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_NOPRESERVE_TIME
|
||||
depends on BUSYBOX_CONFIG_TAR
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAR_SELINUX
|
||||
bool "Support extracting SELinux labels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAR_SELINUX
|
||||
depends on BUSYBOX_CONFIG_TAR && BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
With this option busybox supports restoring SELinux labels
|
||||
when extracting files from tar archives.
|
||||
config BUSYBOX_CONFIG_UNZIP
|
||||
bool "unzip (26 kb)"
|
||||
default BUSYBOX_DEFAULT_UNZIP
|
||||
help
|
||||
unzip will list or extract files from a ZIP archive,
|
||||
commonly found on DOS/WIN systems. The default behavior
|
||||
(with no options) is to extract the archive into the
|
||||
current directory.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UNZIP_CDF
|
||||
bool "Read and use Central Directory data"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UNZIP_CDF
|
||||
depends on BUSYBOX_CONFIG_UNZIP
|
||||
help
|
||||
If you know that you only need to deal with simple
|
||||
ZIP files without deleted/updated files, SFX archives etc,
|
||||
you can reduce code size by unselecting this option.
|
||||
To support less trivial ZIPs, say Y.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UNZIP_BZIP2
|
||||
bool "Support compression method 12 (bzip2)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UNZIP_BZIP2
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UNZIP_CDF && BUSYBOX_CONFIG_DESKTOP
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UNZIP_LZMA
|
||||
bool "Support compression method 14 (lzma)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UNZIP_LZMA
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UNZIP_CDF && BUSYBOX_CONFIG_DESKTOP
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UNZIP_XZ
|
||||
bool "Support compression method 95 (xz)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UNZIP_XZ
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UNZIP_CDF && BUSYBOX_CONFIG_DESKTOP
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LZMA_FAST
|
||||
bool "Optimize lzma for speed"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
|
||||
depends on BUSYBOX_CONFIG_UNLZMA || BUSYBOX_CONFIG_LZCAT || BUSYBOX_CONFIG_LZMA || BUSYBOX_CONFIG_FEATURE_SEAMLESS_LZMA
|
||||
help
|
||||
This option reduces decompression time by about 25% at the cost of
|
||||
a 1K bigger binary.
|
||||
|
||||
endmenu
|
||||
144
package/utils/busybox/config/console-tools/Config.in
Normal file
144
package/utils/busybox/config/console-tools/Config.in
Normal file
@@ -0,0 +1,144 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Console Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_CHVT
|
||||
bool "chvt (2 kb)"
|
||||
default BUSYBOX_DEFAULT_CHVT
|
||||
help
|
||||
This program is used to change to another terminal.
|
||||
Example: chvt 4 (change to terminal /dev/tty4)
|
||||
config BUSYBOX_CONFIG_CLEAR
|
||||
bool "clear (tiny)"
|
||||
default BUSYBOX_DEFAULT_CLEAR
|
||||
help
|
||||
This program clears the terminal screen.
|
||||
config BUSYBOX_CONFIG_DEALLOCVT
|
||||
bool "deallocvt (1.9 kb)"
|
||||
default BUSYBOX_DEFAULT_DEALLOCVT
|
||||
help
|
||||
This program deallocates unused virtual consoles.
|
||||
config BUSYBOX_CONFIG_DUMPKMAP
|
||||
bool "dumpkmap (1.6 kb)"
|
||||
default BUSYBOX_DEFAULT_DUMPKMAP
|
||||
help
|
||||
This program dumps the kernel's keyboard translation table to
|
||||
stdout, in binary format. You can then use loadkmap to load it.
|
||||
config BUSYBOX_CONFIG_FGCONSOLE
|
||||
bool "fgconsole (1.5 kb)"
|
||||
default BUSYBOX_DEFAULT_FGCONSOLE
|
||||
help
|
||||
This program prints active (foreground) console number.
|
||||
config BUSYBOX_CONFIG_KBD_MODE
|
||||
bool "kbd_mode (4.1 kb)"
|
||||
default BUSYBOX_DEFAULT_KBD_MODE
|
||||
help
|
||||
This program reports and sets keyboard mode.
|
||||
config BUSYBOX_CONFIG_LOADFONT
|
||||
bool "loadfont (5.2 kb)"
|
||||
default BUSYBOX_DEFAULT_LOADFONT
|
||||
help
|
||||
This program loads a console font from standard input.
|
||||
|
||||
config BUSYBOX_CONFIG_SETFONT
|
||||
bool "setfont (24 kb)"
|
||||
default BUSYBOX_DEFAULT_SETFONT
|
||||
help
|
||||
Allows to load console screen map. Useful for i18n.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
|
||||
bool "Support reading textual screen maps"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SETFONT_TEXTUAL_MAP
|
||||
depends on BUSYBOX_CONFIG_SETFONT
|
||||
help
|
||||
Support reading textual screen maps.
|
||||
|
||||
config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
|
||||
string "Default directory for console-tools files"
|
||||
default BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR
|
||||
depends on BUSYBOX_CONFIG_SETFONT
|
||||
help
|
||||
Directory to use if setfont's params are simple filenames
|
||||
(not /path/to/file or ./file). Default is "" (no default directory).
|
||||
|
||||
comment "Common options for loadfont and setfont"
|
||||
depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LOADFONT_PSF2
|
||||
bool "Support PSF2 console fonts"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LOADFONT_PSF2
|
||||
depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW
|
||||
bool "Support old (raw) console fonts"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LOADFONT_RAW
|
||||
depends on BUSYBOX_CONFIG_LOADFONT || BUSYBOX_CONFIG_SETFONT
|
||||
config BUSYBOX_CONFIG_LOADKMAP
|
||||
bool "loadkmap (1.8 kb)"
|
||||
default BUSYBOX_DEFAULT_LOADKMAP
|
||||
help
|
||||
This program loads a keyboard translation table from
|
||||
standard input.
|
||||
config BUSYBOX_CONFIG_OPENVT
|
||||
bool "openvt (7.2 kb)"
|
||||
default BUSYBOX_DEFAULT_OPENVT
|
||||
help
|
||||
This program is used to start a command on an unused
|
||||
virtual terminal.
|
||||
config BUSYBOX_CONFIG_RESET
|
||||
bool "reset (345 bytes)"
|
||||
default BUSYBOX_DEFAULT_RESET
|
||||
help
|
||||
This program is used to reset the terminal screen, if it
|
||||
gets messed up.
|
||||
config BUSYBOX_CONFIG_RESIZE
|
||||
bool "resize (903 bytes)"
|
||||
default BUSYBOX_DEFAULT_RESIZE
|
||||
help
|
||||
This program is used to (re)set the width and height of your current
|
||||
terminal.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RESIZE_PRINT
|
||||
bool "Print environment variables"
|
||||
default BUSYBOX_DEFAULT_FEATURE_RESIZE_PRINT
|
||||
depends on BUSYBOX_CONFIG_RESIZE
|
||||
help
|
||||
Prints the newly set size (number of columns and rows) of
|
||||
the terminal.
|
||||
E.g.:
|
||||
COLUMNS=80;LINES=44;export COLUMNS LINES;
|
||||
config BUSYBOX_CONFIG_SETCONSOLE
|
||||
bool "setconsole (3.6 kb)"
|
||||
default BUSYBOX_DEFAULT_SETCONSOLE
|
||||
help
|
||||
Redirect writes to /dev/console to another device,
|
||||
like the current tty while logged in via telnet.
|
||||
This does not redirect kernel log, only writes
|
||||
from user space.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SETCONSOLE_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_SETCONSOLE && BUSYBOX_CONFIG_LONG_OPTS
|
||||
config BUSYBOX_CONFIG_SETKEYCODES
|
||||
bool "setkeycodes (2.1 kb)"
|
||||
default BUSYBOX_DEFAULT_SETKEYCODES
|
||||
help
|
||||
This program loads entries into the kernel's scancode-to-keycode
|
||||
map, allowing unusual keyboards to generate usable keycodes.
|
||||
config BUSYBOX_CONFIG_SETLOGCONS
|
||||
bool "setlogcons (1.8 kb)"
|
||||
default BUSYBOX_DEFAULT_SETLOGCONS
|
||||
help
|
||||
This program redirects the output console of kernel messages.
|
||||
config BUSYBOX_CONFIG_SHOWKEY
|
||||
bool "showkey (4.7 kb)"
|
||||
default BUSYBOX_DEFAULT_SHOWKEY
|
||||
help
|
||||
Shows keys pressed.
|
||||
|
||||
endmenu
|
||||
965
package/utils/busybox/config/coreutils/Config.in
Normal file
965
package/utils/busybox/config/coreutils/Config.in
Normal file
@@ -0,0 +1,965 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Coreutils"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VERBOSE
|
||||
bool "Support verbose options (usually -v) for various applets"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VERBOSE
|
||||
help
|
||||
Enable cp -v, rm -v and similar messages.
|
||||
Also enables long option (--verbose) if it exists.
|
||||
Without this option, -v is accepted but ignored.
|
||||
|
||||
comment "Common options for date and touch"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TIMEZONE
|
||||
bool "Allow timezone in dates"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TIMEZONE
|
||||
depends on BUSYBOX_CONFIG_DESKTOP
|
||||
help
|
||||
Permit the use of timezones when parsing user-provided data
|
||||
strings, e.g. '1996-04-09 12:45:00 -0500'.
|
||||
|
||||
This requires support for the '%z' extension to strptime() which
|
||||
may not be available in all implementations.
|
||||
|
||||
comment "Common options for cp and mv"
|
||||
depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS
|
||||
bool "Preserve hard links"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS
|
||||
depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV
|
||||
help
|
||||
Allow cp and mv to preserve hard links.
|
||||
|
||||
comment "Common options for df, du, ls"
|
||||
depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
|
||||
bool "Support human readable output (example 13k, 23M, 235G)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
|
||||
depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS
|
||||
help
|
||||
Allow df, du, and ls to have human readable output.
|
||||
|
||||
config BUSYBOX_CONFIG_BASENAME
|
||||
bool "basename (438 bytes)"
|
||||
default BUSYBOX_DEFAULT_BASENAME
|
||||
help
|
||||
basename is used to strip the directory and suffix from filenames,
|
||||
leaving just the filename itself. Enable this option if you wish
|
||||
to enable the 'basename' utility.
|
||||
config BUSYBOX_CONFIG_CAT
|
||||
bool "cat (5.6 kb)"
|
||||
default BUSYBOX_DEFAULT_CAT
|
||||
help
|
||||
cat is used to concatenate files and print them to the standard
|
||||
output. Enable this option if you wish to enable the 'cat' utility.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CATN
|
||||
bool "Enable -n and -b options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CATN
|
||||
depends on BUSYBOX_CONFIG_CAT
|
||||
help
|
||||
-n numbers all output lines while -b numbers nonempty output lines.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CATV
|
||||
bool "cat -v[etA]"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CATV
|
||||
depends on BUSYBOX_CONFIG_CAT
|
||||
help
|
||||
Display nonprinting characters as escape sequences
|
||||
config BUSYBOX_CONFIG_CHGRP
|
||||
bool "chgrp (7.6 kb)"
|
||||
default BUSYBOX_DEFAULT_CHGRP
|
||||
help
|
||||
chgrp is used to change the group ownership of files.
|
||||
config BUSYBOX_CONFIG_CHMOD
|
||||
bool "chmod (5.5 kb)"
|
||||
default BUSYBOX_DEFAULT_CHMOD
|
||||
help
|
||||
chmod is used to change the access permission of files.
|
||||
config BUSYBOX_CONFIG_CHOWN
|
||||
bool "chown (7.6 kb)"
|
||||
default BUSYBOX_DEFAULT_CHOWN
|
||||
help
|
||||
chown is used to change the user and/or group ownership
|
||||
of files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHOWN_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_CHOWN && BUSYBOX_CONFIG_LONG_OPTS
|
||||
config BUSYBOX_CONFIG_CHROOT
|
||||
bool "chroot (3.7 kb)"
|
||||
default BUSYBOX_DEFAULT_CHROOT
|
||||
help
|
||||
chroot is used to change the root directory and run a command.
|
||||
The default command is '/bin/sh'.
|
||||
config BUSYBOX_CONFIG_CKSUM
|
||||
bool "cksum (4.1 kb)"
|
||||
default BUSYBOX_DEFAULT_CKSUM
|
||||
|
||||
config BUSYBOX_CONFIG_CRC32
|
||||
bool "crc32 (4.1 kb)"
|
||||
default BUSYBOX_DEFAULT_CRC32
|
||||
config BUSYBOX_CONFIG_COMM
|
||||
bool "comm (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_COMM
|
||||
help
|
||||
comm is used to compare two files line by line and return
|
||||
a three-column output.
|
||||
config BUSYBOX_CONFIG_CP
|
||||
bool "cp (10 kb)"
|
||||
default BUSYBOX_DEFAULT_CP
|
||||
help
|
||||
cp is used to copy files and directories.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CP_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_CP && BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Enable long options.
|
||||
Also add support for --parents option.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CP_REFLINK
|
||||
bool "Enable --reflink[=auto]"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CP_REFLINK
|
||||
depends on BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS
|
||||
config BUSYBOX_CONFIG_CUT
|
||||
bool "cut (5.8 kb)"
|
||||
default BUSYBOX_DEFAULT_CUT
|
||||
help
|
||||
cut is used to print selected parts of lines from
|
||||
each file to stdout.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CUT_REGEX
|
||||
bool "cut -F"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CUT_REGEX
|
||||
depends on BUSYBOX_CONFIG_CUT
|
||||
help
|
||||
Allow regex based delimiters.
|
||||
config BUSYBOX_CONFIG_DATE
|
||||
bool "date (7 kb)"
|
||||
default BUSYBOX_DEFAULT_DATE
|
||||
help
|
||||
date is used to set the system date or display the
|
||||
current time in the given format.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT
|
||||
bool "Enable ISO date format output (-I)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DATE_ISOFMT
|
||||
depends on BUSYBOX_CONFIG_DATE
|
||||
help
|
||||
Enable option (-I) to output an ISO-8601 compliant
|
||||
date/time string.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DATE_NANO
|
||||
bool "Support %[num]N nanosecond format specifier"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DATE_NANO # stat's nanosecond field is a bit non-portable
|
||||
depends on BUSYBOX_CONFIG_DATE
|
||||
help
|
||||
Support %[num]N format specifier. Adds ~250 bytes of code.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DATE_COMPAT
|
||||
bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DATE_COMPAT
|
||||
depends on BUSYBOX_CONFIG_DATE
|
||||
help
|
||||
System time can be set by 'date -s DATE' and simply 'date DATE',
|
||||
but formats of DATE string are different. 'date DATE' accepts
|
||||
a rather weird MMDDhhmm[[YY]YY][.ss] format with completely
|
||||
unnatural placement of year between minutes and seconds.
|
||||
date -s (and other commands like touch -d) use more sensible
|
||||
formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss).
|
||||
|
||||
With this option off, 'date DATE' and 'date -s DATE' support
|
||||
the same format. With it on, 'date DATE' additionally supports
|
||||
MMDDhhmm[[YY]YY][.ss] format.
|
||||
config BUSYBOX_CONFIG_DD
|
||||
bool "dd (7.5 kb)"
|
||||
default BUSYBOX_DEFAULT_DD
|
||||
help
|
||||
dd copies a file (from standard input to standard output,
|
||||
by default) using specific input and output blocksizes,
|
||||
while optionally performing conversions on it.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING
|
||||
bool "Enable signal handling for status reporting"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DD_SIGNAL_HANDLING
|
||||
depends on BUSYBOX_CONFIG_DD
|
||||
help
|
||||
Sending a SIGUSR1 signal to a running 'dd' process makes it
|
||||
print to standard error the number of records read and written
|
||||
so far, then to resume copying.
|
||||
|
||||
$ dd if=/dev/zero of=/dev/null &
|
||||
$ pid=$!; kill -USR1 $pid; sleep 1; kill $pid
|
||||
10899206+0 records in
|
||||
10899206+0 records out
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DD_THIRD_STATUS_LINE
|
||||
bool "Enable the third status line upon signal"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DD_THIRD_STATUS_LINE
|
||||
depends on BUSYBOX_CONFIG_DD && BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING
|
||||
help
|
||||
Displays a coreutils-like third status line with transferred bytes,
|
||||
elapsed time and speed.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS
|
||||
bool "Enable ibs, obs, iflag, oflag and conv options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS
|
||||
depends on BUSYBOX_CONFIG_DD
|
||||
help
|
||||
Enable support for writing a certain number of bytes in and out,
|
||||
at a time, and performing conversions on the data stream.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DD_STATUS
|
||||
bool "Enable status display options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DD_STATUS
|
||||
depends on BUSYBOX_CONFIG_DD
|
||||
help
|
||||
Enable support for status=noxfer/none option.
|
||||
config BUSYBOX_CONFIG_DF
|
||||
bool "df (6.8 kb)"
|
||||
default BUSYBOX_DEFAULT_DF
|
||||
help
|
||||
df reports the amount of disk space used and available
|
||||
on filesystems.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DF_FANCY
|
||||
bool "Enable -a, -i, -B"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DF_FANCY
|
||||
depends on BUSYBOX_CONFIG_DF
|
||||
help
|
||||
-a Show all filesystems
|
||||
-i Inodes
|
||||
-B <SIZE> Blocksize
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS
|
||||
bool "Skip rootfs in mount table"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS
|
||||
depends on BUSYBOX_CONFIG_DF
|
||||
help
|
||||
Ignore rootfs entry in mount table.
|
||||
|
||||
In Linux, kernel has a special filesystem, rootfs, which is initially
|
||||
mounted on /. It contains initramfs data, if kernel is configured
|
||||
to have one. Usually, another file system is mounted over / early
|
||||
in boot process, and therefore most tools which manipulate
|
||||
mount table, such as df, will skip rootfs entry.
|
||||
|
||||
However, some systems do not mount anything on /.
|
||||
If you need to configure busybox for one of these systems,
|
||||
you may find it useful to turn this option off to make df show
|
||||
initramfs statistics.
|
||||
|
||||
Otherwise, choose Y.
|
||||
config BUSYBOX_CONFIG_DIRNAME
|
||||
bool "dirname (329 bytes)"
|
||||
default BUSYBOX_DEFAULT_DIRNAME
|
||||
help
|
||||
dirname is used to strip a non-directory suffix from
|
||||
a file name.
|
||||
config BUSYBOX_CONFIG_DOS2UNIX
|
||||
bool "dos2unix (5.2 kb)"
|
||||
default BUSYBOX_DEFAULT_DOS2UNIX
|
||||
help
|
||||
dos2unix is used to convert a text file from DOS format to
|
||||
UNIX format, and vice versa.
|
||||
|
||||
config BUSYBOX_CONFIG_UNIX2DOS
|
||||
bool "unix2dos (5.2 kb)"
|
||||
default BUSYBOX_DEFAULT_UNIX2DOS
|
||||
help
|
||||
unix2dos is used to convert a text file from UNIX format to
|
||||
DOS format, and vice versa.
|
||||
config BUSYBOX_CONFIG_DU
|
||||
bool "du (6.3 kb)"
|
||||
default BUSYBOX_DEFAULT_DU
|
||||
help
|
||||
du is used to report the amount of disk space used
|
||||
for specified files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
|
||||
bool "Use default blocksize of 1024 bytes (else it's 512 bytes)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
|
||||
depends on BUSYBOX_CONFIG_DU
|
||||
config BUSYBOX_CONFIG_ECHO
|
||||
bool "echo (1.8 kb)"
|
||||
default BUSYBOX_DEFAULT_ECHO
|
||||
help
|
||||
echo prints a specified string to stdout.
|
||||
|
||||
# this entry also appears in shell/Config.in, next to the echo builtin
|
||||
config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO
|
||||
bool "Enable -n and -e options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO
|
||||
depends on BUSYBOX_CONFIG_ECHO || BUSYBOX_CONFIG_ASH_ECHO || BUSYBOX_CONFIG_HUSH_ECHO
|
||||
config BUSYBOX_CONFIG_ENV
|
||||
bool "env (4 kb)"
|
||||
default BUSYBOX_DEFAULT_ENV
|
||||
help
|
||||
env is used to set an environment variable and run
|
||||
a command; without options it displays the current
|
||||
environment.
|
||||
config BUSYBOX_CONFIG_EXPAND
|
||||
bool "expand (5.1 kb)"
|
||||
default BUSYBOX_DEFAULT_EXPAND
|
||||
help
|
||||
By default, convert all tabs to spaces.
|
||||
|
||||
config BUSYBOX_CONFIG_UNEXPAND
|
||||
bool "unexpand (5.3 kb)"
|
||||
default BUSYBOX_DEFAULT_UNEXPAND
|
||||
help
|
||||
By default, convert only leading sequences of blanks to tabs.
|
||||
config BUSYBOX_CONFIG_EXPR
|
||||
bool "expr (6.6 kb)"
|
||||
default BUSYBOX_DEFAULT_EXPR
|
||||
help
|
||||
expr is used to calculate numbers and print the result
|
||||
to standard output.
|
||||
|
||||
config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64
|
||||
bool "Extend Posix numbers support to 64 bit"
|
||||
default BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64
|
||||
depends on BUSYBOX_CONFIG_EXPR
|
||||
help
|
||||
Enable 64-bit math support in the expr applet. This will make
|
||||
the applet slightly larger, but will allow computation with very
|
||||
large numbers.
|
||||
config BUSYBOX_CONFIG_FACTOR
|
||||
bool "factor (2.7 kb)"
|
||||
default BUSYBOX_DEFAULT_FACTOR
|
||||
help
|
||||
factor factorizes integers
|
||||
config BUSYBOX_CONFIG_FALSE
|
||||
bool "false (tiny)"
|
||||
default BUSYBOX_DEFAULT_FALSE
|
||||
help
|
||||
false returns an exit code of FALSE (1).
|
||||
config BUSYBOX_CONFIG_FOLD
|
||||
bool "fold (4.6 kb)"
|
||||
default BUSYBOX_DEFAULT_FOLD
|
||||
help
|
||||
Wrap text to fit a specific width.
|
||||
config BUSYBOX_CONFIG_HEAD
|
||||
bool "head (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_HEAD
|
||||
help
|
||||
head is used to print the first specified number of lines
|
||||
from files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD
|
||||
bool "Enable -c, -q, and -v"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD
|
||||
depends on BUSYBOX_CONFIG_HEAD
|
||||
config BUSYBOX_CONFIG_HOSTID
|
||||
bool "hostid (286 bytes)"
|
||||
default BUSYBOX_DEFAULT_HOSTID
|
||||
help
|
||||
hostid prints the numeric identifier (in hexadecimal) for
|
||||
the current host.
|
||||
config BUSYBOX_CONFIG_ID
|
||||
bool "id (7 kb)"
|
||||
default BUSYBOX_DEFAULT_ID
|
||||
help
|
||||
id displays the current user and group ID names.
|
||||
|
||||
config BUSYBOX_CONFIG_GROUPS
|
||||
bool "groups (6.7 kb)"
|
||||
default BUSYBOX_DEFAULT_GROUPS
|
||||
help
|
||||
Print the group names associated with current user id.
|
||||
config BUSYBOX_CONFIG_INSTALL
|
||||
bool "install (12 kb)"
|
||||
default BUSYBOX_DEFAULT_INSTALL
|
||||
help
|
||||
Copy files and set attributes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INSTALL_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_LONG_OPTS
|
||||
config BUSYBOX_CONFIG_LINK
|
||||
bool "link (3.2 kb)"
|
||||
default BUSYBOX_DEFAULT_LINK
|
||||
help
|
||||
link creates hard links between files.
|
||||
config BUSYBOX_CONFIG_LN
|
||||
bool "ln (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_LN
|
||||
help
|
||||
ln is used to create hard or soft links between files.
|
||||
config BUSYBOX_CONFIG_LOGNAME
|
||||
bool "logname (1.1 kb)"
|
||||
default BUSYBOX_DEFAULT_LOGNAME
|
||||
help
|
||||
logname is used to print the current user's login name.
|
||||
config BUSYBOX_CONFIG_LS
|
||||
bool "ls (14 kb)"
|
||||
default BUSYBOX_DEFAULT_LS
|
||||
help
|
||||
ls is used to list the contents of directories.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_FILETYPES
|
||||
bool "Enable filetyping options (-p and -F)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_FILETYPES
|
||||
depends on BUSYBOX_CONFIG_LS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS
|
||||
bool "Enable symlinks dereferencing (-L)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_FOLLOWLINKS
|
||||
depends on BUSYBOX_CONFIG_LS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE
|
||||
bool "Enable recursion (-R)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_RECURSIVE
|
||||
depends on BUSYBOX_CONFIG_LS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_WIDTH
|
||||
bool "Enable -w WIDTH and window size autodetection"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_WIDTH
|
||||
depends on BUSYBOX_CONFIG_LS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_SORTFILES
|
||||
bool "Sort the file names"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_SORTFILES
|
||||
depends on BUSYBOX_CONFIG_LS
|
||||
help
|
||||
Allow ls to sort file names alphabetically.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS
|
||||
bool "Show file timestamps"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_TIMESTAMPS
|
||||
depends on BUSYBOX_CONFIG_LS
|
||||
help
|
||||
Allow ls to display timestamps for files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_USERNAME
|
||||
bool "Show username/groupnames"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_USERNAME
|
||||
depends on BUSYBOX_CONFIG_LS
|
||||
help
|
||||
Allow ls to display username/groupname for files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_COLOR
|
||||
bool "Allow use of color to identify file types"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_COLOR
|
||||
depends on BUSYBOX_CONFIG_LS && BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
This enables the --color option to ls.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
|
||||
bool "Produce colored ls output by default"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT
|
||||
depends on BUSYBOX_CONFIG_FEATURE_LS_COLOR
|
||||
help
|
||||
Saying yes here will turn coloring on by default,
|
||||
even if no "--color" option is given to the ls command.
|
||||
This is not recommended, since the colors are not
|
||||
configurable, and the output may not be legible on
|
||||
many output screens.
|
||||
config BUSYBOX_CONFIG_MD5SUM
|
||||
bool "md5sum (6.5 kb)"
|
||||
default BUSYBOX_DEFAULT_MD5SUM
|
||||
help
|
||||
Compute and check MD5 message digest
|
||||
|
||||
config BUSYBOX_CONFIG_SHA1SUM
|
||||
bool "sha1sum (5.9 kb)"
|
||||
default BUSYBOX_DEFAULT_SHA1SUM
|
||||
help
|
||||
Compute and check SHA1 message digest
|
||||
|
||||
config BUSYBOX_CONFIG_SHA256SUM
|
||||
bool "sha256sum (7 kb)"
|
||||
default BUSYBOX_DEFAULT_SHA256SUM
|
||||
help
|
||||
Compute and check SHA256 message digest
|
||||
|
||||
config BUSYBOX_CONFIG_SHA512SUM
|
||||
bool "sha512sum (7.4 kb)"
|
||||
default BUSYBOX_DEFAULT_SHA512SUM
|
||||
help
|
||||
Compute and check SHA512 message digest
|
||||
|
||||
config BUSYBOX_CONFIG_SHA3SUM
|
||||
bool "sha3sum (6.1 kb)"
|
||||
default BUSYBOX_DEFAULT_SHA3SUM
|
||||
help
|
||||
Compute and check SHA3 message digest
|
||||
|
||||
comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
|
||||
depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
|
||||
bool "Enable -c, -s and -w options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK
|
||||
depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM || BUSYBOX_CONFIG_SHA256SUM || BUSYBOX_CONFIG_SHA512SUM || BUSYBOX_CONFIG_SHA3SUM
|
||||
help
|
||||
Enabling the -c options allows files to be checked
|
||||
against pre-calculated hash values.
|
||||
-s and -w are useful options when verifying checksums.
|
||||
config BUSYBOX_CONFIG_MKDIR
|
||||
bool "mkdir (4.5 kb)"
|
||||
default BUSYBOX_DEFAULT_MKDIR
|
||||
help
|
||||
mkdir is used to create directories with the specified names.
|
||||
config BUSYBOX_CONFIG_MKFIFO
|
||||
bool "mkfifo (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_MKFIFO
|
||||
help
|
||||
mkfifo is used to create FIFOs (named pipes).
|
||||
The 'mknod' program can also create FIFOs.
|
||||
config BUSYBOX_CONFIG_MKNOD
|
||||
bool "mknod (4.5 kb)"
|
||||
default BUSYBOX_DEFAULT_MKNOD
|
||||
help
|
||||
mknod is used to create FIFOs or block/character special
|
||||
files with the specified names.
|
||||
config BUSYBOX_CONFIG_MKTEMP
|
||||
bool "mktemp (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_MKTEMP
|
||||
help
|
||||
mktemp is used to create unique temporary files
|
||||
config BUSYBOX_CONFIG_MV
|
||||
bool "mv (10 kb)"
|
||||
default BUSYBOX_DEFAULT_MV
|
||||
help
|
||||
mv is used to move or rename files or directories.
|
||||
config BUSYBOX_CONFIG_NICE
|
||||
bool "nice (2.1 kb)"
|
||||
default BUSYBOX_DEFAULT_NICE
|
||||
help
|
||||
nice runs a program with modified scheduling priority.
|
||||
config BUSYBOX_CONFIG_NL
|
||||
bool "nl (4.6 kb)"
|
||||
default BUSYBOX_DEFAULT_NL
|
||||
help
|
||||
nl is used to number lines of files.
|
||||
config BUSYBOX_CONFIG_NOHUP
|
||||
bool "nohup (2 kb)"
|
||||
default BUSYBOX_DEFAULT_NOHUP
|
||||
help
|
||||
run a command immune to hangups, with output to a non-tty.
|
||||
config BUSYBOX_CONFIG_NPROC
|
||||
bool "nproc (3.7 kb)"
|
||||
default BUSYBOX_DEFAULT_NPROC
|
||||
help
|
||||
Print number of CPUs
|
||||
config BUSYBOX_CONFIG_OD
|
||||
bool "od (11 kb)"
|
||||
default BUSYBOX_DEFAULT_OD
|
||||
help
|
||||
od is used to dump binary files in octal and other formats.
|
||||
config BUSYBOX_CONFIG_PASTE
|
||||
bool "paste (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_PASTE
|
||||
help
|
||||
paste is used to paste lines of different files together
|
||||
and write the result to stdout
|
||||
config BUSYBOX_CONFIG_PRINTENV
|
||||
bool "printenv (1.3 kb)"
|
||||
default BUSYBOX_DEFAULT_PRINTENV
|
||||
help
|
||||
printenv is used to print all or part of environment.
|
||||
config BUSYBOX_CONFIG_PRINTF
|
||||
bool "printf (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_PRINTF
|
||||
help
|
||||
printf is used to format and print specified strings.
|
||||
It's similar to 'echo' except it has more options.
|
||||
config BUSYBOX_CONFIG_PWD
|
||||
bool "pwd (3.7 kb)"
|
||||
default BUSYBOX_DEFAULT_PWD
|
||||
help
|
||||
pwd is used to print the current directory.
|
||||
config BUSYBOX_CONFIG_READLINK
|
||||
bool "readlink (4 kb)"
|
||||
default BUSYBOX_DEFAULT_READLINK
|
||||
help
|
||||
This program reads a symbolic link and returns the name
|
||||
of the file it points to
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW
|
||||
bool "Enable canonicalization by following all symlinks (-f)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_READLINK_FOLLOW
|
||||
depends on BUSYBOX_CONFIG_READLINK
|
||||
help
|
||||
Enable the readlink option (-f).
|
||||
config BUSYBOX_CONFIG_REALPATH
|
||||
bool "realpath (1.6 kb)"
|
||||
default BUSYBOX_DEFAULT_REALPATH
|
||||
help
|
||||
Return the canonicalized absolute pathname.
|
||||
This isn't provided by GNU shellutils, but where else does it belong.
|
||||
config BUSYBOX_CONFIG_RM
|
||||
bool "rm (5.4 kb)"
|
||||
default BUSYBOX_DEFAULT_RM
|
||||
help
|
||||
rm is used to remove files or directories.
|
||||
config BUSYBOX_CONFIG_RMDIR
|
||||
bool "rmdir (3.5 kb)"
|
||||
default BUSYBOX_DEFAULT_RMDIR
|
||||
help
|
||||
rmdir is used to remove empty directories.
|
||||
config BUSYBOX_CONFIG_SEQ
|
||||
bool "seq (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_SEQ
|
||||
help
|
||||
print a sequence of numbers
|
||||
config BUSYBOX_CONFIG_SHRED
|
||||
bool "shred (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_SHRED
|
||||
help
|
||||
Overwrite a file to hide its contents, and optionally delete it
|
||||
config BUSYBOX_CONFIG_SHUF
|
||||
bool "shuf (5.4 kb)"
|
||||
default BUSYBOX_DEFAULT_SHUF
|
||||
help
|
||||
Generate random permutations
|
||||
config BUSYBOX_CONFIG_SLEEP
|
||||
bool "sleep (2 kb)"
|
||||
default BUSYBOX_DEFAULT_SLEEP
|
||||
help
|
||||
sleep is used to pause for a specified number of seconds.
|
||||
It comes in 3 versions:
|
||||
- small: takes one integer parameter
|
||||
- fancy: takes multiple integer arguments with suffixes:
|
||||
sleep 1d 2h 3m 15s
|
||||
- fancy with fractional numbers:
|
||||
sleep 2.3s 4.5h sleeps for 16202.3 seconds
|
||||
Last one is "the most compatible" with coreutils sleep,
|
||||
but it adds around 1k of code.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP
|
||||
bool "Enable multiple arguments and s/m/h/d suffixes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FANCY_SLEEP
|
||||
depends on BUSYBOX_CONFIG_SLEEP
|
||||
help
|
||||
Allow sleep to pause for specified minutes, hours, and days.
|
||||
config BUSYBOX_CONFIG_SORT
|
||||
bool "sort (7.7 kb)"
|
||||
default BUSYBOX_DEFAULT_SORT
|
||||
help
|
||||
sort is used to sort lines of text in specified files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SORT_BIG
|
||||
bool "Full SuSv3 compliant sort (support -ktcbdfioghM)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SORT_BIG
|
||||
depends on BUSYBOX_CONFIG_SORT
|
||||
help
|
||||
Without this, sort only supports -rusz, and an integer version
|
||||
of -n. Selecting this adds sort keys, floating point support, and
|
||||
more. This adds a little over 3k to a nonstatic build on x86.
|
||||
|
||||
The SuSv3 sort standard is available at:
|
||||
http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY
|
||||
bool "Use less memory (but might be slower)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SORT_OPTIMIZE_MEMORY # defaults to N since we are size-paranoid tribe
|
||||
depends on BUSYBOX_CONFIG_SORT
|
||||
help
|
||||
Attempt to use less memory (by storing only one copy
|
||||
of duplicated lines, and such). Useful if you work on huge files.
|
||||
config BUSYBOX_CONFIG_SPLIT
|
||||
bool "split (5 kb)"
|
||||
default BUSYBOX_DEFAULT_SPLIT
|
||||
help
|
||||
Split a file into pieces.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SPLIT_FANCY
|
||||
bool "Fancy extensions"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SPLIT_FANCY
|
||||
depends on BUSYBOX_CONFIG_SPLIT
|
||||
help
|
||||
Add support for features not required by SUSv3.
|
||||
Supports additional suffixes 'b' for 512 bytes,
|
||||
'g' for 1GiB for the -b option.
|
||||
config BUSYBOX_CONFIG_STAT
|
||||
bool "stat (11 kb)"
|
||||
default BUSYBOX_DEFAULT_STAT
|
||||
help
|
||||
display file or filesystem status.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
|
||||
bool "Enable custom formats (-c)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_STAT_FORMAT
|
||||
depends on BUSYBOX_CONFIG_STAT
|
||||
help
|
||||
Without this, stat will not support the '-c format' option where
|
||||
users can pass a custom format string for output. This adds about
|
||||
7k to a nonstatic build on amd64.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM
|
||||
bool "Enable display of filesystem status (-f)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM
|
||||
depends on BUSYBOX_CONFIG_STAT
|
||||
help
|
||||
Without this, stat will not support the '-f' option to display
|
||||
information about filesystem status.
|
||||
config BUSYBOX_CONFIG_STTY
|
||||
bool "stty (8.9 kb)"
|
||||
default BUSYBOX_DEFAULT_STTY
|
||||
help
|
||||
stty is used to change and print terminal line settings.
|
||||
config BUSYBOX_CONFIG_SUM
|
||||
bool "sum (4 kb)"
|
||||
default BUSYBOX_DEFAULT_SUM
|
||||
help
|
||||
checksum and count the blocks in a file
|
||||
config BUSYBOX_CONFIG_SYNC
|
||||
bool "sync (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_SYNC
|
||||
help
|
||||
sync is used to flush filesystem buffers.
|
||||
config BUSYBOX_CONFIG_FEATURE_SYNC_FANCY
|
||||
bool "Enable -d and -f flags (requires syncfs(2) in libc)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SYNC_FANCY
|
||||
depends on BUSYBOX_CONFIG_SYNC
|
||||
help
|
||||
sync -d FILE... executes fdatasync() on each FILE.
|
||||
sync -f FILE... executes syncfs() on each FILE.
|
||||
config BUSYBOX_CONFIG_FSYNC
|
||||
bool "fsync (3.6 kb)"
|
||||
default BUSYBOX_DEFAULT_FSYNC
|
||||
help
|
||||
fsync is used to flush file-related cached blocks to disk.
|
||||
config BUSYBOX_CONFIG_TAC
|
||||
bool "tac (3.9 kb)"
|
||||
default BUSYBOX_DEFAULT_TAC
|
||||
help
|
||||
tac is used to concatenate and print files in reverse.
|
||||
config BUSYBOX_CONFIG_TAIL
|
||||
bool "tail (6.8 kb)"
|
||||
default BUSYBOX_DEFAULT_TAIL
|
||||
help
|
||||
tail is used to print the last specified number of lines
|
||||
from files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL
|
||||
bool "Enable -q, -s, -v, and -F options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FANCY_TAIL
|
||||
depends on BUSYBOX_CONFIG_TAIL
|
||||
help
|
||||
These options are provided by GNU tail, but
|
||||
are not specified in the SUSv3 standard:
|
||||
-q Never output headers giving file names
|
||||
-s SEC Wait SEC seconds between reads with -f
|
||||
-v Always output headers giving file names
|
||||
-F Same as -f, but keep retrying
|
||||
config BUSYBOX_CONFIG_TEE
|
||||
bool "tee (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_TEE
|
||||
help
|
||||
tee is used to read from standard input and write
|
||||
to standard output and files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO
|
||||
bool "Enable block I/O (larger/faster) instead of byte I/O"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO
|
||||
depends on BUSYBOX_CONFIG_TEE
|
||||
help
|
||||
Enable this option for a faster tee, at expense of size.
|
||||
config BUSYBOX_CONFIG_TEST
|
||||
bool "test (4.1 kb)"
|
||||
default BUSYBOX_DEFAULT_TEST
|
||||
help
|
||||
test is used to check file types and compare values,
|
||||
returning an appropriate exit code. The bash shell
|
||||
has test built in, ash can build it in optionally.
|
||||
|
||||
config BUSYBOX_CONFIG_TEST1
|
||||
bool "test as ["
|
||||
default BUSYBOX_DEFAULT_TEST1
|
||||
help
|
||||
Provide test command in the "[ EXPR ]" form
|
||||
|
||||
config BUSYBOX_CONFIG_TEST2
|
||||
bool "test as [["
|
||||
default BUSYBOX_DEFAULT_TEST2
|
||||
help
|
||||
Provide test command in the "[[ EXPR ]]" form
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TEST_64
|
||||
bool "Extend test to 64 bit"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TEST_64
|
||||
depends on BUSYBOX_CONFIG_TEST || BUSYBOX_CONFIG_TEST1 || BUSYBOX_CONFIG_TEST2 || BUSYBOX_CONFIG_ASH_TEST || BUSYBOX_CONFIG_HUSH_TEST
|
||||
help
|
||||
Enable 64-bit support in test.
|
||||
config BUSYBOX_CONFIG_TIMEOUT
|
||||
bool "timeout (6 kb)"
|
||||
default BUSYBOX_DEFAULT_TIMEOUT
|
||||
help
|
||||
Runs a program and watches it. If it does not terminate in
|
||||
specified number of seconds, it is sent a signal.
|
||||
config BUSYBOX_CONFIG_TOUCH
|
||||
bool "touch (5.9 kb)"
|
||||
default BUSYBOX_DEFAULT_TOUCH
|
||||
help
|
||||
touch is used to create or change the access and/or
|
||||
modification timestamp of specified files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3
|
||||
bool "Add support for SUSV3 features (-a -d -m -t -r)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3
|
||||
depends on BUSYBOX_CONFIG_TOUCH
|
||||
help
|
||||
Enable touch to use a reference file or a given date/time argument.
|
||||
config BUSYBOX_CONFIG_TR
|
||||
bool "tr (5.1 kb)"
|
||||
default BUSYBOX_DEFAULT_TR
|
||||
help
|
||||
tr is used to squeeze, and/or delete characters from standard
|
||||
input, writing to standard output.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
|
||||
bool "Enable character classes (such as [:upper:])"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TR_CLASSES
|
||||
depends on BUSYBOX_CONFIG_TR
|
||||
help
|
||||
Enable character classes, enabling commands such as:
|
||||
tr [:upper:] [:lower:] to convert input into lowercase.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
|
||||
bool "Enable equivalence classes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TR_EQUIV
|
||||
depends on BUSYBOX_CONFIG_TR
|
||||
help
|
||||
Enable equivalence classes, which essentially add the enclosed
|
||||
character to the current set. For instance, tr [=a=] xyz would
|
||||
replace all instances of 'a' with 'xyz'. This option is mainly
|
||||
useful for cases when no other way of expressing a character
|
||||
is possible.
|
||||
config BUSYBOX_CONFIG_TRUE
|
||||
bool "true (tiny)"
|
||||
default BUSYBOX_DEFAULT_TRUE
|
||||
help
|
||||
true returns an exit code of TRUE (0).
|
||||
config BUSYBOX_CONFIG_TRUNCATE
|
||||
bool "truncate (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_TRUNCATE
|
||||
help
|
||||
truncate truncates files to a given size. If a file does
|
||||
not exist, it is created unless told otherwise.
|
||||
config BUSYBOX_CONFIG_TSORT
|
||||
bool "tsort (0.7 kb)"
|
||||
default BUSYBOX_DEFAULT_TSORT
|
||||
help
|
||||
tsort performs a topological sort.
|
||||
config BUSYBOX_CONFIG_TTY
|
||||
bool "tty (3.6 kb)"
|
||||
default BUSYBOX_DEFAULT_TTY
|
||||
help
|
||||
tty is used to print the name of the current terminal to
|
||||
standard output.
|
||||
config BUSYBOX_CONFIG_UNAME
|
||||
bool "uname (3.9 kb)"
|
||||
default BUSYBOX_DEFAULT_UNAME
|
||||
help
|
||||
uname is used to print system information.
|
||||
|
||||
config BUSYBOX_CONFIG_UNAME_OSNAME
|
||||
string "Operating system name"
|
||||
default BUSYBOX_DEFAULT_UNAME_OSNAME
|
||||
depends on BUSYBOX_CONFIG_UNAME
|
||||
help
|
||||
Sets the operating system name reported by uname -o. The
|
||||
default BUSYBOX_DEFAULT_UNAME_OSNAME "GNU/Linux".
|
||||
|
||||
config BUSYBOX_CONFIG_BB_ARCH
|
||||
bool "arch (1.1 kb)"
|
||||
default BUSYBOX_DEFAULT_BB_ARCH
|
||||
help
|
||||
Same as uname -m.
|
||||
config BUSYBOX_CONFIG_UNIQ
|
||||
bool "uniq (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_UNIQ
|
||||
help
|
||||
uniq is used to remove duplicate lines from a sorted file.
|
||||
config BUSYBOX_CONFIG_UNLINK
|
||||
bool "unlink (3.2 kb)"
|
||||
default BUSYBOX_DEFAULT_UNLINK
|
||||
help
|
||||
unlink deletes a file by calling unlink()
|
||||
config BUSYBOX_CONFIG_USLEEP
|
||||
bool "usleep (1.3 kb)"
|
||||
default BUSYBOX_DEFAULT_USLEEP
|
||||
help
|
||||
usleep is used to pause for a specified number of microseconds.
|
||||
config BUSYBOX_CONFIG_UUDECODE
|
||||
bool "uudecode (5.8 kb)"
|
||||
default BUSYBOX_DEFAULT_UUDECODE
|
||||
help
|
||||
uudecode is used to decode a uuencoded file.
|
||||
config BUSYBOX_CONFIG_BASE32
|
||||
bool "base32 (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_BASE32
|
||||
help
|
||||
Base32 encode and decode
|
||||
config BUSYBOX_CONFIG_BASE64
|
||||
bool "base64 (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_BASE64
|
||||
help
|
||||
Base64 encode and decode
|
||||
config BUSYBOX_CONFIG_UUENCODE
|
||||
bool "uuencode (4.4 kb)"
|
||||
default BUSYBOX_DEFAULT_UUENCODE
|
||||
help
|
||||
uuencode is used to uuencode a file.
|
||||
config BUSYBOX_CONFIG_WC
|
||||
bool "wc (4.5 kb)"
|
||||
default BUSYBOX_DEFAULT_WC
|
||||
help
|
||||
wc is used to print the number of bytes, words, and lines,
|
||||
in specified files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_WC_LARGE
|
||||
bool "Support very large counts"
|
||||
default BUSYBOX_DEFAULT_FEATURE_WC_LARGE
|
||||
depends on BUSYBOX_CONFIG_WC
|
||||
help
|
||||
Use "unsigned long long" for counter variables.
|
||||
config BUSYBOX_CONFIG_WHO
|
||||
bool "who (3.9 kb)"
|
||||
default BUSYBOX_DEFAULT_WHO
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UTMP
|
||||
help
|
||||
Print users currently logged on.
|
||||
|
||||
config BUSYBOX_CONFIG_W
|
||||
bool "w (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_W
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UTMP
|
||||
help
|
||||
Print users currently logged on.
|
||||
|
||||
config BUSYBOX_CONFIG_USERS
|
||||
bool "users (3.4 kb)"
|
||||
default BUSYBOX_DEFAULT_USERS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UTMP
|
||||
help
|
||||
Print users currently logged on.
|
||||
config BUSYBOX_CONFIG_WHOAMI
|
||||
bool "whoami (3.2 kb)"
|
||||
default BUSYBOX_DEFAULT_WHOAMI
|
||||
help
|
||||
whoami is used to print the username of the current
|
||||
user id (same as id -un).
|
||||
config BUSYBOX_CONFIG_YES
|
||||
bool "yes (1.2 kb)"
|
||||
default BUSYBOX_DEFAULT_YES
|
||||
help
|
||||
yes is used to repeatedly output a specific string, or
|
||||
the default string 'y'.
|
||||
|
||||
endmenu
|
||||
70
package/utils/busybox/config/debianutils/Config.in
Normal file
70
package/utils/busybox/config/debianutils/Config.in
Normal file
@@ -0,0 +1,70 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Debian Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_PIPE_PROGRESS
|
||||
bool "pipe_progress (275 bytes)"
|
||||
default BUSYBOX_DEFAULT_PIPE_PROGRESS
|
||||
help
|
||||
Display a dot to indicate pipe activity.
|
||||
config BUSYBOX_CONFIG_RUN_PARTS
|
||||
bool "run-parts (6.1 kb)"
|
||||
default BUSYBOX_DEFAULT_RUN_PARTS
|
||||
help
|
||||
run-parts is a utility designed to run all the scripts in a directory.
|
||||
|
||||
It is useful to set up a directory like cron.daily, where you need to
|
||||
execute all the scripts in that directory.
|
||||
|
||||
In this implementation of run-parts some features (such as report
|
||||
mode) are not implemented.
|
||||
|
||||
Unless you know that run-parts is used in some of your scripts
|
||||
you can safely say N here.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_RUN_PARTS_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_RUN_PARTS && BUSYBOX_CONFIG_LONG_OPTS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RUN_PARTS_FANCY
|
||||
bool "Support additional arguments"
|
||||
default BUSYBOX_DEFAULT_FEATURE_RUN_PARTS_FANCY
|
||||
depends on BUSYBOX_CONFIG_RUN_PARTS
|
||||
help
|
||||
Support additional options:
|
||||
-l --list print the names of the all matching files (not
|
||||
limited to executables), but don't actually run them.
|
||||
config BUSYBOX_CONFIG_START_STOP_DAEMON
|
||||
bool "start-stop-daemon (12 kb)"
|
||||
default BUSYBOX_DEFAULT_START_STOP_DAEMON
|
||||
help
|
||||
start-stop-daemon is used to control the creation and
|
||||
termination of system-level processes, usually the ones
|
||||
started during the startup of the system.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_START_STOP_DAEMON && BUSYBOX_CONFIG_LONG_OPTS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_FANCY
|
||||
bool "Support additional arguments"
|
||||
default BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_FANCY
|
||||
depends on BUSYBOX_CONFIG_START_STOP_DAEMON
|
||||
help
|
||||
-o|--oknodo ignored since we exit with 0 anyway
|
||||
-v|--verbose
|
||||
-N|--nicelevel N
|
||||
config BUSYBOX_CONFIG_WHICH
|
||||
bool "which (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_WHICH
|
||||
help
|
||||
which is used to find programs in your PATH and
|
||||
print out their pathnames.
|
||||
|
||||
endmenu
|
||||
66
package/utils/busybox/config/e2fsprogs/Config.in
Normal file
66
package/utils/busybox/config/e2fsprogs/Config.in
Normal file
@@ -0,0 +1,66 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Linux Ext2 FS Progs"
|
||||
|
||||
config BUSYBOX_CONFIG_CHATTR
|
||||
bool "chattr (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_CHATTR
|
||||
help
|
||||
chattr changes the file attributes on a second extended file system.
|
||||
config BUSYBOX_CONFIG_FSCK
|
||||
bool "fsck (7.4 kb)"
|
||||
default BUSYBOX_DEFAULT_FSCK
|
||||
help
|
||||
fsck is used to check and optionally repair one or more filesystems.
|
||||
In actuality, fsck is simply a front-end for the various file system
|
||||
checkers (fsck.fstype) available under Linux.
|
||||
config BUSYBOX_CONFIG_LSATTR
|
||||
bool "lsattr (5.5 kb)"
|
||||
default BUSYBOX_DEFAULT_LSATTR
|
||||
help
|
||||
lsattr lists the file attributes on a second extended file system.
|
||||
config BUSYBOX_CONFIG_TUNE2FS
|
||||
bool "tune2fs (4.4 kb)"
|
||||
default BUSYBOX_DEFAULT_TUNE2FS # off: it is too limited compared to upstream version
|
||||
help
|
||||
tune2fs allows the system administrator to adjust various tunable
|
||||
filesystem parameters on Linux ext2/ext3 filesystems.
|
||||
|
||||
### config E2FSCK
|
||||
### bool "e2fsck"
|
||||
### default y
|
||||
### help
|
||||
### e2fsck is used to check Linux second extended file systems (ext2fs).
|
||||
### e2fsck also supports ext2 filesystems countaining a journal (ext3).
|
||||
### The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also
|
||||
### provided.
|
||||
|
||||
### config MKE2FS
|
||||
### bool "mke2fs"
|
||||
### default y
|
||||
### help
|
||||
### mke2fs is used to create an ext2/ext3 filesystem. The normal compat
|
||||
### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided.
|
||||
|
||||
### config E2LABEL
|
||||
### bool "e2label"
|
||||
### default y
|
||||
### depends on TUNE2FS
|
||||
### help
|
||||
### e2label will display or change the filesystem label on the ext2
|
||||
### filesystem located on device.
|
||||
|
||||
### NB: this one is now provided by util-linux/volume_id/*
|
||||
### config FINDFS
|
||||
### bool "findfs"
|
||||
### default y
|
||||
### depends on TUNE2FS
|
||||
### help
|
||||
### findfs will search the disks in the system looking for a filesystem
|
||||
### which has a label matching label or a UUID equal to uuid.
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,69 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see scripts/kbuild/config-language.txt.
|
||||
#
|
||||
|
||||
menu "Linux Ext2 FS Progs"
|
||||
|
||||
|
||||
config BUSYBOX_CONFIG_CHATTR
|
||||
bool "chattr"
|
||||
default BUSYBOX_DEFAULT_CHATTR
|
||||
help
|
||||
chattr changes the file attributes on a second extended file system.
|
||||
|
||||
config BUSYBOX_CONFIG_E2FSCK
|
||||
bool "e2fsck"
|
||||
default BUSYBOX_DEFAULT_E2FSCK
|
||||
help
|
||||
e2fsck is used to check Linux second extended file systems (ext2fs).
|
||||
e2fsck also supports ext2 filesystems countaining a journal (ext3).
|
||||
The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also
|
||||
provided.
|
||||
|
||||
config BUSYBOX_CONFIG_FSCK
|
||||
bool "fsck"
|
||||
default BUSYBOX_DEFAULT_FSCK
|
||||
help
|
||||
fsck is used to check and optionally repair one or more filesystems.
|
||||
In actuality, fsck is simply a front-end for the various file system
|
||||
checkers (fsck.fstype) available under Linux.
|
||||
|
||||
config BUSYBOX_CONFIG_LSATTR
|
||||
bool "lsattr"
|
||||
default BUSYBOX_DEFAULT_LSATTR
|
||||
help
|
||||
lsattr lists the file attributes on a second extended file system.
|
||||
|
||||
config BUSYBOX_CONFIG_MKE2FS
|
||||
bool "mke2fs"
|
||||
default BUSYBOX_DEFAULT_MKE2FS
|
||||
help
|
||||
mke2fs is used to create an ext2/ext3 filesystem. The normal compat
|
||||
symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided.
|
||||
|
||||
config BUSYBOX_CONFIG_TUNE2FS
|
||||
bool "tune2fs"
|
||||
default BUSYBOX_DEFAULT_TUNE2FS
|
||||
help
|
||||
tune2fs allows the system administrator to adjust various tunable
|
||||
filesystem parameters on Linux ext2/ext3 filesystems.
|
||||
|
||||
config BUSYBOX_CONFIG_E2LABEL
|
||||
bool "e2label"
|
||||
default BUSYBOX_DEFAULT_E2LABEL
|
||||
depends on BUSYBOX_CONFIG_TUNE2FS
|
||||
help
|
||||
e2label will display or change the filesystem label on the ext2
|
||||
filesystem located on device.
|
||||
|
||||
config BUSYBOX_CONFIG_FINDFS
|
||||
bool "findfs"
|
||||
default BUSYBOX_DEFAULT_FINDFS
|
||||
depends on BUSYBOX_CONFIG_TUNE2FS
|
||||
help
|
||||
findfs will search the disks in the system looking for a filesystem
|
||||
which has a label matching label or a UUID equal to uuid.
|
||||
|
||||
endmenu
|
||||
245
package/utils/busybox/config/editors/Config.in
Normal file
245
package/utils/busybox/config/editors/Config.in
Normal file
@@ -0,0 +1,245 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Editors"
|
||||
|
||||
config BUSYBOX_CONFIG_AWK
|
||||
bool "awk (23 kb)"
|
||||
default BUSYBOX_DEFAULT_AWK
|
||||
help
|
||||
Awk is used as a pattern scanning and processing language.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_AWK_LIBM
|
||||
bool "Enable math functions (requires libm)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_AWK_LIBM
|
||||
depends on BUSYBOX_CONFIG_AWK
|
||||
help
|
||||
Enable math functions of the Awk programming language.
|
||||
NOTE: This requires libm to be present for linking.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_AWK_GNU_EXTENSIONS
|
||||
bool "Enable a few GNU extensions"
|
||||
default BUSYBOX_DEFAULT_FEATURE_AWK_GNU_EXTENSIONS
|
||||
depends on BUSYBOX_CONFIG_AWK
|
||||
help
|
||||
Enable a few features from gawk:
|
||||
* command line option -e AWK_PROGRAM
|
||||
* simultaneous use of -f and -e on the command line.
|
||||
This enables the use of awk library files.
|
||||
Example: awk -f mylib.awk -e '{print myfunction($1);}' ...
|
||||
config BUSYBOX_CONFIG_CMP
|
||||
bool "cmp (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_CMP
|
||||
help
|
||||
cmp is used to compare two files and returns the result
|
||||
to standard output.
|
||||
config BUSYBOX_CONFIG_DIFF
|
||||
bool "diff (13 kb)"
|
||||
default BUSYBOX_DEFAULT_DIFF
|
||||
help
|
||||
diff compares two files or directories and outputs the
|
||||
differences between them in a form that can be given to
|
||||
the patch command.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DIFF_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DIFF_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_DIFF && BUSYBOX_CONFIG_LONG_OPTS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DIFF_DIR
|
||||
bool "Enable directory support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DIFF_DIR
|
||||
depends on BUSYBOX_CONFIG_DIFF
|
||||
help
|
||||
This option enables support for directory and subdirectory
|
||||
comparison.
|
||||
config BUSYBOX_CONFIG_ED
|
||||
bool "ed (21 kb)"
|
||||
default BUSYBOX_DEFAULT_ED
|
||||
help
|
||||
The original 1970's Unix text editor, from the days of teletypes.
|
||||
Small, simple, evil. Part of SUSv3. If you're not already using
|
||||
this, you don't need it.
|
||||
config BUSYBOX_CONFIG_PATCH
|
||||
bool "patch (9.4 kb)"
|
||||
default BUSYBOX_DEFAULT_PATCH
|
||||
help
|
||||
Apply a unified diff formatted patch.
|
||||
config BUSYBOX_CONFIG_SED
|
||||
bool "sed (12 kb)"
|
||||
default BUSYBOX_DEFAULT_SED
|
||||
help
|
||||
sed is used to perform text transformations on a file
|
||||
or input from a pipeline.
|
||||
config BUSYBOX_CONFIG_VI
|
||||
bool "vi (23 kb)"
|
||||
default BUSYBOX_DEFAULT_VI
|
||||
help
|
||||
'vi' is a text editor. More specifically, it is the One True
|
||||
text editor <grin>. It does, however, have a rather steep
|
||||
learning curve. If you are not already comfortable with 'vi'
|
||||
you may wish to use something else.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN
|
||||
int "Maximum screen width"
|
||||
range 256 16384
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_MAX_LEN
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Contrary to what you may think, this is not eating much.
|
||||
Make it smaller than 4k only if you are very limited on memory.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_8BIT
|
||||
bool "Allow to display 8-bit chars (otherwise shows dots)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_8BIT
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
If your terminal can display characters with high bit set,
|
||||
you may want to enable this. Note: vi is not Unicode-capable.
|
||||
If your terminal combines several 8-bit bytes into one character
|
||||
(as in Unicode mode), this will not work properly.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_COLON
|
||||
bool "Enable \":\" colon commands (no \"ex\" mode)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_COLON
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Enable a limited set of colon commands. This does not
|
||||
provide an "ex" mode.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_COLON_EXPAND
|
||||
bool "Expand \"%\" and \"#\" in colon commands"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_COLON_EXPAND
|
||||
depends on BUSYBOX_CONFIG_FEATURE_VI_COLON
|
||||
help
|
||||
Expand the special characters \"%\" (current filename)
|
||||
and \"#\" (alternate filename) in colon commands.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_YANKMARK
|
||||
bool "Enable yank/put commands and mark cmds"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_YANKMARK
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
This enables you to use yank and put, as well as mark.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_SEARCH
|
||||
bool "Enable search and replace cmds"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_SEARCH
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Select this if you wish to be able to do search and replace.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH
|
||||
bool "Enable regex in search and replace"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_REGEX_SEARCH # Uses GNU regex, which may be unavailable. FIXME
|
||||
depends on BUSYBOX_CONFIG_FEATURE_VI_SEARCH
|
||||
depends on USE_GLIBC
|
||||
help
|
||||
Use extended regex search.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS
|
||||
bool "Catch signals"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_USE_SIGNALS
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Selecting this option will make vi signal aware. This will support
|
||||
SIGWINCH to deal with Window Changes, catch ^Z and ^C and alarms.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD
|
||||
bool "Remember previous cmd and \".\" cmd"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_DOT_CMD
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Make vi remember the last command and be able to repeat it.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_READONLY
|
||||
bool "Enable -R option and \"view\" mode"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_READONLY
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Enable the read-only command line option, which allows the user to
|
||||
open a file in read-only mode.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_SETOPTS
|
||||
bool "Enable settable options, ai ic showmatch"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_SETOPTS
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Enable the editor to set some (ai, ic, showmatch) options.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_SET
|
||||
bool "Support :set"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_SET
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_WIN_RESIZE
|
||||
bool "Handle window resize"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_WIN_RESIZE
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Behave nicely with terminals that get resized.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_ASK_TERMINAL
|
||||
bool "Use 'tell me cursor position' ESC sequence to measure window"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_ASK_TERMINAL
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
|
||||
this option makes vi perform a last-ditch effort to find it:
|
||||
position cursor to 999,999 and ask terminal to report real
|
||||
cursor position using "ESC [ 6 n" escape sequence, then read stdin.
|
||||
This is not clean but helps a lot on serial lines and such.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_UNDO
|
||||
bool "Support undo command \"u\""
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_UNDO
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Support the 'u' command to undo insertion, deletion, and replacement
|
||||
of text.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_UNDO_QUEUE
|
||||
bool "Enable undo operation queuing"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_UNDO_QUEUE
|
||||
depends on BUSYBOX_CONFIG_FEATURE_VI_UNDO
|
||||
help
|
||||
The vi undo functions can use an intermediate queue to greatly lower
|
||||
malloc() calls and overhead. When the maximum size of this queue is
|
||||
reached, the contents of the queue are committed to the undo stack.
|
||||
This increases the size of the undo code and allows some undo
|
||||
operations (especially un-typing/backspacing) to be far more useful.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_UNDO_QUEUE_MAX
|
||||
int "Maximum undo character queue size"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_UNDO_QUEUE_MAX
|
||||
range 32 65536
|
||||
depends on BUSYBOX_CONFIG_FEATURE_VI_UNDO_QUEUE
|
||||
help
|
||||
This option sets the number of bytes used at runtime for the queue.
|
||||
Smaller values will create more undo objects and reduce the amount
|
||||
of typed or backspaced characters that are grouped into one undo
|
||||
operation; larger values increase the potential size of each undo
|
||||
and will generally malloc() larger objects and less frequently.
|
||||
Unless you want more (or less) frequent "undo points" while typing,
|
||||
you should probably leave this unchanged.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VI_VERBOSE_STATUS
|
||||
bool "Enable verbose status reporting"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VI_VERBOSE_STATUS
|
||||
depends on BUSYBOX_CONFIG_VI
|
||||
help
|
||||
Enable more verbose reporting of the results of yank, change,
|
||||
delete, undo and substitution commands.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ALLOW_EXEC
|
||||
bool "Allow vi and awk to execute shell commands"
|
||||
default BUSYBOX_DEFAULT_FEATURE_ALLOW_EXEC
|
||||
depends on BUSYBOX_CONFIG_VI || BUSYBOX_CONFIG_AWK
|
||||
help
|
||||
Enables vi and awk features which allow user to execute
|
||||
shell commands (using system() C call).
|
||||
|
||||
endmenu
|
||||
318
package/utils/busybox/config/findutils/Config.in
Normal file
318
package/utils/busybox/config/findutils/Config.in
Normal file
@@ -0,0 +1,318 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Finding Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_FIND
|
||||
bool "find (14 kb)"
|
||||
default BUSYBOX_DEFAULT_FIND
|
||||
help
|
||||
find is used to search your system to find specified files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PRINT0
|
||||
bool "Enable -print0: NUL-terminated output"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_PRINT0
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Causes output names to be separated by a NUL character
|
||||
rather than a newline. This allows names that contain
|
||||
newlines and other whitespace to be more easily
|
||||
interpreted by other programs.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_MTIME
|
||||
bool "Enable -mtime: modification time matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_MTIME
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Allow searching based on the modification time of
|
||||
files, in days.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_ATIME
|
||||
bool "Enable -atime: access time matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_ATIME
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_MTIME
|
||||
help
|
||||
Allow searching based on the access time of
|
||||
files, in days.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_CTIME
|
||||
bool "Enable -ctime: status change timestamp matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_CTIME
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_MTIME
|
||||
help
|
||||
Allow searching based on the status change timestamp of
|
||||
files, in days.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_MMIN
|
||||
bool "Enable -mmin: modification time matching by minutes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_MMIN
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Allow searching based on the modification time of
|
||||
files, in minutes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_AMIN
|
||||
bool "Enable -amin: access time matching by minutes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_AMIN
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_MMIN
|
||||
help
|
||||
Allow searching based on the access time of
|
||||
files, in minutes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_CMIN
|
||||
bool "Enable -cmin: status change timestamp matching by minutes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_CMIN
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_MMIN
|
||||
help
|
||||
Allow searching based on the status change timestamp of
|
||||
files, in minutes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PERM
|
||||
bool "Enable -perm: permissions matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_PERM
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_TYPE
|
||||
bool "Enable -type: file type matching (file/dir/link/...)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_TYPE
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Enable searching based on file type (file,
|
||||
directory, socket, device, etc.).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_EXECUTABLE
|
||||
bool "Enable -executable: file is executable"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_EXECUTABLE
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_XDEV
|
||||
bool "Enable -xdev: 'stay in filesystem'"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_XDEV
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_MAXDEPTH
|
||||
bool "Enable -mindepth N and -maxdepth N"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_MAXDEPTH
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_NEWER
|
||||
bool "Enable -newer: compare file modification times"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_NEWER
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -newer' option for finding any files which have
|
||||
modification time that is more recent than the specified FILE.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_INUM
|
||||
bool "Enable -inum: inode number matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_INUM
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_SAMEFILE
|
||||
bool "Enable -samefile: reference file matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_SAMEFILE
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -samefile' option for searching by a reference file.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_EXEC
|
||||
bool "Enable -exec: execute commands"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_EXEC
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -exec' option for executing commands based upon
|
||||
the files matched.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_EXEC_PLUS
|
||||
bool "Enable -exec ... {} +"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_EXEC_PLUS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_EXEC
|
||||
help
|
||||
Support the 'find -exec ... {} +' option for executing commands
|
||||
for all matched files at once.
|
||||
Without this option, -exec + is a synonym for -exec ;
|
||||
(IOW: it works correctly, but without expected speedup)
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_USER
|
||||
bool "Enable -user: username/uid matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_USER
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_GROUP
|
||||
bool "Enable -group: group/gid matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_GROUP
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_NOT
|
||||
bool "Enable the 'not' (!) operator"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_NOT
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the '!' operator to invert the test results.
|
||||
If 'Enable full-blown desktop' is enabled, then will also support
|
||||
the non-POSIX notation '-not'.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_DEPTH
|
||||
bool "Enable -depth"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_DEPTH
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Process each directory's contents before the directory itself.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PAREN
|
||||
bool "Enable parens in options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_PAREN
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Enable usage of parens '(' to specify logical order of arguments.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_SIZE
|
||||
bool "Enable -size: file size matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_SIZE
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PRUNE
|
||||
bool "Enable -prune: exclude subdirectories"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_PRUNE
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
If the file is a directory, don't descend into it. Useful for
|
||||
exclusion .svn and CVS directories.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_QUIT
|
||||
bool "Enable -quit: exit"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_QUIT
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
If this action is reached, 'find' exits.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_DELETE
|
||||
bool "Enable -delete: delete files/dirs"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_DELETE
|
||||
depends on BUSYBOX_CONFIG_FIND && BUSYBOX_CONFIG_FEATURE_FIND_DEPTH
|
||||
help
|
||||
Support the 'find -delete' option for deleting files and directories.
|
||||
WARNING: This option can do much harm if used wrong. Busybox will not
|
||||
try to protect the user from doing stupid things. Use with care.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_EMPTY
|
||||
bool "Enable -empty: match empty files or directories"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_EMPTY
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -empty' option to find empty regular files
|
||||
or directories.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PATH
|
||||
bool "Enable -path: match pathname with shell pattern"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_PATH
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
The -path option matches whole pathname instead of just filename.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_REGEX
|
||||
bool "Enable -regex: match pathname with regex"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_REGEX
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
The -regex option matches whole pathname against regular expression.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_CONTEXT
|
||||
bool "Enable -context: security context matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_CONTEXT
|
||||
depends on BUSYBOX_CONFIG_FIND && BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Support the 'find -context' option for matching security context.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_LINKS
|
||||
bool "Enable -links: link count matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_LINKS
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -links' option for matching number of links.
|
||||
config BUSYBOX_CONFIG_GREP
|
||||
bool "grep (8.6 kb)"
|
||||
default BUSYBOX_DEFAULT_GREP
|
||||
help
|
||||
grep is used to search files for a specified pattern.
|
||||
|
||||
config BUSYBOX_CONFIG_EGREP
|
||||
bool "egrep (7.8 kb)"
|
||||
default BUSYBOX_DEFAULT_EGREP
|
||||
help
|
||||
Alias to "grep -E".
|
||||
|
||||
config BUSYBOX_CONFIG_FGREP
|
||||
bool "fgrep (7.8 kb)"
|
||||
default BUSYBOX_DEFAULT_FGREP
|
||||
help
|
||||
Alias to "grep -F".
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT
|
||||
bool "Enable before and after context flags (-A, -B and -C)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT
|
||||
depends on BUSYBOX_CONFIG_GREP || BUSYBOX_CONFIG_EGREP || BUSYBOX_CONFIG_FGREP
|
||||
help
|
||||
Print the specified number of leading (-B) and/or trailing (-A)
|
||||
context surrounding our matching lines.
|
||||
Print the specified number of context lines (-C).
|
||||
config BUSYBOX_CONFIG_XARGS
|
||||
bool "xargs (7.2 kb)"
|
||||
default BUSYBOX_DEFAULT_XARGS
|
||||
help
|
||||
xargs is used to execute a specified command for
|
||||
every item from standard input.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION
|
||||
bool "Enable -p: prompt and confirmation"
|
||||
default BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_CONFIRMATION
|
||||
depends on BUSYBOX_CONFIG_XARGS
|
||||
help
|
||||
Support -p: prompt the user whether to run each command
|
||||
line and read a line from the terminal.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES
|
||||
bool "Enable single and double quotes and backslash"
|
||||
default BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_QUOTES
|
||||
depends on BUSYBOX_CONFIG_XARGS
|
||||
help
|
||||
Support quoting in the input.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT
|
||||
bool "Enable -x: exit if -s or -n is exceeded"
|
||||
default BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_TERMOPT
|
||||
depends on BUSYBOX_CONFIG_XARGS
|
||||
help
|
||||
Support -x: exit if the command size (see the -s or -n option)
|
||||
is exceeded.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM
|
||||
bool "Enable -0: NUL-terminated input"
|
||||
default BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_ZERO_TERM
|
||||
depends on BUSYBOX_CONFIG_XARGS
|
||||
help
|
||||
Support -0: input items are terminated by a NUL character
|
||||
instead of whitespace, and the quotes and backslash
|
||||
are not special.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR
|
||||
bool "Enable -I STR: string to replace"
|
||||
default BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_REPL_STR
|
||||
depends on BUSYBOX_CONFIG_XARGS
|
||||
help
|
||||
Support -I STR and -i[STR] options.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_PARALLEL
|
||||
bool "Enable -P N: processes to run in parallel"
|
||||
default BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_PARALLEL
|
||||
depends on BUSYBOX_CONFIG_XARGS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE
|
||||
bool "Enable -a FILE: use FILE instead of stdin"
|
||||
default BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_ARGS_FILE
|
||||
depends on BUSYBOX_CONFIG_XARGS
|
||||
|
||||
endmenu
|
||||
206
package/utils/busybox/config/init/Config.in
Normal file
206
package/utils/busybox/config/init/Config.in
Normal file
@@ -0,0 +1,206 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Init Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_BOOTCHARTD
|
||||
bool "bootchartd (10 kb)"
|
||||
default BUSYBOX_DEFAULT_BOOTCHARTD
|
||||
help
|
||||
bootchartd is commonly used to profile the boot process
|
||||
for the purpose of speeding it up. In this case, it is started
|
||||
by the kernel as the init process. This is configured by adding
|
||||
the init=/sbin/bootchartd option to the kernel command line.
|
||||
|
||||
It can also be used to monitor the resource usage of a specific
|
||||
application or the running system in general. In this case,
|
||||
bootchartd is started interactively by running bootchartd start
|
||||
and stopped using bootchartd stop.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER
|
||||
bool "Compatible, bloated header"
|
||||
default BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_BLOATED_HEADER
|
||||
depends on BUSYBOX_CONFIG_BOOTCHARTD
|
||||
help
|
||||
Create extended header file compatible with "big" bootchartd.
|
||||
"Big" bootchartd is a shell script and it dumps some
|
||||
"convenient" info into the header, such as:
|
||||
title = Boot chart for `hostname` (`date`)
|
||||
system.uname = `uname -srvm`
|
||||
system.release = `cat /etc/DISTRO-release`
|
||||
system.cpu = `grep '^model name' /proc/cpuinfo | head -1` ($cpucount)
|
||||
system.kernel.options = `cat /proc/cmdline`
|
||||
This data is not mandatory for bootchart graph generation,
|
||||
and is considered bloat. Nevertheless, this option
|
||||
makes bootchartd applet to dump a subset of it.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE
|
||||
bool "Support bootchartd.conf"
|
||||
default BUSYBOX_DEFAULT_FEATURE_BOOTCHARTD_CONFIG_FILE
|
||||
depends on BUSYBOX_CONFIG_BOOTCHARTD
|
||||
help
|
||||
Enable reading and parsing of $PWD/bootchartd.conf
|
||||
and /etc/bootchartd.conf files.
|
||||
config BUSYBOX_CONFIG_HALT
|
||||
bool "halt (4 kb)"
|
||||
default BUSYBOX_DEFAULT_HALT
|
||||
help
|
||||
Stop all processes and halt the system.
|
||||
|
||||
config BUSYBOX_CONFIG_POWEROFF
|
||||
bool "poweroff (4 kb)"
|
||||
default BUSYBOX_DEFAULT_POWEROFF
|
||||
help
|
||||
Stop all processes and power off the system.
|
||||
|
||||
config BUSYBOX_CONFIG_REBOOT
|
||||
bool "reboot (4 kb)"
|
||||
default BUSYBOX_DEFAULT_REBOOT
|
||||
help
|
||||
Stop all processes and reboot the system.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_WAIT_FOR_INIT
|
||||
bool "Before signaling init, make sure it is ready for it"
|
||||
default BUSYBOX_DEFAULT_FEATURE_WAIT_FOR_INIT
|
||||
depends on BUSYBOX_CONFIG_HALT || BUSYBOX_CONFIG_POWEROFF || BUSYBOX_CONFIG_REBOOT
|
||||
help
|
||||
In rare cases, poweroff may be commanded by firmware to OS
|
||||
even before init process exists. On Linux, this spawns
|
||||
"/sbin/poweroff" very early. This option adds code
|
||||
which checks that init is ready to receive poweroff
|
||||
commands. Code size increase of ~80 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CALL_TELINIT
|
||||
bool "Call telinit on shutdown and reboot"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CALL_TELINIT
|
||||
depends on (BUSYBOX_CONFIG_HALT || BUSYBOX_CONFIG_POWEROFF || BUSYBOX_CONFIG_REBOOT) && !BUSYBOX_CONFIG_INIT
|
||||
help
|
||||
Call an external program (normally telinit) to facilitate
|
||||
a switch to a proper runlevel.
|
||||
|
||||
This option is only available if you selected halt and friends,
|
||||
but did not select init.
|
||||
|
||||
config BUSYBOX_CONFIG_TELINIT_PATH
|
||||
string "Path to telinit executable"
|
||||
default BUSYBOX_DEFAULT_TELINIT_PATH
|
||||
depends on BUSYBOX_CONFIG_FEATURE_CALL_TELINIT
|
||||
help
|
||||
When busybox halt and friends have to call external telinit
|
||||
to facilitate proper shutdown, this path is to be used when
|
||||
locating telinit executable.
|
||||
config BUSYBOX_CONFIG_INIT
|
||||
bool "init (10 kb)"
|
||||
default BUSYBOX_DEFAULT_INIT
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
init is the first program run when the system boots.
|
||||
|
||||
config BUSYBOX_CONFIG_LINUXRC
|
||||
bool "linuxrc: support running init from initrd (not initramfs)"
|
||||
default BUSYBOX_DEFAULT_LINUXRC
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
Legacy support for running init under the old-style initrd. Allows
|
||||
the name linuxrc to act as init, and it doesn't assume init is PID 1.
|
||||
|
||||
This does not apply to initramfs, which runs /init as PID 1 and
|
||||
requires no special support.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_USE_INITTAB
|
||||
bool "Support reading an inittab file"
|
||||
default BUSYBOX_DEFAULT_FEATURE_USE_INITTAB
|
||||
depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
|
||||
help
|
||||
Allow init to read an inittab file when the system boot.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_KILL_REMOVED
|
||||
bool "Support killing processes that have been removed from inittab"
|
||||
default BUSYBOX_DEFAULT_FEATURE_KILL_REMOVED
|
||||
depends on BUSYBOX_CONFIG_FEATURE_USE_INITTAB
|
||||
help
|
||||
When respawn entries are removed from inittab and a SIGHUP is
|
||||
sent to init, this option will make init kill the processes
|
||||
that have been removed.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_KILL_DELAY
|
||||
int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED
|
||||
range 0 1024
|
||||
default BUSYBOX_DEFAULT_FEATURE_KILL_DELAY
|
||||
depends on BUSYBOX_CONFIG_FEATURE_KILL_REMOVED
|
||||
help
|
||||
With nonzero setting, init sends TERM, forks, child waits N
|
||||
seconds, sends KILL and exits. Setting it too high is unwise
|
||||
(child will hang around for too long and could actually kill
|
||||
the wrong process!)
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INIT_SCTTY
|
||||
bool "Run commands with leading dash with controlling tty"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INIT_SCTTY
|
||||
depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
|
||||
help
|
||||
If this option is enabled, init will try to give a controlling
|
||||
tty to any command which has leading hyphen (often it's "-/bin/sh").
|
||||
More precisely, init will do "ioctl(STDIN_FILENO, TIOCSCTTY, 0)".
|
||||
If device attached to STDIN_FILENO can be a ctty but is not yet
|
||||
a ctty for other session, it will become this process' ctty.
|
||||
This is not the traditional init behavour, but is often what you want
|
||||
in an embedded system where the console is only accessed during
|
||||
development or for maintenance.
|
||||
NB: using cttyhack applet may work better.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INIT_SYSLOG
|
||||
bool "Enable init to write to syslog"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INIT_SYSLOG
|
||||
depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
|
||||
help
|
||||
If selected, some init messages are sent to syslog.
|
||||
Otherwise, they are sent to VT #5 if linux virtual tty is detected
|
||||
(if not, no separate logging is done).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INIT_QUIET
|
||||
bool "Be quiet on boot (no 'init started:' message)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INIT_QUIET
|
||||
depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INIT_COREDUMPS
|
||||
bool "Support dumping core for child processes (debugging only)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INIT_COREDUMPS # not Y because this is a debug option
|
||||
depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
|
||||
help
|
||||
If this option is enabled and the file /.init_enable_core
|
||||
exists, then init will call setrlimit() to allow unlimited
|
||||
core file sizes. If this option is disabled, processes
|
||||
will not generate any core files.
|
||||
|
||||
config BUSYBOX_CONFIG_INIT_TERMINAL_TYPE
|
||||
string "Initial terminal type"
|
||||
default BUSYBOX_DEFAULT_INIT_TERMINAL_TYPE
|
||||
depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
|
||||
help
|
||||
This is the initial value set by init for the TERM environment
|
||||
variable. This variable is used by programs which make use of
|
||||
extended terminal capabilities.
|
||||
|
||||
Note that on Linux, init attempts to detect serial terminal and
|
||||
sets TERM to "vt102" if one is found.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INIT_MODIFY_CMDLINE
|
||||
bool "Clear init's command line"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INIT_MODIFY_CMDLINE
|
||||
depends on BUSYBOX_CONFIG_INIT || BUSYBOX_CONFIG_LINUXRC
|
||||
help
|
||||
When launched as PID 1 and after parsing its arguments, init
|
||||
wipes all the arguments but argv[0] and rewrites argv[0] to
|
||||
contain only "init", so that its command line appears solely as
|
||||
"init" in tools such as ps.
|
||||
If this option is set to Y, init will keep its original behavior,
|
||||
otherwise, all the arguments including argv[0] will be preserved,
|
||||
be they parsed or ignored by init.
|
||||
The original command-line used to launch init can then be
|
||||
retrieved in /proc/1/cmdline on Linux, for example.
|
||||
|
||||
endmenu
|
||||
42
package/utils/busybox/config/klibc-utils/Config.in
Normal file
42
package/utils/busybox/config/klibc-utils/Config.in
Normal file
@@ -0,0 +1,42 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "klibc-utils"
|
||||
|
||||
config BUSYBOX_CONFIG_MINIPS
|
||||
bool "minips (11 kb)"
|
||||
default BUSYBOX_DEFAULT_MINIPS # for god's sake, just use "ps" name in your scripts
|
||||
help
|
||||
Alias to "ps".
|
||||
config BUSYBOX_CONFIG_NUKE
|
||||
bool "nuke (2.9 kb)"
|
||||
default BUSYBOX_DEFAULT_NUKE # off by default: too "accidentally destructive"
|
||||
help
|
||||
Alias to "rm -rf".
|
||||
config BUSYBOX_CONFIG_RESUME
|
||||
bool "resume (3.2 kb)"
|
||||
default BUSYBOX_DEFAULT_RESUME
|
||||
help
|
||||
Resume from saved "suspend-to-disk" image
|
||||
config BUSYBOX_CONFIG_RUN_INIT
|
||||
bool "run-init (7.7 kb)"
|
||||
default BUSYBOX_DEFAULT_RUN_INIT
|
||||
help
|
||||
The run-init utility is used from initramfs to select a new
|
||||
root device. Under initramfs, you have to use this instead of
|
||||
pivot_root.
|
||||
|
||||
Booting with initramfs extracts a gzipped cpio archive into rootfs
|
||||
(which is a variant of ramfs/tmpfs). Because rootfs can't be moved
|
||||
or unmounted, pivot_root will not work from initramfs. Instead,
|
||||
run-init deletes everything out of rootfs (including itself),
|
||||
does a mount --move that overmounts rootfs with the new root, and
|
||||
then execs the specified init program.
|
||||
|
||||
util-linux has a similar tool, switch-root.
|
||||
run-init differs by also having a "-d CAPS_TO_DROP" option.
|
||||
|
||||
endmenu
|
||||
449
package/utils/busybox/config/libbb/Config.in
Normal file
449
package/utils/busybox/config/libbb/Config.in
Normal file
@@ -0,0 +1,449 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
comment "Library Tuning"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_USE_BSS_TAIL
|
||||
bool "Use the end of BSS page"
|
||||
default BUSYBOX_DEFAULT_FEATURE_USE_BSS_TAIL
|
||||
help
|
||||
Attempt to reclaim a small unused part of BSS.
|
||||
|
||||
Executables have the following parts:
|
||||
= read-only executable code and constants, also known as "text"
|
||||
= read-write data
|
||||
= non-initialized (zeroed on demand) data, also known as "bss"
|
||||
|
||||
At link time, "text" is padded to a full page. At runtime, all "text"
|
||||
pages are mapped RO and executable.
|
||||
|
||||
"Data" starts on the next page boundary, but is not padded
|
||||
to a full page at the end. "Bss" starts wherever "data" ends.
|
||||
At runtime, "data" pages are mapped RW and they are file-backed
|
||||
(this includes a small portion of "bss" which may live in the last
|
||||
partial page of "data").
|
||||
Pages which are fully in "bss" are mapped to anonymous memory.
|
||||
|
||||
"Bss" end is usually not page-aligned. There is an unused space
|
||||
in the last page. Linker marks its start with the "_end" symbol.
|
||||
|
||||
This option will attempt to use that space for bb_common_bufsiz1[]
|
||||
array. If it fits after _end, it will be used, and COMMON_BUFSIZE
|
||||
will be enlarged from its guaranteed minimum size of 1 kbyte.
|
||||
This may require recompilation a second time, since value of _end
|
||||
is known only after final link.
|
||||
|
||||
If you are getting a build error like this:
|
||||
appletlib.c:(.text.main+0xd): undefined reference to '_end'
|
||||
disable this option.
|
||||
config BUSYBOX_CONFIG_FLOAT_DURATION
|
||||
bool "Enable fractional duration arguments"
|
||||
default BUSYBOX_DEFAULT_FLOAT_DURATION
|
||||
help
|
||||
Allow sleep N.NNN, top -d N.NNN etc.
|
||||
config BUSYBOX_CONFIG_FEATURE_RTMINMAX
|
||||
bool "Support RTMIN[+n] and RTMAX[-n] signal names"
|
||||
default BUSYBOX_DEFAULT_FEATURE_RTMINMAX
|
||||
help
|
||||
Support RTMIN[+n] and RTMAX[-n] signal names
|
||||
in kill, killall etc. This costs ~250 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS
|
||||
bool "Use the definitions of SIGRTMIN/SIGRTMAX provided by libc"
|
||||
default BUSYBOX_DEFAULT_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_RTMINMAX
|
||||
help
|
||||
Some C libraries reserve a few real-time signals for internal
|
||||
use, and adjust the values of SIGRTMIN/SIGRTMAX seen by
|
||||
applications accordingly. Saying yes here means that a signal
|
||||
name RTMIN+n will be interpreted according to the libc definition
|
||||
of SIGRTMIN, and not the raw definition provided by the kernel.
|
||||
This behavior matches "kill -l RTMIN+n" from bash.
|
||||
|
||||
choice
|
||||
prompt "Buffer allocation policy"
|
||||
default BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
|
||||
help
|
||||
There are 3 ways busybox can handle buffer allocations:
|
||||
- Use malloc. This costs code size for the call to xmalloc.
|
||||
- Put them on stack. For some very small machines with limited stack
|
||||
space, this can be deadly. For most folks, this works just fine.
|
||||
- Put them in BSS. This works beautifully for computers with a real
|
||||
MMU (and OS support), but wastes runtime RAM for uCLinux. This
|
||||
behavior was the only one available for versions 0.48 and earlier.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC
|
||||
bool "Allocate with Malloc"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK
|
||||
bool "Allocate on the Stack"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS
|
||||
bool "Allocate in the .bss section"
|
||||
|
||||
endchoice
|
||||
|
||||
config BUSYBOX_CONFIG_PASSWORD_MINLEN
|
||||
int "Minimum password length"
|
||||
default BUSYBOX_DEFAULT_PASSWORD_MINLEN
|
||||
range 5 32
|
||||
help
|
||||
Minimum allowable password length.
|
||||
|
||||
config BUSYBOX_CONFIG_MD5_SMALL
|
||||
int "MD5: Trade bytes for speed (0:fast, 3:slow)"
|
||||
default BUSYBOX_DEFAULT_MD5_SMALL # all "fast or small" options default to small
|
||||
range 0 3
|
||||
help
|
||||
Trade binary size versus speed for the md5 algorithm.
|
||||
Approximate values running uClibc and hashing
|
||||
linux-2.4.4.tar.bz2 were:
|
||||
value user times (sec) text size (386)
|
||||
0 (fastest) 1.1 6144
|
||||
1 1.4 5392
|
||||
2 3.0 5088
|
||||
3 (smallest) 5.1 4912
|
||||
|
||||
config BUSYBOX_CONFIG_SHA1_SMALL
|
||||
int "SHA1: Trade bytes for speed (0:fast, 3:slow)"
|
||||
default BUSYBOX_DEFAULT_SHA1_SMALL # all "fast or small" options default to small
|
||||
range 0 3
|
||||
help
|
||||
Trade binary size versus speed for the sha1 algorithm.
|
||||
With FEATURE_COPYBUF_KB=64:
|
||||
throughput MB/s size of sha1_process_block64
|
||||
value 486 x86-64 486 x86-64
|
||||
0 440 485 3481 3502
|
||||
1 265 265 641 696
|
||||
2,3 220 210 342 364
|
||||
|
||||
config BUSYBOX_CONFIG_SHA1_HWACCEL
|
||||
bool "SHA1: Use hardware accelerated instructions if possible"
|
||||
default BUSYBOX_DEFAULT_SHA1_HWACCEL
|
||||
help
|
||||
On x86, this adds ~590 bytes of code. Throughput
|
||||
is about twice as fast as fully-unrolled generic code.
|
||||
|
||||
config BUSYBOX_CONFIG_SHA256_HWACCEL
|
||||
bool "SHA256: Use hardware accelerated instructions if possible"
|
||||
default BUSYBOX_DEFAULT_SHA256_HWACCEL
|
||||
help
|
||||
On x86, this adds ~1k bytes of code.
|
||||
|
||||
config BUSYBOX_CONFIG_SHA3_SMALL
|
||||
int "SHA3: Trade bytes for speed (0:fast, 1:slow)"
|
||||
default BUSYBOX_DEFAULT_SHA3_SMALL # all "fast or small" options default to small
|
||||
range 0 1
|
||||
help
|
||||
Trade binary size versus speed for the sha3 algorithm.
|
||||
SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate):
|
||||
64-bit x86: +270 bytes of code, 45% faster
|
||||
32-bit x86: +450 bytes of code, 75% faster
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP
|
||||
bool "Non-POSIX, but safer, copying to special nodes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
|
||||
help
|
||||
With this option, "cp file symlink" will delete symlink
|
||||
and create a regular file. This does not conform to POSIX,
|
||||
but prevents a symlink attack.
|
||||
Similarly, "cp file device" will not send file's data
|
||||
to the device. (To do that, use "cat file >device")
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE
|
||||
bool "Give more precise messages when copy fails (cp, mv etc)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
|
||||
help
|
||||
Error messages with this feature enabled:
|
||||
|
||||
$ cp file /does_not_exist/file
|
||||
cp: cannot create '/does_not_exist/file': Path does not exist
|
||||
$ cp file /vmlinuz/file
|
||||
cp: cannot stat '/vmlinuz/file': Path has non-directory component
|
||||
|
||||
If this feature is not enabled, they will be, respectively:
|
||||
|
||||
cp: cannot create '/does_not_exist/file': No such file or directory
|
||||
cp: cannot stat '/vmlinuz/file': Not a directory
|
||||
|
||||
This will cost you ~60 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
|
||||
bool "Use sendfile system call"
|
||||
default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
|
||||
help
|
||||
When enabled, busybox will use the kernel sendfile() function
|
||||
instead of read/write loops to copy data between file descriptors
|
||||
(for example, cp command does this a lot).
|
||||
If sendfile() doesn't work, copying code falls back to read/write
|
||||
loop. sendfile() was originally implemented for faster I/O
|
||||
from files to sockets, but since Linux 2.6.33 it was extended
|
||||
to work for many more file types.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB
|
||||
int "Copy buffer size, in kilobytes"
|
||||
range 1 1024
|
||||
default BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
|
||||
help
|
||||
Size of buffer used by cp, mv, install, wget etc.
|
||||
Buffers which are 4 kb or less will be allocated on stack.
|
||||
Bigger buffers will be allocated with mmap, with fallback to 4 kb
|
||||
stack buffer if mmap fails.
|
||||
|
||||
config BUSYBOX_CONFIG_MONOTONIC_SYSCALL
|
||||
bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
|
||||
default BUSYBOX_DEFAULT_MONOTONIC_SYSCALL
|
||||
help
|
||||
Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
|
||||
time intervals (time, ping, traceroute etc need this).
|
||||
Probably requires Linux 2.6+. If not selected, gettimeofday
|
||||
will be used instead (which gives wrong results if date/time
|
||||
is reset).
|
||||
|
||||
config BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR
|
||||
bool "Use ioctl names rather than hex values in error messages"
|
||||
default BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR
|
||||
help
|
||||
Use ioctl names rather than hex values in error messages
|
||||
(e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
|
||||
saves about 1400 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
bool "Command line editing"
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING
|
||||
help
|
||||
Enable line editing (mainly for shell command line).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_MAX_LEN
|
||||
int "Maximum length of input"
|
||||
range 128 8192
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING_MAX_LEN
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Line editing code uses on-stack buffers for storage.
|
||||
You may want to decrease this parameter if your target machine
|
||||
benefits from smaller stack usage.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_VI
|
||||
bool "vi-style line editing commands"
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING_VI
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Enable vi-style line editing. In shells, this mode can be
|
||||
turned on and off with "set -o vi" and "set +o vi".
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_HISTORY
|
||||
int "History size"
|
||||
# Don't allow way too big values here, code uses fixed "char *history[N]" struct member
|
||||
range 0 9999
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING_HISTORY
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Specify command history size (0 - disable).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY
|
||||
bool "History saving"
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING_SAVEHISTORY
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Enable history saving in shells.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_SAVE_ON_EXIT
|
||||
bool "Save history on shell exit, not after every command"
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING_SAVE_ON_EXIT
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY
|
||||
help
|
||||
Save history on shell exit, not after every command.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_REVERSE_SEARCH
|
||||
bool "Reverse history search"
|
||||
default BUSYBOX_DEFAULT_FEATURE_REVERSE_SEARCH
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Enable readline-like Ctrl-R combination for reverse history search.
|
||||
Increases code by about 0.5k.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION
|
||||
bool "Tab completion"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TAB_COMPLETION
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_USERNAME_COMPLETION
|
||||
bool "Username completion"
|
||||
default BUSYBOX_DEFAULT_FEATURE_USERNAME_COMPLETION
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_PROMPT
|
||||
bool "Fancy shell prompts"
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING_FANCY_PROMPT
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Setting this option allows for prompts to use things like \w and
|
||||
\$ and escape codes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_WINCH
|
||||
bool "Enable automatic tracking of window size changes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING_WINCH
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL
|
||||
bool "Query cursor position from terminal"
|
||||
default BUSYBOX_DEFAULT_FEATURE_EDITING_ASK_TERMINAL
|
||||
depends on BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
help
|
||||
Allow usage of "ESC [ 6 n" sequence. Terminal answers back with
|
||||
current cursor position. This information is used to make line
|
||||
editing more robust in some cases.
|
||||
If you are not sure whether your terminals respond to this code
|
||||
correctly, or want to save on code size (about 400 bytes),
|
||||
then do not turn this option on.
|
||||
|
||||
config BUSYBOX_CONFIG_LOCALE_SUPPORT
|
||||
bool "Enable locale support (system needs locale for this to work)"
|
||||
default BUSYBOX_DEFAULT_LOCALE_SUPPORT
|
||||
help
|
||||
Enable this if your system has locale support and you would like
|
||||
busybox to support locale settings.
|
||||
|
||||
config BUSYBOX_CONFIG_UNICODE_SUPPORT
|
||||
bool "Support Unicode"
|
||||
default BUSYBOX_DEFAULT_UNICODE_SUPPORT
|
||||
help
|
||||
This makes various applets aware that one byte is not
|
||||
one character on screen.
|
||||
|
||||
Busybox aims to eventually work correctly with Unicode displays.
|
||||
Any older encodings are not guaranteed to work.
|
||||
Probably by the time when busybox will be fully Unicode-clean,
|
||||
other encodings will be mainly of historic interest.
|
||||
|
||||
config BUSYBOX_CONFIG_UNICODE_USING_LOCALE
|
||||
bool "Use libc routines for Unicode (else uses internal ones)"
|
||||
default BUSYBOX_DEFAULT_UNICODE_USING_LOCALE
|
||||
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && BUSYBOX_CONFIG_LOCALE_SUPPORT
|
||||
help
|
||||
With this option on, Unicode support is implemented using libc
|
||||
routines. Otherwise, internal implementation is used.
|
||||
Internal implementation is smaller.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHECK_UNICODE_IN_ENV
|
||||
bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHECK_UNICODE_IN_ENV
|
||||
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
|
||||
help
|
||||
With this option on, Unicode support is activated
|
||||
only if locale-related variables have the value of the form
|
||||
"xxxx.utf8"
|
||||
|
||||
Otherwise, Unicode support will be always enabled and active.
|
||||
|
||||
config BUSYBOX_CONFIG_SUBST_WCHAR
|
||||
int "Character code to substitute unprintable characters with"
|
||||
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
|
||||
default BUSYBOX_DEFAULT_SUBST_WCHAR
|
||||
help
|
||||
Typical values are 63 for '?' (works with any output device),
|
||||
30 for ASCII substitute control code,
|
||||
65533 (0xfffd) for Unicode replacement character.
|
||||
|
||||
config BUSYBOX_CONFIG_LAST_SUPPORTED_WCHAR
|
||||
int "Range of supported Unicode characters"
|
||||
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
|
||||
default BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR
|
||||
help
|
||||
Any character with Unicode value bigger than this is assumed
|
||||
to be non-printable on output device. Many applets replace
|
||||
such characters with substitution character.
|
||||
|
||||
The idea is that many valid printable Unicode chars
|
||||
nevertheless are not displayed correctly. Think about
|
||||
combining charachers, double-wide hieroglyphs, obscure
|
||||
characters in dozens of ancient scripts...
|
||||
Many terminals, terminal emulators, xterms etc will fail
|
||||
to handle them correctly. Choose the smallest value
|
||||
which suits your needs.
|
||||
|
||||
Typical values are:
|
||||
126 - ASCII only
|
||||
767 (0x2ff) - there are no combining chars in [0..767] range
|
||||
(the range includes Latin 1, Latin Ext. A and B),
|
||||
code is ~700 bytes smaller for this case.
|
||||
4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
|
||||
code is ~300 bytes smaller for this case.
|
||||
12799 (0x31ff) - nearly all non-ideographic characters are
|
||||
available in [0..12799] range, including
|
||||
East Asian scripts like katakana, hiragana, hangul,
|
||||
bopomofo...
|
||||
0 - off, any valid printable Unicode character will be printed.
|
||||
|
||||
config BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
|
||||
bool "Allow zero-width Unicode characters on output"
|
||||
default BUSYBOX_DEFAULT_UNICODE_COMBINING_WCHARS
|
||||
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
|
||||
help
|
||||
With this option off, any Unicode char with width of 0
|
||||
is substituted on output.
|
||||
|
||||
config BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
|
||||
bool "Allow wide Unicode characters on output"
|
||||
default BUSYBOX_DEFAULT_UNICODE_WIDE_WCHARS
|
||||
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
|
||||
help
|
||||
With this option off, any Unicode char with width > 1
|
||||
is substituted on output.
|
||||
|
||||
config BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
|
||||
bool "Bidirectional character-aware line input"
|
||||
default BUSYBOX_DEFAULT_UNICODE_BIDI_SUPPORT
|
||||
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT && !BUSYBOX_CONFIG_UNICODE_USING_LOCALE
|
||||
help
|
||||
With this option on, right-to-left Unicode characters
|
||||
are treated differently on input (e.g. cursor movement).
|
||||
|
||||
config BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
|
||||
bool "In bidi input, support non-ASCII neutral chars too"
|
||||
default BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
|
||||
depends on BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
|
||||
help
|
||||
In most cases it's enough to treat only ASCII non-letters
|
||||
(i.e. punctuation, numbers and space) as characters
|
||||
with neutral directionality.
|
||||
With this option on, more extensive (and bigger) table
|
||||
of neutral chars will be used.
|
||||
|
||||
config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
|
||||
bool "Make it possible to enter sequences of chars which are not Unicode"
|
||||
default BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
|
||||
depends on BUSYBOX_CONFIG_UNICODE_SUPPORT
|
||||
help
|
||||
With this option on, on line-editing input (such as used by shells)
|
||||
invalid UTF-8 bytes are not substituted with the selected
|
||||
substitution character.
|
||||
For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
|
||||
at shell prompt will list file named 0xff (single char name
|
||||
with char value 255), not file named '?'.
|
||||
|
||||
choice
|
||||
prompt "Use LOOP_CONFIGURE for losetup and loop mounts"
|
||||
default BUSYBOX_CONFIG_TRY_LOOP_CONFIGURE
|
||||
help
|
||||
LOOP_CONFIGURE is added to Linux 5.8
|
||||
https://lwn.net/Articles/820408/
|
||||
This allows userspace to completely setup a loop device with a single
|
||||
ioctl, removing the in-between state where the device can be partially
|
||||
configured - eg the loop device has a backing file associated with it,
|
||||
but is reading from the wrong offset.
|
||||
|
||||
config BUSYBOX_CONFIG_LOOP_CONFIGURE
|
||||
bool "use LOOP_CONFIGURE, needs kernel >= 5.8"
|
||||
|
||||
config BUSYBOX_CONFIG_NO_LOOP_CONFIGURE
|
||||
bool "use LOOP_SET_FD + LOOP_SET_STATUS"
|
||||
|
||||
config BUSYBOX_CONFIG_TRY_LOOP_CONFIGURE
|
||||
bool "try LOOP_CONFIGURE, fall back to LOOP_SET_FD + LOOP_SET_STATUS"
|
||||
|
||||
endchoice
|
||||
330
package/utils/busybox/config/loginutils/Config.in
Normal file
330
package/utils/busybox/config/loginutils/Config.in
Normal file
@@ -0,0 +1,330 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Login/Password Management Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS
|
||||
bool "Support shadow passwords"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SHADOWPASSWDS
|
||||
help
|
||||
Build support for shadow password in /etc/shadow. This file is only
|
||||
readable by root and thus the encrypted passwords are no longer
|
||||
publicly readable.
|
||||
|
||||
config BUSYBOX_CONFIG_USE_BB_PWD_GRP
|
||||
bool "Use internal password and group functions rather than system functions"
|
||||
default BUSYBOX_DEFAULT_USE_BB_PWD_GRP
|
||||
help
|
||||
If you leave this disabled, busybox will use the system's password
|
||||
and group functions. And if you are using the GNU C library
|
||||
(glibc), you will then need to install the /etc/nsswitch.conf
|
||||
configuration file and the required /lib/libnss_* libraries in
|
||||
order for the password and group functions to work. This generally
|
||||
makes your embedded system quite a bit larger.
|
||||
|
||||
Enabling this option will cause busybox to directly access the
|
||||
system's /etc/password, /etc/group files (and your system will be
|
||||
smaller, and I will get fewer emails asking about how glibc NSS
|
||||
works). When this option is enabled, you will not be able to use
|
||||
PAM to access remote LDAP password servers and whatnot. And if you
|
||||
want hostname resolution to work with glibc, you still need the
|
||||
/lib/libnss_* libraries.
|
||||
|
||||
If you need to use glibc's nsswitch.conf mechanism
|
||||
(e.g. if user/group database is NOT stored in /etc/passwd etc),
|
||||
you must NOT use this option.
|
||||
|
||||
If you enable this option, it will add about 1.5k.
|
||||
|
||||
config BUSYBOX_CONFIG_USE_BB_SHADOW
|
||||
bool "Use internal shadow password functions"
|
||||
default BUSYBOX_DEFAULT_USE_BB_SHADOW
|
||||
depends on BUSYBOX_CONFIG_USE_BB_PWD_GRP && BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS
|
||||
help
|
||||
If you leave this disabled, busybox will use the system's shadow
|
||||
password handling functions. And if you are using the GNU C library
|
||||
(glibc), you will then need to install the /etc/nsswitch.conf
|
||||
configuration file and the required /lib/libnss_* libraries in
|
||||
order for the shadow password functions to work. This generally
|
||||
makes your embedded system quite a bit larger.
|
||||
|
||||
Enabling this option will cause busybox to directly access the
|
||||
system's /etc/shadow file when handling shadow passwords. This
|
||||
makes your system smaller (and I will get fewer emails asking about
|
||||
how glibc NSS works). When this option is enabled, you will not be
|
||||
able to use PAM to access shadow passwords from remote LDAP
|
||||
password servers and whatnot.
|
||||
|
||||
config BUSYBOX_CONFIG_USE_BB_CRYPT
|
||||
bool "Use internal crypt functions"
|
||||
default BUSYBOX_DEFAULT_USE_BB_CRYPT
|
||||
help
|
||||
Busybox has internal DES and MD5 crypt functions.
|
||||
They produce results which are identical to corresponding
|
||||
standard C library functions.
|
||||
|
||||
If you leave this disabled, busybox will use the system's
|
||||
crypt functions. Most C libraries use large (~70k)
|
||||
static buffers there, and also combine them with more general
|
||||
DES encryption/decryption.
|
||||
|
||||
For busybox, having large static buffers is undesirable,
|
||||
especially on NOMMU machines. Busybox also doesn't need
|
||||
DES encryption/decryption and can do with smaller code.
|
||||
|
||||
If you enable this option, it will add about 4.8k of code
|
||||
if you are building dynamically linked executable.
|
||||
In static build, it makes code _smaller_ by about 1.2k,
|
||||
and likely many kilobytes less of bss.
|
||||
|
||||
config BUSYBOX_CONFIG_USE_BB_CRYPT_SHA
|
||||
bool "Enable SHA256/512 crypt functions"
|
||||
default BUSYBOX_DEFAULT_USE_BB_CRYPT_SHA
|
||||
depends on BUSYBOX_CONFIG_USE_BB_CRYPT
|
||||
help
|
||||
Enable this if you have passwords starting with "$5$" or "$6$"
|
||||
in your /etc/passwd or /etc/shadow files. These passwords
|
||||
are hashed using SHA256 and SHA512 algorithms. Support for them
|
||||
was added to glibc in 2008.
|
||||
With this option off, login will fail password check for any
|
||||
user which has password encrypted with these algorithms.
|
||||
|
||||
config BUSYBOX_CONFIG_ADD_SHELL
|
||||
bool "add-shell (3.1 kb)"
|
||||
default BUSYBOX_DEFAULT_ADD_SHELL if BUSYBOX_CONFIG_DESKTOP
|
||||
help
|
||||
Add shells to /etc/shells.
|
||||
|
||||
config BUSYBOX_CONFIG_REMOVE_SHELL
|
||||
bool "remove-shell (3 kb)"
|
||||
default BUSYBOX_DEFAULT_REMOVE_SHELL if BUSYBOX_CONFIG_DESKTOP
|
||||
help
|
||||
Remove shells from /etc/shells.
|
||||
config BUSYBOX_CONFIG_ADDGROUP
|
||||
bool "addgroup (8.6 kb)"
|
||||
default BUSYBOX_DEFAULT_ADDGROUP
|
||||
select BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Utility for creating a new group account.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ADDUSER_TO_GROUP
|
||||
bool "Support adding users to groups"
|
||||
default BUSYBOX_DEFAULT_FEATURE_ADDUSER_TO_GROUP
|
||||
depends on BUSYBOX_CONFIG_ADDGROUP
|
||||
help
|
||||
If called with two non-option arguments,
|
||||
addgroup will add an existing user to an
|
||||
existing group.
|
||||
config BUSYBOX_CONFIG_ADDUSER
|
||||
bool "adduser (15 kb)"
|
||||
default BUSYBOX_DEFAULT_ADDUSER
|
||||
select BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Utility for creating a new user account.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHECK_NAMES
|
||||
bool "Enable sanity check on user/group names in adduser and addgroup"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHECK_NAMES
|
||||
depends on BUSYBOX_CONFIG_ADDUSER || BUSYBOX_CONFIG_ADDGROUP
|
||||
help
|
||||
Enable sanity check on user and group names in adduser and addgroup.
|
||||
To avoid problems, the user or group name should consist only of
|
||||
letters, digits, underscores, periods, at signs and dashes,
|
||||
and not start with a dash (as defined by IEEE Std 1003.1-2001).
|
||||
For compatibility with Samba machine accounts "$" is also supported
|
||||
at the end of the user or group name.
|
||||
|
||||
config BUSYBOX_CONFIG_LAST_ID
|
||||
int "Last valid uid or gid for adduser and addgroup"
|
||||
depends on BUSYBOX_CONFIG_ADDUSER || BUSYBOX_CONFIG_ADDGROUP
|
||||
default BUSYBOX_DEFAULT_LAST_ID
|
||||
help
|
||||
Last valid uid or gid for adduser and addgroup
|
||||
|
||||
config BUSYBOX_CONFIG_FIRST_SYSTEM_ID
|
||||
int "First valid system uid or gid for adduser and addgroup"
|
||||
depends on BUSYBOX_CONFIG_ADDUSER || BUSYBOX_CONFIG_ADDGROUP
|
||||
range 0 BUSYBOX_CONFIG_LAST_ID
|
||||
default BUSYBOX_DEFAULT_FIRST_SYSTEM_ID
|
||||
help
|
||||
First valid system uid or gid for adduser and addgroup
|
||||
|
||||
config BUSYBOX_CONFIG_LAST_SYSTEM_ID
|
||||
int "Last valid system uid or gid for adduser and addgroup"
|
||||
depends on BUSYBOX_CONFIG_ADDUSER || BUSYBOX_CONFIG_ADDGROUP
|
||||
range BUSYBOX_CONFIG_FIRST_SYSTEM_ID BUSYBOX_CONFIG_LAST_ID
|
||||
default BUSYBOX_DEFAULT_LAST_SYSTEM_ID
|
||||
help
|
||||
Last valid system uid or gid for adduser and addgroup
|
||||
config BUSYBOX_CONFIG_CHPASSWD
|
||||
bool "chpasswd (18 kb)"
|
||||
default BUSYBOX_DEFAULT_CHPASSWD
|
||||
help
|
||||
Reads a file of user name and password pairs from standard input
|
||||
and uses this information to update a group of existing users.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DEFAULT_PASSWD_ALGO
|
||||
string "Default encryption method (passwd -a, cryptpw -m, chpasswd -c ALG)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DEFAULT_PASSWD_ALGO
|
||||
depends on BUSYBOX_CONFIG_PASSWD || BUSYBOX_CONFIG_CRYPTPW || BUSYBOX_CONFIG_CHPASSWD
|
||||
help
|
||||
Possible choices are "d[es]", "m[d5]", "s[ha256]" or "sha512".
|
||||
config BUSYBOX_CONFIG_CRYPTPW
|
||||
bool "cryptpw (14 kb)"
|
||||
default BUSYBOX_DEFAULT_CRYPTPW
|
||||
help
|
||||
Encrypts the given password with the crypt(3) libc function
|
||||
using the given salt.
|
||||
|
||||
config BUSYBOX_CONFIG_MKPASSWD
|
||||
bool "mkpasswd (15 kb)"
|
||||
default BUSYBOX_DEFAULT_MKPASSWD
|
||||
help
|
||||
Encrypts the given password with the crypt(3) libc function
|
||||
using the given salt. Debian has this utility under mkpasswd
|
||||
name. Busybox provides mkpasswd as an alias for cryptpw.
|
||||
config BUSYBOX_CONFIG_DELUSER
|
||||
bool "deluser (9.1 kb)"
|
||||
default BUSYBOX_DEFAULT_DELUSER
|
||||
help
|
||||
Utility for deleting a user account.
|
||||
|
||||
config BUSYBOX_CONFIG_DELGROUP
|
||||
bool "delgroup (6.4 kb)"
|
||||
default BUSYBOX_DEFAULT_DELGROUP
|
||||
help
|
||||
Utility for deleting a group account.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DEL_USER_FROM_GROUP
|
||||
bool "Support removing users from groups"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DEL_USER_FROM_GROUP
|
||||
depends on BUSYBOX_CONFIG_DELGROUP
|
||||
help
|
||||
If called with two non-option arguments, deluser
|
||||
or delgroup will remove an user from a specified group.
|
||||
config BUSYBOX_CONFIG_GETTY
|
||||
bool "getty (10 kb)"
|
||||
default BUSYBOX_DEFAULT_GETTY
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
getty lets you log in on a tty. It is normally invoked by init.
|
||||
|
||||
Note that you can save a few bytes by disabling it and
|
||||
using login applet directly.
|
||||
If you need to reset tty attributes before calling login,
|
||||
this script approximates getty:
|
||||
|
||||
exec </dev/$1 >/dev/$1 2>&1 || exit 1
|
||||
reset
|
||||
stty sane; stty ispeed 38400; stty ospeed 38400
|
||||
printf "%s login: " "`hostname`"
|
||||
read -r login
|
||||
exec /bin/login "$login"
|
||||
config BUSYBOX_CONFIG_LOGIN
|
||||
bool "login (24 kb)"
|
||||
default BUSYBOX_DEFAULT_LOGIN
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
login is used when signing onto a system.
|
||||
|
||||
Note that busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
|
||||
config BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD
|
||||
bool "Run logged in session in a child process"
|
||||
default BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD if BUSYBOX_CONFIG_PAM
|
||||
depends on BUSYBOX_CONFIG_LOGIN
|
||||
help
|
||||
Run the logged in session in a child process. This allows
|
||||
login to clean up things such as utmp entries or PAM sessions
|
||||
when the login session is complete. If you use PAM, you
|
||||
almost always would want this to be set to Y, else PAM session
|
||||
will not be cleaned up.
|
||||
|
||||
config BUSYBOX_CONFIG_LOGIN_SCRIPTS
|
||||
bool "Support login scripts"
|
||||
depends on BUSYBOX_CONFIG_LOGIN
|
||||
default BUSYBOX_DEFAULT_LOGIN_SCRIPTS
|
||||
help
|
||||
Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT
|
||||
just prior to switching from root to logged-in user.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_NOLOGIN
|
||||
bool "Support /etc/nologin"
|
||||
default BUSYBOX_DEFAULT_FEATURE_NOLOGIN
|
||||
depends on BUSYBOX_CONFIG_LOGIN
|
||||
help
|
||||
The file /etc/nologin is used by (some versions of) login(1).
|
||||
If it exists, non-root logins are prohibited.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SECURETTY
|
||||
bool "Support /etc/securetty"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SECURETTY
|
||||
depends on BUSYBOX_CONFIG_LOGIN
|
||||
help
|
||||
The file /etc/securetty is used by (some versions of) login(1).
|
||||
The file contains the device names of tty lines (one per line,
|
||||
without leading /dev/) on which root is allowed to login.
|
||||
config BUSYBOX_CONFIG_PASSWD
|
||||
bool "passwd (21 kb)"
|
||||
default BUSYBOX_DEFAULT_PASSWD
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
passwd changes passwords for user and group accounts. A normal user
|
||||
may only change the password for his/her own account, the super user
|
||||
may change the password for any account. The administrator of a group
|
||||
may change the password for the group.
|
||||
|
||||
Note that busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PASSWD_WEAK_CHECK
|
||||
bool "Check new passwords for weakness"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PASSWD_WEAK_CHECK
|
||||
depends on BUSYBOX_CONFIG_PASSWD
|
||||
help
|
||||
With this option passwd will refuse new passwords which are "weak".
|
||||
config BUSYBOX_CONFIG_SU
|
||||
bool "su (19 kb)"
|
||||
default BUSYBOX_DEFAULT_SU
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
su is used to become another user during a login session.
|
||||
Invoked without a username, su defaults to becoming the super user.
|
||||
Note that busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SU_SYSLOG
|
||||
bool "Log to syslog all attempts to use su"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SU_SYSLOG
|
||||
depends on BUSYBOX_CONFIG_SU
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SU_CHECKS_SHELLS
|
||||
bool "If user's shell is not in /etc/shells, disallow -s PROG"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SU_CHECKS_SHELLS
|
||||
depends on BUSYBOX_CONFIG_SU
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY
|
||||
bool "Allow blank passwords only on TTYs in /etc/securetty"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY
|
||||
depends on BUSYBOX_CONFIG_SU
|
||||
config BUSYBOX_CONFIG_SULOGIN
|
||||
bool "sulogin (17 kb)"
|
||||
default BUSYBOX_DEFAULT_SULOGIN
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
sulogin is invoked when the system goes into single user
|
||||
mode (this is done through an entry in inittab).
|
||||
config BUSYBOX_CONFIG_VLOCK
|
||||
bool "vlock (17 kb)"
|
||||
default BUSYBOX_DEFAULT_VLOCK
|
||||
help
|
||||
Build the "vlock" applet which allows you to lock (virtual) terminals.
|
||||
|
||||
Note that busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
|
||||
endmenu
|
||||
51
package/utils/busybox/config/mailutils/Config.in
Normal file
51
package/utils/busybox/config/mailutils/Config.in
Normal file
@@ -0,0 +1,51 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
menu "Mail Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
|
||||
string "Default charset"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
|
||||
depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
|
||||
help
|
||||
Default charset of the message.
|
||||
|
||||
config BUSYBOX_CONFIG_MAKEMIME
|
||||
bool "makemime (5.4 kb)"
|
||||
default BUSYBOX_DEFAULT_MAKEMIME
|
||||
help
|
||||
Create MIME-formatted messages.
|
||||
config BUSYBOX_CONFIG_POPMAILDIR
|
||||
bool "popmaildir (10 kb)"
|
||||
default BUSYBOX_DEFAULT_POPMAILDIR
|
||||
help
|
||||
Simple yet powerful POP3 mail popper. Delivers content
|
||||
of remote mailboxes to local Maildir.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_POPMAILDIR_DELIVERY
|
||||
bool "Allow message filters and custom delivery program"
|
||||
default BUSYBOX_DEFAULT_FEATURE_POPMAILDIR_DELIVERY
|
||||
depends on BUSYBOX_CONFIG_POPMAILDIR
|
||||
help
|
||||
Allow to use a custom program to filter the content
|
||||
of the message before actual delivery (-F "prog [args...]").
|
||||
Allow to use a custom program for message actual delivery
|
||||
(-M "prog [args...]").
|
||||
config BUSYBOX_CONFIG_REFORMIME
|
||||
bool "reformime (7.5 kb)"
|
||||
default BUSYBOX_DEFAULT_REFORMIME
|
||||
help
|
||||
Parse MIME-formatted messages.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_REFORMIME_COMPAT
|
||||
bool "Accept and ignore options other than -x and -X"
|
||||
default BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT
|
||||
depends on BUSYBOX_CONFIG_REFORMIME
|
||||
help
|
||||
Accept (for compatibility only) and ignore options
|
||||
other than -x and -X.
|
||||
config BUSYBOX_CONFIG_SENDMAIL
|
||||
bool "sendmail (14 kb)"
|
||||
default BUSYBOX_DEFAULT_SENDMAIL
|
||||
help
|
||||
Barebones sendmail.
|
||||
|
||||
endmenu
|
||||
824
package/utils/busybox/config/miscutils/Config.in
Normal file
824
package/utils/busybox/config/miscutils/Config.in
Normal file
@@ -0,0 +1,824 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Miscellaneous Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_ADJTIMEX
|
||||
bool "adjtimex (4.7 kb)"
|
||||
default BUSYBOX_DEFAULT_ADJTIMEX
|
||||
help
|
||||
Adjtimex reads and optionally sets adjustment parameters for
|
||||
the Linux clock adjustment algorithm.
|
||||
config BUSYBOX_CONFIG_ASCII
|
||||
bool "ascii"
|
||||
default BUSYBOX_DEFAULT_ASCII
|
||||
help
|
||||
Print ascii table.
|
||||
|
||||
config BUSYBOX_CONFIG_BBCONFIG
|
||||
bool "bbconfig (9.7 kb)"
|
||||
default BUSYBOX_DEFAULT_BBCONFIG
|
||||
help
|
||||
The bbconfig applet will print the config file with which
|
||||
busybox was built.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COMPRESS_BBCONFIG
|
||||
bool "Compress bbconfig data"
|
||||
default BUSYBOX_DEFAULT_FEATURE_COMPRESS_BBCONFIG
|
||||
depends on BUSYBOX_CONFIG_BBCONFIG
|
||||
help
|
||||
Store bbconfig data in compressed form, uncompress them on-the-fly
|
||||
before output.
|
||||
|
||||
If you have a really tiny busybox with few applets enabled (and
|
||||
bunzip2 isn't one of them), the overhead of the decompressor might
|
||||
be noticeable. Also, if you run executables directly from ROM
|
||||
and have very little memory, this might not be a win. Otherwise,
|
||||
you probably want this.
|
||||
config BUSYBOX_CONFIG_BC
|
||||
bool "bc (45 kb)"
|
||||
default BUSYBOX_DEFAULT_BC
|
||||
select BUSYBOX_CONFIG_FEATURE_DC_BIG
|
||||
help
|
||||
bc is a command-line, arbitrary-precision calculator with a
|
||||
Turing-complete language. See the GNU bc manual
|
||||
(https://www.gnu.org/software/bc/manual/bc.html) and bc spec
|
||||
(http://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html).
|
||||
|
||||
This bc has five differences to the GNU bc:
|
||||
1) The period (.) is a shortcut for "last", as in the BSD bc.
|
||||
2) Arrays are copied before being passed as arguments to
|
||||
functions. This behavior is required by the bc spec.
|
||||
3) Arrays can be passed to the builtin "length" function to get
|
||||
the number of elements in the array. This prints "1":
|
||||
a[0] = 0; length(a[])
|
||||
4) The precedence of the boolean "not" operator (!) is equal to
|
||||
that of the unary minus (-) negation operator. This still
|
||||
allows POSIX-compliant scripts to work while somewhat
|
||||
preserving expected behavior (versus C) and making parsing
|
||||
easier.
|
||||
5) "read()" accepts expressions, not only numeric literals.
|
||||
|
||||
config BUSYBOX_CONFIG_DC
|
||||
bool "dc (36 kb)"
|
||||
default BUSYBOX_DEFAULT_DC
|
||||
help
|
||||
dc is a reverse-polish notation command-line calculator which
|
||||
supports unlimited precision arithmetic. See the FreeBSD man page
|
||||
(https://www.unix.com/man-page/FreeBSD/1/dc/) and GNU dc manual
|
||||
(https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html).
|
||||
|
||||
This dc has a few differences from the two above:
|
||||
1) When printing a byte stream (command "P"), this dc follows what
|
||||
the FreeBSD dc does.
|
||||
2) Implements the GNU extensions for divmod ("~") and
|
||||
modular exponentiation ("|").
|
||||
3) Implements all FreeBSD extensions, except for "J" and "M".
|
||||
4) Like the FreeBSD dc, this dc supports extended registers.
|
||||
However, they are implemented differently. When it encounters
|
||||
whitespace where a register should be, it skips the whitespace.
|
||||
If the character following is not a lowercase letter, an error
|
||||
is issued. Otherwise, the register name is parsed by the
|
||||
following regex: [a-z][a-z0-9_]*
|
||||
This generally means that register names will be surrounded by
|
||||
whitespace. Examples:
|
||||
l idx s temp L index S temp2 < do_thing
|
||||
Also note that, like the FreeBSD dc, extended registers are not
|
||||
allowed unless the "-x" option is given.
|
||||
|
||||
if BC || BUSYBOX_CONFIG_DC # for menuconfig indenting
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DC_BIG
|
||||
bool "Use bc code base for dc (larger, more features)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DC_BIG
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DC_LIBM
|
||||
bool "Enable power and exp functions (requires libm)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DC_LIBM
|
||||
depends on BUSYBOX_CONFIG_DC && !BUSYBOX_CONFIG_BC && !BUSYBOX_CONFIG_FEATURE_DC_BIG
|
||||
help
|
||||
Enable power and exp functions.
|
||||
NOTE: This will require libm to be present for linking.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BC_INTERACTIVE
|
||||
bool "Interactive mode (+4kb)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_BC_INTERACTIVE
|
||||
depends on BUSYBOX_CONFIG_BC || (BUSYBOX_CONFIG_DC && BUSYBOX_CONFIG_FEATURE_DC_BIG)
|
||||
help
|
||||
Enable interactive mode: when started on a tty,
|
||||
^C interrupts execution and returns to command line,
|
||||
errors also return to command line instead of exiting,
|
||||
line editing with history is available.
|
||||
|
||||
With this option off, input can still be taken from tty,
|
||||
but all errors are fatal, ^C is fatal,
|
||||
tty is treated exactly the same as any other
|
||||
standard input (IOW: no line editing).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BC_LONG_OPTIONS
|
||||
bool "Enable bc/dc long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_BC_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_BC || (BUSYBOX_CONFIG_DC && BUSYBOX_CONFIG_FEATURE_DC_BIG)
|
||||
|
||||
endif
|
||||
config BUSYBOX_CONFIG_BEEP
|
||||
bool "beep (2.4 kb)"
|
||||
default BUSYBOX_DEFAULT_BEEP
|
||||
help
|
||||
The beep applets beeps in a given freq/Hz.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BEEP_FREQ
|
||||
int "default frequency"
|
||||
range 20 50000 # allowing 0 here breaks the build
|
||||
default BUSYBOX_DEFAULT_FEATURE_BEEP_FREQ
|
||||
depends on BUSYBOX_CONFIG_BEEP
|
||||
help
|
||||
Frequency for default beep.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BEEP_LENGTH_MS
|
||||
int "default length"
|
||||
range 0 2147483647
|
||||
default BUSYBOX_DEFAULT_FEATURE_BEEP_LENGTH_MS
|
||||
depends on BUSYBOX_CONFIG_BEEP
|
||||
help
|
||||
Length in ms for default beep.
|
||||
config BUSYBOX_CONFIG_CHAT
|
||||
bool "chat (6.3 kb)"
|
||||
default BUSYBOX_DEFAULT_CHAT
|
||||
help
|
||||
Simple chat utility.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHAT_NOFAIL
|
||||
bool "Enable NOFAIL expect strings"
|
||||
depends on BUSYBOX_CONFIG_CHAT
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHAT_NOFAIL
|
||||
help
|
||||
When enabled expect strings which are started with a dash trigger
|
||||
no-fail mode. That is when expectation is not met within timeout
|
||||
the script is not terminated but sends next SEND string and waits
|
||||
for next EXPECT string. This allows to compose far more flexible
|
||||
scripts.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHAT_TTY_HIFI
|
||||
bool "Force STDIN to be a TTY"
|
||||
depends on BUSYBOX_CONFIG_CHAT
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHAT_TTY_HIFI
|
||||
help
|
||||
Original chat always treats STDIN as a TTY device and sets for it
|
||||
so-called raw mode. This option turns on such behaviour.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHAT_IMPLICIT_CR
|
||||
bool "Enable implicit Carriage Return"
|
||||
depends on BUSYBOX_CONFIG_CHAT
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHAT_IMPLICIT_CR
|
||||
help
|
||||
When enabled make chat to terminate all SEND strings with a "\r"
|
||||
unless "\c" is met anywhere in the string.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHAT_SWALLOW_OPTS
|
||||
bool "Swallow options"
|
||||
depends on BUSYBOX_CONFIG_CHAT
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHAT_SWALLOW_OPTS
|
||||
help
|
||||
Busybox chat require no options. To make it not fail when used
|
||||
in place of original chat (which has a bunch of options) turn
|
||||
this on.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHAT_SEND_ESCAPES
|
||||
bool "Support weird SEND escapes"
|
||||
depends on BUSYBOX_CONFIG_CHAT
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHAT_SEND_ESCAPES
|
||||
help
|
||||
Original chat uses some escape sequences in SEND arguments which
|
||||
are not sent to device but rather performs special actions.
|
||||
E.g. "\K" means to send a break sequence to device.
|
||||
"\d" delays execution for a second, "\p" -- for a 1/100 of second.
|
||||
Before turning this option on think twice: do you really need them?
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHAT_VAR_ABORT_LEN
|
||||
bool "Support variable-length ABORT conditions"
|
||||
depends on BUSYBOX_CONFIG_CHAT
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHAT_VAR_ABORT_LEN
|
||||
help
|
||||
Original chat uses fixed 50-bytes length ABORT conditions. Say N here.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHAT_CLR_ABORT
|
||||
bool "Support revoking of ABORT conditions"
|
||||
depends on BUSYBOX_CONFIG_CHAT
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHAT_CLR_ABORT
|
||||
help
|
||||
Support CLR_ABORT directive.
|
||||
config BUSYBOX_CONFIG_CONSPY
|
||||
bool "conspy (10 kb)"
|
||||
default BUSYBOX_DEFAULT_CONSPY
|
||||
help
|
||||
A text-mode VNC like program for Linux virtual terminals.
|
||||
example: conspy NUM shared access to console num
|
||||
or conspy -nd NUM screenshot of console num
|
||||
or conspy -cs NUM poor man's GNU screen like
|
||||
config BUSYBOX_CONFIG_CROND
|
||||
bool "crond (14 kb)"
|
||||
default BUSYBOX_DEFAULT_CROND
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
Crond is a background daemon that parses individual crontab
|
||||
files and executes commands on behalf of the users in question.
|
||||
This is a port of dcron from slackware. It uses files of the
|
||||
format /var/spool/cron/crontabs/<username> files, for example:
|
||||
$ cat /var/spool/cron/crontabs/root
|
||||
# Run daily cron jobs at 4:40 every day:
|
||||
40 4 * * * /etc/cron/daily > /dev/null 2>&1
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CROND_D
|
||||
bool "Support -d (redirect output to stderr)"
|
||||
depends on BUSYBOX_CONFIG_CROND
|
||||
default BUSYBOX_DEFAULT_FEATURE_CROND_D
|
||||
help
|
||||
-d N sets loglevel (0:most verbose) and directs all output to stderr.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL
|
||||
bool "Report command output via email (using sendmail)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CROND_CALL_SENDMAIL
|
||||
depends on BUSYBOX_CONFIG_CROND
|
||||
help
|
||||
Command output will be sent to corresponding user via email.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES
|
||||
bool "Support special times (@reboot, @daily, etc) in crontabs"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CROND_SPECIAL_TIMES
|
||||
depends on BUSYBOX_CONFIG_CROND
|
||||
help
|
||||
string meaning
|
||||
------ -------
|
||||
@reboot Run once, at startup
|
||||
@yearly Run once a year: "0 0 1 1 *"
|
||||
@annually Same as @yearly: "0 0 1 1 *"
|
||||
@monthly Run once a month: "0 0 1 * *"
|
||||
@weekly Run once a week: "0 0 * * 0"
|
||||
@daily Run once a day: "0 0 * * *"
|
||||
@midnight Same as @daily: "0 0 * * *"
|
||||
@hourly Run once an hour: "0 * * * *"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CROND_DIR
|
||||
string "crond spool directory"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CROND_DIR
|
||||
depends on BUSYBOX_CONFIG_CROND || BUSYBOX_CONFIG_CRONTAB
|
||||
help
|
||||
Location of crond spool.
|
||||
config BUSYBOX_CONFIG_CRONTAB
|
||||
bool "crontab (10 kb)"
|
||||
default BUSYBOX_DEFAULT_CRONTAB
|
||||
help
|
||||
Crontab manipulates the crontab for a particular user. Only
|
||||
the superuser may specify a different user and/or crontab directory.
|
||||
Note that busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
config BUSYBOX_CONFIG_DEVFSD
|
||||
bool "devfsd (obsolete)"
|
||||
default BUSYBOX_DEFAULT_DEVFSD
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
This is deprecated and should NOT be used anymore.
|
||||
Use linux >= 2.6 (optionally with hotplug) and mdev instead!
|
||||
See docs/mdev.txt for detailed instructions on how to use mdev
|
||||
instead.
|
||||
|
||||
Provides compatibility with old device names on a devfs systems.
|
||||
You should set it to true if you have devfs enabled.
|
||||
The following keywords in devsfd.conf are supported:
|
||||
"CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE",
|
||||
"PERMISSIONS", "EXECUTE", "COPY", "IGNORE",
|
||||
"MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT".
|
||||
|
||||
But only if they are written UPPERCASE!!!!!!!!
|
||||
|
||||
config BUSYBOX_CONFIG_DEVFSD_MODLOAD
|
||||
bool "Adds support for MODLOAD keyword in devsfd.conf"
|
||||
default BUSYBOX_DEFAULT_DEVFSD_MODLOAD
|
||||
depends on BUSYBOX_CONFIG_DEVFSD
|
||||
help
|
||||
This actually doesn't work with busybox modutils but needs
|
||||
the external modutils.
|
||||
|
||||
config BUSYBOX_CONFIG_DEVFSD_FG_NP
|
||||
bool "Enable the -fg and -np options"
|
||||
default BUSYBOX_DEFAULT_DEVFSD_FG_NP
|
||||
depends on BUSYBOX_CONFIG_DEVFSD
|
||||
help
|
||||
-fg Run the daemon in the foreground.
|
||||
-np Exit after parsing config. Do not poll for events.
|
||||
|
||||
config BUSYBOX_CONFIG_DEVFSD_VERBOSE
|
||||
bool "Increases logging (and size)"
|
||||
default BUSYBOX_DEFAULT_DEVFSD_VERBOSE
|
||||
depends on BUSYBOX_CONFIG_DEVFSD
|
||||
help
|
||||
Increases logging to stderr or syslog.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DEVFS
|
||||
bool "Use devfs names for all devices (obsolete)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DEVFS
|
||||
help
|
||||
This is obsolete and should NOT be used anymore.
|
||||
Use linux >= 2.6 (optionally with hotplug) and mdev instead!
|
||||
|
||||
For legacy systems -- if there is no way around devfsd -- this
|
||||
tells busybox to look for names like /dev/loop/0 instead of
|
||||
/dev/loop0. If your /dev directory has normal names instead of
|
||||
devfs names, you don't want this.
|
||||
config BUSYBOX_CONFIG_DEVMEM
|
||||
bool "devmem (2.5 kb)"
|
||||
default BUSYBOX_DEFAULT_DEVMEM
|
||||
help
|
||||
devmem is a small program that reads and writes from physical
|
||||
memory using /dev/mem.
|
||||
config BUSYBOX_CONFIG_FBSPLASH
|
||||
bool "fbsplash (26 kb)"
|
||||
default BUSYBOX_DEFAULT_FBSPLASH
|
||||
help
|
||||
Shows splash image and progress bar on framebuffer device.
|
||||
Can be used during boot phase of an embedded device.
|
||||
Usage:
|
||||
- use kernel option 'vga=xxx' or otherwise enable fb device.
|
||||
- put somewhere fbsplash.cfg file and an image in .ppm format.
|
||||
- $ setsid fbsplash [params] &
|
||||
-c: hide cursor
|
||||
-d /dev/fbN: framebuffer device (if not /dev/fb0)
|
||||
-s path_to_image_file (can be "-" for stdin)
|
||||
-i path_to_cfg_file (can be "-" for stdin)
|
||||
-f path_to_fifo (can be "-" for stdin)
|
||||
- if you want to run it only in presence of kernel parameter:
|
||||
grep -q "fbsplash=on" </proc/cmdline && setsid fbsplash [params] &
|
||||
- commands for fifo:
|
||||
"NN" (ASCII decimal number) - percentage to show on progress bar
|
||||
"exit" - well you guessed it
|
||||
config BUSYBOX_CONFIG_FLASH_ERASEALL
|
||||
bool "flash_eraseall (5.9 kb)"
|
||||
default BUSYBOX_DEFAULT_FLASH_ERASEALL # doesn't build on Ubuntu 8.04
|
||||
help
|
||||
The flash_eraseall binary from mtd-utils as of git head c4c6a59eb.
|
||||
This utility is used to erase the whole MTD device.
|
||||
config BUSYBOX_CONFIG_FLASH_LOCK
|
||||
bool "flash_lock (2.1 kb)"
|
||||
default BUSYBOX_DEFAULT_FLASH_LOCK # doesn't build on Ubuntu 8.04
|
||||
help
|
||||
The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
|
||||
utility locks part or all of the flash device.
|
||||
|
||||
config BUSYBOX_CONFIG_FLASH_UNLOCK
|
||||
bool "flash_unlock (1.3 kb)"
|
||||
default BUSYBOX_DEFAULT_FLASH_UNLOCK # doesn't build on Ubuntu 8.04
|
||||
help
|
||||
The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
|
||||
utility unlocks part or all of the flash device.
|
||||
config BUSYBOX_CONFIG_FLASHCP
|
||||
bool "flashcp (5.3 kb)"
|
||||
default BUSYBOX_DEFAULT_FLASHCP # doesn't build on Ubuntu 8.04
|
||||
help
|
||||
The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
|
||||
This utility is used to copy images into a MTD device.
|
||||
config BUSYBOX_CONFIG_HDPARM
|
||||
bool "hdparm (25 kb)"
|
||||
default BUSYBOX_DEFAULT_HDPARM
|
||||
help
|
||||
Get/Set hard drive parameters. Primarily intended for ATA
|
||||
drives.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HDPARM_GET_IDENTITY
|
||||
bool "Support obtaining detailed information directly from drives"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HDPARM_GET_IDENTITY
|
||||
depends on BUSYBOX_CONFIG_HDPARM
|
||||
help
|
||||
Enable the -I and -i options to obtain detailed information
|
||||
directly from drives about their capabilities and supported ATA
|
||||
feature set. If no device name is specified, hdparm will read
|
||||
identify data from stdin. Enabling this option will add about 16k...
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF
|
||||
bool "Register an IDE interface (DANGEROUS)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_SCAN_HWIF
|
||||
depends on BUSYBOX_CONFIG_HDPARM
|
||||
help
|
||||
Enable the 'hdparm -R' option to register an IDE interface.
|
||||
This is dangerous stuff, so you should probably say N.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
|
||||
bool "Un-register an IDE interface (DANGEROUS)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
|
||||
depends on BUSYBOX_CONFIG_HDPARM
|
||||
help
|
||||
Enable the 'hdparm -U' option to un-register an IDE interface.
|
||||
This is dangerous stuff, so you should probably say N.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET
|
||||
bool "Perform device reset (DANGEROUS)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_DRIVE_RESET
|
||||
depends on BUSYBOX_CONFIG_HDPARM
|
||||
help
|
||||
Enable the 'hdparm -w' option to perform a device reset.
|
||||
This is dangerous stuff, so you should probably say N.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
|
||||
bool "Tristate device for hotswap (DANGEROUS)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
|
||||
depends on BUSYBOX_CONFIG_HDPARM
|
||||
help
|
||||
Enable the 'hdparm -x' option to tristate device for hotswap,
|
||||
and the '-b' option to get/set bus state. This is dangerous
|
||||
stuff, so you should probably say N.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA
|
||||
bool "Get/set using_dma flag"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HDPARM_HDIO_GETSET_DMA
|
||||
depends on BUSYBOX_CONFIG_HDPARM
|
||||
help
|
||||
Enable the 'hdparm -d' option to get/set using_dma flag.
|
||||
config BUSYBOX_CONFIG_HEXEDIT
|
||||
bool "hexedit (21 kb)"
|
||||
default BUSYBOX_DEFAULT_HEXEDIT
|
||||
help
|
||||
Edit file in hexadecimal.
|
||||
config BUSYBOX_CONFIG_I2CGET
|
||||
bool "i2cget (5.5 kb)"
|
||||
default BUSYBOX_DEFAULT_I2CGET
|
||||
help
|
||||
Read from I2C/SMBus chip registers.
|
||||
|
||||
config BUSYBOX_CONFIG_I2CSET
|
||||
bool "i2cset (6.7 kb)"
|
||||
default BUSYBOX_DEFAULT_I2CSET
|
||||
help
|
||||
Set I2C registers.
|
||||
|
||||
config BUSYBOX_CONFIG_I2CDUMP
|
||||
bool "i2cdump (7.1 kb)"
|
||||
default BUSYBOX_DEFAULT_I2CDUMP
|
||||
help
|
||||
Examine I2C registers.
|
||||
|
||||
config BUSYBOX_CONFIG_I2CDETECT
|
||||
bool "i2cdetect (7.1 kb)"
|
||||
default BUSYBOX_DEFAULT_I2CDETECT
|
||||
help
|
||||
Detect I2C chips.
|
||||
|
||||
config BUSYBOX_CONFIG_I2CTRANSFER
|
||||
bool "i2ctransfer (4.0 kb)"
|
||||
default BUSYBOX_DEFAULT_I2CTRANSFER
|
||||
help
|
||||
Send user-defined I2C messages in one transfer.
|
||||
|
||||
config BUSYBOX_CONFIG_INOTIFYD
|
||||
bool "inotifyd (3.6 kb)"
|
||||
default BUSYBOX_DEFAULT_INOTIFYD # doesn't build on Knoppix 5
|
||||
help
|
||||
Simple inotify daemon. Reports filesystem changes. Requires
|
||||
kernel >= 2.6.13
|
||||
config BUSYBOX_CONFIG_LESS
|
||||
bool "less (16 kb)"
|
||||
default BUSYBOX_DEFAULT_LESS
|
||||
help
|
||||
'less' is a pager, meaning that it displays text files. It possesses
|
||||
a wide array of features, and is an improvement over 'more'.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES
|
||||
int "Max number of input lines less will try to eat"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES
|
||||
depends on BUSYBOX_CONFIG_LESS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS
|
||||
bool "Enable bracket searching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_BRACKETS
|
||||
depends on BUSYBOX_CONFIG_LESS
|
||||
help
|
||||
This option adds the capability to search for matching left and right
|
||||
brackets, facilitating programming.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_FLAGS
|
||||
bool "Enable -m/-M"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_FLAGS
|
||||
depends on BUSYBOX_CONFIG_LESS
|
||||
help
|
||||
The -M/-m flag enables a more sophisticated status line.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE
|
||||
bool "Enable -S"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_TRUNCATE
|
||||
depends on BUSYBOX_CONFIG_LESS
|
||||
help
|
||||
The -S flag causes long lines to be truncated rather than
|
||||
wrapped.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_MARKS
|
||||
bool "Enable marks"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_MARKS
|
||||
depends on BUSYBOX_CONFIG_LESS
|
||||
help
|
||||
Marks enable positions in a file to be stored for easy reference.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_REGEXP
|
||||
bool "Enable regular expressions"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_REGEXP
|
||||
depends on BUSYBOX_CONFIG_LESS
|
||||
help
|
||||
Enable regular expressions, allowing complex file searches.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_WINCH
|
||||
bool "Enable automatic resizing on window size changes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_WINCH
|
||||
depends on BUSYBOX_CONFIG_LESS
|
||||
help
|
||||
Makes less track window size changes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_ASK_TERMINAL
|
||||
bool "Use 'tell me cursor position' ESC sequence to measure window"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_ASK_TERMINAL
|
||||
depends on BUSYBOX_CONFIG_FEATURE_LESS_WINCH
|
||||
help
|
||||
Makes less track window size changes.
|
||||
If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
|
||||
this option makes less perform a last-ditch effort to find it:
|
||||
position cursor to 999,999 and ask terminal to report real
|
||||
cursor position using "ESC [ 6 n" escape sequence, then read stdin.
|
||||
This is not clean but helps a lot on serial lines and such.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
|
||||
bool "Enable flag changes ('-' command)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_DASHCMD
|
||||
depends on BUSYBOX_CONFIG_LESS
|
||||
help
|
||||
This enables the ability to change command-line flags within
|
||||
less itself ('-' keyboard command).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_LINENUMS
|
||||
bool "Enable -N (dynamic switching of line numbers)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_LINENUMS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_RAW
|
||||
bool "Enable -R ('raw control characters')"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_RAW
|
||||
depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
|
||||
help
|
||||
This is essential for less applet to work with tools that use colors
|
||||
and paging, such as git, systemd tools or nmcli.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LESS_ENV
|
||||
bool "Take options from $LESS environment variable"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LESS_ENV
|
||||
depends on BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD
|
||||
help
|
||||
This is essential for less applet to work with tools that use colors
|
||||
and paging, such as git, systemd tools or nmcli.
|
||||
config BUSYBOX_CONFIG_LOCK
|
||||
bool "lock"
|
||||
default BUSYBOX_DEFAULT_LOCK
|
||||
help
|
||||
Small utility for using locks in scripts
|
||||
config BUSYBOX_CONFIG_LSSCSI
|
||||
bool "lsscsi (2.5 kb)"
|
||||
default BUSYBOX_DEFAULT_LSSCSI
|
||||
help
|
||||
lsscsi is a utility for displaying information about SCSI buses in the
|
||||
system and devices connected to them.
|
||||
|
||||
This version uses sysfs (/sys/bus/scsi/devices) only.
|
||||
config BUSYBOX_CONFIG_MAKEDEVS
|
||||
bool "makedevs (9.2 kb)"
|
||||
default BUSYBOX_DEFAULT_MAKEDEVS
|
||||
help
|
||||
'makedevs' is a utility used to create a batch of devices with
|
||||
one command.
|
||||
|
||||
There are two choices for command line behaviour, the interface
|
||||
as used by LEAF/Linux Router Project, or a device table file.
|
||||
|
||||
'leaf' is traditionally what busybox follows, it allows multiple
|
||||
devices of a particluar type to be created per command.
|
||||
e.g. /dev/hda[0-9]
|
||||
Device properties are passed as command line arguments.
|
||||
|
||||
'table' reads device properties from a file or stdin, allowing
|
||||
a batch of unrelated devices to be made with one command.
|
||||
User/group names are allowed as an alternative to uid/gid.
|
||||
|
||||
choice
|
||||
prompt "Choose makedevs behaviour"
|
||||
depends on BUSYBOX_CONFIG_MAKEDEVS
|
||||
default BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_LEAF
|
||||
bool "leaf"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MAKEDEVS_TABLE
|
||||
bool "table"
|
||||
|
||||
endchoice
|
||||
config BUSYBOX_CONFIG_MAN
|
||||
bool "man (26 kb)"
|
||||
default BUSYBOX_DEFAULT_MAN
|
||||
help
|
||||
Format and display manual pages.
|
||||
config BUSYBOX_CONFIG_MICROCOM
|
||||
bool "microcom (5.7 kb)"
|
||||
default BUSYBOX_DEFAULT_MICROCOM
|
||||
help
|
||||
The poor man's minicom utility for chatting with serial port devices.
|
||||
config BUSYBOX_CONFIG_MIM
|
||||
bool "mim (0.5 kb)"
|
||||
default BUSYBOX_DEFAULT_MIM
|
||||
depends on BUSYBOX_CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS
|
||||
help
|
||||
Run a script from a Makefile-like specification file.
|
||||
Unlike 'make' dependencies aren't supported.
|
||||
config BUSYBOX_CONFIG_MT
|
||||
bool "mt (2.5 kb)"
|
||||
default BUSYBOX_DEFAULT_MT
|
||||
help
|
||||
mt is used to control tape devices. You can use the mt utility
|
||||
to advance or rewind a tape past a specified number of archive
|
||||
files on the tape.
|
||||
config BUSYBOX_CONFIG_NANDWRITE
|
||||
bool "nandwrite (4.8 kb)"
|
||||
default BUSYBOX_DEFAULT_NANDWRITE
|
||||
help
|
||||
Write to the specified MTD device, with bad blocks awareness
|
||||
|
||||
config BUSYBOX_CONFIG_NANDDUMP
|
||||
bool "nanddump (5.2 kb)"
|
||||
default BUSYBOX_DEFAULT_NANDDUMP
|
||||
help
|
||||
Dump the content of raw NAND chip
|
||||
config BUSYBOX_CONFIG_PARTPROBE
|
||||
bool "partprobe (3.5 kb)"
|
||||
default BUSYBOX_DEFAULT_PARTPROBE
|
||||
help
|
||||
Ask kernel to rescan partition table.
|
||||
config BUSYBOX_CONFIG_RAIDAUTORUN
|
||||
bool "raidautorun (1.3 kb)"
|
||||
default BUSYBOX_DEFAULT_RAIDAUTORUN
|
||||
help
|
||||
raidautorun tells the kernel md driver to
|
||||
search and start RAID arrays.
|
||||
config BUSYBOX_CONFIG_READAHEAD
|
||||
bool "readahead (1.5 kb)"
|
||||
default BUSYBOX_DEFAULT_READAHEAD
|
||||
depends on BUSYBOX_CONFIG_LFS
|
||||
help
|
||||
Preload the files listed on the command line into RAM cache so that
|
||||
subsequent reads on these files will not block on disk I/O.
|
||||
|
||||
This applet just calls the readahead(2) system call on each file.
|
||||
It is mainly useful in system startup scripts to preload files
|
||||
or executables before they are used. When used at the right time
|
||||
(in particular when a CPU bound process is running) it can
|
||||
significantly speed up system startup.
|
||||
|
||||
As readahead(2) blocks until each file has been read, it is best to
|
||||
run this applet as a background job.
|
||||
config BUSYBOX_CONFIG_RFKILL
|
||||
bool "rfkill (4.4 kb)"
|
||||
default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04
|
||||
help
|
||||
Enable/disable wireless devices.
|
||||
|
||||
rfkill list : list all wireless devices
|
||||
rfkill list bluetooth : list all bluetooth devices
|
||||
rfkill list 1 : list device corresponding to the given index
|
||||
rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
|
||||
|
||||
config BUSYBOX_CONFIG_RUNLEVEL
|
||||
bool "runlevel (559 bytes)"
|
||||
default BUSYBOX_DEFAULT_RUNLEVEL
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UTMP
|
||||
help
|
||||
Find the current and previous system runlevel.
|
||||
|
||||
This applet uses utmp but does not rely on busybox supporing
|
||||
utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
|
||||
config BUSYBOX_CONFIG_RX
|
||||
bool "rx (2.9 kb)"
|
||||
default BUSYBOX_DEFAULT_RX
|
||||
help
|
||||
Receive files using the Xmodem protocol.
|
||||
config BUSYBOX_CONFIG_SEEDRNG
|
||||
bool "seedrng (1.3 kb)"
|
||||
default BUSYBOX_DEFAULT_SEEDRNG
|
||||
help
|
||||
Seed the kernel RNG from seed files, meant to be called
|
||||
once during startup, once during shutdown, and optionally
|
||||
at some periodic interval in between.
|
||||
config BUSYBOX_CONFIG_SETFATTR
|
||||
bool "setfattr (3.7 kb)"
|
||||
default BUSYBOX_DEFAULT_SETFATTR
|
||||
help
|
||||
Set/delete extended attributes on files
|
||||
config BUSYBOX_CONFIG_SETSERIAL
|
||||
bool "setserial (6.9 kb)"
|
||||
default BUSYBOX_DEFAULT_SETSERIAL
|
||||
help
|
||||
Retrieve or set Linux serial port.
|
||||
config BUSYBOX_CONFIG_STRINGS
|
||||
bool "strings (4.6 kb)"
|
||||
default BUSYBOX_DEFAULT_STRINGS
|
||||
help
|
||||
strings prints the printable character sequences for each file
|
||||
specified.
|
||||
config BUSYBOX_CONFIG_TIME
|
||||
bool "time (6.8 kb)"
|
||||
default BUSYBOX_DEFAULT_TIME
|
||||
help
|
||||
The time command runs the specified program with the given arguments.
|
||||
When the command finishes, time writes a message to standard output
|
||||
giving timing statistics about this program run.
|
||||
config BUSYBOX_CONFIG_TREE
|
||||
bool "tree (0.6 kb)"
|
||||
default BUSYBOX_DEFAULT_TREE
|
||||
help
|
||||
List files and directories in a tree structure.
|
||||
config BUSYBOX_CONFIG_TS
|
||||
bool "ts (450 bytes)"
|
||||
default BUSYBOX_DEFAULT_TS
|
||||
config BUSYBOX_CONFIG_TTYSIZE
|
||||
bool "ttysize (432 bytes)"
|
||||
default BUSYBOX_DEFAULT_TTYSIZE
|
||||
help
|
||||
A replacement for "stty size". Unlike stty, can report only width,
|
||||
only height, or both, in any order. It also does not complain on
|
||||
error, but returns default 80x24.
|
||||
Usage in shell scripts: width=`ttysize w`.
|
||||
config BUSYBOX_CONFIG_UBIATTACH
|
||||
bool "ubiattach (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_UBIATTACH
|
||||
help
|
||||
Attach MTD device to an UBI device.
|
||||
|
||||
config BUSYBOX_CONFIG_UBIDETACH
|
||||
bool "ubidetach (4.1 kb)"
|
||||
default BUSYBOX_DEFAULT_UBIDETACH
|
||||
help
|
||||
Detach MTD device from an UBI device.
|
||||
|
||||
config BUSYBOX_CONFIG_UBIMKVOL
|
||||
bool "ubimkvol (5.3 kb)"
|
||||
default BUSYBOX_DEFAULT_UBIMKVOL
|
||||
help
|
||||
Create a UBI volume.
|
||||
|
||||
config BUSYBOX_CONFIG_UBIRMVOL
|
||||
bool "ubirmvol (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_UBIRMVOL
|
||||
help
|
||||
Delete a UBI volume.
|
||||
|
||||
config BUSYBOX_CONFIG_UBIRSVOL
|
||||
bool "ubirsvol (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_UBIRSVOL
|
||||
help
|
||||
Resize a UBI volume.
|
||||
|
||||
config BUSYBOX_CONFIG_UBIUPDATEVOL
|
||||
bool "ubiupdatevol (5.2 kb)"
|
||||
default BUSYBOX_DEFAULT_UBIUPDATEVOL
|
||||
help
|
||||
Update a UBI volume.
|
||||
config BUSYBOX_CONFIG_UBIRENAME
|
||||
bool "ubirename (2.4 kb)"
|
||||
default BUSYBOX_DEFAULT_UBIRENAME
|
||||
help
|
||||
Utility to rename UBI volumes
|
||||
config BUSYBOX_CONFIG_VOLNAME
|
||||
bool "volname (1.6 kb)"
|
||||
default BUSYBOX_DEFAULT_VOLNAME
|
||||
help
|
||||
Prints a CD-ROM volume name.
|
||||
config BUSYBOX_CONFIG_WATCHDOG
|
||||
bool "watchdog (5.3 kb)"
|
||||
default BUSYBOX_DEFAULT_WATCHDOG
|
||||
help
|
||||
The watchdog utility is used with hardware or software watchdog
|
||||
device drivers. It opens the specified watchdog device special file
|
||||
and periodically writes a magic character to the device. If the
|
||||
watchdog applet ever fails to write the magic character within a
|
||||
certain amount of time, the watchdog device assumes the system has
|
||||
hung, and will cause the hardware to reboot.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_WATCHDOG_OPEN_TWICE
|
||||
bool "Open watchdog device twice, closing it gracefully in between"
|
||||
depends on BUSYBOX_CONFIG_WATCHDOG
|
||||
default BUSYBOX_DEFAULT_FEATURE_WATCHDOG_OPEN_TWICE # this behavior was essentially a hack for a broken driver
|
||||
help
|
||||
When enabled, the watchdog device is opened and then immediately
|
||||
magic-closed, before being opened a second time. This may be necessary
|
||||
for some watchdog devices, but can cause spurious warnings in the
|
||||
kernel log if the nowayout feature is enabled. If this workaround
|
||||
is really needed for you machine to work properly, consider whether
|
||||
it should be fixed in the kernel driver instead. Even when disabled,
|
||||
the behaviour is easily emulated with a "printf 'V' > /dev/watchdog"
|
||||
immediately before starting the busybox watchdog daemon. Say n unless
|
||||
you know that you absolutely need this.
|
||||
|
||||
endmenu
|
||||
239
package/utils/busybox/config/modutils/Config.in
Normal file
239
package/utils/busybox/config/modutils/Config.in
Normal file
@@ -0,0 +1,239 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Linux Module Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_MODPROBE_SMALL
|
||||
bool "Simplified modutils"
|
||||
default BUSYBOX_DEFAULT_MODPROBE_SMALL
|
||||
help
|
||||
Build smaller (~1.5 kbytes), simplified module tools.
|
||||
|
||||
This option by itself does not enable any applets -
|
||||
you need to select applets individually below.
|
||||
|
||||
With this option modprobe does not require modules.dep file
|
||||
and does not use /etc/modules.conf file.
|
||||
It scans module files in /lib/modules/`uname -r` and
|
||||
determines dependencies and module alias names on the fly.
|
||||
This may make module loading slower, most notably
|
||||
when one needs to load module by alias (this requires
|
||||
scanning through module _bodies_).
|
||||
|
||||
At the first attempt to load a module by alias modprobe
|
||||
will try to generate modules.dep.bb file in order to speed up
|
||||
future loads by alias. Failure to do so (read-only /lib/modules,
|
||||
etc) is not reported, and future modprobes will be slow too.
|
||||
|
||||
NB: modules.dep.bb file format is not compatible
|
||||
with modules.dep file as created/used by standard module tools.
|
||||
|
||||
Additional module parameters can be stored in
|
||||
/etc/modules/$module_name files.
|
||||
|
||||
config BUSYBOX_CONFIG_DEPMOD
|
||||
bool "depmod (27 kb)"
|
||||
default BUSYBOX_DEFAULT_DEPMOD
|
||||
help
|
||||
depmod generates modules.dep (and potentially modules.alias
|
||||
and modules.symbols) that contain dependency information
|
||||
for modprobe.
|
||||
config BUSYBOX_CONFIG_INSMOD
|
||||
bool "insmod (22 kb)"
|
||||
default BUSYBOX_DEFAULT_INSMOD
|
||||
help
|
||||
insmod is used to load specified modules in the running kernel.
|
||||
config BUSYBOX_CONFIG_LSMOD
|
||||
bool "lsmod (1.9 kb)"
|
||||
default BUSYBOX_DEFAULT_LSMOD
|
||||
help
|
||||
lsmod is used to display a list of loaded modules.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
|
||||
bool "Pretty output"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
|
||||
depends on BUSYBOX_CONFIG_LSMOD && !BUSYBOX_CONFIG_MODPROBE_SMALL
|
||||
help
|
||||
This option makes output format of lsmod adjusted to
|
||||
the format of module-init-tools for Linux kernel 2.6.
|
||||
Increases size somewhat.
|
||||
config BUSYBOX_CONFIG_MODINFO
|
||||
bool "modinfo (24 kb)"
|
||||
default BUSYBOX_DEFAULT_MODINFO
|
||||
help
|
||||
Show information about a Linux Kernel module
|
||||
config BUSYBOX_CONFIG_MODPROBE
|
||||
bool "modprobe (28 kb)"
|
||||
default BUSYBOX_DEFAULT_MODPROBE
|
||||
help
|
||||
Handle the loading of modules, and their dependencies on a high
|
||||
level.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST
|
||||
bool "Blacklist support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MODPROBE_BLACKLIST
|
||||
depends on BUSYBOX_CONFIG_MODPROBE && !BUSYBOX_CONFIG_MODPROBE_SMALL
|
||||
help
|
||||
Say 'y' here to enable support for the 'blacklist' command in
|
||||
modprobe.conf. This prevents the alias resolver to resolve
|
||||
blacklisted modules. This is useful if you want to prevent your
|
||||
hardware autodetection scripts to load modules like evdev, frame
|
||||
buffer drivers etc.
|
||||
config BUSYBOX_CONFIG_RMMOD
|
||||
bool "rmmod (3.3 kb)"
|
||||
default BUSYBOX_DEFAULT_RMMOD
|
||||
help
|
||||
rmmod is used to unload specified modules from the kernel.
|
||||
|
||||
comment "Options common to multiple modutils"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS
|
||||
bool "Accept module options on modprobe command line"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CMDLINE_MODULE_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE
|
||||
help
|
||||
Allow insmod and modprobe take module options from the applets'
|
||||
command line.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
|
||||
bool "Skip loading of already loaded modules"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
|
||||
depends on BUSYBOX_CONFIG_MODPROBE_SMALL && (BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE)
|
||||
help
|
||||
Check if the module is already loaded.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_2_4_MODULES
|
||||
bool "Support version 2.2/2.4 Linux kernels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_2_4_MODULES
|
||||
depends on (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_LSMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_RMMOD) && !BUSYBOX_CONFIG_MODPROBE_SMALL
|
||||
help
|
||||
Support module loading for 2.2.x and 2.4.x Linux kernels.
|
||||
This increases size considerably. Say N unless you plan
|
||||
to run ancient kernels.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INSMOD_VERSION_CHECKING
|
||||
bool "Enable module version checking"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INSMOD_VERSION_CHECKING
|
||||
depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE)
|
||||
help
|
||||
Support checking of versions for modules. This is used to
|
||||
ensure that the kernel and module are made for each other.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
|
||||
bool "Add module symbols to kernel symbol table"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE)
|
||||
help
|
||||
By adding module symbols to the kernel symbol table, Oops messages
|
||||
occurring within kernel modules can be properly debugged. By enabling
|
||||
this feature, module symbols will always be added to the kernel symbol
|
||||
table for proper debugging support. If you are not interested in
|
||||
Oops messages from kernel modules, say N.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INSMOD_LOADINKMEM
|
||||
bool "In kernel memory optimization (uClinux only)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOADINKMEM
|
||||
depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE)
|
||||
help
|
||||
This is a special uClinux only memory optimization that lets insmod
|
||||
load the specified kernel module directly into kernel space, reducing
|
||||
memory usage by preventing the need for two copies of the module
|
||||
being loaded into memory.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP
|
||||
bool "Enable insmod load map (-m) option"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP
|
||||
depends on BUSYBOX_CONFIG_FEATURE_2_4_MODULES && BUSYBOX_CONFIG_INSMOD
|
||||
help
|
||||
Enabling this, one would be able to get a load map
|
||||
output on stdout. This makes kernel module debugging
|
||||
easier.
|
||||
If you don't plan to debug kernel modules, you
|
||||
don't need this option.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL
|
||||
bool "Symbols in load map"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INSMOD_LOAD_MAP_FULL
|
||||
depends on BUSYBOX_CONFIG_FEATURE_INSMOD_LOAD_MAP
|
||||
help
|
||||
Without this option, -m will only output section
|
||||
load map. With this option, -m will also output
|
||||
symbols load map.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CHECK_TAINTED_MODULE
|
||||
bool "Support tainted module checking with new kernels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CHECK_TAINTED_MODULE
|
||||
depends on (BUSYBOX_CONFIG_LSMOD || BUSYBOX_CONFIG_FEATURE_2_4_MODULES) && !BUSYBOX_CONFIG_MODPROBE_SMALL
|
||||
help
|
||||
Support checking for tainted modules. These are usually binary
|
||||
only modules that will make the linux-kernel list ignore your
|
||||
support request.
|
||||
This option is required to support GPLONLY modules.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_INSMOD_TRY_MMAP
|
||||
bool "Try to load module from a mmap'ed area"
|
||||
default BUSYBOX_DEFAULT_FEATURE_INSMOD_TRY_MMAP
|
||||
depends on (BUSYBOX_CONFIG_INSMOD || BUSYBOX_CONFIG_MODPROBE) && !BUSYBOX_CONFIG_MODPROBE_SMALL
|
||||
help
|
||||
This option causes module loading code to try to mmap
|
||||
module first. If it does not work (for example,
|
||||
it does not work for compressed modules), module will be read
|
||||
(and unpacked if needed) into a memory block allocated by malloc.
|
||||
|
||||
The only case when mmap works but malloc does not is when
|
||||
you are trying to load a big module on a very memory-constrained
|
||||
machine. Malloc will momentarily need 2x as much memory as mmap.
|
||||
|
||||
Choosing N saves about 250 bytes of code (on 32-bit x86).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MODUTILS_ALIAS
|
||||
bool "Support module.aliases file"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MODUTILS_ALIAS
|
||||
depends on (BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE) && !BUSYBOX_CONFIG_MODPROBE_SMALL
|
||||
help
|
||||
Generate and parse modules.alias containing aliases for bus
|
||||
identifiers:
|
||||
alias pcmcia:m*c*f03fn*pfn*pa*pb*pc*pd* parport_cs
|
||||
|
||||
and aliases for logical modules names e.g.:
|
||||
alias padlock_aes aes
|
||||
alias aes_i586 aes
|
||||
alias aes_generic aes
|
||||
|
||||
Say Y if unsure.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MODUTILS_SYMBOLS
|
||||
bool "Support module.symbols file"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MODUTILS_SYMBOLS
|
||||
depends on (BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE) && !BUSYBOX_CONFIG_MODPROBE_SMALL
|
||||
help
|
||||
Generate and parse modules.symbols containing aliases for
|
||||
symbol_request() kernel calls, such as:
|
||||
alias symbol:usb_sg_init usbcore
|
||||
|
||||
Say Y if unsure.
|
||||
|
||||
config BUSYBOX_CONFIG_DEFAULT_MODULES_DIR
|
||||
string "Default directory containing modules"
|
||||
default BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR
|
||||
depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_MODINFO
|
||||
help
|
||||
Directory that contains kernel modules.
|
||||
Defaults to "/lib/modules"
|
||||
|
||||
config BUSYBOX_CONFIG_DEFAULT_DEPMOD_FILE
|
||||
string "Default name of modules.dep"
|
||||
default BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE
|
||||
depends on BUSYBOX_CONFIG_DEPMOD || BUSYBOX_CONFIG_MODPROBE || BUSYBOX_CONFIG_MODINFO
|
||||
help
|
||||
Filename that contains kernel modules dependencies.
|
||||
Defaults to "modules.dep".
|
||||
If you configured the "simplified modutils" (MODPROBE_SMALL), a
|
||||
".bb" suffix will be added after this name. Do not specify ".bb"
|
||||
here unless you intend your depmod or modprobe to work on
|
||||
"modules.dep.bb.bb" or such.
|
||||
|
||||
endmenu
|
||||
1263
package/utils/busybox/config/networking/Config.in
Normal file
1263
package/utils/busybox/config/networking/Config.in
Normal file
File diff suppressed because it is too large
Load Diff
216
package/utils/busybox/config/networking/udhcp/Config.in
Normal file
216
package/utils/busybox/config/networking/udhcp/Config.in
Normal file
@@ -0,0 +1,216 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
config BUSYBOX_CONFIG_UDHCPD
|
||||
bool "udhcpd (21 kb)"
|
||||
default BUSYBOX_DEFAULT_UDHCPD
|
||||
help
|
||||
udhcpd is a DHCP server geared primarily toward embedded systems,
|
||||
while striving to be fully functional and RFC compliant.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC
|
||||
bool "Select IP address based on client MAC"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCPD_BASE_IP_ON_MAC
|
||||
depends on BUSYBOX_CONFIG_UDHCPD
|
||||
help
|
||||
If selected, udhcpd will base its selection of IP address to offer
|
||||
on the client's hardware address. Otherwise udhcpd uses the next
|
||||
consecutive free address.
|
||||
|
||||
This reduces the frequency of IP address changes for clients
|
||||
which let their lease expire, and makes consecutive DHCPOFFERS
|
||||
for the same client to (almost always) contain the same
|
||||
IP address.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY
|
||||
bool "Rewrite lease file at every new acknowledge"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCPD_WRITE_LEASES_EARLY
|
||||
depends on BUSYBOX_CONFIG_UDHCPD
|
||||
help
|
||||
If selected, udhcpd will write a new file with leases every
|
||||
time a new lease has been accepted, thus eliminating the need
|
||||
to send SIGUSR1 for the initial writing or updating. Any timed
|
||||
rewriting remains undisturbed.
|
||||
|
||||
config BUSYBOX_CONFIG_DHCPD_LEASES_FILE
|
||||
string "Absolute path to lease file"
|
||||
default BUSYBOX_DEFAULT_DHCPD_LEASES_FILE
|
||||
depends on BUSYBOX_CONFIG_UDHCPD
|
||||
help
|
||||
udhcpd stores addresses in a lease file. This is the absolute path
|
||||
of the file. Normally it is safe to leave it untouched.
|
||||
|
||||
config BUSYBOX_CONFIG_DUMPLEASES
|
||||
bool "dumpleases (5.1 kb)"
|
||||
default BUSYBOX_DEFAULT_DUMPLEASES
|
||||
help
|
||||
dumpleases displays the leases written out by the udhcpd.
|
||||
Lease times are stored in the file by time remaining in lease, or
|
||||
by the absolute time that it expires in seconds from epoch.
|
||||
|
||||
config BUSYBOX_CONFIG_DHCPRELAY
|
||||
bool "dhcprelay (5.2 kb)"
|
||||
default BUSYBOX_DEFAULT_DHCPRELAY
|
||||
help
|
||||
dhcprelay listens for DHCP requests on one or more interfaces
|
||||
and forwards these requests to a different interface or DHCP
|
||||
server.
|
||||
|
||||
config BUSYBOX_CONFIG_UDHCPC
|
||||
bool "udhcpc (24 kb)"
|
||||
default BUSYBOX_DEFAULT_UDHCPC
|
||||
help
|
||||
udhcpc is a DHCP client geared primarily toward embedded systems,
|
||||
while striving to be fully functional and RFC compliant.
|
||||
|
||||
The udhcp client negotiates a lease with the DHCP server and
|
||||
runs a script when a lease is obtained or lost.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPC_ARPING
|
||||
bool "Verify that the offered address is free, using ARP ping"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCPC_ARPING
|
||||
depends on BUSYBOX_CONFIG_UDHCPC
|
||||
help
|
||||
If selected, udhcpc will send ARP probes and make sure
|
||||
the offered address is really not in use by anyone. The client
|
||||
will DHCPDECLINE the offer if the address is in use,
|
||||
and restart the discover process.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPC_SANITIZEOPT
|
||||
bool "Do not pass malformed host and domain names"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCPC_SANITIZEOPT
|
||||
depends on BUSYBOX_CONFIG_UDHCPC
|
||||
help
|
||||
If selected, udhcpc will check some options (such as option 12 -
|
||||
hostname) and if they don't look like valid hostnames
|
||||
(for example, if they start with dash or contain spaces),
|
||||
they will be replaced with string "bad" when exporting
|
||||
to the environment.
|
||||
|
||||
config BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT
|
||||
string "Absolute path to config script"
|
||||
default BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT
|
||||
depends on BUSYBOX_CONFIG_UDHCPC
|
||||
help
|
||||
This script is called after udhcpc receives an answer. See
|
||||
examples/udhcp for a working example. Normally it is safe
|
||||
to leave this untouched.
|
||||
|
||||
config BUSYBOX_CONFIG_UDHCPC6_DEFAULT_SCRIPT
|
||||
string "Absolute path to config script for IPv6"
|
||||
default BUSYBOX_DEFAULT_UDHCPC6_DEFAULT_SCRIPT
|
||||
depends on BUSYBOX_CONFIG_UDHCPC6
|
||||
|
||||
# udhcpc6 config is inserted here:
|
||||
config BUSYBOX_CONFIG_UDHCPC6
|
||||
bool "udhcpc6 (21 kb)"
|
||||
default BUSYBOX_DEFAULT_UDHCPC6
|
||||
depends on BUSYBOX_CONFIG_FEATURE_IPV6
|
||||
help
|
||||
udhcpc6 is a DHCPv6 client
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPC6_RFC3646
|
||||
bool "Support RFC 3646 (DNS server and search list)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC3646
|
||||
depends on BUSYBOX_CONFIG_UDHCPC6
|
||||
help
|
||||
List of DNS servers and domain search list can be requested with
|
||||
"-O dns" and "-O search". If server gives these values,
|
||||
they will be set in environment variables "dns" and "search".
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPC6_RFC4704
|
||||
bool "Support RFC 4704 (Client FQDN)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC4704
|
||||
depends on BUSYBOX_CONFIG_UDHCPC6
|
||||
help
|
||||
You can request FQDN to be given by server using "-O fqdn".
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPC6_RFC4833
|
||||
bool "Support RFC 4833 (Timezones)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC4833
|
||||
depends on BUSYBOX_CONFIG_UDHCPC6
|
||||
help
|
||||
You can request POSIX timezone with "-O tz" and timezone name
|
||||
with "-O timezone".
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCPC6_RFC5970
|
||||
bool "Support RFC 5970 (Network Boot)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCPC6_RFC5970
|
||||
depends on BUSYBOX_CONFIG_UDHCPC6
|
||||
help
|
||||
You can request bootfile-url with "-O bootfile_url" and
|
||||
bootfile-params with "-O bootfile_params".
|
||||
|
||||
comment "Common options for DHCP applets"
|
||||
depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC || BUSYBOX_CONFIG_UDHCPC6 || BUSYBOX_CONFIG_DHCPRELAY
|
||||
|
||||
config BUSYBOX_CONFIG_UDHCPC_DEFAULT_INTERFACE
|
||||
string "Default interface name"
|
||||
default BUSYBOX_DEFAULT_UDHCPC_DEFAULT_INTERFACE
|
||||
depends on BUSYBOX_CONFIG_UDHCPC || BUSYBOX_CONFIG_UDHCPC6
|
||||
help
|
||||
The interface that will be used if no other interface is
|
||||
specified on the commandline.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCP_PORT
|
||||
bool "Enable '-P port' option for udhcpd and udhcpc"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCP_PORT
|
||||
depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC || BUSYBOX_CONFIG_UDHCPC6
|
||||
help
|
||||
At the cost of ~300 bytes, enables -P port option.
|
||||
This feature is typically not needed.
|
||||
|
||||
config BUSYBOX_CONFIG_UDHCP_DEBUG
|
||||
int "Maximum verbosity level (0..9)"
|
||||
default BUSYBOX_DEFAULT_UDHCP_DEBUG
|
||||
range 0 9
|
||||
depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC || BUSYBOX_CONFIG_UDHCPC6 || BUSYBOX_CONFIG_DHCPRELAY
|
||||
help
|
||||
Verbosity can be increased with multiple -v options.
|
||||
This option controls how high it can be cranked up.
|
||||
|
||||
Bigger values result in bigger code. Levels above 1
|
||||
are very verbose and useful for debugging only.
|
||||
|
||||
config BUSYBOX_CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS
|
||||
int "DHCP options slack buffer size"
|
||||
default BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS
|
||||
range 0 924
|
||||
depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC
|
||||
help
|
||||
Some buggy DHCP servers send DHCP offer packets with option
|
||||
field larger than we expect (which might also be considered a
|
||||
buffer overflow attempt). These packets are normally discarded.
|
||||
If circumstances beyond your control force you to support such
|
||||
servers, this may help. The upper limit (924) makes udhcpc accept
|
||||
even 1500 byte packets (maximum-sized ethernet packets).
|
||||
|
||||
This option does not make udhcp[cd] emit non-standard
|
||||
sized packets.
|
||||
|
||||
Known buggy DHCP servers:
|
||||
3Com OfficeConnect Remote 812 ADSL Router:
|
||||
seems to confuse maximum allowed UDP packet size with
|
||||
maximum size of entire IP packet, and sends packets
|
||||
which are 28 bytes too large.
|
||||
Seednet (ISP) VDSL: sends packets 2 bytes too large.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCP_RFC3397
|
||||
bool "Support RFC 3397 domain search options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCP_RFC3397
|
||||
depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC
|
||||
help
|
||||
If selected, both client and server will support passing of domain
|
||||
search lists via option 119, specified in RFC 3397,
|
||||
and SIP servers option 120, specified in RFC 3361.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q
|
||||
bool "Support 802.1Q VLAN parameters options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UDHCP_8021Q
|
||||
depends on BUSYBOX_CONFIG_UDHCPD || BUSYBOX_CONFIG_UDHCPC
|
||||
help
|
||||
If selected, both client and server will support passing of VLAN
|
||||
ID and priority via options 132 and 133 as per 802.1Q.
|
||||
26
package/utils/busybox/config/printutils/Config.in
Normal file
26
package/utils/busybox/config/printutils/Config.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Print Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_LPD
|
||||
bool "lpd (5.5 kb)"
|
||||
default BUSYBOX_DEFAULT_LPD
|
||||
help
|
||||
lpd is a print spooling daemon.
|
||||
config BUSYBOX_CONFIG_LPR
|
||||
bool "lpr (9.9 kb)"
|
||||
default BUSYBOX_DEFAULT_LPR
|
||||
help
|
||||
lpr sends files (or standard input) to a print spooling daemon.
|
||||
|
||||
config BUSYBOX_CONFIG_LPQ
|
||||
bool "lpq (9.9 kb)"
|
||||
default BUSYBOX_DEFAULT_LPQ
|
||||
help
|
||||
lpq is a print spool queue examination and manipulation program.
|
||||
|
||||
endmenu
|
||||
277
package/utils/busybox/config/procps/Config.in
Normal file
277
package/utils/busybox/config/procps/Config.in
Normal file
@@ -0,0 +1,277 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Process Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FAST_TOP
|
||||
bool "Faster /proc scanning code (+100 bytes)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FAST_TOP # all "fast or small" options default to small
|
||||
help
|
||||
This option makes top and ps ~20% faster (or 20% less CPU hungry),
|
||||
but code size is slightly bigger.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
|
||||
bool "Support thread display in ps/pstree/top"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
|
||||
depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
|
||||
help
|
||||
Enables the ps -T option, showing of threads in pstree,
|
||||
and 'h' command in top.
|
||||
|
||||
config BUSYBOX_CONFIG_FREE
|
||||
bool "free (3.1 kb)"
|
||||
default BUSYBOX_DEFAULT_FREE
|
||||
help
|
||||
free displays the total amount of free and used physical and swap
|
||||
memory in the system, as well as the buffers used by the kernel.
|
||||
The shared memory column should be ignored; it is obsolete.
|
||||
config BUSYBOX_CONFIG_FUSER
|
||||
bool "fuser (7 kb)"
|
||||
default BUSYBOX_DEFAULT_FUSER
|
||||
help
|
||||
fuser lists all PIDs (Process IDs) that currently have a given
|
||||
file open. fuser can also list all PIDs that have a given network
|
||||
(TCP or UDP) port open.
|
||||
config BUSYBOX_CONFIG_IOSTAT
|
||||
bool "iostat (7.6 kb)"
|
||||
default BUSYBOX_DEFAULT_IOSTAT
|
||||
help
|
||||
Report CPU and I/O statistics
|
||||
config BUSYBOX_CONFIG_KILL
|
||||
bool "kill (3.1 kb)"
|
||||
default BUSYBOX_DEFAULT_KILL
|
||||
help
|
||||
The command kill sends the specified signal to the specified
|
||||
process or process group. If no signal is specified, the TERM
|
||||
signal is sent.
|
||||
|
||||
config BUSYBOX_CONFIG_KILLALL
|
||||
bool "killall (5.6 kb)"
|
||||
default BUSYBOX_DEFAULT_KILLALL
|
||||
help
|
||||
killall sends a signal to all processes running any of the
|
||||
specified commands. If no signal name is specified, SIGTERM is
|
||||
sent.
|
||||
|
||||
config BUSYBOX_CONFIG_KILLALL5
|
||||
bool "killall5 (5.3 kb)"
|
||||
default BUSYBOX_DEFAULT_KILLALL5
|
||||
help
|
||||
The SystemV killall command. killall5 sends a signal
|
||||
to all processes except kernel threads and the processes
|
||||
in its own session, so it won't kill the shell that is running
|
||||
the script it was called from.
|
||||
config BUSYBOX_CONFIG_LSOF
|
||||
bool "lsof (3.4 kb)"
|
||||
default BUSYBOX_DEFAULT_LSOF
|
||||
help
|
||||
Show open files in the format of:
|
||||
PID <TAB> /path/to/executable <TAB> /path/to/opened/file
|
||||
config BUSYBOX_CONFIG_MPSTAT
|
||||
bool "mpstat (9.8 kb)"
|
||||
default BUSYBOX_DEFAULT_MPSTAT
|
||||
help
|
||||
Per-processor statistics
|
||||
config BUSYBOX_CONFIG_NMETER
|
||||
bool "nmeter (11 kb)"
|
||||
default BUSYBOX_DEFAULT_NMETER
|
||||
help
|
||||
Prints selected system stats continuously, one line per update.
|
||||
config BUSYBOX_CONFIG_PGREP
|
||||
bool "pgrep (6.5 kb)"
|
||||
default BUSYBOX_DEFAULT_PGREP
|
||||
help
|
||||
Look for processes by name.
|
||||
|
||||
config BUSYBOX_CONFIG_PKILL
|
||||
bool "pkill (7.5 kb)"
|
||||
default BUSYBOX_DEFAULT_PKILL
|
||||
help
|
||||
Send signals to processes by name.
|
||||
config BUSYBOX_CONFIG_PIDOF
|
||||
bool "pidof (6.3 kb)"
|
||||
default BUSYBOX_DEFAULT_PIDOF
|
||||
help
|
||||
Pidof finds the process id's (pids) of the named programs. It prints
|
||||
those id's on the standard output.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE
|
||||
bool "Enable single shot (-s)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PIDOF_SINGLE
|
||||
depends on BUSYBOX_CONFIG_PIDOF
|
||||
help
|
||||
Support '-s' for returning only the first pid found.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT
|
||||
bool "Enable omitting pids (-o PID)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PIDOF_OMIT
|
||||
depends on BUSYBOX_CONFIG_PIDOF
|
||||
help
|
||||
Support '-o PID' for omitting the given pid(s) in output.
|
||||
The special pid %PPID can be used to name the parent process
|
||||
of the pidof, in other words the calling shell or shell script.
|
||||
config BUSYBOX_CONFIG_PMAP
|
||||
bool "pmap (6 kb)"
|
||||
default BUSYBOX_DEFAULT_PMAP
|
||||
help
|
||||
Display processes' memory mappings.
|
||||
config BUSYBOX_CONFIG_POWERTOP
|
||||
bool "powertop (9.6 kb)"
|
||||
default BUSYBOX_DEFAULT_POWERTOP
|
||||
help
|
||||
Analyze power consumption on Intel-based laptops
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_POWERTOP_INTERACTIVE
|
||||
bool "Accept keyboard commands"
|
||||
default BUSYBOX_DEFAULT_FEATURE_POWERTOP_INTERACTIVE
|
||||
depends on BUSYBOX_CONFIG_POWERTOP
|
||||
help
|
||||
Without this, powertop will only refresh display every 10 seconds.
|
||||
No keyboard commands will work, only ^C to terminate.
|
||||
config BUSYBOX_CONFIG_PS
|
||||
bool "ps (11 kb)"
|
||||
default BUSYBOX_DEFAULT_PS
|
||||
help
|
||||
ps gives a snapshot of the current processes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PS_WIDE
|
||||
bool "Enable wide output (-w)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PS_WIDE
|
||||
depends on (BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_MINIPS) && !BUSYBOX_CONFIG_DESKTOP
|
||||
help
|
||||
Support argument 'w' for wide output.
|
||||
If given once, 132 chars are printed, and if given more
|
||||
than once, the length is unlimited.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PS_LONG
|
||||
bool "Enable long output (-l)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PS_LONG
|
||||
depends on (BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_MINIPS) && !BUSYBOX_CONFIG_DESKTOP
|
||||
help
|
||||
Support argument 'l' for long output.
|
||||
Adds fields PPID, RSS, START, TIME & TTY
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PS_TIME
|
||||
bool "Enable -o time and -o etime specifiers"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PS_TIME
|
||||
depends on (BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_MINIPS) && BUSYBOX_CONFIG_DESKTOP
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS
|
||||
bool "Support Linux prior to 2.4.0 and non-ELF systems"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PS_UNUSUAL_SYSTEMS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_PS_TIME
|
||||
help
|
||||
Include support for measuring HZ on old kernels and non-ELF systems
|
||||
(if you are on Linux 2.4.0+ and use ELF, you don't need this)
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS
|
||||
bool "Enable -o rgroup, -o ruser, -o nice specifiers"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PS_ADDITIONAL_COLUMNS
|
||||
depends on (BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_MINIPS) && BUSYBOX_CONFIG_DESKTOP
|
||||
config BUSYBOX_CONFIG_PSTREE
|
||||
bool "pstree (9.3 kb)"
|
||||
default BUSYBOX_DEFAULT_PSTREE
|
||||
help
|
||||
Display a tree of processes.
|
||||
config BUSYBOX_CONFIG_PWDX
|
||||
bool "pwdx (3.7 kb)"
|
||||
default BUSYBOX_DEFAULT_PWDX
|
||||
help
|
||||
Report current working directory of a process
|
||||
config BUSYBOX_CONFIG_SMEMCAP
|
||||
bool "smemcap (2.5 kb)"
|
||||
default BUSYBOX_DEFAULT_SMEMCAP
|
||||
help
|
||||
smemcap is a tool for capturing process data for smem,
|
||||
a memory usage statistic tool.
|
||||
config BUSYBOX_CONFIG_BB_SYSCTL
|
||||
bool "sysctl (7.4 kb)"
|
||||
default BUSYBOX_DEFAULT_BB_SYSCTL
|
||||
help
|
||||
Configure kernel parameters at runtime.
|
||||
config BUSYBOX_CONFIG_TOP
|
||||
bool "top (18 kb)"
|
||||
default BUSYBOX_DEFAULT_TOP
|
||||
help
|
||||
The top program provides a dynamic real-time view of a running
|
||||
system.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_INTERACTIVE
|
||||
bool "Accept keyboard commands"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TOP_INTERACTIVE
|
||||
depends on BUSYBOX_CONFIG_TOP
|
||||
help
|
||||
Without this, top will only refresh display every 5 seconds.
|
||||
No keyboard commands will work, only ^C to terminate.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
|
||||
bool "Show CPU per-process usage percentage"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE
|
||||
depends on BUSYBOX_CONFIG_TOP
|
||||
help
|
||||
Make top display CPU usage for each process.
|
||||
This adds about 2k.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
|
||||
bool "Show CPU global usage percentage"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
|
||||
help
|
||||
Makes top display "CPU: NN% usr NN% sys..." line.
|
||||
This adds about 0.5k.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU
|
||||
bool "SMP CPU usage display ('c' key)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_CPU
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS
|
||||
help
|
||||
Allow 'c' key to switch between individual/cumulative CPU stats
|
||||
This adds about 0.5k.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS
|
||||
bool "Show 1/10th of a percent in CPU/mem statistics"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TOP_DECIMALS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
|
||||
help
|
||||
Show 1/10th of a percent in CPU/mem statistics.
|
||||
This adds about 0.3k.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS
|
||||
bool "Show CPU process runs on ('j' field)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TOP_SMP_PROCESS
|
||||
depends on BUSYBOX_CONFIG_TOP
|
||||
help
|
||||
Show CPU where process was last found running on.
|
||||
This is the 'j' field.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TOPMEM
|
||||
bool "Topmem command ('s' key)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TOPMEM
|
||||
depends on BUSYBOX_CONFIG_TOP
|
||||
help
|
||||
Enable 's' in top (gives lots of memory info).
|
||||
config BUSYBOX_CONFIG_UPTIME
|
||||
bool "uptime (3.7 kb)"
|
||||
default BUSYBOX_DEFAULT_UPTIME
|
||||
help
|
||||
uptime gives a one line display of the current time, how long
|
||||
the system has been running, how many users are currently logged
|
||||
on, and the system load averages for the past 1, 5, and 15 minutes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UPTIME_UTMP_SUPPORT
|
||||
bool "Show the number of users"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
|
||||
depends on BUSYBOX_CONFIG_UPTIME && BUSYBOX_CONFIG_FEATURE_UTMP
|
||||
help
|
||||
Display the number of users currently logged on.
|
||||
config BUSYBOX_CONFIG_WATCH
|
||||
bool "watch (4.4 kb)"
|
||||
default BUSYBOX_DEFAULT_WATCH
|
||||
help
|
||||
watch is used to execute a program periodically, showing
|
||||
output to the screen.
|
||||
|
||||
endmenu
|
||||
98
package/utils/busybox/config/runit/Config.in
Normal file
98
package/utils/busybox/config/runit/Config.in
Normal file
@@ -0,0 +1,98 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Runit Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_CHPST
|
||||
bool "chpst (9 kb)"
|
||||
default BUSYBOX_DEFAULT_CHPST
|
||||
help
|
||||
chpst changes the process state according to the given options, and
|
||||
execs specified program.
|
||||
|
||||
config BUSYBOX_CONFIG_SETUIDGID
|
||||
bool "setuidgid (4 kb)"
|
||||
default BUSYBOX_DEFAULT_SETUIDGID
|
||||
help
|
||||
Sets soft resource limits as specified by options
|
||||
|
||||
config BUSYBOX_CONFIG_ENVUIDGID
|
||||
bool "envuidgid (3.9 kb)"
|
||||
default BUSYBOX_DEFAULT_ENVUIDGID
|
||||
help
|
||||
Sets $UID to account's uid and $GID to account's gid
|
||||
|
||||
config BUSYBOX_CONFIG_ENVDIR
|
||||
bool "envdir (2.5 kb)"
|
||||
default BUSYBOX_DEFAULT_ENVDIR
|
||||
help
|
||||
Sets various environment variables as specified by files
|
||||
in the given directory
|
||||
|
||||
config BUSYBOX_CONFIG_SOFTLIMIT
|
||||
bool "softlimit (4.5 kb)"
|
||||
default BUSYBOX_DEFAULT_SOFTLIMIT
|
||||
help
|
||||
Sets soft resource limits as specified by options
|
||||
config BUSYBOX_CONFIG_RUNSV
|
||||
bool "runsv (7.8 kb)"
|
||||
default BUSYBOX_DEFAULT_RUNSV
|
||||
help
|
||||
runsv starts and monitors a service and optionally an appendant log
|
||||
service.
|
||||
config BUSYBOX_CONFIG_RUNSVDIR
|
||||
bool "runsvdir (6.3 kb)"
|
||||
default BUSYBOX_DEFAULT_RUNSVDIR
|
||||
help
|
||||
runsvdir starts a runsv process for each subdirectory, or symlink to
|
||||
a directory, in the services directory dir, up to a limit of 1000
|
||||
subdirectories, and restarts a runsv process if it terminates.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_RUNSVDIR_LOG
|
||||
bool "Enable scrolling argument log"
|
||||
depends on BUSYBOX_CONFIG_RUNSVDIR
|
||||
default BUSYBOX_DEFAULT_FEATURE_RUNSVDIR_LOG
|
||||
help
|
||||
Enable feature where second parameter of runsvdir holds last error
|
||||
message (viewable via top/ps). Otherwise (feature is off
|
||||
or no parameter), error messages go to stderr only.
|
||||
config BUSYBOX_CONFIG_SV
|
||||
bool "sv (8.5 kb)"
|
||||
default BUSYBOX_DEFAULT_SV
|
||||
help
|
||||
sv reports the current status and controls the state of services
|
||||
monitored by the runsv supervisor.
|
||||
|
||||
config BUSYBOX_CONFIG_SV_DEFAULT_SERVICE_DIR
|
||||
string "Default directory for services"
|
||||
default BUSYBOX_DEFAULT_SV_DEFAULT_SERVICE_DIR
|
||||
depends on BUSYBOX_CONFIG_SV || BUSYBOX_CONFIG_SVC || BUSYBOX_CONFIG_SVOK
|
||||
help
|
||||
Default directory for services.
|
||||
Defaults to "/var/service"
|
||||
|
||||
config BUSYBOX_CONFIG_SVC
|
||||
bool "svc (8.4 kb)"
|
||||
default BUSYBOX_DEFAULT_SVC
|
||||
help
|
||||
svc controls the state of services monitored by the runsv supervisor.
|
||||
It is compatible with daemontools command with the same name.
|
||||
|
||||
config BUSYBOX_CONFIG_SVOK
|
||||
bool "svok (1.5 kb)"
|
||||
default BUSYBOX_DEFAULT_SVOK
|
||||
help
|
||||
svok checks whether runsv supervisor is running.
|
||||
It is compatible with daemontools command with the same name.
|
||||
config BUSYBOX_CONFIG_SVLOGD
|
||||
bool "svlogd (16 kb)"
|
||||
default BUSYBOX_DEFAULT_SVLOGD
|
||||
help
|
||||
svlogd continuously reads log data from its standard input, optionally
|
||||
filters log messages, and writes the data to one or more automatically
|
||||
rotated logs.
|
||||
|
||||
endmenu
|
||||
99
package/utils/busybox/config/selinux/Config.in
Normal file
99
package/utils/busybox/config/selinux/Config.in
Normal file
@@ -0,0 +1,99 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "SELinux Utilities"
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
|
||||
config BUSYBOX_CONFIG_CHCON
|
||||
bool "chcon (8.9 kb)"
|
||||
default BUSYBOX_DEFAULT_CHCON
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to change the security context of file.
|
||||
config BUSYBOX_CONFIG_GETENFORCE
|
||||
bool "getenforce (1.7 kb)"
|
||||
default BUSYBOX_DEFAULT_GETENFORCE
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to get the current mode of SELinux.
|
||||
config BUSYBOX_CONFIG_GETSEBOOL
|
||||
bool "getsebool (5.5 kb)"
|
||||
default BUSYBOX_DEFAULT_GETSEBOOL
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to get SELinux boolean values.
|
||||
config BUSYBOX_CONFIG_LOAD_POLICY
|
||||
bool "load_policy (1.6 kb)"
|
||||
default BUSYBOX_DEFAULT_LOAD_POLICY
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to load SELinux policy.
|
||||
config BUSYBOX_CONFIG_MATCHPATHCON
|
||||
bool "matchpathcon (6.1 kb)"
|
||||
default BUSYBOX_DEFAULT_MATCHPATHCON
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to get default security context of the
|
||||
specified path from the file contexts configuration.
|
||||
config BUSYBOX_CONFIG_RUNCON
|
||||
bool "runcon (6.6 kb)"
|
||||
default BUSYBOX_DEFAULT_RUNCON
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to run command in specified security context.
|
||||
config BUSYBOX_CONFIG_SELINUXENABLED
|
||||
bool "selinuxenabled (321 bytes)"
|
||||
default BUSYBOX_DEFAULT_SELINUXENABLED
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support for this command to be used within shell scripts
|
||||
to determine if selinux is enabled.
|
||||
config BUSYBOX_CONFIG_SESTATUS
|
||||
bool "sestatus (12 kb)"
|
||||
default BUSYBOX_DEFAULT_SESTATUS
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Displays the status of SELinux.
|
||||
config BUSYBOX_CONFIG_SETENFORCE
|
||||
bool "setenforce (2.1 kb)"
|
||||
default BUSYBOX_DEFAULT_SETENFORCE
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to modify the mode SELinux is running in.
|
||||
config BUSYBOX_CONFIG_SETFILES
|
||||
bool "setfiles (13 kb)"
|
||||
default BUSYBOX_DEFAULT_SETFILES
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to modify to relabel files.
|
||||
Notice: If you built libselinux with -D_FILE_OFFSET_BITS=64,
|
||||
(It is default in libselinux's Makefile), you _must_ enable
|
||||
CONFIG_LFS.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SETFILES_CHECK_OPTION
|
||||
bool "Enable check option"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SETFILES_CHECK_OPTION
|
||||
depends on BUSYBOX_CONFIG_SETFILES
|
||||
help
|
||||
Support "-c" option (check the validity of the contexts against
|
||||
the specified binary policy) for setfiles. Requires libsepol.
|
||||
|
||||
config BUSYBOX_CONFIG_RESTORECON
|
||||
bool "restorecon (12 kb)"
|
||||
default BUSYBOX_DEFAULT_RESTORECON
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support to relabel files. The feature is almost
|
||||
the same as setfiles, but usage is a little different.
|
||||
config BUSYBOX_CONFIG_SETSEBOOL
|
||||
bool "setsebool (1.7 kb)"
|
||||
default BUSYBOX_DEFAULT_SETSEBOOL
|
||||
depends on BUSYBOX_CONFIG_SELINUX
|
||||
help
|
||||
Enable support for change boolean.
|
||||
semanage and -P option is not supported yet.
|
||||
|
||||
endmenu
|
||||
608
package/utils/busybox/config/shell/Config.in
Normal file
608
package/utils/busybox/config/shell/Config.in
Normal file
@@ -0,0 +1,608 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Shells"
|
||||
|
||||
|
||||
choice
|
||||
prompt "Choose which shell is aliased to 'sh' name"
|
||||
default BUSYBOX_CONFIG_SH_IS_ASH
|
||||
help
|
||||
Choose which shell you want to be executed by 'sh' alias.
|
||||
The ash shell is the most bash compatible and full featured one.
|
||||
|
||||
# note: cannot use "select ASH" here, it breaks "make allnoconfig"
|
||||
config BUSYBOX_CONFIG_SH_IS_ASH
|
||||
depends on !BUSYBOX_CONFIG_NOMMU
|
||||
bool "ash"
|
||||
select BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
Choose ash to be the shell executed by 'sh' name.
|
||||
The ash code will be built into busybox. If you don't select
|
||||
"ash" choice (CONFIG_ASH), this shell may only be invoked by
|
||||
the name 'sh' (and not 'ash').
|
||||
|
||||
config BUSYBOX_CONFIG_SH_IS_HUSH
|
||||
bool "hush"
|
||||
select BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Choose hush to be the shell executed by 'sh' name.
|
||||
The hush code will be built into busybox. If you don't select
|
||||
"hush" choice (CONFIG_HUSH), this shell may only be invoked by
|
||||
the name 'sh' (and not 'hush').
|
||||
|
||||
config BUSYBOX_CONFIG_SH_IS_NONE
|
||||
bool "none"
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Choose which shell is aliased to 'bash' name"
|
||||
default BUSYBOX_CONFIG_BASH_IS_NONE
|
||||
help
|
||||
Choose which shell you want to be executed by 'bash' alias.
|
||||
The ash shell is the most bash compatible and full featured one,
|
||||
although compatibility is far from being complete.
|
||||
|
||||
Note that selecting this option does not switch on any bash
|
||||
compatibility code. It merely makes it possible to install
|
||||
/bin/bash (sym)link and run scripts which start with
|
||||
#!/bin/bash line.
|
||||
|
||||
Many systems use it in scripts which use bash-specific features,
|
||||
even simple ones like $RANDOM. Without this option, busybox
|
||||
can't be used for running them because it won't recongnize
|
||||
"bash" as a supported applet name.
|
||||
|
||||
config BUSYBOX_CONFIG_BASH_IS_ASH
|
||||
depends on !BUSYBOX_CONFIG_NOMMU
|
||||
bool "ash"
|
||||
select BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
Choose ash to be the shell executed by 'bash' name.
|
||||
The ash code will be built into busybox. If you don't select
|
||||
"ash" choice (CONFIG_ASH), this shell may only be invoked by
|
||||
the name 'bash' (and not 'ash').
|
||||
|
||||
config BUSYBOX_CONFIG_BASH_IS_HUSH
|
||||
bool "hush"
|
||||
select BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Choose hush to be the shell executed by 'bash' name.
|
||||
The hush code will be built into busybox. If you don't select
|
||||
"hush" choice (CONFIG_HUSH), this shell may only be invoked by
|
||||
the name 'bash' (and not 'hush').
|
||||
|
||||
config BUSYBOX_CONFIG_BASH_IS_NONE
|
||||
bool "none"
|
||||
|
||||
endchoice
|
||||
|
||||
|
||||
config BUSYBOX_CONFIG_SHELL_ASH
|
||||
bool #hidden option
|
||||
depends on !BUSYBOX_CONFIG_NOMMU
|
||||
|
||||
config BUSYBOX_CONFIG_ASH
|
||||
bool "ash (78 kb)"
|
||||
default BUSYBOX_DEFAULT_ASH
|
||||
depends on !BUSYBOX_CONFIG_NOMMU
|
||||
select BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
The most complete and most pedantically correct shell included with
|
||||
busybox. This shell is actually a derivative of the Debian 'dash'
|
||||
shell (by Herbert Xu), which was created by porting the 'ash' shell
|
||||
(written by Kenneth Almquist) from NetBSD.
|
||||
|
||||
# ash options
|
||||
# note: Don't remove !NOMMU part in the next line; it would break
|
||||
# menuconfig's indenting.
|
||||
if !NOMMU && (BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH)
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
|
||||
bool "Optimize for size instead of speed"
|
||||
default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB
|
||||
bool "Use internal glob() implementation"
|
||||
default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB # Y is bigger, but because of uclibc glob() bug, let Y be default for now
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
Do not use glob() function from libc, use internal implementation.
|
||||
Use this if you are getting "glob.h: No such file or directory"
|
||||
or similar build errors.
|
||||
Note that as of now (2017-01), uclibc and musl glob() both have bugs
|
||||
which would break ash if you select N here.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_BASH_COMPAT
|
||||
bool "bash-compatible extensions"
|
||||
default BUSYBOX_DEFAULT_ASH_BASH_COMPAT
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_BASH_SOURCE_CURDIR
|
||||
bool "'source' and '.' builtins search current directory after $PATH"
|
||||
default BUSYBOX_DEFAULT_ASH_BASH_SOURCE_CURDIR # do not encourage non-standard behavior
|
||||
depends on BUSYBOX_CONFIG_ASH_BASH_COMPAT
|
||||
help
|
||||
This is not compliant with standards. Avoid if possible.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_BASH_NOT_FOUND_HOOK
|
||||
bool "command_not_found_handle hook support"
|
||||
default BUSYBOX_DEFAULT_ASH_BASH_NOT_FOUND_HOOK
|
||||
depends on BUSYBOX_CONFIG_ASH_BASH_COMPAT
|
||||
help
|
||||
Enable support for the 'command_not_found_handle' hook function,
|
||||
from GNU bash, which allows for alternative command not found
|
||||
handling.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_JOB_CONTROL
|
||||
bool "Job control"
|
||||
default BUSYBOX_DEFAULT_ASH_JOB_CONTROL
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_ALIAS
|
||||
bool "Alias support"
|
||||
default BUSYBOX_DEFAULT_ASH_ALIAS
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
|
||||
bool "Pseudorandom generator and $RANDOM variable"
|
||||
default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
Enable pseudorandom generator and dynamic variable "$RANDOM".
|
||||
Each read of "$RANDOM" will generate a new pseudorandom value.
|
||||
You can reset the generator by using a specified start value.
|
||||
After "unset RANDOM" the generator will switch off and this
|
||||
variable will no longer have special treatment.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
|
||||
bool "Expand prompt string"
|
||||
default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
$PS# may contain volatile content, such as backquote commands.
|
||||
This option recreates the prompt string from the environment
|
||||
variable each time it is displayed.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT
|
||||
bool "Idle timeout variable $TMOUT"
|
||||
default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
Enable bash-like auto-logout after $TMOUT seconds of idle time.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_MAIL
|
||||
bool "Check for new mail in interactive shell"
|
||||
default BUSYBOX_DEFAULT_ASH_MAIL
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
Enable "check for new mail" function:
|
||||
if set, $MAIL file and $MAILPATH list of files
|
||||
are checked for mtime changes, and "you have mail"
|
||||
message is printed if change is detected.
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_ECHO
|
||||
bool "echo builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_ECHO
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_PRINTF
|
||||
bool "printf builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_PRINTF
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_TEST
|
||||
bool "test builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_TEST
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_SLEEP
|
||||
bool "sleep builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_SLEEP
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_HELP
|
||||
bool "help builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_HELP
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_GETOPTS
|
||||
bool "getopts builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_GETOPTS
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_CMDCMD
|
||||
bool "command builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_CMDCMD
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
help
|
||||
Enable support for the 'command' builtin, which allows
|
||||
you to run the specified command or builtin,
|
||||
even when there is a function with the same name.
|
||||
|
||||
endif # ash options
|
||||
config BUSYBOX_CONFIG_CTTYHACK
|
||||
bool "cttyhack (2.4 kb)"
|
||||
default BUSYBOX_DEFAULT_CTTYHACK
|
||||
help
|
||||
One common problem reported on the mailing list is the "can't
|
||||
access tty; job control turned off" error message, which typically
|
||||
appears when one tries to use a shell with stdin/stdout on
|
||||
/dev/console.
|
||||
This device is special - it cannot be a controlling tty.
|
||||
|
||||
The proper solution is to use the correct device instead of
|
||||
/dev/console.
|
||||
|
||||
cttyhack provides a "quick and dirty" solution to this problem.
|
||||
It analyzes stdin with various ioctls, trying to determine whether
|
||||
it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
|
||||
On Linux it also checks sysfs for a pointer to the active console.
|
||||
If cttyhack is able to find the real console device, it closes
|
||||
stdin/out/err and reopens that device.
|
||||
Then it executes the given program. Opening the device will make
|
||||
that device a controlling tty. This may require cttyhack
|
||||
to be a session leader.
|
||||
|
||||
Example for /etc/inittab (for busybox init):
|
||||
|
||||
::respawn:/bin/cttyhack /bin/sh
|
||||
|
||||
Starting an interactive shell from boot shell script:
|
||||
|
||||
setsid cttyhack sh
|
||||
|
||||
Giving controlling tty to shell running with PID 1:
|
||||
|
||||
# exec cttyhack sh
|
||||
|
||||
Without cttyhack, you need to know exact tty name,
|
||||
and do something like this:
|
||||
|
||||
# exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
|
||||
|
||||
Starting getty on a controlling tty from a shell script:
|
||||
|
||||
# getty 115200 $(cttyhack)
|
||||
config BUSYBOX_CONFIG_HUSH
|
||||
bool "hush (68 kb)"
|
||||
default BUSYBOX_DEFAULT_HUSH
|
||||
select BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
hush is a small shell. It handles the normal flow control
|
||||
constructs such as if/then/elif/else/fi, for/in/do/done, while loops,
|
||||
case/esac. Redirections, here documents, $((arithmetic))
|
||||
and functions are supported.
|
||||
|
||||
It will compile and work on no-mmu systems.
|
||||
|
||||
It does not handle select, aliases, tilde expansion,
|
||||
&>file and >&file redirection of stdout+stderr.
|
||||
|
||||
config BUSYBOX_CONFIG_SHELL_HUSH
|
||||
bool "Internal shell for embedded script support"
|
||||
default BUSYBOX_DEFAULT_SHELL_HUSH
|
||||
|
||||
# hush options
|
||||
# It's only needed to get "nice" menuconfig indenting.
|
||||
if SHELL_HUSH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_BASH_COMPAT
|
||||
bool "bash-compatible extensions"
|
||||
default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION
|
||||
bool "Brace expansion"
|
||||
default BUSYBOX_DEFAULT_HUSH_BRACE_EXPANSION
|
||||
depends on BUSYBOX_CONFIG_HUSH_BASH_COMPAT
|
||||
help
|
||||
Enable {abc,def} extension.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_BASH_SOURCE_CURDIR
|
||||
bool "'source' and '.' builtins search current directory after $PATH"
|
||||
default BUSYBOX_DEFAULT_HUSH_BASH_SOURCE_CURDIR # do not encourage non-standard behavior
|
||||
depends on BUSYBOX_CONFIG_HUSH_BASH_COMPAT
|
||||
help
|
||||
This is not compliant with standards. Avoid if possible.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_LINENO_VAR
|
||||
bool "$LINENO variable (bashism)"
|
||||
default BUSYBOX_DEFAULT_HUSH_LINENO_VAR
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_INTERACTIVE
|
||||
bool "Interactive mode"
|
||||
default BUSYBOX_DEFAULT_HUSH_INTERACTIVE
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Enable interactive mode (prompt and command editing).
|
||||
Without this, hush simply reads and executes commands
|
||||
from stdin just like a shell script from a file.
|
||||
No prompt, no PS1/PS2 magic shell variables.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_SAVEHISTORY
|
||||
bool "Save command history to .hush_history"
|
||||
default BUSYBOX_DEFAULT_HUSH_SAVEHISTORY
|
||||
depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE && BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_JOB
|
||||
bool "Job control"
|
||||
default BUSYBOX_DEFAULT_HUSH_JOB
|
||||
depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE
|
||||
help
|
||||
Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
|
||||
command (not entire shell), fg/bg builtins work. Without this option,
|
||||
"cmd &" still works by simply spawning a process and immediately
|
||||
prompting for next command (or executing next command in a script),
|
||||
but no separate process group is formed.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_TICK
|
||||
bool "Support command substitution"
|
||||
default BUSYBOX_DEFAULT_HUSH_TICK
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Enable `command` and $(command).
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_IF
|
||||
bool "Support if/then/elif/else/fi"
|
||||
default BUSYBOX_DEFAULT_HUSH_IF
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_LOOPS
|
||||
bool "Support for, while and until loops"
|
||||
default BUSYBOX_DEFAULT_HUSH_LOOPS
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_CASE
|
||||
bool "Support case ... esac statement"
|
||||
default BUSYBOX_DEFAULT_HUSH_CASE
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Enable case ... esac statement. +400 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_FUNCTIONS
|
||||
bool "Support funcname() { commands; } syntax"
|
||||
default BUSYBOX_DEFAULT_HUSH_FUNCTIONS
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Enable support for shell functions. +800 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_LOCAL
|
||||
bool "local builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_LOCAL
|
||||
depends on BUSYBOX_CONFIG_HUSH_FUNCTIONS
|
||||
help
|
||||
Enable support for local variables in functions.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
|
||||
bool "Pseudorandom generator and $RANDOM variable"
|
||||
default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Enable pseudorandom generator and dynamic variable "$RANDOM".
|
||||
Each read of "$RANDOM" will generate a new pseudorandom value.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_MODE_X
|
||||
bool "Support 'hush -x' option and 'set -x' command"
|
||||
default BUSYBOX_DEFAULT_HUSH_MODE_X
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
This instructs hush to print commands before execution.
|
||||
Adds ~300 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_ECHO
|
||||
bool "echo builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_ECHO
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_PRINTF
|
||||
bool "printf builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_PRINTF
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_TEST
|
||||
bool "test builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_TEST
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_HELP
|
||||
bool "help builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_HELP
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_EXPORT
|
||||
bool "export builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_EXPORT
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_EXPORT_N
|
||||
bool "Support 'export -n' option"
|
||||
default BUSYBOX_DEFAULT_HUSH_EXPORT_N
|
||||
depends on BUSYBOX_CONFIG_HUSH_EXPORT
|
||||
help
|
||||
export -n unexports variables. It is a bash extension.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_READONLY
|
||||
bool "readonly builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_READONLY
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Enable support for read-only variables.
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_KILL
|
||||
bool "kill builtin (supports kill %jobspec)"
|
||||
default BUSYBOX_DEFAULT_HUSH_KILL
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_WAIT
|
||||
bool "wait builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_WAIT
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_COMMAND
|
||||
bool "command builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_COMMAND
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_TRAP
|
||||
bool "trap builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_TRAP
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_TYPE
|
||||
bool "type builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_TYPE
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_TIMES
|
||||
bool "times builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_TIMES
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_READ
|
||||
bool "read builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_READ
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_SET
|
||||
bool "set builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_SET
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_UNSET
|
||||
bool "unset builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_UNSET
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_ULIMIT
|
||||
bool "ulimit builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_ULIMIT
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_UMASK
|
||||
bool "umask builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_UMASK
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_GETOPTS
|
||||
bool "getopts builtin"
|
||||
default BUSYBOX_DEFAULT_HUSH_GETOPTS
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_HUSH_MEMLEAK
|
||||
bool "memleak builtin (debugging)"
|
||||
default BUSYBOX_DEFAULT_HUSH_MEMLEAK
|
||||
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
endif # hush options
|
||||
|
||||
|
||||
comment "Options common to all shells"
|
||||
if BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_MATH
|
||||
bool "POSIX math support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_MATH
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Enable math support in the shell via $((...)) syntax.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_MATH_64
|
||||
bool "Extend POSIX math support to 64 bit"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
|
||||
depends on BUSYBOX_CONFIG_FEATURE_SH_MATH
|
||||
help
|
||||
Enable 64-bit math support in the shell. This will make the shell
|
||||
slightly larger, but will allow computation with very large numbers.
|
||||
This is not in POSIX, so do not rely on this in portable code.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_MATH_BASE
|
||||
bool "Support BASE#nnnn literals"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_MATH_BASE
|
||||
depends on BUSYBOX_CONFIG_FEATURE_SH_MATH
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
|
||||
bool "Hide message on interactive shell startup"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Remove the busybox introduction when starting a shell.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
|
||||
bool "Standalone shell"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
This option causes busybox shells to use busybox applets
|
||||
in preference to executables in the PATH whenever possible. For
|
||||
example, entering the command 'ifconfig' into the shell would cause
|
||||
busybox to use the ifconfig busybox applet. Specifying the fully
|
||||
qualified executable name, such as '/sbin/ifconfig' will still
|
||||
execute the /sbin/ifconfig executable on the filesystem. This option
|
||||
is generally used when creating a statically linked version of busybox
|
||||
for use as a rescue shell, in the event that you screw up your system.
|
||||
|
||||
This is implemented by re-execing /proc/self/exe (typically)
|
||||
with right parameters.
|
||||
|
||||
However, there are drawbacks: it is problematic in chroot jails
|
||||
without mounted /proc, and ps/top may show command name as 'exe'
|
||||
for applets started this way.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
|
||||
bool "Run 'nofork' applets directly"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
This option causes busybox shells to not execute typical
|
||||
fork/exec/wait sequence, but call <applet>_main directly,
|
||||
if possible. (Sometimes it is not possible: for example,
|
||||
this is not possible in pipes).
|
||||
|
||||
This will be done only for some applets (those which are marked
|
||||
NOFORK in include/applets.h).
|
||||
|
||||
This may significantly speed up some shell scripts.
|
||||
|
||||
This feature is relatively new. Use with care. Report bugs
|
||||
to project mailing list.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_READ_FRAC
|
||||
bool "read -t N.NNN support (+110 bytes)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_READ_FRAC
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Enable support for fractional second timeout in read builtin.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE
|
||||
bool "Use $HISTFILESIZE"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
This option makes busybox shells to use $HISTFILESIZE variable
|
||||
to set shell history size. Note that its max value is capped
|
||||
by "History size" setting in library tuning section.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS
|
||||
bool "Embed scripts in the binary"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SH_EMBEDDED_SCRIPTS
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
||||
help
|
||||
Allow scripts to be compressed and embedded in the busybox
|
||||
binary. The scripts should be placed in the 'embed' directory
|
||||
at build time. Like applets, scripts can be run as
|
||||
'busybox SCRIPT ...' or by linking their name to the binary.
|
||||
|
||||
This also allows applets to be implemented as scripts: place
|
||||
the script in 'applets_sh' and a stub C file containing
|
||||
configuration in the appropriate subsystem directory.
|
||||
|
||||
endif # Options common to all shells
|
||||
|
||||
endmenu
|
||||
171
package/utils/busybox/config/sysklogd/Config.in
Normal file
171
package/utils/busybox/config/sysklogd/Config.in
Normal file
@@ -0,0 +1,171 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "System Logging Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_KLOGD
|
||||
bool "klogd (5.7 kb)"
|
||||
default BUSYBOX_DEFAULT_KLOGD
|
||||
help
|
||||
klogd is a utility which intercepts and logs all
|
||||
messages from the Linux kernel and sends the messages
|
||||
out to the 'syslogd' utility so they can be logged. If
|
||||
you wish to record the messages produced by the kernel,
|
||||
you should enable this option.
|
||||
|
||||
comment "klogd should not be used together with syslog to kernel printk buffer"
|
||||
depends on BUSYBOX_CONFIG_KLOGD && BUSYBOX_CONFIG_FEATURE_KMSG_SYSLOG
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_KLOGD_KLOGCTL
|
||||
bool "Use the klogctl() interface"
|
||||
default BUSYBOX_DEFAULT_FEATURE_KLOGD_KLOGCTL
|
||||
depends on BUSYBOX_CONFIG_KLOGD
|
||||
help
|
||||
The klogd applet supports two interfaces for reading
|
||||
kernel messages. Linux provides the klogctl() interface
|
||||
which allows reading messages from the kernel ring buffer
|
||||
independently from the file system.
|
||||
|
||||
If you answer 'N' here, klogd will use the more portable
|
||||
approach of reading them from /proc or a device node.
|
||||
However, this method requires the file to be available.
|
||||
|
||||
If in doubt, say 'Y'.
|
||||
config BUSYBOX_CONFIG_LOGGER
|
||||
bool "logger (6.3 kb)"
|
||||
default BUSYBOX_DEFAULT_LOGGER
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
The logger utility allows you to send arbitrary text
|
||||
messages to the system log (i.e. the 'syslogd' utility) so
|
||||
they can be logged. This is generally used to help locate
|
||||
problems that occur within programs and scripts.
|
||||
config BUSYBOX_CONFIG_LOGREAD
|
||||
bool "logread (4.8 kb)"
|
||||
default BUSYBOX_DEFAULT_LOGREAD
|
||||
help
|
||||
If you enabled Circular Buffer support, you almost
|
||||
certainly want to enable this feature as well. This
|
||||
utility will allow you to read the messages that are
|
||||
stored in the syslogd circular buffer.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING
|
||||
bool "Double buffering"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LOGREAD_REDUCED_LOCKING
|
||||
depends on BUSYBOX_CONFIG_LOGREAD
|
||||
help
|
||||
'logread' output to slow serial terminals can have
|
||||
side effects on syslog because of the semaphore.
|
||||
This option make logread to double buffer copy
|
||||
from circular buffer, minimizing semaphore
|
||||
contention at some minor memory expense.
|
||||
|
||||
config BUSYBOX_CONFIG_SYSLOGD
|
||||
bool "syslogd (13 kb)"
|
||||
default BUSYBOX_DEFAULT_SYSLOGD
|
||||
help
|
||||
The syslogd utility is used to record logs of all the
|
||||
significant events that occur on a system. Every
|
||||
message that is logged records the date and time of the
|
||||
event, and will generally also record the name of the
|
||||
application that generated the message. When used in
|
||||
conjunction with klogd, messages from the Linux kernel
|
||||
can also be recorded. This is terribly useful,
|
||||
especially for finding what happened when something goes
|
||||
wrong. And something almost always will go wrong if
|
||||
you wait long enough....
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ROTATE_LOGFILE
|
||||
bool "Rotate message files"
|
||||
default BUSYBOX_DEFAULT_FEATURE_ROTATE_LOGFILE
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
help
|
||||
This enables syslogd to rotate the message files
|
||||
on his own. No need to use an external rotate script.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_REMOTE_LOG
|
||||
bool "Remote Log support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_REMOTE_LOG
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
help
|
||||
When you enable this feature, the syslogd utility can
|
||||
be used to send system log messages to another system
|
||||
connected via a network. This allows the remote
|
||||
machine to log all the system messages, which can be
|
||||
terribly useful for reducing the number of serial
|
||||
cables you use. It can also be a very good security
|
||||
measure to prevent system logs from being tampered with
|
||||
by an intruder.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SYSLOGD_DUP
|
||||
bool "Support -D (drop dups) option"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SYSLOGD_DUP
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
help
|
||||
Option -D instructs syslogd to drop consecutive messages
|
||||
which are totally the same.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SYSLOGD_CFG
|
||||
bool "Support syslog.conf"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SYSLOGD_CFG
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
help
|
||||
Supports restricted syslogd config. See docs/syslog.conf.txt
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS
|
||||
bool "Include milliseconds in timestamps"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
help
|
||||
Includes milliseconds (HH:MM:SS.mmm) in timestamp when
|
||||
timestamps are added.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE
|
||||
int "Read buffer size in bytes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SYSLOGD_READ_BUFFER_SIZE
|
||||
range 256 20000
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
help
|
||||
This option sets the size of the syslog read buffer.
|
||||
Actual memory usage increases around five times the
|
||||
change done here.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG
|
||||
bool "Circular Buffer support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_IPC_SYSLOG
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
help
|
||||
When you enable this feature, the syslogd utility will
|
||||
use a circular buffer to record system log messages.
|
||||
When the buffer is filled it will continue to overwrite
|
||||
the oldest messages. This can be very useful for
|
||||
systems with little or no permanent storage, since
|
||||
otherwise system logs can eventually fill up your
|
||||
entire filesystem, which may cause your system to
|
||||
break badly.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE
|
||||
int "Circular buffer size in Kbytes (minimum 4KB)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_IPC_SYSLOG_BUFFER_SIZE
|
||||
range 4 2147483647
|
||||
depends on BUSYBOX_CONFIG_FEATURE_IPC_SYSLOG
|
||||
help
|
||||
This option sets the size of the circular buffer
|
||||
used to record system log messages.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_KMSG_SYSLOG
|
||||
bool "Linux kernel printk buffer support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_KMSG_SYSLOG
|
||||
depends on BUSYBOX_CONFIG_SYSLOGD
|
||||
help
|
||||
When you enable this feature, the syslogd utility will
|
||||
write system log message to the Linux kernel's printk buffer.
|
||||
This can be used as a smaller alternative to the syslogd IPC
|
||||
support, as klogd and logread aren't needed.
|
||||
|
||||
NOTICE: Syslog facilities in log entries needs kernel 3.5+.
|
||||
|
||||
endmenu
|
||||
955
package/utils/busybox/config/util-linux/Config.in
Normal file
955
package/utils/busybox/config/util-linux/Config.in
Normal file
@@ -0,0 +1,955 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "Linux System Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_ACPID
|
||||
bool "acpid (9 kb)"
|
||||
default BUSYBOX_DEFAULT_ACPID
|
||||
help
|
||||
acpid listens to ACPI events coming either in textual form from
|
||||
/proc/acpi/event (though it is marked deprecated it is still widely
|
||||
used and _is_ a standard) or in binary form from specified evdevs
|
||||
(just use /dev/input/event*).
|
||||
|
||||
It parses the event to retrieve ACTION and a possible PARAMETER.
|
||||
It then spawns /etc/acpi/<ACTION>[/<PARAMETER>] either via run-parts
|
||||
(if the resulting path is a directory) or directly as an executable.
|
||||
|
||||
N.B. acpid relies on run-parts so have the latter installed.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ACPID_COMPAT
|
||||
bool "Accept and ignore redundant options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_ACPID_COMPAT
|
||||
depends on BUSYBOX_CONFIG_ACPID
|
||||
help
|
||||
Accept and ignore compatibility options -g -m -s -S -v.
|
||||
config BUSYBOX_CONFIG_BLKDISCARD
|
||||
bool "blkdiscard (4.3 kb)"
|
||||
default BUSYBOX_DEFAULT_BLKDISCARD
|
||||
help
|
||||
blkdiscard discards sectors on a given device.
|
||||
config BUSYBOX_CONFIG_BLKID
|
||||
bool "blkid (12 kb)"
|
||||
default BUSYBOX_DEFAULT_BLKID
|
||||
select BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
Lists labels and UUIDs of all filesystems.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_BLKID_TYPE
|
||||
bool "Print filesystem type"
|
||||
default BUSYBOX_DEFAULT_FEATURE_BLKID_TYPE
|
||||
depends on BUSYBOX_CONFIG_BLKID
|
||||
help
|
||||
Show TYPE="filesystem type"
|
||||
config BUSYBOX_CONFIG_BLOCKDEV
|
||||
bool "blockdev (2.3 kb)"
|
||||
default BUSYBOX_DEFAULT_BLOCKDEV
|
||||
help
|
||||
Performs some ioctls with block devices.
|
||||
config BUSYBOX_CONFIG_CAL
|
||||
bool "cal (5.8 kb)"
|
||||
default BUSYBOX_DEFAULT_CAL
|
||||
help
|
||||
cal is used to display a monthly calendar.
|
||||
config BUSYBOX_CONFIG_CHRT
|
||||
bool "chrt (4.7 kb)"
|
||||
default BUSYBOX_DEFAULT_CHRT
|
||||
help
|
||||
Manipulate real-time attributes of a process.
|
||||
This requires sched_{g,s}etparam support in your libc.
|
||||
config BUSYBOX_CONFIG_DMESG
|
||||
bool "dmesg (3.7 kb)"
|
||||
default BUSYBOX_DEFAULT_DMESG
|
||||
help
|
||||
dmesg is used to examine or control the kernel ring buffer. When the
|
||||
Linux kernel prints messages to the system log, they are stored in
|
||||
the kernel ring buffer. You can use dmesg to print the kernel's ring
|
||||
buffer, clear the kernel ring buffer, change the size of the kernel
|
||||
ring buffer, and change the priority level at which kernel messages
|
||||
are also logged to the system console. Enable this option if you
|
||||
wish to enable the 'dmesg' utility.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY
|
||||
bool "Pretty output"
|
||||
default BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY
|
||||
depends on BUSYBOX_CONFIG_DMESG
|
||||
help
|
||||
If you wish to scrub the syslog level from the output, say 'Y' here.
|
||||
The syslog level is a string prefixed to every line with the form
|
||||
"<#>".
|
||||
|
||||
With this option you will see:
|
||||
# dmesg
|
||||
Linux version 2.6.17.4 .....
|
||||
BIOS-provided physical RAM map:
|
||||
BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
|
||||
|
||||
Without this option you will see:
|
||||
# dmesg
|
||||
<5>Linux version 2.6.17.4 .....
|
||||
<6>BIOS-provided physical RAM map:
|
||||
<6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
|
||||
config BUSYBOX_CONFIG_EJECT
|
||||
bool "eject (4 kb)"
|
||||
default BUSYBOX_DEFAULT_EJECT
|
||||
help
|
||||
Used to eject cdroms. (defaults to /dev/cdrom)
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EJECT_SCSI
|
||||
bool "SCSI support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_EJECT_SCSI
|
||||
depends on BUSYBOX_CONFIG_EJECT
|
||||
help
|
||||
Add the -s option to eject, this allows to eject SCSI-Devices and
|
||||
usb-storage devices.
|
||||
config BUSYBOX_CONFIG_FALLOCATE
|
||||
bool "fallocate (4.1 kb)"
|
||||
default BUSYBOX_DEFAULT_FALLOCATE
|
||||
help
|
||||
Preallocate space for files.
|
||||
config BUSYBOX_CONFIG_FATATTR
|
||||
bool "fatattr (1.9 kb)"
|
||||
default BUSYBOX_DEFAULT_FATATTR
|
||||
help
|
||||
fatattr lists or changes the file attributes on a fat file system.
|
||||
config BUSYBOX_CONFIG_FBSET
|
||||
bool "fbset (5.9 kb)"
|
||||
default BUSYBOX_DEFAULT_FBSET
|
||||
help
|
||||
fbset is used to show or change the settings of a Linux frame buffer
|
||||
device. The frame buffer device provides a simple and unique
|
||||
interface to access a graphics display. Enable this option
|
||||
if you wish to enable the 'fbset' utility.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FBSET_FANCY
|
||||
bool "Enable extra options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FBSET_FANCY
|
||||
depends on BUSYBOX_CONFIG_FBSET
|
||||
help
|
||||
This option enables extended fbset options, allowing one to set the
|
||||
framebuffer size, color depth, etc. interface to access a graphics
|
||||
display. Enable this option if you wish to enable extended fbset
|
||||
options.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE
|
||||
bool "Enable readmode support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE
|
||||
depends on BUSYBOX_CONFIG_FBSET
|
||||
help
|
||||
This option allows fbset to read the video mode database stored by
|
||||
default BUSYBOX_DEFAULT_FEATURE_FBSET_READMODE /etc/fb.modes, which can be used to set frame buffer
|
||||
device to pre-defined video modes.
|
||||
config BUSYBOX_CONFIG_FDFORMAT
|
||||
bool "fdformat (4.4 kb)"
|
||||
default BUSYBOX_DEFAULT_FDFORMAT
|
||||
help
|
||||
fdformat is used to low-level format a floppy disk.
|
||||
config BUSYBOX_CONFIG_FDISK
|
||||
bool "fdisk (37 kb)"
|
||||
default BUSYBOX_DEFAULT_FDISK
|
||||
help
|
||||
The fdisk utility is used to divide hard disks into one or more
|
||||
logical disks, which are generally called partitions. This utility
|
||||
can be used to list and edit the set of partitions or BSD style
|
||||
'disk slices' that are defined on a hard drive.
|
||||
|
||||
config BUSYBOX_CONFIG_FDISK_SUPPORT_LARGE_DISKS
|
||||
bool "Support over 4GB disks"
|
||||
default BUSYBOX_DEFAULT_FDISK_SUPPORT_LARGE_DISKS
|
||||
depends on BUSYBOX_CONFIG_FDISK
|
||||
depends on !BUSYBOX_CONFIG_LFS # with LFS no special code is needed
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
bool "Write support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FDISK_WRITABLE
|
||||
depends on BUSYBOX_CONFIG_FDISK
|
||||
help
|
||||
Enabling this option allows you to create or change a partition table
|
||||
and write those changes out to disk. If you leave this option
|
||||
disabled, you will only be able to view the partition table.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_AIX_LABEL
|
||||
bool "Support AIX disklabels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_AIX_LABEL
|
||||
depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
help
|
||||
Enabling this option allows you to create or change AIX disklabels.
|
||||
Most people can safely leave this option disabled.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SGI_LABEL
|
||||
bool "Support SGI disklabels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SGI_LABEL
|
||||
depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
help
|
||||
Enabling this option allows you to create or change SGI disklabels.
|
||||
Most people can safely leave this option disabled.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SUN_LABEL
|
||||
bool "Support SUN disklabels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SUN_LABEL
|
||||
depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
help
|
||||
Enabling this option allows you to create or change SUN disklabels.
|
||||
Most people can safely leave this option disabled.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_OSF_LABEL
|
||||
bool "Support BSD disklabels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_OSF_LABEL
|
||||
depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
help
|
||||
Enabling this option allows you to create or change BSD disklabels
|
||||
and define and edit BSD disk slices.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_GPT_LABEL
|
||||
bool "Support GPT disklabels"
|
||||
default BUSYBOX_DEFAULT_FEATURE_GPT_LABEL
|
||||
depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
help
|
||||
Enabling this option allows you to view GUID Partition Table
|
||||
disklabels.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED
|
||||
bool "Support expert mode"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FDISK_ADVANCED
|
||||
depends on BUSYBOX_CONFIG_FDISK && BUSYBOX_CONFIG_FEATURE_FDISK_WRITABLE
|
||||
help
|
||||
Enabling this option allows you to do terribly unsafe things like
|
||||
define arbitrary drive geometry, move the beginning of data in a
|
||||
partition, and similarly evil things. Unless you have a very good
|
||||
reason you would be wise to leave this disabled.
|
||||
config BUSYBOX_CONFIG_FINDFS
|
||||
bool "findfs (12 kb)"
|
||||
default BUSYBOX_DEFAULT_FINDFS
|
||||
select BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
Prints the name of a filesystem with given label or UUID.
|
||||
config BUSYBOX_CONFIG_FLOCK
|
||||
bool "flock (6.3 kb)"
|
||||
default BUSYBOX_DEFAULT_FLOCK
|
||||
help
|
||||
Manage locks from shell scripts
|
||||
config BUSYBOX_CONFIG_FDFLUSH
|
||||
bool "fdflush (1.3 kb)"
|
||||
default BUSYBOX_DEFAULT_FDFLUSH
|
||||
help
|
||||
fdflush is only needed when changing media on slightly-broken
|
||||
removable media drives. It is used to make Linux believe that a
|
||||
hardware disk-change switch has been actuated, which causes Linux to
|
||||
forget anything it has cached from the previous media. If you have
|
||||
such a slightly-broken drive, you will need to run fdflush every time
|
||||
you change a disk. Most people have working hardware and can safely
|
||||
leave this disabled.
|
||||
|
||||
config BUSYBOX_CONFIG_FREERAMDISK
|
||||
bool "freeramdisk (1.3 kb)"
|
||||
default BUSYBOX_DEFAULT_FREERAMDISK
|
||||
help
|
||||
Linux allows you to create ramdisks. This utility allows you to
|
||||
delete them and completely free all memory that was used for the
|
||||
ramdisk. For example, if you boot Linux into a ramdisk and later
|
||||
pivot_root, you may want to free the memory that is allocated to the
|
||||
ramdisk. If you have no use for freeing memory from a ramdisk, leave
|
||||
this disabled.
|
||||
config BUSYBOX_CONFIG_FSCK_MINIX
|
||||
bool "fsck.minix (13 kb)"
|
||||
default BUSYBOX_DEFAULT_FSCK_MINIX
|
||||
help
|
||||
The minix filesystem is a nice, small, compact, read-write filesystem
|
||||
with little overhead. It is not a journaling filesystem however and
|
||||
can experience corruption if it is not properly unmounted or if the
|
||||
power goes off in the middle of a write. This utility allows you to
|
||||
check for and attempt to repair any corruption that occurs to a minix
|
||||
filesystem.
|
||||
config BUSYBOX_CONFIG_FSFREEZE
|
||||
bool "fsfreeze (3.5 kb)"
|
||||
default BUSYBOX_DEFAULT_FSFREEZE
|
||||
select BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Halt new accesses and flush writes on a mounted filesystem.
|
||||
config BUSYBOX_CONFIG_FSTRIM
|
||||
bool "fstrim (4.4 kb)"
|
||||
default BUSYBOX_DEFAULT_FSTRIM
|
||||
help
|
||||
Discard unused blocks on a mounted filesystem.
|
||||
config BUSYBOX_CONFIG_GETOPT
|
||||
bool "getopt (5.8 kb)"
|
||||
default BUSYBOX_DEFAULT_GETOPT
|
||||
help
|
||||
The getopt utility is used to break up (parse) options in command
|
||||
lines to make it easy to write complex shell scripts that also check
|
||||
for legal (and illegal) options. If you want to write horribly
|
||||
complex shell scripts, or use some horribly complex shell script
|
||||
written by others, this utility may be for you. Most people will
|
||||
wisely leave this disabled.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_GETOPT_LONG
|
||||
bool "Support -l LONGOPTs"
|
||||
default BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
|
||||
depends on BUSYBOX_CONFIG_GETOPT && BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Enable support for long options (option -l).
|
||||
config BUSYBOX_CONFIG_HEXDUMP
|
||||
bool "hexdump (8.6 kb)"
|
||||
default BUSYBOX_DEFAULT_HEXDUMP
|
||||
help
|
||||
The hexdump utility is used to display binary data in a readable
|
||||
way that is comparable to the output from most hex editors.
|
||||
|
||||
config BUSYBOX_CONFIG_HD
|
||||
bool "hd (7.8 kb)"
|
||||
default BUSYBOX_DEFAULT_HD
|
||||
help
|
||||
hd is an alias to hexdump -C.
|
||||
config BUSYBOX_CONFIG_XXD
|
||||
bool "xxd (8.9 kb)"
|
||||
default BUSYBOX_DEFAULT_XXD
|
||||
help
|
||||
The xxd utility is used to display binary data in a readable
|
||||
way that is comparable to the output from most hex editors.
|
||||
config BUSYBOX_CONFIG_HWCLOCK
|
||||
bool "hwclock (5.8 kb)"
|
||||
default BUSYBOX_DEFAULT_HWCLOCK
|
||||
help
|
||||
The hwclock utility is used to read and set the hardware clock
|
||||
on a system. This is primarily used to set the current time on
|
||||
shutdown in the hardware clock, so the hardware will keep the
|
||||
correct time when Linux is _not_ running.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS
|
||||
bool "Use FHS /var/lib/hwclock/adjtime"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HWCLOCK_ADJTIME_FHS # util-linux-ng in Fedora 13 still uses /etc/adjtime
|
||||
depends on BUSYBOX_CONFIG_HWCLOCK
|
||||
help
|
||||
Starting with FHS 2.3, the adjtime state file is supposed to exist
|
||||
at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish
|
||||
to use the FHS behavior, answer Y here, otherwise answer N for the
|
||||
classic /etc/adjtime path.
|
||||
|
||||
pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
|
||||
config BUSYBOX_CONFIG_IONICE
|
||||
bool "ionice (3.8 kb)"
|
||||
default BUSYBOX_DEFAULT_IONICE
|
||||
help
|
||||
Set/set program io scheduling class and priority
|
||||
Requires kernel >= 2.6.13
|
||||
config BUSYBOX_CONFIG_IPCRM
|
||||
bool "ipcrm (3.2 kb)"
|
||||
default BUSYBOX_DEFAULT_IPCRM
|
||||
help
|
||||
The ipcrm utility allows the removal of System V interprocess
|
||||
communication (IPC) objects and the associated data structures
|
||||
from the system.
|
||||
config BUSYBOX_CONFIG_IPCS
|
||||
bool "ipcs (11 kb)"
|
||||
default BUSYBOX_DEFAULT_IPCS
|
||||
help
|
||||
The ipcs utility is used to provide information on the currently
|
||||
allocated System V interprocess (IPC) objects in the system.
|
||||
config BUSYBOX_CONFIG_LAST
|
||||
bool "last (6.1 kb)"
|
||||
default BUSYBOX_DEFAULT_LAST
|
||||
depends on BUSYBOX_CONFIG_FEATURE_WTMP
|
||||
help
|
||||
'last' displays a list of the last users that logged into the system.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_LAST_FANCY
|
||||
bool "Output extra information"
|
||||
default BUSYBOX_DEFAULT_FEATURE_LAST_FANCY
|
||||
depends on BUSYBOX_CONFIG_LAST
|
||||
help
|
||||
'last' displays detailed information about the last users that
|
||||
logged into the system (mimics sysvinit last). +900 bytes.
|
||||
config BUSYBOX_CONFIG_LOSETUP
|
||||
bool "losetup (5.5 kb)"
|
||||
default BUSYBOX_DEFAULT_LOSETUP
|
||||
help
|
||||
losetup is used to associate or detach a loop device with a regular
|
||||
file or block device, and to query the status of a loop device. This
|
||||
version does not currently support enabling data encryption.
|
||||
config BUSYBOX_CONFIG_LSPCI
|
||||
bool "lspci (6.3 kb)"
|
||||
default BUSYBOX_DEFAULT_LSPCI
|
||||
help
|
||||
lspci is a utility for displaying information about PCI buses in the
|
||||
system and devices connected to them.
|
||||
|
||||
This version uses sysfs (/sys/bus/pci/devices) only.
|
||||
config BUSYBOX_CONFIG_LSUSB
|
||||
bool "lsusb (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_LSUSB
|
||||
help
|
||||
lsusb is a utility for displaying information about USB buses in the
|
||||
system and devices connected to them.
|
||||
|
||||
This version uses sysfs (/sys/bus/usb/devices) only.
|
||||
config BUSYBOX_CONFIG_MDEV
|
||||
bool "mdev (17 kb)"
|
||||
default BUSYBOX_DEFAULT_MDEV
|
||||
help
|
||||
mdev is a mini-udev implementation for dynamically creating device
|
||||
nodes in the /dev directory.
|
||||
|
||||
For more information, please see docs/mdev.txt
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_CONF
|
||||
bool "Support /etc/mdev.conf"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MDEV_CONF
|
||||
depends on BUSYBOX_CONFIG_MDEV
|
||||
help
|
||||
Add support for the mdev config file to control ownership and
|
||||
permissions of the device nodes.
|
||||
|
||||
For more information, please see docs/mdev.txt
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
|
||||
bool "Support subdirs/symlinks"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME
|
||||
depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
|
||||
help
|
||||
Add support for renaming devices and creating symlinks.
|
||||
|
||||
For more information, please see docs/mdev.txt
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_RENAME_REGEXP
|
||||
bool "Support regular expressions substitutions when renaming device"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME_REGEXP
|
||||
depends on BUSYBOX_CONFIG_FEATURE_MDEV_RENAME
|
||||
help
|
||||
Add support for regular expressions substitutions when renaming
|
||||
device.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_EXEC
|
||||
bool "Support command execution at device addition/removal"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MDEV_EXEC
|
||||
depends on BUSYBOX_CONFIG_FEATURE_MDEV_CONF
|
||||
help
|
||||
This adds support for an optional field to /etc/mdev.conf for
|
||||
executing commands when devices are created/removed.
|
||||
|
||||
For more information, please see docs/mdev.txt
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_LOAD_FIRMWARE
|
||||
bool "Support loading of firmware"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MDEV_LOAD_FIRMWARE
|
||||
depends on BUSYBOX_CONFIG_MDEV
|
||||
help
|
||||
Some devices need to load firmware before they can be usable.
|
||||
|
||||
These devices will request userspace look up the files in
|
||||
/lib/firmware/ and if it exists, send it to the kernel for
|
||||
loading into the hardware.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MDEV_DAEMON
|
||||
bool "Support daemon mode"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MDEV_DAEMON
|
||||
depends on BUSYBOX_CONFIG_MDEV
|
||||
help
|
||||
Adds the -d option to run mdev in daemon mode handling hotplug
|
||||
events from the kernel like udev. If the system generates many
|
||||
hotplug events this mode of operation will consume less
|
||||
resources than registering mdev as hotplug helper or using the
|
||||
uevent applet.
|
||||
config BUSYBOX_CONFIG_MESG
|
||||
bool "mesg (1.4 kb)"
|
||||
default BUSYBOX_DEFAULT_MESG
|
||||
help
|
||||
Mesg controls access to your terminal by others. It is typically
|
||||
used to allow or disallow other users to write to your terminal
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP
|
||||
bool "Enable writing to tty only by group, not by everybody"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MESG_ENABLE_ONLY_GROUP
|
||||
depends on BUSYBOX_CONFIG_MESG
|
||||
help
|
||||
Usually, ttys are owned by group "tty", and "write" tool is
|
||||
setgid to this group. This way, "mesg y" only needs to enable
|
||||
"write by owning group" bit in tty mode.
|
||||
|
||||
If you set this option to N, "mesg y" will enable writing
|
||||
by anybody at all. This is not recommended.
|
||||
config BUSYBOX_CONFIG_MKE2FS
|
||||
bool "mke2fs (10 kb)"
|
||||
default BUSYBOX_DEFAULT_MKE2FS
|
||||
help
|
||||
Utility to create EXT2 filesystems.
|
||||
|
||||
config BUSYBOX_CONFIG_MKFS_EXT2
|
||||
bool "mkfs.ext2 (10 kb)"
|
||||
default BUSYBOX_DEFAULT_MKFS_EXT2
|
||||
help
|
||||
Alias to "mke2fs".
|
||||
config BUSYBOX_CONFIG_MKFS_MINIX
|
||||
bool "mkfs.minix (10 kb)"
|
||||
default BUSYBOX_DEFAULT_MKFS_MINIX
|
||||
help
|
||||
The minix filesystem is a nice, small, compact, read-write filesystem
|
||||
with little overhead. If you wish to be able to create minix
|
||||
filesystems this utility will do the job for you.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MINIX2
|
||||
bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MINIX2
|
||||
depends on BUSYBOX_CONFIG_FSCK_MINIX || BUSYBOX_CONFIG_MKFS_MINIX
|
||||
help
|
||||
If you wish to be able to create version 2 minix filesystems, enable
|
||||
this. If you enabled 'mkfs_minix' then you almost certainly want to
|
||||
be using the version 2 filesystem support.
|
||||
config BUSYBOX_CONFIG_MKFS_REISER
|
||||
bool "mkfs_reiser"
|
||||
default BUSYBOX_DEFAULT_MKFS_REISER
|
||||
help
|
||||
Utility to create ReiserFS filesystems.
|
||||
Note: this applet needs a lot of testing and polishing.
|
||||
config BUSYBOX_CONFIG_MKDOSFS
|
||||
bool "mkdosfs (7.2 kb)"
|
||||
default BUSYBOX_DEFAULT_MKDOSFS
|
||||
help
|
||||
Utility to create FAT32 filesystems.
|
||||
|
||||
config BUSYBOX_CONFIG_MKFS_VFAT
|
||||
bool "mkfs.vfat (7.2 kb)"
|
||||
default BUSYBOX_DEFAULT_MKFS_VFAT
|
||||
help
|
||||
Alias to "mkdosfs".
|
||||
config BUSYBOX_CONFIG_MKSWAP
|
||||
bool "mkswap (6.3 kb)"
|
||||
default BUSYBOX_DEFAULT_MKSWAP
|
||||
help
|
||||
The mkswap utility is used to configure a file or disk partition as
|
||||
Linux swap space. This allows Linux to use the entire file or
|
||||
partition as if it were additional RAM, which can greatly increase
|
||||
the capability of low-memory machines. This additional memory is
|
||||
much slower than real RAM, but can be very helpful at preventing your
|
||||
applications being killed by the Linux out of memory (OOM) killer.
|
||||
Once you have created swap space using 'mkswap' you need to enable
|
||||
the swap space using the 'swapon' utility.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID
|
||||
bool "UUID support"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MKSWAP_UUID
|
||||
depends on BUSYBOX_CONFIG_MKSWAP
|
||||
help
|
||||
Generate swap spaces with universally unique identifiers.
|
||||
config BUSYBOX_CONFIG_MORE
|
||||
bool "more (7 kb)"
|
||||
default BUSYBOX_DEFAULT_MORE
|
||||
help
|
||||
more is a simple utility which allows you to read text one screen
|
||||
sized page at a time. If you want to read text that is larger than
|
||||
the screen, and you are using anything faster than a 300 baud modem,
|
||||
you will probably find this utility very helpful. If you don't have
|
||||
any need to reading text files, you can leave this disabled.
|
||||
config BUSYBOX_CONFIG_MOUNT
|
||||
bool "mount (23 kb)"
|
||||
default BUSYBOX_DEFAULT_MOUNT
|
||||
help
|
||||
All files and filesystems in Unix are arranged into one big directory
|
||||
tree. The 'mount' utility is used to graft a filesystem onto a
|
||||
particular part of the tree. A filesystem can either live on a block
|
||||
device, or it can be accessible over the network, as is the case with
|
||||
NFS filesystems.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
|
||||
bool "Support -f (fake mount)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_FAKE
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
help
|
||||
Enable support for faking a file system mount.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE
|
||||
bool "Support -v (verbose)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_VERBOSE
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
help
|
||||
Enable multi-level -v[vv...] verbose messages. Useful if you
|
||||
debug mount problems and want to see what is exactly passed
|
||||
to the kernel.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS
|
||||
bool "Support mount helpers"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
help
|
||||
Enable mounting of virtual file systems via external helpers.
|
||||
E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
|
||||
"obexfs -b00.11.22.33.44.55 /mnt"
|
||||
Also "mount -t sometype [-o opts] fs /mnt" will try
|
||||
"sometype [-o opts] fs /mnt" if simple mount syscall fails.
|
||||
The idea is to use such virtual filesystems in /etc/fstab.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL
|
||||
bool "Support specifying devices by label or UUID"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_LABEL
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
select BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
This allows for specifying a device by label or uuid, rather than by
|
||||
name. This feature utilizes the same functionality as blkid/findfs.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS
|
||||
bool "Support mounting NFS file systems on Linux < 2.6.23"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_NFS
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
select BUSYBOX_CONFIG_FEATURE_SYSLOG
|
||||
help
|
||||
Enable mounting of NFS file systems on Linux kernels prior
|
||||
to version 2.6.23. Note that in this case mounting of NFS
|
||||
over IPv6 will not be possible.
|
||||
|
||||
Note that this option links in RPC support from libc,
|
||||
which is rather large (~10 kbytes on uclibc).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS
|
||||
bool "Support mounting CIFS/SMB file systems"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
help
|
||||
Enable support for samba mounts.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
bool "Support lots of -o flags"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS
|
||||
help
|
||||
Without this, mount only supports ro/rw/remount. With this, it
|
||||
supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
|
||||
noatime, diratime, nodiratime, loud, bind, move, shared, slave,
|
||||
private, unbindable, rshared, rslave, rprivate, and runbindable.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
|
||||
depends on BUSYBOX_CONFIG_MOUNT
|
||||
bool "Support /etc/fstab and -a (mount all)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB
|
||||
help
|
||||
Support mount all and looking for files in /etc/fstab.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB
|
||||
depends on BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB
|
||||
bool "Support -T <alt_fstab>"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_OTHERTAB
|
||||
help
|
||||
Support mount -T (specifying an alternate fstab)
|
||||
config BUSYBOX_CONFIG_MOUNTPOINT
|
||||
bool "mountpoint (4.9 kb)"
|
||||
default BUSYBOX_DEFAULT_MOUNTPOINT
|
||||
help
|
||||
mountpoint checks if the directory is a mountpoint.
|
||||
config BUSYBOX_CONFIG_NOLOGIN
|
||||
bool "nologin"
|
||||
default BUSYBOX_DEFAULT_NOLOGIN
|
||||
depends on BUSYBOX_CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS
|
||||
help
|
||||
Politely refuse a login
|
||||
|
||||
config BUSYBOX_CONFIG_NOLOGIN_DEPENDENCIES
|
||||
bool "Enable dependencies for nologin"
|
||||
default BUSYBOX_DEFAULT_NOLOGIN_DEPENDENCIES # Y default makes it harder to select single-applet test
|
||||
depends on BUSYBOX_CONFIG_NOLOGIN
|
||||
select BUSYBOX_CONFIG_CAT
|
||||
select BUSYBOX_CONFIG_ECHO
|
||||
select BUSYBOX_CONFIG_SLEEP
|
||||
help
|
||||
nologin is implemented as a shell script. It requires the
|
||||
following in the runtime environment:
|
||||
cat echo sleep
|
||||
If you know these will be available externally you can
|
||||
disable this option.
|
||||
config BUSYBOX_CONFIG_NSENTER
|
||||
bool "nsenter (6.5 kb)"
|
||||
default BUSYBOX_DEFAULT_NSENTER
|
||||
help
|
||||
Run program with namespaces of other processes.
|
||||
config BUSYBOX_CONFIG_PIVOT_ROOT
|
||||
bool "pivot_root (1.1 kb)"
|
||||
default BUSYBOX_DEFAULT_PIVOT_ROOT
|
||||
help
|
||||
The pivot_root utility swaps the mount points for the root filesystem
|
||||
with some other mounted filesystem. This allows you to do all sorts
|
||||
of wild and crazy things with your Linux system and is far more
|
||||
powerful than 'chroot'.
|
||||
|
||||
Note: This is for initrd in linux 2.4. Under initramfs (introduced
|
||||
in linux 2.6) use switch_root instead.
|
||||
config BUSYBOX_CONFIG_RDATE
|
||||
bool "rdate (5.6 kb)"
|
||||
default BUSYBOX_DEFAULT_RDATE
|
||||
help
|
||||
The rdate utility allows you to synchronize the date and time of your
|
||||
system clock with the date and time of a remote networked system using
|
||||
the RFC868 protocol, which is built into the inetd daemon on most
|
||||
systems.
|
||||
config BUSYBOX_CONFIG_RDEV
|
||||
bool "rdev (1.8 kb)"
|
||||
default BUSYBOX_DEFAULT_RDEV
|
||||
help
|
||||
Print the device node associated with the filesystem mounted at '/'.
|
||||
config BUSYBOX_CONFIG_READPROFILE
|
||||
bool "readprofile (7.1 kb)"
|
||||
default BUSYBOX_DEFAULT_READPROFILE
|
||||
help
|
||||
This allows you to parse /proc/profile for basic profiling.
|
||||
config BUSYBOX_CONFIG_RENICE
|
||||
bool "renice (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_RENICE
|
||||
help
|
||||
Renice alters the scheduling priority of one or more running
|
||||
processes.
|
||||
config BUSYBOX_CONFIG_REV
|
||||
bool "rev (4.4 kb)"
|
||||
default BUSYBOX_DEFAULT_REV
|
||||
help
|
||||
Reverse lines of a file or files.
|
||||
config BUSYBOX_CONFIG_RTCWAKE
|
||||
bool "rtcwake (6.8 kb)"
|
||||
default BUSYBOX_DEFAULT_RTCWAKE
|
||||
help
|
||||
Enter a system sleep state until specified wakeup time.
|
||||
config BUSYBOX_CONFIG_SCRIPT
|
||||
bool "script (8.6 kb)"
|
||||
default BUSYBOX_DEFAULT_SCRIPT
|
||||
help
|
||||
The script makes typescript of terminal session.
|
||||
config BUSYBOX_CONFIG_SCRIPTREPLAY
|
||||
bool "scriptreplay (2.4 kb)"
|
||||
default BUSYBOX_DEFAULT_SCRIPTREPLAY
|
||||
help
|
||||
This program replays a typescript, using timing information
|
||||
given by script -t.
|
||||
config BUSYBOX_CONFIG_SETARCH
|
||||
bool "setarch (3.6 kb)"
|
||||
default BUSYBOX_DEFAULT_SETARCH
|
||||
help
|
||||
The linux32 utility is used to create a 32bit environment for the
|
||||
specified program (usually a shell). It only makes sense to have
|
||||
this util on a system that supports both 64bit and 32bit userland
|
||||
(like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
|
||||
|
||||
config BUSYBOX_CONFIG_LINUX32
|
||||
bool "linux32 (3.3 kb)"
|
||||
default BUSYBOX_DEFAULT_LINUX32
|
||||
help
|
||||
Alias to "setarch linux32".
|
||||
|
||||
config BUSYBOX_CONFIG_LINUX64
|
||||
bool "linux64 (3.3 kb)"
|
||||
default BUSYBOX_DEFAULT_LINUX64
|
||||
help
|
||||
Alias to "setarch linux64".
|
||||
config BUSYBOX_CONFIG_SETPRIV
|
||||
bool "setpriv (6.6 kb)"
|
||||
default BUSYBOX_DEFAULT_SETPRIV
|
||||
select BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Run a program with different Linux privilege settings.
|
||||
Requires kernel >= 3.5
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SETPRIV_DUMP
|
||||
bool "Support dumping current privilege state"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SETPRIV_DUMP
|
||||
depends on BUSYBOX_CONFIG_SETPRIV
|
||||
help
|
||||
Enables the "--dump" switch to print out the current privilege
|
||||
state. This is helpful for diagnosing problems.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SETPRIV_CAPABILITIES
|
||||
bool "Support capabilities"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SETPRIV_CAPABILITIES
|
||||
depends on BUSYBOX_CONFIG_SETPRIV
|
||||
help
|
||||
Capabilities can be used to grant processes additional rights
|
||||
without the necessity to always execute as the root user.
|
||||
Enabling this option enables "--dump" to show information on
|
||||
capabilities.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES
|
||||
bool "Support capability names"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SETPRIV_CAPABILITY_NAMES
|
||||
depends on BUSYBOX_CONFIG_SETPRIV && BUSYBOX_CONFIG_FEATURE_SETPRIV_CAPABILITIES
|
||||
help
|
||||
Capabilities can be either referenced via a human-readble name,
|
||||
e.g. "net_admin", or using their index, e.g. "cap_12". Enabling
|
||||
this option allows using the human-readable names in addition to
|
||||
the index-based names.
|
||||
config BUSYBOX_CONFIG_SETSID
|
||||
bool "setsid (3.6 kb)"
|
||||
default BUSYBOX_DEFAULT_SETSID
|
||||
help
|
||||
setsid runs a program in a new session
|
||||
config BUSYBOX_CONFIG_SWAPON
|
||||
bool "swapon (15 kb)"
|
||||
default BUSYBOX_DEFAULT_SWAPON
|
||||
help
|
||||
Once you have created some swap space using 'mkswap', you also need
|
||||
to enable your swap space with the 'swapon' utility. The 'swapoff'
|
||||
utility is used, typically at system shutdown, to disable any swap
|
||||
space. If you are not using any swap space, you can leave this
|
||||
option disabled.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD
|
||||
bool "Support discard option -d"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD
|
||||
depends on BUSYBOX_CONFIG_SWAPON
|
||||
help
|
||||
Enable support for discarding swap area blocks at swapon and/or as
|
||||
the kernel frees them. This option enables both the -d option on
|
||||
'swapon' and the 'discard' option for swap entries in /etc/fstab.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SWAPON_PRI
|
||||
bool "Support priority option -p"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI
|
||||
depends on BUSYBOX_CONFIG_SWAPON
|
||||
help
|
||||
Enable support for setting swap device priority in swapon.
|
||||
|
||||
config BUSYBOX_CONFIG_SWAPOFF
|
||||
bool "swapoff (14 kb)"
|
||||
default BUSYBOX_DEFAULT_SWAPOFF
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SWAPONOFF_LABEL
|
||||
bool "Support specifying devices by label or UUID"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SWAPONOFF_LABEL
|
||||
depends on BUSYBOX_CONFIG_SWAPON || BUSYBOX_CONFIG_SWAPOFF
|
||||
select BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
This allows for specifying a device by label or uuid, rather than by
|
||||
name. This feature utilizes the same functionality as blkid/findfs.
|
||||
config BUSYBOX_CONFIG_SWITCH_ROOT
|
||||
bool "switch_root (5.5 kb)"
|
||||
default BUSYBOX_DEFAULT_SWITCH_ROOT
|
||||
help
|
||||
The switch_root utility is used from initramfs to select a new
|
||||
root device. Under initramfs, you have to use this instead of
|
||||
pivot_root. (Stop reading here if you don't care why.)
|
||||
|
||||
Booting with initramfs extracts a gzipped cpio archive into rootfs
|
||||
(which is a variant of ramfs/tmpfs). Because rootfs can't be moved
|
||||
or unmounted*, pivot_root will not work from initramfs. Instead,
|
||||
switch_root deletes everything out of rootfs (including itself),
|
||||
does a mount --move that overmounts rootfs with the new root, and
|
||||
then execs the specified init program.
|
||||
|
||||
* Because the Linux kernel uses rootfs internally as the starting
|
||||
and ending point for searching through the kernel's doubly linked
|
||||
list of active mount points. That's why.
|
||||
|
||||
config BUSYBOX_CONFIG_TASKSET
|
||||
bool "taskset (4.2 kb)"
|
||||
default BUSYBOX_DEFAULT_TASKSET
|
||||
help
|
||||
Retrieve or set a processes's CPU affinity.
|
||||
This requires sched_{g,s}etaffinity support in your libc.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
|
||||
bool "Fancy output"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
|
||||
depends on BUSYBOX_CONFIG_TASKSET
|
||||
help
|
||||
Needed for machines with more than 32-64 CPUs:
|
||||
affinity parameter 0xHHHHHHHHHHHHHHHHHHHH can be arbitrarily long
|
||||
in this case. Otherwise, it is limited to sizeof(long).
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TASKSET_CPULIST
|
||||
bool "CPU list support (-c option)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TASKSET_CPULIST
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY
|
||||
help
|
||||
Add support for taking/printing affinity as CPU list when '-c'
|
||||
option is used. For example, it prints '0-3,7' instead of mask '8f'.
|
||||
config BUSYBOX_CONFIG_UEVENT
|
||||
bool "uevent (3.1 kb)"
|
||||
default BUSYBOX_DEFAULT_UEVENT
|
||||
help
|
||||
uevent is a netlink listener for kernel uevent notifications
|
||||
sent via netlink. It is usually used for dynamic device creation.
|
||||
config BUSYBOX_CONFIG_UMOUNT
|
||||
bool "umount (5.1 kb)"
|
||||
default BUSYBOX_DEFAULT_UMOUNT
|
||||
help
|
||||
When you want to remove a mounted filesystem from its current mount
|
||||
point, for example when you are shutting down the system, the
|
||||
'umount' utility is the tool to use. If you enabled the 'mount'
|
||||
utility, you almost certainly also want to enable 'umount'.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL
|
||||
bool "Support -a (unmount all)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_UMOUNT_ALL
|
||||
depends on BUSYBOX_CONFIG_UMOUNT
|
||||
help
|
||||
Support -a option to unmount all currently mounted filesystems.
|
||||
config BUSYBOX_CONFIG_UNSHARE
|
||||
bool "unshare (7.2 kb)"
|
||||
default BUSYBOX_DEFAULT_UNSHARE
|
||||
depends on !BUSYBOX_CONFIG_NOMMU
|
||||
select BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Run program with some namespaces unshared from parent.
|
||||
config BUSYBOX_CONFIG_WALL
|
||||
bool "wall (2.6 kb)"
|
||||
default BUSYBOX_DEFAULT_WALL
|
||||
depends on BUSYBOX_CONFIG_FEATURE_UTMP
|
||||
help
|
||||
Write a message to all users that are logged in.
|
||||
|
||||
comment "Common options for mount/umount"
|
||||
depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP
|
||||
bool "Support loopback mounts"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP
|
||||
depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT
|
||||
help
|
||||
Enabling this feature allows automatic mounting of files (containing
|
||||
filesystem images) via the linux kernel's loopback devices.
|
||||
The mount command will detect you are trying to mount a file instead
|
||||
of a block device, and transparently associate the file with a
|
||||
loopback device. The umount command will also free that loopback
|
||||
device.
|
||||
|
||||
You can still use the 'losetup' utility (to manually associate files
|
||||
with loop devices) if you need to do something advanced, such as
|
||||
specify an offset or cryptographic options to the loopback device.
|
||||
(If you don't want umount to free the loop device, use "umount -D".)
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP_CREATE
|
||||
bool "Create new loopback devices if needed"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP_CREATE
|
||||
depends on BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP
|
||||
help
|
||||
Linux kernels >= 2.6.24 support unlimited loopback devices. They are
|
||||
allocated for use when trying to use a loop device. The loop device
|
||||
must however exist.
|
||||
|
||||
This feature lets mount to try to create next /dev/loopN device
|
||||
if it does not find a free one.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT
|
||||
bool "Support old /etc/mtab file"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MTAB_SUPPORT
|
||||
depends on BUSYBOX_CONFIG_MOUNT || BUSYBOX_CONFIG_UMOUNT
|
||||
select BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE
|
||||
help
|
||||
Historically, Unix systems kept track of the currently mounted
|
||||
partitions in the file "/etc/mtab". These days, the kernel exports
|
||||
the list of currently mounted partitions in "/proc/mounts", rendering
|
||||
the old mtab file obsolete. (In modern systems, /etc/mtab should be
|
||||
a symlink to /proc/mounts.)
|
||||
|
||||
The only reason to have mount maintain an /etc/mtab file itself is if
|
||||
your stripped-down embedded system does not have a /proc directory.
|
||||
If you must use this, keep in mind it's inherently brittle (for
|
||||
example a mount under chroot won't update it), can't handle modern
|
||||
features like separate per-process filesystem namespaces, requires
|
||||
that your /etc directory be writable, tends to get easily confused
|
||||
by --bind or --move mounts, won't update if you rename a directory
|
||||
that contains a mount point, and so on. (In brief: avoid.)
|
||||
|
||||
About the only reason to use this is if you've removed /proc from
|
||||
your kernel.
|
||||
|
||||
source "volume_id/Config.in"
|
||||
|
||||
endmenu
|
||||
203
package/utils/busybox/config/util-linux/volume_id/Config.in
Normal file
203
package/utils/busybox/config/util-linux/volume_id/Config.in
Normal file
@@ -0,0 +1,203 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see docs/Kconfig-language.txt.
|
||||
#
|
||||
|
||||
config BUSYBOX_CONFIG_VOLUMEID
|
||||
bool #No description makes it a hidden option
|
||||
default BUSYBOX_DEFAULT_VOLUMEID
|
||||
|
||||
menu "Filesystem/Volume identification"
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_BCACHE
|
||||
bool "bcache filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BCACHE
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_BTRFS
|
||||
bool "btrfs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_CRAMFS
|
||||
bool "cramfs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EROFS
|
||||
bool "erofs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EROFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
Erofs is a compressed readonly filesystem for Linux.
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXFAT
|
||||
bool "exFAT filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXFAT
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
exFAT (extended FAT) is a proprietary file system designed especially
|
||||
for flash drives. It has many features from NTFS, but with less
|
||||
overhead. exFAT is used on most SDXC cards for consumer electronics.
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXT
|
||||
bool "Ext filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXT
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_F2FS
|
||||
bool "f2fs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_F2FS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
F2FS (aka Flash-Friendly File System) is a log-structured file system,
|
||||
which is adapted to newer forms of storage. F2FS also remedies some
|
||||
known issues of the older log structured file systems, such as high
|
||||
cleaning overhead.
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_FAT
|
||||
bool "fat filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_FAT
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_HFS
|
||||
bool "hfs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_HFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_ISO9660
|
||||
bool "iso9660 filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ISO9660
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_JFS
|
||||
bool "jfs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_JFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LFS
|
||||
bool "LittleFS filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID && BUSYBOX_CONFIG_FEATURE_BLKID_TYPE
|
||||
help
|
||||
LittleFS is a small fail-safe filesystem designed for embedded
|
||||
systems. It has strong copy-on-write guarantees and storage on disk
|
||||
is always kept in a valid state. It also provides a form of dynamic
|
||||
wear levelling for systems that can not fit a full flash translation
|
||||
layer.
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXRAID
|
||||
bool "linuxraid"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXRAID
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXSWAP
|
||||
bool "linux swap filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LINUXSWAP
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_LUKS
|
||||
bool "luks filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_LUKS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_MINIX
|
||||
bool "minix filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_MINIX
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_NILFS
|
||||
bool "nilfs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NILFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
NILFS is a New Implementation of a Log-Structured File System (LFS)
|
||||
that supports continuous snapshots. This provides features like
|
||||
versioning of the entire filesystem, restoration of files that
|
||||
were deleted a few minutes ago. NILFS keeps consistency like
|
||||
conventional LFS, so it provides quick recovery after system crashes.
|
||||
|
||||
The possible use of NILFS includes versioning, tamper detection,
|
||||
SOX compliance logging, and so forth. It can serve as an alternative
|
||||
filesystem for Linux desktop environment, or as a basis of advanced
|
||||
storage appliances.
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_NTFS
|
||||
bool "ntfs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_NTFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_OCFS2
|
||||
bool "ocfs2 filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_OCFS2
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_REISERFS
|
||||
bool "Reiser filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_REISERFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_ROMFS
|
||||
bool "romfs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_ROMFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SQUASHFS
|
||||
bool "SquashFS filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SQUASHFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID && BUSYBOX_CONFIG_FEATURE_BLKID_TYPE
|
||||
help
|
||||
Squashfs is a compressed read-only filesystem for Linux. Squashfs is
|
||||
intended for general read-only filesystem use and in constrained block
|
||||
device/memory systems (e.g. embedded systems) where low overhead is
|
||||
needed.
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV
|
||||
bool "sysv filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_SYSV
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS
|
||||
bool "UBIFS filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UBIFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
help
|
||||
UBIFS (Unsorted Block Image File System) is a file
|
||||
system for use with raw flash memory media.
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF
|
||||
bool "udf filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_UDF
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
### config FEATURE_VOLUMEID_HIGHPOINTRAID
|
||||
### bool "highpoint raid"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_HPFS
|
||||
### bool "hpfs filesystem"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_ISWRAID
|
||||
### bool "intel raid"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_LSIRAID
|
||||
### bool "lsi raid"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_LVM
|
||||
### bool "lvm"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_MAC
|
||||
### bool "mac filesystem"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_MSDOS
|
||||
### bool "msdos filesystem"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_NVIDIARAID
|
||||
### bool "nvidia raid"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_PROMISERAID
|
||||
### bool "promise raid"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_SILICONRAID
|
||||
### bool "silicon raid"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_UFS
|
||||
### bool "ufs filesystem"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
### config FEATURE_VOLUMEID_VIARAID
|
||||
### bool "via raid"
|
||||
### default y
|
||||
### depends on VOLUMEID
|
||||
config BUSYBOX_CONFIG_FEATURE_VOLUMEID_XFS
|
||||
bool "xfs filesystem"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_XFS
|
||||
depends on BUSYBOX_CONFIG_VOLUMEID
|
||||
|
||||
endmenu
|
||||
13
package/utils/busybox/convert_defaults.pl
Executable file
13
package/utils/busybox/convert_defaults.pl
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
while (<>) {
|
||||
/^(# )?CONFIG_([^=]+)(=(.+)| is not set)/ and do {
|
||||
my $default = $4;
|
||||
$1 and $default = "n";
|
||||
my $name = $2;
|
||||
my $type = "bool";
|
||||
$default =~ /^\"/ and $type = "string";
|
||||
$default =~ /^\d/ and $type = "int";
|
||||
print "config BUSYBOX_DEFAULT_$name\n\t$type\n\tdefault $default\n";
|
||||
};
|
||||
}
|
||||
76
package/utils/busybox/convert_menuconfig.pl
Executable file
76
package/utils/busybox/convert_menuconfig.pl
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
use strict;
|
||||
my $PATH = $ARGV[0];
|
||||
($PATH and -d $PATH) or die 'invalid path';
|
||||
|
||||
my %config;
|
||||
|
||||
open FIND, "find \"$PATH\" -name Config.in |";
|
||||
while (<FIND>) {
|
||||
chomp;
|
||||
my $input = $_;
|
||||
my $output = $input;
|
||||
my $replace = quotemeta($PATH);
|
||||
$output =~ s/^$replace\///g;
|
||||
$output =~ s/sysdeps\/linux\///g;
|
||||
print STDERR "$input => $output\n";
|
||||
$output =~ /^(.+)\/[^\/]+$/ and system("mkdir -p $1");
|
||||
|
||||
open INPUT, $input;
|
||||
open OUTPUT, ">$output";
|
||||
my ($cur, $default_set, $line);
|
||||
while ($line = <INPUT>) {
|
||||
next if $line =~ /^\s*mainmenu/;
|
||||
|
||||
# FIXME: make this dynamic
|
||||
$line =~ s/default FEATURE_BUFFERS_USE_MALLOC/default FEATURE_BUFFERS_GO_ON_STACK/;
|
||||
$line =~ s/default FEATURE_SH_IS_NONE/default FEATURE_SH_IS_ASH/;
|
||||
|
||||
if ($line =~ /^\s*config\s*([\w_]+)/) {
|
||||
$cur = $1;
|
||||
undef $default_set;
|
||||
}
|
||||
if ($line =~ /^\s*(menu|choice|end|source)/) {
|
||||
undef $cur;
|
||||
undef $default_set;
|
||||
}
|
||||
$line =~ s/^(\s*source\s+)([^\/]+\/)*([^\/]+\/[^\/]+)$/$1$3/;
|
||||
if ($line =~ /^(\s*range\s*)(\w+)(\s+)(\w+)\s*$/) {
|
||||
my $prefix = $1;
|
||||
my $r1 = $2;
|
||||
my $r2 = $4;
|
||||
$r1 =~ s/^([a-zA-Z]+)/BUSYBOX_CONFIG_$1/;
|
||||
$r2 =~ s/^([a-zA-Z]+)/BUSYBOX_CONFIG_$1/;
|
||||
$line = "$prefix$r1 $r2\n";
|
||||
}
|
||||
|
||||
$line =~ s/^(\s*(prompt "[^"]+" if|config|depends|depends on|select|default|default \w if)\s+\!?)([A-Z_])/$1BUSYBOX_CONFIG_$3/g;
|
||||
$line =~ s/(( \|\| | \&\& | \( )!?)([A-Z_])/$1BUSYBOX_CONFIG_$3/g;
|
||||
$line =~ s/(\( ?!?)([A-Z_]+ (\|\||&&))/$1BUSYBOX_CONFIG_$2/g;
|
||||
|
||||
if ($cur) {
|
||||
($cur eq 'LFS') and do {
|
||||
$line =~ s/^(\s*(bool|tristate|string))\s*".+"$/$1/;
|
||||
};
|
||||
if ($line =~ /^\s*default/) {
|
||||
my $c;
|
||||
$default_set = 1;
|
||||
$c = "BUSYBOX_DEFAULT_$cur";
|
||||
|
||||
$line =~ s/^(\s*default\s*)(\w+|"[^"]*")(.*)/$1$c$3/;
|
||||
}
|
||||
}
|
||||
|
||||
print OUTPUT $line;
|
||||
}
|
||||
close OUTPUT;
|
||||
close INPUT;
|
||||
}
|
||||
close FIND;
|
||||
41
package/utils/busybox/files/cron
Executable file
41
package/utils/busybox/files/cron
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
|
||||
START=50
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/crond
|
||||
|
||||
validate_cron_section() {
|
||||
uci_validate_section system system "${1}" \
|
||||
'cronloglevel:uinteger'
|
||||
}
|
||||
|
||||
start_service() {
|
||||
[ -z "$(ls /etc/crontabs/)" ] && return 1
|
||||
|
||||
loglevel="$(uci_get "system.@system[0].cronloglevel")"
|
||||
|
||||
[ -z "${loglevel}" ] || {
|
||||
/sbin/validate_data uinteger "${loglevel}" 2>/dev/null
|
||||
[ "$?" -eq 0 ] || {
|
||||
echo "validation failed"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
mkdir -p /var/spool/cron
|
||||
ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -f -c /etc/crontabs -l "${loglevel:-5}"
|
||||
for crontab in /etc/crontabs/*; do
|
||||
procd_set_param file "$crontab"
|
||||
done
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_validation validate_cron_section
|
||||
}
|
||||
12
package/utils/busybox/files/ntpd-hotplug
Executable file
12
package/utils/busybox/files/ntpd-hotplug
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
addenv="$( env | while read line; do echo "json_add_string \"\" \"$line\";"; done )"
|
||||
json_init
|
||||
json_add_array env
|
||||
json_add_string "" "ACTION=$1"
|
||||
eval "$addenv"
|
||||
json_close_array env
|
||||
|
||||
ubus call hotplug.ntp call "$(json_dump)"
|
||||
22
package/utils/busybox/files/ntpd.capabilities
Normal file
22
package/utils/busybox/files/ntpd.capabilities
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"bounding": [
|
||||
"CAP_NET_BIND_SERVICE",
|
||||
"CAP_SYS_TIME"
|
||||
],
|
||||
"effective": [
|
||||
"CAP_NET_BIND_SERVICE",
|
||||
"CAP_SYS_TIME"
|
||||
],
|
||||
"ambient": [
|
||||
"CAP_NET_BIND_SERVICE",
|
||||
"CAP_SYS_TIME"
|
||||
],
|
||||
"permitted": [
|
||||
"CAP_NET_BIND_SERVICE",
|
||||
"CAP_SYS_TIME"
|
||||
],
|
||||
"inheritable": [
|
||||
"CAP_NET_BIND_SERVICE",
|
||||
"CAP_SYS_TIME"
|
||||
]
|
||||
}
|
||||
8
package/utils/busybox/files/ntpd_acl.json
Normal file
8
package/utils/busybox/files/ntpd_acl.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"user": "ntp",
|
||||
"access": {
|
||||
"hotplug.ntp": {
|
||||
"methods": [ "call" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
130
package/utils/busybox/files/sysntpd
Executable file
130
package/utils/busybox/files/sysntpd
Executable file
@@ -0,0 +1,130 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
|
||||
START=98
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/ntpd
|
||||
HOTPLUG_SCRIPT=/usr/sbin/ntpd-hotplug
|
||||
|
||||
get_dhcp_ntp_servers() {
|
||||
local interfaces="$1"
|
||||
local filter="*"
|
||||
local interface ntpservers ntpserver
|
||||
|
||||
for interface in $interfaces; do
|
||||
[ "$filter" = "*" ] && filter="@.interface='$interface'" || filter="$filter,@.interface='$interface'"
|
||||
done
|
||||
|
||||
ntpservers=$(ubus call network.interface dump | jsonfilter -e "@.interface[$filter]['data']['ntpserver']")
|
||||
|
||||
for ntpserver in $ntpservers; do
|
||||
local duplicate=0
|
||||
local entry
|
||||
for entry in $server; do
|
||||
[ "$ntpserver" = "$entry" ] && duplicate=1
|
||||
done
|
||||
[ "$duplicate" = 0 ] && server="$server $ntpserver"
|
||||
done
|
||||
}
|
||||
|
||||
validate_ntp_section() {
|
||||
uci_load_validate system timeserver "$1" "$2" \
|
||||
'dhcp_interface:list(string)' \
|
||||
'enable_server:bool:0' \
|
||||
'enabled:bool:1' \
|
||||
'interface:string' \
|
||||
'server:list(host)' \
|
||||
'use_dhcp:bool:1'
|
||||
}
|
||||
|
||||
start_ntpd_instance() {
|
||||
local peer
|
||||
|
||||
[ "$2" = 0 ] || {
|
||||
echo "validation failed"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ $enabled = 0 ] && return
|
||||
|
||||
[ $use_dhcp = 1 ] && get_dhcp_ntp_servers "$dhcp_interface"
|
||||
|
||||
[ -z "$server" -a "$enable_server" = "0" ] && return
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -n -N
|
||||
if [ "$enable_server" = "1" ]; then
|
||||
procd_append_param command -l
|
||||
[ -n "$interface" ] && {
|
||||
local ifname
|
||||
|
||||
network_get_device ifname "$interface" || \
|
||||
ifname="$interface"
|
||||
procd_append_param command -I "$ifname"
|
||||
procd_append_param netdev "$ifname"
|
||||
}
|
||||
fi
|
||||
[ -x "$HOTPLUG_SCRIPT" ] && procd_append_param command -S "$HOTPLUG_SCRIPT"
|
||||
for peer in $server; do
|
||||
procd_append_param command -p $peer
|
||||
done
|
||||
procd_set_param respawn
|
||||
[ -x /sbin/ujail -a -e /etc/capabilities/ntpd.json ] && {
|
||||
procd_add_jail ntpd ubus
|
||||
procd_add_jail_mount "$HOTPLUG_SCRIPT"
|
||||
procd_add_jail_mount "/usr/share/libubox/jshn.sh"
|
||||
procd_add_jail_mount "/usr/bin/env"
|
||||
procd_add_jail_mount "/usr/bin/jshn"
|
||||
procd_add_jail_mount "/bin/ubus"
|
||||
procd_set_param capabilities /etc/capabilities/ntpd.json
|
||||
procd_set_param user ntp
|
||||
procd_set_param group ntp
|
||||
procd_set_param no_new_privs 1
|
||||
}
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
start_service() {
|
||||
. /lib/functions/network.sh
|
||||
validate_ntp_section ntp start_ntpd_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
local script name use_dhcp enable_server interface
|
||||
|
||||
script=$(readlink -f "$initscript")
|
||||
name=$(basename ${script:-$initscript})
|
||||
|
||||
procd_add_config_trigger "config.change" "system" /etc/init.d/$name reload
|
||||
|
||||
config_load system
|
||||
config_get use_dhcp ntp use_dhcp 1
|
||||
|
||||
[ $use_dhcp = 1 ] && {
|
||||
local dhcp_interface
|
||||
config_get dhcp_interface ntp dhcp_interface
|
||||
|
||||
if [ -n "$dhcp_interface" ]; then
|
||||
for n in $dhcp_interface; do
|
||||
procd_add_interface_trigger "interface.*" $n /etc/init.d/$name reload
|
||||
done
|
||||
else
|
||||
procd_add_raw_trigger "interface.*" 1000 /etc/init.d/$name reload
|
||||
fi
|
||||
}
|
||||
|
||||
config_get_bool enable_server ntp enable_server 0
|
||||
config_get interface ntp interface
|
||||
|
||||
[ $enable_server -eq 1 ] && [ -n "$interface" ] && {
|
||||
local ifname
|
||||
|
||||
network_get_device ifname "$interface" || \
|
||||
ifname="$interface"
|
||||
procd_add_interface_trigger "interface.*" "$ifname" \
|
||||
/etc/init.d/"$name" reload
|
||||
}
|
||||
|
||||
procd_add_validation validate_ntp_section
|
||||
}
|
||||
27
package/utils/busybox/patches/120-lto-jobserver.patch
Normal file
27
package/utils/busybox/patches/120-lto-jobserver.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
--- a/scripts/Kbuild.include
|
||||
+++ b/scripts/Kbuild.include
|
||||
@@ -131,7 +131,7 @@ make-cmd = $(subst \#,\\\#,$(subst $$,$$
|
||||
#
|
||||
if_changed = $(if $(strip $(filter-out $(PHONY),$?) \
|
||||
$(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
|
||||
- @set -e; \
|
||||
+ +@set -e; \
|
||||
$(echo-cmd) $(cmd_$(1)); \
|
||||
echo 'cmd_$@ := $(make-cmd)' > $(@D)/.$(@F).cmd)
|
||||
|
||||
@@ -140,7 +140,7 @@ if_changed = $(if $(strip $(filter-out $
|
||||
if_changed_dep = $(if $(strip $(filter-out $(PHONY),$?) \
|
||||
$(filter-out FORCE $(wildcard $^),$^) \
|
||||
$(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
|
||||
- @set -e; \
|
||||
+ +@set -e; \
|
||||
$(echo-cmd) $(cmd_$(1)); \
|
||||
scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(@D)/.$(@F).tmp; \
|
||||
rm -f $(depfile); \
|
||||
@@ -151,5 +151,5 @@ if_changed_dep = $(if $(strip $(filter-o
|
||||
# and if so will execute $(rule_foo)
|
||||
if_changed_rule = $(if $(strip $(filter-out $(PHONY),$?) \
|
||||
$(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\
|
||||
- @set -e; \
|
||||
+ +@set -e; \
|
||||
$(rule_$(1)))
|
||||
18
package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
Normal file
18
package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- a/networking/udhcp/dhcpc.c
|
||||
+++ b/networking/udhcp/dhcpc.c
|
||||
@@ -722,6 +722,7 @@ static int bcast_or_ucast(struct dhcp_pa
|
||||
static NOINLINE int send_discover(uint32_t requested)
|
||||
{
|
||||
struct dhcp_packet packet;
|
||||
+ static int msgs = 0;
|
||||
|
||||
/* Fill in: op, htype, hlen, cookie, chaddr fields,
|
||||
* xid field, message type option:
|
||||
@@ -736,6 +737,7 @@ static NOINLINE int send_discover(uint32
|
||||
*/
|
||||
add_client_options(&packet);
|
||||
|
||||
+ if (msgs++ < 3)
|
||||
bb_simple_info_msg("broadcasting discover");
|
||||
return raw_bcast_from_client_data_ifindex(&packet, INADDR_ANY);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/networking/udhcp/dhcpc.c
|
||||
+++ b/networking/udhcp/dhcpc.c
|
||||
@@ -1384,6 +1384,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c
|
||||
struct pollfd pfds[2];
|
||||
struct dhcp_packet packet;
|
||||
|
||||
+ /* When running on a bridge, the ifindex may have changed (e.g. if
|
||||
+ * member interfaces were added/removed or if the status of the
|
||||
+ * bridge changed).
|
||||
+ * Workaround: refresh it here before processing the next packet */
|
||||
+ udhcp_read_interface(client_data.interface, &client_data.ifindex, NULL, client_data.client_mac);
|
||||
+
|
||||
//bb_error_msg("sockfd:%d, listen_mode:%d", client_data.sockfd, client_data.listen_mode);
|
||||
|
||||
/* Was opening raw or udp socket here
|
||||
79
package/utils/busybox/patches/210-add_netmsg_util.patch
Normal file
79
package/utils/busybox/patches/210-add_netmsg_util.patch
Normal file
@@ -0,0 +1,79 @@
|
||||
--- /dev/null
|
||||
+++ b/networking/netmsg.c
|
||||
@@ -0,0 +1,76 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2006 Felix Fietkau <nbd@nbd.name>
|
||||
+ *
|
||||
+ * This is free software, licensed under the GNU General Public License v2.
|
||||
+ */
|
||||
+
|
||||
+//config:config NETMSG
|
||||
+//config: bool "netmsg"
|
||||
+//config: default n
|
||||
+//config: help
|
||||
+//config: simple program for sending udp broadcast messages
|
||||
+
|
||||
+//applet:IF_NETMSG(APPLET(netmsg, BB_DIR_BIN, BB_SUID_REQUIRE))
|
||||
+
|
||||
+//kbuild:lib-$(CONFIG_NETMSG) += netmsg.o
|
||||
+
|
||||
+//usage:#define netmsg_trivial_usage NOUSAGE_STR
|
||||
+//usage:#define netmsg_full_usage ""
|
||||
+
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <netinet/in.h>
|
||||
+#include <netdb.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include "busybox.h"
|
||||
+
|
||||
+#ifndef CONFIG_NETMSG
|
||||
+int main(int argc, char **argv)
|
||||
+#else
|
||||
+int netmsg_main(int argc, char **argv)
|
||||
+#endif
|
||||
+{
|
||||
+ int s;
|
||||
+ struct sockaddr_in addr;
|
||||
+ int optval = 1;
|
||||
+ unsigned char buf[1001];
|
||||
+
|
||||
+ if (argc != 3) {
|
||||
+ fprintf(stderr, "usage: %s <ip> \"<message>\"\n", argv[0]);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
|
||||
+ perror("Opening socket");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ memset(&addr, 0, sizeof(addr));
|
||||
+ addr.sin_family = AF_INET;
|
||||
+ addr.sin_addr.s_addr = inet_addr(argv[1]);
|
||||
+ addr.sin_port = htons(0x1337);
|
||||
+
|
||||
+ memset(buf, 0, 1001);
|
||||
+ buf[0] = 0xde;
|
||||
+ buf[1] = 0xad;
|
||||
+
|
||||
+ strncpy(buf + 2, argv[2], 998);
|
||||
+
|
||||
+ if (setsockopt (s, SOL_SOCKET, SO_BROADCAST, (caddr_t) &optval, sizeof (optval)) < 0) {
|
||||
+ perror("setsockopt()");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ if (sendto(s, buf, 1001, 0, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
|
||||
+ perror("sendto()");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+fail:
|
||||
+ close(s);
|
||||
+ exit(1);
|
||||
+}
|
||||
158
package/utils/busybox/patches/220-add_lock_util.patch
Normal file
158
package/utils/busybox/patches/220-add_lock_util.patch
Normal file
@@ -0,0 +1,158 @@
|
||||
--- /dev/null
|
||||
+++ b/miscutils/lock.c
|
||||
@@ -0,0 +1,155 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2006 Felix Fietkau <nbd@nbd.name>
|
||||
+ *
|
||||
+ * This is free software, licensed under the GNU General Public License v2.
|
||||
+ */
|
||||
+
|
||||
+//config:config LOCK
|
||||
+//config: bool "lock"
|
||||
+//config: default n
|
||||
+//config: help
|
||||
+//config: Small utility for using locks in scripts
|
||||
+
|
||||
+//applet:IF_LOCK(APPLET(lock, BB_DIR_BIN, BB_SUID_DROP))
|
||||
+
|
||||
+//kbuild:lib-$(CONFIG_LOCK) += lock.o
|
||||
+
|
||||
+//usage:#define lock_trivial_usage NOUSAGE_STR
|
||||
+//usage:#define lock_full_usage ""
|
||||
+
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/file.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <signal.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <unistd.h>
|
||||
+#include <stdio.h>
|
||||
+#include "busybox.h"
|
||||
+
|
||||
+static int unlock = 0;
|
||||
+static int shared = 0;
|
||||
+static int waitonly = 0;
|
||||
+static int try_lock = 0;
|
||||
+static int fd;
|
||||
+static char *file;
|
||||
+
|
||||
+static void usage(char *name)
|
||||
+{
|
||||
+ fprintf(stderr, "Usage: %s [-suw] <filename>\n"
|
||||
+ " -s Use shared locking\n"
|
||||
+ " -u Unlock\n"
|
||||
+ " -w Wait for the lock to become free, don't acquire lock\n"
|
||||
+ " -n Don't wait for the lock to become free. Fail with exit code\n"
|
||||
+ "\n", name);
|
||||
+ exit(1);
|
||||
+}
|
||||
+
|
||||
+static void exit_unlock(int sig)
|
||||
+{
|
||||
+ flock(fd, LOCK_UN);
|
||||
+ exit(0);
|
||||
+}
|
||||
+
|
||||
+static int do_unlock(void)
|
||||
+{
|
||||
+ FILE *f;
|
||||
+ int i;
|
||||
+
|
||||
+ if ((f = fopen(file, "r")) == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
+ fscanf(f, "%d", &i);
|
||||
+ if (i > 0)
|
||||
+ kill(i, SIGTERM);
|
||||
+
|
||||
+ fclose(f);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int do_lock(void)
|
||||
+{
|
||||
+ pid_t pid;
|
||||
+ int flags;
|
||||
+ char pidstr[12];
|
||||
+
|
||||
+ if ((fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0700)) < 0) {
|
||||
+ if ((fd = open(file, O_RDWR)) < 0) {
|
||||
+ fprintf(stderr, "Can't open %s\n", file);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ flags = shared ? LOCK_SH : LOCK_EX;
|
||||
+ flags |= try_lock ? LOCK_NB : 0;
|
||||
+
|
||||
+ if (flock(fd, flags) < 0) {
|
||||
+ fprintf(stderr, "Can't lock %s\n", file);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ pid = fork();
|
||||
+
|
||||
+ if (pid < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (pid == 0) {
|
||||
+ signal(SIGKILL, exit_unlock);
|
||||
+ signal(SIGTERM, exit_unlock);
|
||||
+ signal(SIGINT, exit_unlock);
|
||||
+ if (waitonly)
|
||||
+ exit_unlock(0);
|
||||
+ else
|
||||
+ while (1)
|
||||
+ sleep(1);
|
||||
+ } else {
|
||||
+ if (!waitonly) {
|
||||
+ lseek(fd, 0, SEEK_SET);
|
||||
+ ftruncate(fd, 0);
|
||||
+ snprintf(pidstr, sizeof(pidstr), "%d\n", pid);
|
||||
+ write(fd, pidstr, strlen(pidstr));
|
||||
+ close(fd);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int lock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
+int lock_main(int argc, char **argv)
|
||||
+{
|
||||
+ char **args = &argv[1];
|
||||
+ int c = argc - 1;
|
||||
+
|
||||
+ while ((*args != NULL) && (*args)[0] == '-') {
|
||||
+ char *ch = *args;
|
||||
+ while (*(++ch) > 0) {
|
||||
+ switch(*ch) {
|
||||
+ case 'w':
|
||||
+ waitonly = 1;
|
||||
+ break;
|
||||
+ case 's':
|
||||
+ shared = 1;
|
||||
+ break;
|
||||
+ case 'u':
|
||||
+ unlock = 1;
|
||||
+ break;
|
||||
+ case 'n':
|
||||
+ try_lock = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ c--;
|
||||
+ args++;
|
||||
+ }
|
||||
+
|
||||
+ if (c != 1)
|
||||
+ usage(argv[0]);
|
||||
+
|
||||
+ file = *args;
|
||||
+ if (unlock)
|
||||
+ return do_unlock();
|
||||
+ else
|
||||
+ return do_lock();
|
||||
+}
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/libbb/printable_string.c
|
||||
+++ b/libbb/printable_string.c
|
||||
@@ -28,8 +28,6 @@ const char* FAST_FUNC printable_string2(
|
||||
}
|
||||
if (c < ' ')
|
||||
break;
|
||||
- if (c >= 0x7f)
|
||||
- break;
|
||||
s++;
|
||||
}
|
||||
|
||||
@@ -42,7 +40,7 @@ const char* FAST_FUNC printable_string2(
|
||||
unsigned char c = *d;
|
||||
if (c == '\0')
|
||||
break;
|
||||
- if (c < ' ' || c >= 0x7f)
|
||||
+ if (c < ' ')
|
||||
*d = '?';
|
||||
d++;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/networking/libiproute/iplink.c
|
||||
+++ b/networking/libiproute/iplink.c
|
||||
@@ -683,7 +683,7 @@ static int do_add_or_delete(char **argv,
|
||||
}
|
||||
xrtnl_open(&rth);
|
||||
ll_init_map(&rth);
|
||||
- if (type_str) {
|
||||
+ if (type_str && rtm == RTM_NEWLINK) {
|
||||
struct rtattr *linkinfo = NLMSG_TAIL(&req.n);
|
||||
|
||||
addattr_l(&req.n, sizeof(req), IFLA_LINKINFO, NULL, 0);
|
||||
@@ -0,0 +1,13 @@
|
||||
--- a/networking/traceroute.c
|
||||
+++ b/networking/traceroute.c
|
||||
@@ -236,8 +236,8 @@
|
||||
//config: depends on TRACEROUTE || TRACEROUTE6
|
||||
|
||||
/* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */
|
||||
-//applet:IF_TRACEROUTE(APPLET(traceroute, BB_DIR_USR_BIN, BB_SUID_MAYBE))
|
||||
-//applet:IF_TRACEROUTE6(APPLET(traceroute6, BB_DIR_USR_BIN, BB_SUID_MAYBE))
|
||||
+//applet:IF_TRACEROUTE(APPLET(traceroute, BB_DIR_BIN, BB_SUID_MAYBE))
|
||||
+//applet:IF_TRACEROUTE6(APPLET(traceroute6, BB_DIR_BIN, BB_SUID_MAYBE))
|
||||
|
||||
//kbuild:lib-$(CONFIG_TRACEROUTE) += traceroute.o
|
||||
//kbuild:lib-$(CONFIG_TRACEROUTE6) += traceroute.o
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/loginutils/passwd.c
|
||||
+++ b/loginutils/passwd.c
|
||||
@@ -23,7 +23,7 @@
|
||||
//config: With this option passwd will refuse new passwords which are "weak".
|
||||
|
||||
//applet:/* Needs to be run by root or be suid root - needs to change /etc/{passwd,shadow}: */
|
||||
-//applet:IF_PASSWD(APPLET(passwd, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
|
||||
+//applet:IF_PASSWD(APPLET(passwd, BB_DIR_BIN, BB_SUID_REQUIRE))
|
||||
|
||||
//kbuild:lib-$(CONFIG_PASSWD) += passwd.o
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
--- a/loginutils/chpasswd.c
|
||||
+++ b/loginutils/chpasswd.c
|
||||
@@ -89,6 +89,11 @@ int chpasswd_main(int argc UNUSED_PARAM,
|
||||
|
||||
crypt_make_pw_salt(salt, algo);
|
||||
free_me = pass = pw_encrypt(pass, salt, 0);
|
||||
+
|
||||
+ if (pass[0] == 0) {
|
||||
+ free(free_me);
|
||||
+ bb_perror_msg_and_die("password encryption failed");
|
||||
+ }
|
||||
}
|
||||
|
||||
/* This is rather complex: if user is not found in /etc/shadow,
|
||||
--- a/loginutils/cryptpw.c
|
||||
+++ b/loginutils/cryptpw.c
|
||||
@@ -87,7 +87,7 @@ int cryptpw_main(int argc UNUSED_PARAM,
|
||||
/* Supports: cryptpw -m sha256 PASS 'rounds=999999999$SALT' */
|
||||
char salt[MAX_PW_SALT_LEN + sizeof("rounds=999999999$")];
|
||||
char *salt_ptr;
|
||||
- char *password;
|
||||
+ char *password, *hash;
|
||||
const char *opt_m, *opt_S;
|
||||
int fd;
|
||||
|
||||
@@ -132,8 +132,12 @@ int cryptpw_main(int argc UNUSED_PARAM,
|
||||
/* may still be NULL on EOF/error */
|
||||
}
|
||||
|
||||
- if (password)
|
||||
- puts(pw_encrypt(password, salt, 1));
|
||||
+ if (password) {
|
||||
+ hash = pw_encrypt(password, salt, 1);
|
||||
+ if (hash[0] == 0)
|
||||
+ bb_perror_msg_and_die("password encryption failed");
|
||||
+ puts(hash);
|
||||
+ }
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
--- a/loginutils/passwd.c
|
||||
+++ b/loginutils/passwd.c
|
||||
@@ -187,6 +187,10 @@ int passwd_main(int argc UNUSED_PARAM, c
|
||||
if (!newp) {
|
||||
logmode = LOGMODE_STDIO;
|
||||
bb_error_msg_and_die("password for %s is unchanged", name);
|
||||
+ } else if (newp[0] == 0) {
|
||||
+ logmode = LOGMODE_STDIO;
|
||||
+ free(newp);
|
||||
+ bb_perror_msg_and_die("password encryption failed");
|
||||
}
|
||||
} else if (opt & OPT_lock) {
|
||||
if (!c)
|
||||
@@ -0,0 +1,42 @@
|
||||
From: Uwe Kleine-König <uwe@kleine-koenig.org>
|
||||
Date: Sat, 8 Oct 2022 19:22:52 +0200
|
||||
Subject: [PATCH] nslookup: ensure unique transaction IDs for the DNS queries
|
||||
|
||||
The transaction IDs generated by res_mkquery() for both glibc and musl only
|
||||
depends on the state of the monotonic clock.
|
||||
For some machines (here: a TP-Link RE200 powered by a MediaTek MT7620A)
|
||||
the monotonic clock has a coarse resolution (here: 20 µs) and it can happen
|
||||
that the requests for A and AAAA share the same transaction ID.
|
||||
|
||||
In that case the mapping from received responses to the sent queries
|
||||
doesn't work and name resolution fails as follows:
|
||||
|
||||
# /bin/busybox nslookup heise.de
|
||||
Server: 127.0.0.1
|
||||
Address: 127.0.0.1:53
|
||||
|
||||
Non-authoritative answer:
|
||||
Name: heise.de
|
||||
Address: 193.99.144.80
|
||||
|
||||
*** Can't find heise.de: No answer
|
||||
|
||||
because the AAAA reply is dropped as a duplicate reply to the A query.
|
||||
|
||||
To prevent this make sure the transaction IDs are unique.
|
||||
|
||||
Forwarded: http://lists.busybox.net/pipermail/busybox/2022-October/089911.html
|
||||
---
|
||||
--- a/networking/nslookup.c
|
||||
+++ b/networking/nslookup.c
|
||||
@@ -978,6 +978,10 @@ int nslookup_main(int argc UNUSED_PARAM,
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Ensure the Transaction IDs are unique */
|
||||
+ for (rc = 1; rc < G.query_count; rc++)
|
||||
+ G.query[rc].query[1] = G.query[rc - 1].query[1] + 1;
|
||||
+
|
||||
for (rc = 0; rc < G.serv_count;) {
|
||||
int c;
|
||||
|
||||
15
package/utils/busybox/selinux.config
Normal file
15
package/utils/busybox/selinux.config
Normal file
@@ -0,0 +1,15 @@
|
||||
CONFIG_SELINUX=y
|
||||
CONFIG_FEATURE_TAR_SELINUX=y
|
||||
CONFIG_CHCON=y
|
||||
CONFIG_GETENFORCE=y
|
||||
CONFIG_GETSEBOOL=y
|
||||
CONFIG_LOAD_POLICY=y
|
||||
CONFIG_MATCHPATHCON=y
|
||||
CONFIG_RUNCON=y
|
||||
CONFIG_SELINUXENABLED=y
|
||||
CONFIG_SESTATUS=y
|
||||
CONFIG_SETFILES=y
|
||||
CONFIG_FEATURE_SETFILES_CHECK_OPTION=y
|
||||
CONFIG_RESTORECON=y
|
||||
CONFIG_SETSEBOOL=y
|
||||
CONFIG_SETENFORCE=y
|
||||
110
package/utils/bzip2/Makefile
Normal file
110
package/utils/bzip2/Makefile
Normal file
@@ -0,0 +1,110 @@
|
||||
#
|
||||
# Copyright (C) 2007-2008 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bzip2
|
||||
PKG_VERSION:=1.0.8
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://sourceware.org/pub/bzip2
|
||||
PKG_HASH:=ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
|
||||
|
||||
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
|
||||
PKG_LICENSE:=bzip2-1.0.8
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_CPE_ID:=cpe:/a:bzip:bzip2
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/bzip2/Default
|
||||
SUBMENU:=Compression
|
||||
URL:=https://sourceware.org/bzip2/
|
||||
endef
|
||||
|
||||
define Package/libbz2
|
||||
$(call Package/bzip2/Default)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
DEPENDS:=
|
||||
TITLE:=bzip2 library.
|
||||
ABI_VERSION:=1.0
|
||||
endef
|
||||
|
||||
define Package/libbz2/description
|
||||
bzip2 is a freely available, patent free, high-quality
|
||||
data compressor. This packages provides libbz2 library.
|
||||
endef
|
||||
|
||||
define Package/bzip2
|
||||
$(call Package/bzip2/Default)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libbz2
|
||||
TITLE:=bzip2 is a compression utility.
|
||||
endef
|
||||
|
||||
define Package/bzip2/description
|
||||
bzip2 is a freely available, patent free, high-quality
|
||||
data compressor. This package provides the binary.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
$(FPIC)
|
||||
|
||||
CONFIGURE_ARGS += --prefix=/usr
|
||||
|
||||
MAKE_FLAGS += \
|
||||
-f Makefile-libbz2_so \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
all
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_BUILD_DIR)/bzlib.h $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
|
||||
$(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
|
||||
$(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so
|
||||
endef
|
||||
|
||||
define Package/libbz2/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
|
||||
$(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
|
||||
endef
|
||||
|
||||
define Package/bzip2/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bzip2-shared $(1)/usr/bin/bzip2
|
||||
$(INSTALL_DIR) $(1)/bin/
|
||||
$(LN) ../usr/bin/bzip2 $(1)/bin/bzip2
|
||||
endef
|
||||
|
||||
HOST_CFLAGS += \
|
||||
$(FPIC)
|
||||
|
||||
HOST_MAKE_FLAGS+= \
|
||||
CFLAGS="$(HOST_CFLAGS)" \
|
||||
LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
all
|
||||
|
||||
HOST_CONFIGURE_ARGS+= \
|
||||
--prefix=$(STAGING_DIR_HOSTPKG)
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) PREFIX=$(STAGING_DIR_HOSTPKG)/ install
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
||||
$(eval $(call BuildPackage,libbz2))
|
||||
$(eval $(call BuildPackage,bzip2))
|
||||
27
package/utils/bzip2/patches/020-no-utime.patch
Normal file
27
package/utils/bzip2/patches/020-no-utime.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
--- a/bzip2.c
|
||||
+++ b/bzip2.c
|
||||
@@ -69,7 +69,6 @@
|
||||
#if BZ_UNIX
|
||||
# include <fcntl.h>
|
||||
# include <sys/types.h>
|
||||
-# include <utime.h>
|
||||
# include <unistd.h>
|
||||
# include <sys/stat.h>
|
||||
# include <sys/times.h>
|
||||
@@ -1051,12 +1050,12 @@ void applySavedTimeInfoToOutputFile ( Ch
|
||||
{
|
||||
# if BZ_UNIX
|
||||
IntNative retVal;
|
||||
- struct utimbuf uTimBuf;
|
||||
+ struct timespec uTimBuf[2] = {};
|
||||
|
||||
- uTimBuf.actime = fileMetaInfo.st_atime;
|
||||
- uTimBuf.modtime = fileMetaInfo.st_mtime;
|
||||
+ uTimBuf[0].tv_sec = fileMetaInfo.st_atime;
|
||||
+ uTimBuf[1].tv_sec = fileMetaInfo.st_mtime;
|
||||
|
||||
- retVal = utime ( dstName, &uTimBuf );
|
||||
+ retVal = utimensat ( AT_FDCWD, dstName, uTimBuf , 0 );
|
||||
ERROR_IF_NOT_ZERO ( retVal );
|
||||
# endif
|
||||
}
|
||||
11
package/utils/bzip2/patches/021-fix-LDFLAGS.patch
Normal file
11
package/utils/bzip2/patches/021-fix-LDFLAGS.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/Makefile-libbz2_so
|
||||
+++ b/Makefile-libbz2_so
|
||||
@@ -35,7 +35,7 @@ OBJS= blocksort.o \
|
||||
bzlib.o
|
||||
|
||||
all: $(OBJS)
|
||||
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
|
||||
+ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 $(LDFLAGS) -o libbz2.so.1.0.8 $(OBJS)
|
||||
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
|
||||
rm -f libbz2.so.1.0
|
||||
ln -s libbz2.so.1.0.8 libbz2.so.1.0
|
||||
52
package/utils/checkpolicy/Makefile
Normal file
52
package/utils/checkpolicy/Makefile
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=checkpolicy
|
||||
PKG_VERSION:=3.5
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=7aa48ab2222a0b9881111d6d7f70c3014d3d9338827d9e02df105a68c0df5dbc
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_DEPENDS:=libselinux
|
||||
HOST_BUILD_DEPENDS:=libselinux/host
|
||||
|
||||
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
PKG_CPE_ID:=cpe:/a:selinuxproject:checkpolicy
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/checkpolicy
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=SELinux policy compiler
|
||||
URL:=http://selinuxproject.org/page/Main_Page
|
||||
endef
|
||||
|
||||
define Package/checkpolicy/description
|
||||
checkpolicy is the SELinux policy compiler. It uses libsepol
|
||||
to generate the binary policy. checkpolicy uses the static
|
||||
libsepol since it deals with low level details of the policy
|
||||
that have not been encapsulated/abstracted by a proper
|
||||
shared library interface.
|
||||
endef
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_MAKE_FLAGS += \
|
||||
PREFIX=$(STAGING_DIR_HOSTPKG)
|
||||
|
||||
define Package/checkpolicy/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,checkpolicy))
|
||||
52
package/utils/ct-bugcheck/Makefile
Normal file
52
package/utils/ct-bugcheck/Makefile
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# Copyright (C) 2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ct-bugcheck
|
||||
PKG_RELEASE:=2016-07-21
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ct-bugcheck
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Bug checking and reporting utility
|
||||
VERSION:=$(PKG_RELEASE)
|
||||
MAINTAINER:=Ben Greear <greearb@candelatech.com>
|
||||
endef
|
||||
|
||||
define Package/ct-bugcheck/description
|
||||
Scripts to check for bugs (like firmware crashes) and package them for reporting.
|
||||
Currently this script only checks for ath10k firmware crashes.
|
||||
Once installed, you can enable this tool by creating a file called
|
||||
/etc/config/bugcheck with the following contents:
|
||||
DO_BUGCHECK=1
|
||||
export DO_BUGCHECK
|
||||
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(CP) src/bugcheck.sh $(PKG_BUILD_DIR)/
|
||||
$(CP) src/bugchecker.sh $(PKG_BUILD_DIR)/
|
||||
$(CP) src/bugcheck.initd $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/ct-bugcheck/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bugcheck.sh $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bugchecker.sh $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bugcheck.initd $(1)/etc/init.d/bugcheck
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ct-bugcheck))
|
||||
16
package/utils/ct-bugcheck/src/bugcheck.initd
Normal file
16
package/utils/ct-bugcheck/src/bugcheck.initd
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2016 OpenWrt.org
|
||||
|
||||
START=99
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/bin/bugchecker.sh
|
||||
|
||||
# To actually make bugchecker.sh run, see comments
|
||||
# at top of its file.
|
||||
|
||||
start_service () {
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_close_instance
|
||||
}
|
||||
115
package/utils/ct-bugcheck/src/bugcheck.sh
Executable file
115
package/utils/ct-bugcheck/src/bugcheck.sh
Executable file
@@ -0,0 +1,115 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Check for ath10k (and maybe other) bugs, package them up,
|
||||
# and let user know what to do with them.
|
||||
|
||||
TMPLOC=/tmp
|
||||
CRASHDIR=$TMPLOC/bugcheck
|
||||
FOUND_BUG=0
|
||||
|
||||
# set -x
|
||||
|
||||
bugcheck_generic()
|
||||
{
|
||||
echo "OpenWrt crashlog report" > $CRASHDIR/info.txt
|
||||
date >> $CRASHDIR/info.txt
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "uname" >> $CRASHDIR/info.txt
|
||||
uname -a >> $CRASHDIR/info.txt
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "os-release" >> $CRASHDIR/info.txt
|
||||
cat /etc/os-release >> $CRASHDIR/info.txt
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "os-release" >> $CRASHDIR/info.txt
|
||||
cat /etc/os-release >> $CRASHDIR/info.txt
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "dmesg output" >> $CRASHDIR/info.txt
|
||||
dmesg >> $CRASHDIR/info.txt
|
||||
if [ -x /usr/bin/lspci ]
|
||||
then
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "lspci" >> $CRASHDIR/info.txt
|
||||
lspci >> $CRASHDIR/info.txt
|
||||
fi
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "cpuinfo" >> $CRASHDIR/info.txt
|
||||
cat /proc/cpuinfo >> $CRASHDIR/info.txt
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "meminfo" >> $CRASHDIR/info.txt
|
||||
cat /proc/cpuinfo >> $CRASHDIR/info.txt
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "cmdline" >> $CRASHDIR/info.txt
|
||||
cat /proc/cmdline >> $CRASHDIR/info.txt
|
||||
echo >> $CRASHDIR/info.txt
|
||||
echo "lsmod" >> $CRASHDIR/info.txt
|
||||
lsmod >> $CRASHDIR/info.txt
|
||||
}
|
||||
|
||||
roll_crashes()
|
||||
{
|
||||
# Roll any existing crashes
|
||||
if [ -d $CRASHDIR ]
|
||||
then
|
||||
if [ -d $CRASHDIR.1 ]
|
||||
then
|
||||
rm -fr $CRASHDIR.1
|
||||
fi
|
||||
mv $CRASHDIR $CRASHDIR.1
|
||||
fi
|
||||
|
||||
# Prepare location
|
||||
mkdir -p $CRASHDIR
|
||||
}
|
||||
|
||||
# ath10k, check debugfs entries.
|
||||
for i in /sys/kernel/debug/ieee80211/*/ath10k/fw_crash_dump
|
||||
do
|
||||
#echo "Checking $i"
|
||||
if cat $i > $TMPLOC/ath10k_crash.bin 2>&1
|
||||
then
|
||||
FOUND_BUG=1
|
||||
|
||||
#echo "Found ath10k crash data in $i"
|
||||
roll_crashes
|
||||
|
||||
ADIR=${i/fw_crash_dump/}
|
||||
|
||||
CTFW=0
|
||||
if grep -- -ct- $TMPLOC/ath10k_crash.bin > /dev/null 2>&1
|
||||
then
|
||||
CTFW=1
|
||||
fi
|
||||
|
||||
echo "Send bug reports to:" > $CRASHDIR/report_to.txt
|
||||
if [ -f $ADIR/ct_special -o $CTFW == "1" ]
|
||||
then
|
||||
# Looks like this is CT firmware or driver...
|
||||
echo "greearb@candelatech.com" >> $CRASHDIR/report_to.txt
|
||||
echo "and/or report or check for duplicates here:" >> $CRASHDIR/report_to.txt
|
||||
echo "https://github.com/greearb/ath10k-ct/issues" >> $CRASHDIR/report_to.txt
|
||||
else
|
||||
# Not sure who would want these bug reports for upstream...
|
||||
echo "https://openwrt.org/" >> $CRASHDIR/report_to.txt
|
||||
fi
|
||||
echo >> $CRASHDIR/report_to.txt
|
||||
echo "Please attach all files in this directory to bug reports." >> $CRASHDIR/report_to.txt
|
||||
|
||||
mv $TMPLOC/ath10k_crash.bin $CRASHDIR
|
||||
|
||||
# Add any more ath10k specific stuff here.
|
||||
|
||||
# And call generic bug reporting logic
|
||||
bugcheck_generic
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $FOUND_BUG == "1" ]
|
||||
then
|
||||
# Notify LUCI somehow?
|
||||
echo "bugcheck.sh found an issue to be reported" > /dev/kmsg
|
||||
echo "See $CRASHDIR for details on how to report this" > /dev/kmsg
|
||||
# Let calling code know something was wrong.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
29
package/utils/ct-bugcheck/src/bugchecker.sh
Executable file
29
package/utils/ct-bugcheck/src/bugchecker.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Periodically call bugcheck.sh script
|
||||
|
||||
CHECKER=bugcheck.sh
|
||||
SLEEPFOR=60
|
||||
|
||||
DO_BUGCHECK=0
|
||||
|
||||
# So, to enable this, you create an /etc/config/bugcheck file
|
||||
# with contents like:
|
||||
# DO_BUGCHECK=1
|
||||
# export DO_BUGCHECK
|
||||
|
||||
if [ -f /etc/config/bugcheck ]
|
||||
then
|
||||
. /etc/config/bugcheck
|
||||
fi
|
||||
|
||||
if [ $DO_BUGCHECK == 0 ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while true
|
||||
do
|
||||
$CHECKER
|
||||
sleep $SLEEPFOR
|
||||
done
|
||||
32
package/utils/debugcc/Makefile
Normal file
32
package/utils/debugcc/Makefile
Normal file
@@ -0,0 +1,32 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=debugcc
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/linux-msm/debugcc.git
|
||||
PKG_SOURCE_DATE:=2023-11-10
|
||||
PKG_SOURCE_VERSION:=d15bea7c05f224a85dd1fcec24b0f153dbad9f6e
|
||||
PKG_MIRROR_HASH:=4cd7a770a05db28f496a60eb9fe015a4af677bba05053b4d4be21adcf95e52e5
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_MAINTAINER:=Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
define Package/debugcc
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=QCOM debugcc utility
|
||||
DEPENDS:=@KERNEL_DEVMEM @(TARGET_qualcommax||TARGET_ipq806x||TARGET_ipq40xx)
|
||||
endef
|
||||
|
||||
define Package/debugcc/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(MESON_BUILD_DIR)/debugcc $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,debugcc))
|
||||
36
package/utils/dns320l-mcu/Makefile
Normal file
36
package/utils/dns320l-mcu/Makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dns320l-mcu
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/wigyori/dns320l-daemon.git
|
||||
PKG_SOURCE_DATE:=2024-05-11
|
||||
PKG_SOURCE_VERSION:=c74941880e0a8d2bc0344b3256b984397512e8c3
|
||||
PKG_MIRROR_HASH:=e0f186a0c139ccfac3d311f49e2fecdbd02fa3f9fe6ced4b1ce0baa603d49fc3
|
||||
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
|
||||
PKG_LICENSE:=GPL-3.0+
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/dns320l-mcu
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Utility to control the MCU on DNS-320L
|
||||
DEPENDS:=@TARGET_kirkwood
|
||||
URL:=https://github.com/wigyori/dns320l-mcu
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall"
|
||||
endef
|
||||
|
||||
define Package/dns320l-mcu/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/dns320l-mcu.init $(1)/etc/init.d/dns320l-mcu
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dns320l-daemon $(1)/usr/bin/dns320l-mcu
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dns320l-mcu))
|
||||
14
package/utils/dns320l-mcu/files/dns320l-mcu.init
Normal file
14
package/utils/dns320l-mcu/files/dns320l-mcu.init
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (c) 2024 OpenWrt.org
|
||||
|
||||
START=99
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/bin/dns320l-mcu
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
106
package/utils/dtc/Makefile
Normal file
106
package/utils/dtc/Makefile
Normal file
@@ -0,0 +1,106 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Copyright (C) 2016-2019 Yousong Zhou <yszhou4tech@gmail.com>
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dtc
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=29edce3d302a15563d8663198bbc398c5a0554765c83830d0d4c0409d21a16c4
|
||||
PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
|
||||
|
||||
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=GPL
|
||||
PKG_CPE_ID:=cpe:/a:dtc_project:dtc
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
define Package/dtc
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Device Tree Compiler
|
||||
URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
|
||||
endef
|
||||
|
||||
define Package/dtc/description
|
||||
Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
|
||||
as input a device-tree in a given format and outputs a device-tree in another
|
||||
format for booting kernels on embedded systems.
|
||||
endef
|
||||
|
||||
define Package/dtc/config
|
||||
config DTC_STATIC_BUILD
|
||||
depends on PACKAGE_dtc
|
||||
bool "Build dtc as static binary"
|
||||
default n
|
||||
help
|
||||
Builds dtc as a static binary.
|
||||
This is usefull in order to export live DTS from a device running
|
||||
various vendor modified OpenWrt versions.
|
||||
endef
|
||||
|
||||
define Package/dtc/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin
|
||||
endef
|
||||
|
||||
|
||||
# See Documentation/manual.txt for details about each utility
|
||||
define Package/fdt-utils
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Flat Device Tree Utilities
|
||||
URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
|
||||
DEPENDS:=+libfdt
|
||||
endef
|
||||
|
||||
define Package/fdt-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/convert-dtsv0 $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtdump $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtget $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtput $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtoverlay $(1)/usr/bin
|
||||
endef
|
||||
|
||||
|
||||
define Package/libfdt
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=a utility library for reading and manipulating dtb files
|
||||
URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
|
||||
endef
|
||||
|
||||
define Package/libfdt/description
|
||||
This is a library containing functions for manipulating Flat Device Trees.
|
||||
endef
|
||||
|
||||
define Package/libfdt/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdt*.so* $(1)/usr/lib
|
||||
endef
|
||||
|
||||
MESON_ARGS += \
|
||||
-Dtools=true \
|
||||
-Dyaml=disabled \
|
||||
-Dvalgrind=disabled \
|
||||
-Dpython=disabled \
|
||||
-Dstatic-build=$(if $(CONFIG_DTC_STATIC_BUILD),true,false)
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dtc))
|
||||
$(eval $(call BuildPackage,fdt-utils))
|
||||
$(eval $(call BuildPackage,libfdt))
|
||||
48
package/utils/dtc/patches/010-both-libraries.patch
Normal file
48
package/utils/dtc/patches/010-both-libraries.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
From da39ee0e68b6d9293133a7c41c6cf73354dce337 Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Wed, 21 Feb 2024 13:57:56 -0800
|
||||
Subject: [PATCH] libfdt: rework shared/static libraries
|
||||
|
||||
Instead of creating 2 libraries manualy, just call both_libraries and
|
||||
link to the appropriate one as requested.
|
||||
|
||||
Fixes compilation when passing -Ddefault_libraries=both as the
|
||||
static_library name is duplicated.
|
||||
|
||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||
---
|
||||
libfdt/meson.build | 17 +++++------------
|
||||
1 file changed, 5 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/libfdt/meson.build
|
||||
+++ b/libfdt/meson.build
|
||||
@@ -16,7 +16,7 @@ sources = files(
|
||||
'fdt_wip.c',
|
||||
)
|
||||
|
||||
-libfdt = library(
|
||||
+libfdt = both_libraries(
|
||||
'fdt', sources,
|
||||
version: '1.6.0',
|
||||
link_args: ['-Wl,--no-undefined', version_script],
|
||||
@@ -24,17 +24,12 @@ libfdt = library(
|
||||
install: true,
|
||||
)
|
||||
|
||||
-libfdt_a = static_library(
|
||||
- 'fdt', sources,
|
||||
- install: true,
|
||||
-)
|
||||
-
|
||||
libfdt_inc = include_directories('.')
|
||||
|
||||
if static_build
|
||||
- link_with = libfdt_a
|
||||
+ link_with = libfdt.get_static_lib()
|
||||
else
|
||||
- link_with = libfdt
|
||||
+ link_with = libfdt.get_shared_lib()
|
||||
endif
|
||||
|
||||
libfdt_dep = declare_dependency(
|
||||
339
package/utils/e2fsprogs/Makefile
Normal file
339
package/utils/e2fsprogs/Makefile
Normal file
@@ -0,0 +1,339 @@
|
||||
#
|
||||
# Copyright (C) 2006-2014 OpenWrt.org
|
||||
# Copyright 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=e2fsprogs
|
||||
PKG_VERSION:=1.47.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/
|
||||
PKG_HASH:=144af53f2bbd921cef6f8bea88bb9faddca865da3fbc657cc9b4d2001097d5db
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=NOTICE
|
||||
PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs
|
||||
|
||||
PKG_BUILD_DEPENDS:=util-linux
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=gc-sections lto
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Package/e2fsprogs
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
TITLE:=Ext2/3/4 filesystem utilities
|
||||
URL:=http://e2fsprogs.sourceforge.net/
|
||||
DEPENDS:=+libuuid +libext2fs +libe2p
|
||||
endef
|
||||
|
||||
define Package/e2fsprogs/description
|
||||
This package contains essential ext2 filesystem utilities which consists of
|
||||
e2fsck, mke2fs and most of the other core ext2 filesystem utilities.
|
||||
endef
|
||||
|
||||
define Package/libext2fs
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=ext2/3/4 filesystem library
|
||||
URL:=http://e2fsprogs.sourceforge.net/
|
||||
DEPENDS:=+libuuid +libblkid +libss +libcomerr
|
||||
ABI_VERSION:=2
|
||||
endef
|
||||
|
||||
define Package/libext2fs/description
|
||||
libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
|
||||
endef
|
||||
|
||||
define Package/libe2p
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=ext2fs userspace programs utility library
|
||||
URL:=http://e2fsprogs.sourceforge.net/
|
||||
DEPENDS:=+libuuid
|
||||
ABI_VERSION:=2
|
||||
endef
|
||||
|
||||
define Package/libe2p/description
|
||||
This package contains libe2p, ext2fs userspace programs utility library
|
||||
bundled with e2fsprogs.
|
||||
endef
|
||||
|
||||
define Package/libss
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=command-line interface parsing library
|
||||
URL:=http://e2fsprogs.sourceforge.net/
|
||||
DEPENDS:=+libcomerr
|
||||
ABI_VERSION:=2
|
||||
endef
|
||||
|
||||
define Package/libss/description
|
||||
This pacakge contains libss, a command-line interface parsing library
|
||||
bundled with e2fsprogs.
|
||||
endef
|
||||
|
||||
define Package/libcomerr
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=common error description library
|
||||
URL:=http://e2fsprogs.sourceforge.net/
|
||||
DEPENDS:=+libuuid
|
||||
ABI_VERSION:=0
|
||||
endef
|
||||
|
||||
define Package/libcomerr/description
|
||||
This package contains libcom_err, the common error description library
|
||||
bundled with e2fsprogs.
|
||||
endef
|
||||
|
||||
define Package/tune2fs
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem tune utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/resize2fs
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem resize utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/badblocks
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem badblocks utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/dumpe2fs
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem information dumping utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/e2freefrag
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem free space fragmentation information utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/e4crypt
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext4 Filesystem encryption utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/filefrag
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem file fragmentation report utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/debugfs
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem debugger
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/chattr
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem chattr utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
define Package/lsattr
|
||||
$(call Package/e2fsprogs)
|
||||
TITLE:=Ext2 Filesystem lsattr utility
|
||||
DEPENDS:= +e2fsprogs
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC)
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-testio-debug \
|
||||
--enable-elf-shlibs \
|
||||
--disable-libuuid \
|
||||
--disable-libblkid \
|
||||
--disable-uuidd \
|
||||
--disable-tls \
|
||||
--disable-nls \
|
||||
--disable-rpath \
|
||||
--disable-fuse2fs
|
||||
|
||||
ifneq ($(CONFIG_USE_MUSL),)
|
||||
CONFIGURE_VARS += ac_cv_func_lseek64=yes
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/util \
|
||||
BUILDCC="$(HOSTCC)" \
|
||||
CFLAGS="" \
|
||||
CPPFLAGS="" \
|
||||
LDFLAGS="" \
|
||||
V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1,) \
|
||||
subst
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
BUILDCC="$(HOSTCC)" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
ELF_OTHER_LIBS="$(TARGET_LDFLAGS) -luuid" \
|
||||
SYSLIBS="$(TARGET_LDFLAGS) -ldl -L$(PKG_BUILD_DIR)/lib/ -l:libcom_err.so.0.0" \
|
||||
V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1,) \
|
||||
all
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/ext2fs/ext2fs.pc $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/et/com_err.pc $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/e2p/e2p.pc $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/ss/ss.pc $(1)/usr/lib/pkgconfig
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libext2fs.{so,a}* $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libcom_err.{so,a}* $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libss.{so,a}* $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/libe2p.{so,a}* $(1)/usr/lib
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/include/ext2fs
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/ext2fs/*.h $(1)/usr/include/ext2fs
|
||||
$(INSTALL_DIR) $(1)/usr/include/et
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/et/*.h $(1)/usr/include/et
|
||||
# Apparently there is some confusion
|
||||
echo "#include <et/com_err.h>" > $(1)/usr/include/com_err.h
|
||||
$(INSTALL_DIR) $(1)/usr/include/ss
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/lib/ss/ss.h \
|
||||
$(PKG_BUILD_DIR)/lib/ss/ss_err.h \
|
||||
$(1)/usr/include/ss/
|
||||
$(INSTALL_DIR) $(1)/usr/include/e2p
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/e2p/e2p.h $(1)/usr/include/e2p
|
||||
endef
|
||||
|
||||
define Package/e2fsprogs/conffiles
|
||||
/etc/e2fsck.conf
|
||||
endef
|
||||
|
||||
define Package/e2fsprogs/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
|
||||
$(LN) mke2fs $(1)/usr/sbin/mkfs.ext2
|
||||
$(LN) mke2fs $(1)/usr/sbin/mkfs.ext3
|
||||
$(LN) mke2fs $(1)/usr/sbin/mkfs.ext4
|
||||
$(LN) e2fsck $(1)/usr/sbin/fsck.ext2
|
||||
$(LN) e2fsck $(1)/usr/sbin/fsck.ext3
|
||||
$(LN) e2fsck $(1)/usr/sbin/fsck.ext4
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/lib/functions/fsck
|
||||
$(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
|
||||
$(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
|
||||
endef
|
||||
|
||||
define Package/libe2p/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libcomerr/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libss/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libss.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libext2fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libext2fs/install_lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/ext2fs/libext2fs.a $(1)/usr/lib/libext2fs_pic.a
|
||||
endef
|
||||
|
||||
define Package/tune2fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/resize2fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/badblocks/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/dumpe2fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dumpe2fs $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/e2freefrag/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2freefrag $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/e4crypt/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e4crypt $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/filefrag/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/filefrag $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/debugfs/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/debugfs $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
define Package/chattr/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chattr $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/lsattr/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsattr $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libcomerr))
|
||||
$(eval $(call BuildPackage,libss))
|
||||
$(eval $(call BuildPackage,libext2fs))
|
||||
$(eval $(call BuildPackage,libe2p))
|
||||
$(eval $(call BuildPackage,e2fsprogs))
|
||||
$(eval $(call BuildPackage,tune2fs))
|
||||
$(eval $(call BuildPackage,resize2fs))
|
||||
$(eval $(call BuildPackage,badblocks))
|
||||
$(eval $(call BuildPackage,dumpe2fs))
|
||||
$(eval $(call BuildPackage,e2freefrag))
|
||||
$(eval $(call BuildPackage,e4crypt))
|
||||
$(eval $(call BuildPackage,filefrag))
|
||||
$(eval $(call BuildPackage,debugfs))
|
||||
$(eval $(call BuildPackage,chattr))
|
||||
$(eval $(call BuildPackage,lsattr))
|
||||
3
package/utils/e2fsprogs/files/e2fsck.conf
Normal file
3
package/utils/e2fsprogs/files/e2fsck.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
[options]
|
||||
broken_system_clock = true
|
||||
|
||||
38
package/utils/e2fsprogs/files/e2fsck.sh
Normal file
38
package/utils/e2fsprogs/files/e2fsck.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2010 Vertical Communications
|
||||
# Copyright 2012 OpenWrt.org
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
fsck_e2fsck() {
|
||||
set -o pipefail
|
||||
e2fsck -p "$device" 2>&1 | logger -t "fstab: e2fsck ($device)"
|
||||
local status="$?"
|
||||
set +o pipefail
|
||||
case "$status" in
|
||||
0|1) ;; #success
|
||||
2) reboot;;
|
||||
4) echo "e2fsck ($device): Warning! Uncorrected errors."| logger -t fstab
|
||||
return 1
|
||||
;;
|
||||
*) echo "e2fsck ($device): Error $status. Check not complete."| logger -t fstab;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
fsck_ext2() {
|
||||
fsck_e2fsck "$@"
|
||||
}
|
||||
|
||||
fsck_ext3() {
|
||||
fsck_e2fsck "$@"
|
||||
}
|
||||
|
||||
fsck_ext4() {
|
||||
fsck_e2fsck "$@"
|
||||
}
|
||||
|
||||
append libmount_known_fsck "ext2"
|
||||
append libmount_known_fsck "ext3"
|
||||
append libmount_known_fsck "ext4"
|
||||
40
package/utils/e2fsprogs/patches/000-relocatable.patch
Normal file
40
package/utils/e2fsprogs/patches/000-relocatable.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
--- a/lib/et/compile_et.sh.in
|
||||
+++ b/lib/et/compile_et.sh.in
|
||||
@@ -2,8 +2,14 @@
|
||||
#
|
||||
#
|
||||
|
||||
-AWK=@AWK@
|
||||
-DIR=@datadir@/et
|
||||
+if test "x$STAGING_DIR" = x ; then
|
||||
+ AWK=@AWK@
|
||||
+ DIR=@datadir@/et
|
||||
+else
|
||||
+ AWK=awk
|
||||
+ DIR="$STAGING_DIR/../hostpkg/share/et"
|
||||
+fi
|
||||
+
|
||||
|
||||
if test "$1" = "--build-tree" ; then
|
||||
shift;
|
||||
--- a/lib/ss/mk_cmds.sh.in
|
||||
+++ b/lib/ss/mk_cmds.sh.in
|
||||
@@ -2,10 +2,16 @@
|
||||
#
|
||||
#
|
||||
|
||||
-DIR=@datadir@/ss
|
||||
-AWK=@AWK@
|
||||
SED=sed
|
||||
|
||||
+if test "x$STAGING_DIR" = x ; then
|
||||
+ DIR=@datadir@/ss
|
||||
+ AWK=@AWK@
|
||||
+else
|
||||
+ DIR="$STAGING_DIR/../hostpkg/share/ss"
|
||||
+ AWK=awk
|
||||
+fi
|
||||
+
|
||||
for as_var in \
|
||||
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
|
||||
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
|
||||
13
package/utils/e2fsprogs/patches/001-com_err_version.patch
Normal file
13
package/utils/e2fsprogs/patches/001-com_err_version.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- a/lib/et/Makefile.in
|
||||
+++ b/lib/et/Makefile.in
|
||||
@@ -26,8 +26,8 @@ SHARE_FILES= et_c.awk et_h.awk
|
||||
LIBRARY= libcom_err
|
||||
LIBDIR= et
|
||||
|
||||
-ELF_VERSION = 2.1
|
||||
-ELF_SO_VERSION = 2
|
||||
+ELF_VERSION = 0.0
|
||||
+ELF_SO_VERSION = 0
|
||||
ELF_IMAGE = libcom_err
|
||||
ELF_MYDIR = et
|
||||
ELF_INSTALL_DIR = $(root_libdir)
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/util/subst.c
|
||||
+++ b/util/subst.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#else
|
||||
#define HAVE_SYS_STAT_H
|
||||
#define HAVE_SYS_TIME_H
|
||||
+#define HAVE_SYS_STAT_H
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
160
package/utils/f2fs-tools/Makefile
Normal file
160
package/utils/f2fs-tools/Makefile
Normal file
@@ -0,0 +1,160 @@
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=f2fs-tools
|
||||
PKG_VERSION:=1.16.0
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
|
||||
PKG_HASH:=208c7a07e95383fbd7b466b5681590789dcb41f41bf197369c41a95383b57c5e
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_CPE_ID:=cpe:/a:f2fs-tools_project:f2fs-tools
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/f2fs-tools/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
DEPENDS:=+libf2fs
|
||||
URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git
|
||||
VARIANT:=default
|
||||
endef
|
||||
|
||||
define Package/f2fs-tools/SELinux
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Filesystem
|
||||
DEPENDS:=+libf2fs-selinux +libselinux
|
||||
URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git
|
||||
VARIANT:=selinux
|
||||
endef
|
||||
|
||||
define Package/mkf2fs
|
||||
$(Package/f2fs-tools/Default)
|
||||
TITLE:=Utility for creating a Flash-Friendly File System (F2FS)
|
||||
CONFLICTS:=mkf2fs-selinux
|
||||
endef
|
||||
|
||||
define Package/mkf2fs-selinux
|
||||
$(Package/f2fs-tools/SELinux)
|
||||
TITLE:=Utility for creating a Flash-Friendly File System (F2FS) with SELinux support
|
||||
endef
|
||||
|
||||
define Package/f2fsck
|
||||
$(Package/f2fs-tools/Default)
|
||||
TITLE:=Utility for checking/repairing a Flash-Friendly File System (F2FS)
|
||||
CONFLICTS:=f2fsck-selinux
|
||||
endef
|
||||
|
||||
define Package/f2fsck-selinux
|
||||
$(Package/f2fs-tools/SELinux)
|
||||
TITLE:=Utility for checking/repairing a Flash-Friendly File System (F2FS) with SELinux support
|
||||
endef
|
||||
|
||||
define Package/f2fs-tools
|
||||
$(Package/f2fs-tools/Default)
|
||||
TITLE:=Tools for Flash-Friendly File System (F2FS)
|
||||
DEPENDS += +mkf2fs +f2fsck
|
||||
CONFLICTS:=f2fs-tools-selinux
|
||||
endef
|
||||
|
||||
define Package/f2fs-tools-selinux
|
||||
$(Package/f2fs-tools/SELinux)
|
||||
TITLE:=Tools for Flash-Friendly File System (F2FS) with SELinux support
|
||||
DEPENDS += +mkf2fs-selinux +f2fsck-selinux
|
||||
endef
|
||||
|
||||
define Package/libf2fs
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for Flash-Friendly File System (F2FS) tools
|
||||
DEPENDS:=+libuuid
|
||||
ABI_VERSION:=6
|
||||
CONFLICTS:=libf2fs-selinux
|
||||
VARIANT:=default
|
||||
endef
|
||||
|
||||
define Package/libf2fs-selinux
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for Flash-Friendly File System (F2FS) tools with SELinux support
|
||||
DEPENDS:=+libuuid +libselinux
|
||||
ABI_VERSION:=6
|
||||
VARIANT:=selinux
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-static \
|
||||
--without-blkid \
|
||||
--without-lzo2 \
|
||||
--without-lz4
|
||||
|
||||
ifneq ($(BUILD_VARIANT),selinux)
|
||||
CONFIGURE_ARGS += --without-selinux
|
||||
endif
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
ac_cv_file__git=no
|
||||
|
||||
ifneq ($(CONFIG_USE_MUSL),)
|
||||
CONFIGURE_VARS += ac_cv_func_lseek64=yes
|
||||
endif
|
||||
|
||||
define Package/libf2fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libf2fs.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
Package/libf2fs-selinux/install = $(Package/libf2fs/install)
|
||||
|
||||
define Package/mkf2fs/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.f2fs $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
Package/mkf2fs-selinux/install = $(Package/mkf2fs/install)
|
||||
|
||||
define Package/f2fsck/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.f2fs $(1)/usr/sbin
|
||||
$(LN) ../sbin/fsck.f2fs $(1)/usr/sbin/defrag.f2fs
|
||||
$(LN) ../sbin/fsck.f2fs $(1)/usr/sbin/dump.f2fs
|
||||
$(LN) ../sbin/fsck.f2fs $(1)/usr/sbin/sload.f2fs
|
||||
$(LN) ../sbin/fsck.f2fs $(1)/usr/sbin/resize.f2fs
|
||||
$(LN) ../sbin/fsck.f2fs $(1)/usr/sbin/f2fslabel
|
||||
endef
|
||||
|
||||
Package/f2fsck-selinux/install = $(Package/f2fsck/install)
|
||||
|
||||
define Package/f2fs-tools/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fibmap.f2fs $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parse.f2fs $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
Package/f2fs-tools-selinux/install = $(Package/f2fs-tools/install)
|
||||
|
||||
$(eval $(call BuildPackage,libf2fs))
|
||||
$(eval $(call BuildPackage,libf2fs-selinux))
|
||||
$(eval $(call BuildPackage,mkf2fs))
|
||||
$(eval $(call BuildPackage,mkf2fs-selinux))
|
||||
$(eval $(call BuildPackage,f2fsck))
|
||||
$(eval $(call BuildPackage,f2fsck-selinux))
|
||||
$(eval $(call BuildPackage,f2fs-tools))
|
||||
$(eval $(call BuildPackage,f2fs-tools-selinux))
|
||||
39
package/utils/fbtest/Makefile
Normal file
39
package/utils/fbtest/Makefile
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# Copyright (C) 2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fbtest
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/fbtest
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Frame buffer device testing tool
|
||||
DEPENDS:=@DISPLAY_SUPPORT
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
endef
|
||||
|
||||
define Package/fbtest/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fbtest $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,fbtest))
|
||||
14
package/utils/fbtest/src/Makefile
Normal file
14
package/utils/fbtest/src/Makefile
Normal file
@@ -0,0 +1,14 @@
|
||||
CC = gcc
|
||||
CFLAGS = -Wall
|
||||
OBJS = fbtest.o
|
||||
|
||||
all: fbtest
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
fbtest: $(OBJS)
|
||||
$(CC) -o $@ $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f fbtest *.o
|
||||
446
package/utils/fbtest/src/fbtest.c
Normal file
446
package/utils/fbtest/src/fbtest.c
Normal file
@@ -0,0 +1,446 @@
|
||||
/******************************************************************************
|
||||
* fbtest - fbtest.c
|
||||
* test program for the tuxbox-framebuffer device
|
||||
* tests all GTX/eNX supported modes
|
||||
*
|
||||
* (c) 2003 Carsten Juttner (carjay@gmx.net)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* The Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
******************************************************************************
|
||||
* $Id: fbtest.c,v 1.5 2005/01/14 23:14:41 carjay Exp $
|
||||
******************************************************************************/
|
||||
|
||||
// TODO: - should restore the colour map and mode to what it was before
|
||||
// - is colour map handled correctly?
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <linux/fb.h>
|
||||
|
||||
#define FBDEV "/dev/fb0"
|
||||
|
||||
struct vidsize{
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
static
|
||||
const struct vidsize vidsizetable[]={ // all supported sizes
|
||||
{720,576},{720,480},{720,288},{720,240},
|
||||
{640,576},{640,480},{640,288},{640,240},
|
||||
{360,576},{360,480},{360,288},{360,240},
|
||||
{320,576},{320,480},{320,288},{320,240}
|
||||
};
|
||||
#define VIDSIZENUM (sizeof(vidsizetable)/sizeof(struct vidsize))
|
||||
|
||||
enum pixenum{ // keep in sync with pixname !
|
||||
CLUT4=0,
|
||||
CLUT8,
|
||||
RGB565,
|
||||
ARGB1555,
|
||||
ARGB
|
||||
};
|
||||
const char *pixname[] = {
|
||||
"CLUT4",
|
||||
"CLUT8",
|
||||
"RGB565",
|
||||
"ARGB1555",
|
||||
"ARGB"
|
||||
};
|
||||
|
||||
struct pixelformat{
|
||||
char *name;
|
||||
struct fb_bitfield red;
|
||||
struct fb_bitfield green;
|
||||
struct fb_bitfield blue;
|
||||
struct fb_bitfield transp;
|
||||
char bpp;
|
||||
char pixenum;
|
||||
};
|
||||
|
||||
static // so far these are all modes supported by the eNX (only partially by GTX)
|
||||
const struct pixelformat pixelformattable[] = {
|
||||
{ .name = "CLUT4 ARGB8888", // CLUT4 (ARGB8888)
|
||||
.bpp = 4, .pixenum = CLUT4,
|
||||
.red = { .offset = 0, .length=8, .msb_right =0 },
|
||||
.green = { .offset = 0, .length=8, .msb_right =0 },
|
||||
.blue = { .offset = 0, .length=8, .msb_right =0 },
|
||||
.transp= { .offset = 0, .length=8, .msb_right =0 }
|
||||
},
|
||||
{ .name = "CLUT4 ARGB1555", // CLUT4 (ARGB1555)
|
||||
.bpp = 4, .pixenum = CLUT4,
|
||||
.red = { .offset = 0, .length=5, .msb_right =0 },
|
||||
.green = { .offset = 0, .length=5, .msb_right =0 },
|
||||
.blue = { .offset = 0, .length=5, .msb_right =0 },
|
||||
.transp= { .offset = 0, .length=1, .msb_right =0 }
|
||||
},
|
||||
{ .name = "CLUT8 ARGB8888", // CLUT8 (ARGB8888)
|
||||
.bpp = 8, .pixenum = CLUT8,
|
||||
.red = { .offset = 0, .length=8, .msb_right =0 },
|
||||
.green = { .offset = 0, .length=8, .msb_right =0 },
|
||||
.blue = { .offset = 0, .length=8, .msb_right =0 },
|
||||
.transp= { .offset = 0, .length=8, .msb_right =0 }
|
||||
},
|
||||
{ .name = "CLUT8 ARGB1555", // CLUT8 (ARGB1555)
|
||||
.bpp = 8, .pixenum = CLUT8,
|
||||
.red = { .offset = 0, .length=5, .msb_right =0 },
|
||||
.green = { .offset = 0, .length=5, .msb_right =0 },
|
||||
.blue = { .offset = 0, .length=5, .msb_right =0 },
|
||||
.transp= { .offset = 0, .length=1, .msb_right =0 }
|
||||
},
|
||||
{ .name = "ARGB1555", // ARGB1555
|
||||
.bpp = 16, .pixenum = ARGB1555,
|
||||
.red = { .offset = 10, .length=5, .msb_right =0 },
|
||||
.green = { .offset = 5, .length=5, .msb_right =0 },
|
||||
.blue = { .offset = 0, .length=5, .msb_right =0 },
|
||||
.transp= { .offset = 15, .length=1, .msb_right =0 }
|
||||
},
|
||||
{ .name = "RGB565", // RGB565
|
||||
.bpp = 16, .pixenum = RGB565,
|
||||
.red = { .offset = 11, .length=5, .msb_right =0 },
|
||||
.green = { .offset = 5, .length=6, .msb_right =0 },
|
||||
.blue = { .offset = 0, .length=5, .msb_right =0 },
|
||||
.transp= { .offset = 0, .length=0, .msb_right =0 }
|
||||
},
|
||||
{ .name = "ARGB", // 32 f*cking bits, the real McCoy :)
|
||||
.bpp = 32, .pixenum = ARGB,
|
||||
.red = { .offset = 16, .length=8, .msb_right =0 },
|
||||
.green = { .offset = 8, .length=8, .msb_right =0 },
|
||||
.blue = { .offset = 0, .length=8, .msb_right =0 },
|
||||
.transp= { .offset = 24, .length=8, .msb_right =0 }
|
||||
}
|
||||
};
|
||||
#define PIXELFORMATNUM (sizeof(pixelformattable)/sizeof(struct pixelformat))
|
||||
|
||||
struct colour {
|
||||
__u16 r;
|
||||
__u16 g;
|
||||
__u16 b;
|
||||
__u16 a;
|
||||
};
|
||||
static
|
||||
struct colour colourtable[] = {
|
||||
{.r =0xffff, .g = 0xffff, .b=0xffff, .a=0xffff}, // fully transparent white
|
||||
{.r =0xffff, .g = 0x0000, .b=0x0000, .a=0x0000}, // red
|
||||
{.r =0x0000, .g = 0xffff, .b=0x0000, .a=0x0000}, // green
|
||||
{.r =0x0000, .g = 0x0000, .b=0xffff, .a=0x0000}, // blue
|
||||
{.r =0x0000, .g = 0x0000, .b=0x0000, .a=0x0000} // black
|
||||
};
|
||||
#define COLOURNUM (sizeof(colourtable)/sizeof(struct colour))
|
||||
|
||||
struct rect{
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
const struct colour *col;
|
||||
};
|
||||
struct pixel{ // up to 32 bits of pixel information
|
||||
char byte[4];
|
||||
};
|
||||
|
||||
void col2pixel (struct pixel *pix, const struct pixelformat *pixf, const struct colour *col){
|
||||
switch (pixf->pixenum){
|
||||
case RGB565:
|
||||
pix->byte[0]=(col->r&0xf8)|(col->g&0xfc)>>5;
|
||||
pix->byte[1]=(col->g&0xfc)<<3|(col->b&0xf8)>>3;
|
||||
break;
|
||||
case ARGB1555:
|
||||
pix->byte[0]=(col->a&0x80)|(col->r&0xf8)>>1|(col->g&0xf8)>>6;
|
||||
pix->byte[1]=(col->g&0xf8)<<2|(col->b&0xf8)>>3;
|
||||
break;
|
||||
case ARGB:
|
||||
pix->byte[0]=col->a;
|
||||
pix->byte[1]=col->r;
|
||||
pix->byte[2]=col->g;
|
||||
pix->byte[3]=col->b;
|
||||
break;
|
||||
default:
|
||||
printf ("unknown pixelformat\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
int setmode(int fbd, const struct pixelformat *pixf,const struct vidsize *vids){
|
||||
struct fb_var_screeninfo var;
|
||||
int stat;
|
||||
stat = ioctl (fbd, FBIOGET_VSCREENINFO,&var);
|
||||
if (stat<0) return -2;
|
||||
|
||||
var.xres= vids->width;
|
||||
var.xres_virtual = vids->width;
|
||||
var.yres= vids->height;
|
||||
var.yres_virtual = vids->height;
|
||||
|
||||
var.bits_per_pixel = pixf->bpp;
|
||||
var.red = pixf->red;
|
||||
var.green = pixf->green;
|
||||
var.blue = pixf->blue;
|
||||
var.transp = pixf->transp;
|
||||
|
||||
stat = ioctl (fbd, FBIOPUT_VSCREENINFO,&var);
|
||||
if (stat<0) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// unefficient implementation, do NOT use it for your next ego shooter, please :)
|
||||
// for 4-Bit only rectangles with even width are supported
|
||||
// CLUT-modes use value of red component as index
|
||||
void drawrect(void *videoram, struct rect *r, const struct pixelformat *pixf, const struct vidsize *vids){
|
||||
int x,y,corwidth, bpp = 0, tocopy = 1;
|
||||
struct pixel pix;
|
||||
unsigned char *pmem = videoram;
|
||||
corwidth = r->width; // actually only "corrected" for 4 Bit
|
||||
|
||||
if (pixf->pixenum!=CLUT4&&pixf->pixenum!=CLUT8){
|
||||
switch (pixf->pixenum){
|
||||
case ARGB1555:
|
||||
case RGB565:
|
||||
bpp = 16;
|
||||
tocopy = 2;
|
||||
break;
|
||||
case ARGB:
|
||||
bpp = 32;
|
||||
tocopy = 4;
|
||||
break;
|
||||
default:
|
||||
printf ("drawrect: unknown pixelformat(%d) bpp:%d\n",pixf->pixenum,pixf->bpp);
|
||||
exit(1);
|
||||
}
|
||||
col2pixel(&pix,pixf,r->col);
|
||||
} else {
|
||||
switch (pixf->pixenum){ // CLUT = Colour LookUp Table (palette)
|
||||
case CLUT4: // take red value as index in this case
|
||||
pix.byte[0]=(r->col->r)<<4|(r->col->r&0xf); // slightly cryptic... "rect->colour->red"
|
||||
corwidth>>=1; // we copy bytes
|
||||
bpp=4;
|
||||
tocopy=1;
|
||||
break;
|
||||
case CLUT8:
|
||||
pix.byte[0]=(r->col->r&0xff);
|
||||
bpp=8;
|
||||
tocopy=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
pmem=videoram+((((r->y*vids->width)+r->x)*bpp)>>3);
|
||||
for (y=0;y<r->height;y++){
|
||||
int offset = 0;
|
||||
for (x=0;x<corwidth;x++){
|
||||
memcpy (pmem+offset,pix.byte,tocopy);
|
||||
offset+=tocopy;
|
||||
}
|
||||
pmem +=((vids->width*bpp)>>3); // skip one whole line, actually should be taken from "fix-info"
|
||||
}
|
||||
}
|
||||
|
||||
// create quick little test image, 4 colours from table
|
||||
void draw4field(void *videoram, const struct pixelformat *pixf, const struct vidsize *vids){
|
||||
struct rect r;
|
||||
struct colour c;
|
||||
int height, width;
|
||||
c.r = 1; // only used for the indexed modes, r is taken as index
|
||||
height = vids->height;
|
||||
width = vids->width;
|
||||
|
||||
r.height = height>>1;
|
||||
r.width = width>>1;
|
||||
r.x = 0; r.y = 0;
|
||||
if (pixf->pixenum==CLUT4||pixf->pixenum==CLUT8) r.col = &c;
|
||||
else r.col = &colourtable[1];
|
||||
drawrect (videoram, &r, pixf, vids);
|
||||
|
||||
r.x = width/2; r.y = 0;
|
||||
if (pixf->pixenum==CLUT4||pixf->pixenum==CLUT8) c.r = 2;
|
||||
else r.col = &colourtable[2];
|
||||
drawrect (videoram, &r, pixf, vids);
|
||||
|
||||
r.x = 0; r.y = height/2;
|
||||
if (pixf->pixenum==CLUT4||pixf->pixenum==CLUT8) c.r = 3;
|
||||
else r.col = &colourtable[3];
|
||||
drawrect (videoram, &r, pixf, vids);
|
||||
|
||||
r.x = width/2; r.y = height/2;
|
||||
if (pixf->pixenum==CLUT4||pixf->pixenum==CLUT8) c.r = 0;
|
||||
else r.col = &colourtable[0];
|
||||
drawrect (videoram, &r, pixf, vids);
|
||||
}
|
||||
|
||||
void usage(char *name){
|
||||
printf ("Usage: %s [options]\n"
|
||||
"Options: -f<pixelformat>\n"
|
||||
" where format is one of:\n"
|
||||
" CLUT4,CLUT8,ARGB1555,RGB565,ARGB\n"
|
||||
" -s<width>x<heigth>\n"
|
||||
" where width is either 720,640,360,320\n"
|
||||
" and height is either 288,240,480,576\n"
|
||||
" -n\n"
|
||||
" disables clearing the framebuffer after drawing\n"
|
||||
" the testimage. This can be useful to keep the last\n"
|
||||
" drawn image onscreen.\n"
|
||||
"\nExample: %s -fRGB322\n",name,name);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main (int argc,char **argv){
|
||||
struct fb_fix_screeninfo fix;
|
||||
struct fb_var_screeninfo var;
|
||||
struct fb_cmap cmap;
|
||||
struct rect r;
|
||||
int fbd;
|
||||
unsigned char *pfb;
|
||||
int stat;
|
||||
int optchar,fmode=-1,smode=-1,clear=1;
|
||||
int i_cmap,i_size,i_pix;
|
||||
extern char *optarg;
|
||||
|
||||
if (argc!=0&&argc>4) usage(argv[0]);
|
||||
while ( (optchar = getopt (argc,argv,"f:s:n"))!= -1){
|
||||
int i,height,width;
|
||||
switch (optchar){
|
||||
case 'f':
|
||||
for (i=0;i<(sizeof(pixname)/sizeof(char*));i++){
|
||||
if (!strncmp (optarg,pixname[i],strlen(pixname[i]))){
|
||||
fmode=i;
|
||||
printf ("displaying only %s-modes\n",pixname[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fmode==-1){
|
||||
printf ("unknown pixelformat\n");
|
||||
exit(0);
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
if (sscanf (optarg,"%dx%d",&width,&height)!=2){
|
||||
printf ("parsing size failed\n");
|
||||
exit(0);
|
||||
} else {
|
||||
printf ("requested size %dx%d\n",width,height);
|
||||
for (i=0;i<VIDSIZENUM;i++){
|
||||
if (vidsizetable[i].width == width &&
|
||||
vidsizetable[i].height == height){
|
||||
smode = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (smode==-1){
|
||||
printf ("this size is not supported\n");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'n':
|
||||
clear = 0;
|
||||
printf ("clearing framebuffer after drawing is disabled\n");
|
||||
break;
|
||||
case '?':
|
||||
usage (argv[0]);
|
||||
}
|
||||
}
|
||||
|
||||
fbd = open (FBDEV, O_RDWR);
|
||||
if (fbd<0){
|
||||
perror ("Error opening framebuffer device");
|
||||
return 1;
|
||||
}
|
||||
stat = ioctl (fbd, FBIOGET_FSCREENINFO,&fix);
|
||||
if (stat<0){
|
||||
perror ("Error getting fix screeninfo");
|
||||
return 1;
|
||||
}
|
||||
stat = ioctl (fbd, FBIOGET_VSCREENINFO,&var);
|
||||
if (stat<0){
|
||||
perror ("Error getting var screeninfo");
|
||||
return 1;
|
||||
}
|
||||
stat = ioctl (fbd, FBIOPUT_VSCREENINFO,&var);
|
||||
if (stat<0){
|
||||
perror ("Error setting mode");
|
||||
return 1;
|
||||
}
|
||||
pfb = mmap (0, fix.smem_len, PROT_READ|PROT_WRITE, MAP_SHARED, fbd, 0);
|
||||
if (pfb == MAP_FAILED){
|
||||
perror ("Error mmap'ing framebuffer device");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// iterate over all modes
|
||||
for (i_pix=0;i_pix<PIXELFORMATNUM;i_pix++){
|
||||
if (fmode!=-1 && pixelformattable[i_pix].pixenum != fmode) continue;
|
||||
printf ("testing: %s",pixelformattable[i_pix].name);
|
||||
printf (" for sizes: \n");
|
||||
for (i_size=0;i_size<VIDSIZENUM;i_size++){
|
||||
if (smode!=-1 && i_size!=smode) continue;
|
||||
printf ("%dx%d ",vidsizetable[i_size].width,vidsizetable[i_size].height);
|
||||
fflush(stdout);
|
||||
if ((i_size%4)==3) printf ("\n");
|
||||
|
||||
// try to set mode
|
||||
stat = setmode(fbd,&pixelformattable[i_pix],&vidsizetable[i_size]);
|
||||
if (stat==-2) perror ("fbtest: could not get fb_var-screeninfo from fb-device");
|
||||
else if (stat==-1){
|
||||
printf ("\nCould not set mode %s (%dx%d), possible reasons:\n"
|
||||
"- you have a GTX (soz m8)\n"
|
||||
"- your configuration does not have enough graphics RAM\n"
|
||||
"- you found a bug\n"
|
||||
"choose your poison accordingly...\n",
|
||||
pixelformattable[i_pix].name,vidsizetable[i_size].width,vidsizetable[i_size].height);
|
||||
continue;
|
||||
}
|
||||
// fill cmap;
|
||||
cmap.len = 1;
|
||||
if ((pixelformattable[i_pix].bpp==4)||
|
||||
((pixelformattable[i_pix].bpp==8)&&(pixelformattable[i_pix].red.length!=3))){
|
||||
for (i_cmap=0;i_cmap<COLOURNUM;i_cmap++){
|
||||
cmap.start=i_cmap;
|
||||
cmap.red=&colourtable[i_cmap].r;
|
||||
cmap.green=&colourtable[i_cmap].g;
|
||||
cmap.blue=&colourtable[i_cmap].b;
|
||||
cmap.transp=&colourtable[i_cmap].a;
|
||||
stat = ioctl (fbd, FBIOPUTCMAP, &cmap);
|
||||
if (stat<0) printf ("setting colourmap failed\n");
|
||||
}
|
||||
}
|
||||
// create the test image
|
||||
draw4field(pfb,&pixelformattable[i_pix],&vidsizetable[i_size]);
|
||||
usleep (500000);
|
||||
// clear screen
|
||||
if (clear){
|
||||
r.x=r.y=0;r.width = vidsizetable[i_size].width; r.height = vidsizetable[i_size].height;
|
||||
r.col = &colourtable[4];
|
||||
drawrect(pfb,&r,&pixelformattable[i_pix],&vidsizetable[i_size]);
|
||||
}
|
||||
}
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
stat = munmap (pfb,fix.smem_len);
|
||||
if (stat<0){
|
||||
perror ("Error munmap'ing framebuffer device");
|
||||
return 1;
|
||||
}
|
||||
close (fbd);
|
||||
return 0;
|
||||
}
|
||||
41
package/utils/firmware-utils/Makefile
Normal file
41
package/utils/firmware-utils/Makefile
Normal file
@@ -0,0 +1,41 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=firmware-utils
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
|
||||
PKG_SOURCE_DATE:=2024-06-20
|
||||
PKG_SOURCE_VERSION:=6ac44974185a3e7dc7848e97b964339948e817a7
|
||||
PKG_MIRROR_HASH:=ee5b29f45593750a6806cfa7cad3fd766b321b44107a6b481b890efe82a7dbf5
|
||||
|
||||
PKG_BUILD_DEPENDS:=openssl zlib
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Firmware utility $(1)
|
||||
DEPENDS:=$(2)
|
||||
endef
|
||||
|
||||
Package/oseama = $(call Package/default,oseama,@TARGET_bcm53xx)
|
||||
|
||||
define Package/oseama/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/oseama $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
Package/otrx = $(call Package/default,otrx,@(TARGET_bcm47xx||TARGET_bcm53xx))
|
||||
|
||||
define Package/otrx/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/otrx $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,oseama))
|
||||
$(eval $(call BuildPackage,otrx))
|
||||
43
package/utils/fitblk/Makefile
Normal file
43
package/utils/fitblk/Makefile
Normal file
@@ -0,0 +1,43 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fitblk
|
||||
PKG_RELEASE:=2
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/fitblk
|
||||
HIDDEN:=1
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
TITLE:=fitblk firmware release tool
|
||||
DEPENDS:=@!LINUX_5_15
|
||||
endef
|
||||
|
||||
define Package/fitblk/description
|
||||
Release uImage.FIT block devices using ioctl.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall -Werror" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)"
|
||||
endef
|
||||
|
||||
define Package/fitblk/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fitblk $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/lib/upgrade
|
||||
$(INSTALL_DATA) ./files/fit.sh $(1)/lib/upgrade
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,fitblk))
|
||||
63
package/utils/fitblk/files/fit.sh
Normal file
63
package/utils/fitblk/files/fit.sh
Normal file
@@ -0,0 +1,63 @@
|
||||
export_fitblk_bootdev() {
|
||||
[ -e /sys/firmware/devicetree/base/chosen/rootdisk ] || return
|
||||
|
||||
local rootdisk="$(cat /sys/firmware/devicetree/base/chosen/rootdisk)"
|
||||
local handle bootdev
|
||||
|
||||
for handle in /sys/class/mtd/mtd*/of_node/volumes/*/phandle; do
|
||||
[ ! -e "$handle" ] && continue
|
||||
if [ "$rootdisk" = "$(cat "$handle")" ]; then
|
||||
if [ -e "${handle%/phandle}/volname" ]; then
|
||||
export CI_KERNPART="$(cat "${handle%/phandle}/volname")"
|
||||
elif [ -e "${handle%/phandle}/volid" ]; then
|
||||
export CI_KERNVOLID="$(cat "${handle%/phandle}/volid")"
|
||||
else
|
||||
return
|
||||
fi
|
||||
export CI_UBIPART="$(cat "${handle%%/of_node*}/name")"
|
||||
export CI_METHOD="ubi"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for handle in /sys/class/mtd/mtd*/of_node/phandle; do
|
||||
[ ! -e "$handle" ] && continue
|
||||
if [ "$rootdisk" = "$(cat $handle)" ]; then
|
||||
bootdev="${handle%/of_node/phandle}"
|
||||
bootdev="${bootdev#/sys/class/mtd/}"
|
||||
export PART_NAME="/dev/$bootdev"
|
||||
export CI_METHOD="default"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
for handle in /sys/class/block/*/of_node/phandle; do
|
||||
[ ! -e "$handle" ] && continue
|
||||
if [ "$rootdisk" = "$(cat $handle)" ]; then
|
||||
bootdev="${handle%/of_node/phandle}"
|
||||
bootdev="${bootdev#/sys/class/block/}"
|
||||
export EMMC_KERN_DEV="/dev/$bootdev"
|
||||
export CI_METHOD="emmc"
|
||||
return
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
fit_do_upgrade() {
|
||||
export_fitblk_bootdev
|
||||
[ -n "$CI_METHOD" ] || return 1
|
||||
[ -e /dev/fit0 ] && fitblk /dev/fit0
|
||||
[ -e /dev/fitrw ] && fitblk /dev/fitrw
|
||||
|
||||
case "$CI_METHOD" in
|
||||
emmc)
|
||||
emmc_do_upgrade "$1"
|
||||
;;
|
||||
default)
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
ubi)
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
7
package/utils/fitblk/src/Makefile
Normal file
7
package/utils/fitblk/src/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
all: fitblk
|
||||
|
||||
fitblk:
|
||||
$(CC) $(CFLAGS) -o $@ fitblk.c $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f fitblk
|
||||
45
package/utils/fitblk/src/fitblk.c
Normal file
45
package/utils/fitblk/src/fitblk.c
Normal file
@@ -0,0 +1,45 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fitblk.h>
|
||||
|
||||
static int fitblk_release(char *device)
|
||||
{
|
||||
int fd, ret;
|
||||
|
||||
fd = open(device, O_RDONLY);
|
||||
if (fd == -1)
|
||||
return errno;
|
||||
|
||||
ret = ioctl(fd, FITBLK_RELEASE, NULL);
|
||||
close(fd);
|
||||
|
||||
if (ret == -1)
|
||||
return errno;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argp[])
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "Release uImage.FIT sub-image block device\n");
|
||||
fprintf(stderr, "Syntax: %s /dev/fitXXX\n", argp[0]);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = fitblk_release(argp[1]);
|
||||
if (ret)
|
||||
fprintf(stderr, "fitblk: error releasing %s: %s\n", argp[1],
|
||||
strerror(ret));
|
||||
else
|
||||
fprintf(stderr, "fitblk: %s released\n", argp[1]);
|
||||
|
||||
return ret;
|
||||
}
|
||||
60
package/utils/fritz-tools/Makefile
Normal file
60
package/utils/fritz-tools/Makefile
Normal file
@@ -0,0 +1,60 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fritz-tools
|
||||
PKG_RELEASE:=2
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/fritz-tools/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
endef
|
||||
|
||||
define Package/fritz-tffs
|
||||
$(call Package/fritz-tools/Default)
|
||||
TITLE:=Utility to partially read the TFFS filesystems
|
||||
endef
|
||||
|
||||
define Package/fritz-tffs/description
|
||||
Utility to partially read the TFFS filesystems.
|
||||
endef
|
||||
|
||||
define Package/fritz-tffs-nand
|
||||
$(call Package/fritz-tools/Default)
|
||||
TITLE:=Utility to partially read the TFFS filesystems on NAND flash
|
||||
endef
|
||||
|
||||
define Package/fritz-tffs-nand/description
|
||||
Utility to partially read the TFFS filesystems on NAND flash.
|
||||
endef
|
||||
|
||||
define Package/fritz-caldata
|
||||
$(call Package/fritz-tools/Default)
|
||||
DEPENDS:=+zlib
|
||||
TITLE:=Utility to extract WLAN calibration data
|
||||
endef
|
||||
|
||||
define Package/fritz-caldata/description
|
||||
Utility to extract the zlib compress calibration data from flash.
|
||||
endef
|
||||
|
||||
define Package/fritz-tffs/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fritz_tffs_read $(1)/usr/bin/fritz_tffs
|
||||
endef
|
||||
|
||||
define Package/fritz-tffs-nand/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fritz_tffs_nand_read $(1)/usr/bin/fritz_tffs_nand
|
||||
endef
|
||||
|
||||
define Package/fritz-caldata/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fritz_cal_extract $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,fritz-tffs))
|
||||
$(eval $(call BuildPackage,fritz-tffs-nand))
|
||||
$(eval $(call BuildPackage,fritz-caldata))
|
||||
50
package/utils/fritz-tools/README.md
Normal file
50
package/utils/fritz-tools/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
Userspace utilties for accessing TFFS (a name-value storage usually found in AVM Fritz!Box based devices)
|
||||
|
||||
## Building
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake /path/to/fritz_tffs_tools
|
||||
make
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
All command line parameters are documented:
|
||||
```
|
||||
fritz_tffs_read -h
|
||||
```
|
||||
|
||||
Show all entries from a TFFS partition dump (in the format: name=value):
|
||||
```
|
||||
fritz_tffs_read -i /path/to/tffs.dump -a
|
||||
```
|
||||
|
||||
Read a TFFS partition and show all entries (in the format: name=value):
|
||||
```
|
||||
fritz_tffs_read -i /dev/mtdX -a
|
||||
```
|
||||
|
||||
Output only the value of a specific key (this will only show the value):
|
||||
```
|
||||
fritz_tffs_read -i /dev/mtdX -n my_ipaddress
|
||||
```
|
||||
|
||||
## LICENSE
|
||||
|
||||
See `LICENSE`:
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
16
package/utils/fritz-tools/src/CMakeLists.txt
Normal file
16
package/utils/fritz-tools/src/CMakeLists.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
PROJECT(fritz-tools C)
|
||||
ADD_DEFINITIONS(-Wall -Werror --std=gnu99 -Wmissing-declarations)
|
||||
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
|
||||
FIND_PATH(zlib_include_dir zlib.h)
|
||||
INCLUDE_DIRECTORIES(${zlib_include_dir})
|
||||
|
||||
ADD_EXECUTABLE(fritz_tffs_read fritz_tffs_read.c)
|
||||
ADD_EXECUTABLE(fritz_tffs_nand_read fritz_tffs_nand_read.c)
|
||||
ADD_EXECUTABLE(fritz_cal_extract fritz_cal_extract.c)
|
||||
TARGET_LINK_LIBRARIES(fritz_cal_extract z)
|
||||
|
||||
INSTALL(TARGETS fritz_tffs_read fritz_tffs_nand_read fritz_cal_extract RUNTIME DESTINATION bin)
|
||||
261
package/utils/fritz-tools/src/fritz_cal_extract.c
Normal file
261
package/utils/fritz-tools/src/fritz_cal_extract.c
Normal file
@@ -0,0 +1,261 @@
|
||||
/*
|
||||
* A tool for reading the zlib compressed calibration data
|
||||
* found in AVM Fritz!Box based devices).
|
||||
*
|
||||
* Copyright (c) 2017 Christian Lamparter <chunkeey@googlemail.com>
|
||||
*
|
||||
* Based on zpipe, which is an example of proper use of zlib's inflate().
|
||||
* that is Not copyrighted -- provided to the public domain
|
||||
* Version 1.4 11 December 2005 Mark Adler
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <endian.h>
|
||||
#include <errno.h>
|
||||
#include "zlib.h"
|
||||
|
||||
#define CHUNK 1024
|
||||
|
||||
static inline size_t special_min(size_t a, size_t b)
|
||||
{
|
||||
return a == 0 ? b : (a < b ? a : b);
|
||||
}
|
||||
|
||||
/* Decompress from file source to file dest until stream ends or EOF.
|
||||
inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
|
||||
allocated for processing, Z_DATA_ERROR if the deflate data is
|
||||
invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
|
||||
the version of the library linked do not match, or Z_ERRNO if there
|
||||
is an error reading or writing the files. */
|
||||
static int inf(FILE *source, FILE *dest, size_t limit, size_t skip)
|
||||
{
|
||||
int ret;
|
||||
size_t have;
|
||||
z_stream strm;
|
||||
unsigned char in[CHUNK];
|
||||
unsigned char out[CHUNK];
|
||||
|
||||
/* allocate inflate state */
|
||||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
strm.avail_in = 0;
|
||||
strm.next_in = Z_NULL;
|
||||
ret = inflateInit(&strm);
|
||||
if (ret != Z_OK)
|
||||
return ret;
|
||||
|
||||
/* decompress until deflate stream ends or end of file */
|
||||
do {
|
||||
strm.avail_in = fread(in, 1, CHUNK, source);
|
||||
if (ferror(source)) {
|
||||
(void)inflateEnd(&strm);
|
||||
return Z_ERRNO;
|
||||
}
|
||||
if (strm.avail_in == 0)
|
||||
break;
|
||||
strm.next_in = in;
|
||||
|
||||
/* run inflate() on input until output buffer not full */
|
||||
do {
|
||||
strm.avail_out = CHUNK;
|
||||
strm.next_out = out;
|
||||
ret = inflate(&strm, Z_NO_FLUSH);
|
||||
assert(ret != Z_STREAM_ERROR); /* state not clobbered */
|
||||
switch (ret) {
|
||||
case Z_NEED_DICT:
|
||||
ret = Z_DATA_ERROR; /* and fall through */
|
||||
case Z_DATA_ERROR:
|
||||
case Z_MEM_ERROR:
|
||||
(void)inflateEnd(&strm);
|
||||
return ret;
|
||||
}
|
||||
have = special_min(limit, CHUNK - strm.avail_out) - skip;
|
||||
if (fwrite(&out[skip], have, 1, dest) != 1 || ferror(dest)) {
|
||||
(void)inflateEnd(&strm);
|
||||
return Z_ERRNO;
|
||||
}
|
||||
skip = 0;
|
||||
limit -= have;
|
||||
} while (strm.avail_out == 0 && limit > 0);
|
||||
|
||||
/* done when inflate() says it's done */
|
||||
} while (ret != Z_STREAM_END && limit > 0);
|
||||
|
||||
/* clean up and return */
|
||||
(void)inflateEnd(&strm);
|
||||
return (limit == 0 ? Z_OK : (ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR));
|
||||
}
|
||||
|
||||
/* report a zlib or i/o error */
|
||||
static void zerr(int ret)
|
||||
{
|
||||
switch (ret) {
|
||||
case Z_ERRNO:
|
||||
if (ferror(stdin))
|
||||
fputs("error reading stdin\n", stderr);
|
||||
if (ferror(stdout))
|
||||
fputs("error writing stdout\n", stderr);
|
||||
break;
|
||||
case Z_STREAM_ERROR:
|
||||
fputs("invalid compression level\n", stderr);
|
||||
break;
|
||||
case Z_DATA_ERROR:
|
||||
fputs("invalid or incomplete deflate data\n", stderr);
|
||||
break;
|
||||
case Z_MEM_ERROR:
|
||||
fputs("out of memory\n", stderr);
|
||||
break;
|
||||
case Z_VERSION_ERROR:
|
||||
fputs("zlib version mismatch!\n", stderr);
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int get_num(char *str)
|
||||
{
|
||||
if (!strncmp("0x", str, 2))
|
||||
return strtoul(str+2, NULL, 16);
|
||||
else
|
||||
return strtoul(str, NULL, 10);
|
||||
}
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, "Usage: fritz_cal_extract [-s seek offset] [-i skip] [-o output file] [-l limit] [infile] -e entry_id\n"
|
||||
"Finds and extracts zlib compressed calibration data in the EVA loader\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
struct cal_entry {
|
||||
uint16_t id;
|
||||
uint16_t len;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* compress or decompress from stdin to stdout */
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct cal_entry cal = { .len = 0 };
|
||||
FILE *in = stdin;
|
||||
FILE *out = stdout;
|
||||
size_t limit = 0, skip = 0;
|
||||
int initial_offset = 0;
|
||||
int entry = -1;
|
||||
int ret;
|
||||
int opt;
|
||||
|
||||
while ((opt = getopt(argc, argv, "s:e:o:l:i:")) != -1) {
|
||||
switch (opt) {
|
||||
case 's':
|
||||
initial_offset = (int)get_num(optarg);
|
||||
if (errno) {
|
||||
perror("Failed to parse seek offset");
|
||||
goto out_bad;
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
entry = (int) htobe16(get_num(optarg));
|
||||
if (errno) {
|
||||
perror("Failed to entry id");
|
||||
goto out_bad;
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
out = fopen(optarg, "w");
|
||||
if (!out) {
|
||||
perror("Failed to create output file");
|
||||
goto out_bad;
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
limit = (size_t)get_num(optarg);
|
||||
if (errno) {
|
||||
perror("Failed to parse limit");
|
||||
goto out_bad;
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
skip = (size_t)get_num(optarg);
|
||||
if (errno) {
|
||||
perror("Failed to parse skip");
|
||||
goto out_bad;
|
||||
}
|
||||
break;
|
||||
default: /* '?' */
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (entry == -1)
|
||||
usage();
|
||||
|
||||
if (argc > 1 && optind <= argc) {
|
||||
in = fopen(argv[optind], "r");
|
||||
if (!in) {
|
||||
perror("Failed to open input file");
|
||||
goto out_bad;
|
||||
}
|
||||
}
|
||||
|
||||
if (initial_offset) {
|
||||
ret = fseek(in, initial_offset, SEEK_CUR);
|
||||
if (ret) {
|
||||
perror("Failed to seek to calibration table");
|
||||
goto out_bad;
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
ret = fseek(in, be16toh(cal.len), SEEK_CUR);
|
||||
if (feof(in)) {
|
||||
fprintf(stderr, "Reached end of file, but didn't find the matching entry\n");
|
||||
goto out_bad;
|
||||
} else if (ferror(in)) {
|
||||
perror("Failure during seek");
|
||||
goto out_bad;
|
||||
}
|
||||
|
||||
ret = fread(&cal, 1, sizeof cal, in);
|
||||
if (ret != sizeof cal)
|
||||
goto out_bad;
|
||||
} while (entry != cal.id || cal.id == 0xffff);
|
||||
|
||||
if (cal.id == 0xffff) {
|
||||
fprintf(stderr, "Reached end of filesystem, but didn't find the matching entry\n");
|
||||
goto out_bad;
|
||||
}
|
||||
|
||||
ret = inf(in, out, limit, skip);
|
||||
if (ret == Z_OK)
|
||||
goto out;
|
||||
|
||||
zerr(ret);
|
||||
|
||||
out_bad:
|
||||
ret = EXIT_FAILURE;
|
||||
|
||||
out:
|
||||
if (in)
|
||||
fclose(in);
|
||||
if (out)
|
||||
fclose(out);
|
||||
return ret;
|
||||
}
|
||||
587
package/utils/fritz-tools/src/fritz_tffs_nand_read.c
Normal file
587
package/utils/fritz-tools/src/fritz_tffs_nand_read.c
Normal file
@@ -0,0 +1,587 @@
|
||||
/*
|
||||
* A tool for reading the TFFS partitions (a name-value storage usually
|
||||
* found in AVM Fritz!Box based devices) on nand flash.
|
||||
*
|
||||
* Copyright (c) 2018 Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.DE>
|
||||
*
|
||||
* Based on the fritz_tffs_read tool:
|
||||
* Copyright (c) 2015-2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
* and on the TFFS 2.0 kernel driver from AVM:
|
||||
* Copyright (c) 2004-2007 AVM GmbH <fritzbox_info@avm.de>
|
||||
* and the TFFS 3.0 kernel driver from AVM:
|
||||
* Copyright (C) 2004-2014 AVM GmbH <fritzbox_info@avm.de>
|
||||
* and the OpenWrt TFFS kernel driver:
|
||||
* Copyright (c) 2013 John Crispin <john@phrozen.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
#include <getopt.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <endian.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <mtd/mtd-user.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define DEFAULT_TFFS_SIZE (256 * 1024)
|
||||
|
||||
#define TFFS_ID_END 0xffffffff
|
||||
#define TFFS_ID_TABLE_NAME 0x000001ff
|
||||
|
||||
#define TFFS_BLOCK_HEADER_MAGIC 0x41564d5f54464653ULL
|
||||
#define TFFS_VERSION 0x0003
|
||||
#define TFFS_ENTRY_HEADER_SIZE 0x18
|
||||
#define TFFS_MAXIMUM_SEGMENT_SIZE (0x800 - TFFS_ENTRY_HEADER_SIZE)
|
||||
|
||||
#define TFFS_SECTOR_SIZE 0x0800
|
||||
#define TFFS_SECTOR_OOB_SIZE 0x0040
|
||||
#define TFFS_SECTORS_PER_PAGE 2
|
||||
|
||||
#define TFFS_SEGMENT_CLEARED 0xffffffff
|
||||
|
||||
static char *progname;
|
||||
static char *mtddev;
|
||||
static char *name_filter = NULL;
|
||||
static bool show_all = false;
|
||||
static bool print_all_key_names = false;
|
||||
static bool read_oob_sector_health = false;
|
||||
static bool swap_bytes = false;
|
||||
static uint8_t readbuf[TFFS_SECTOR_SIZE];
|
||||
static uint8_t oobbuf[TFFS_SECTOR_OOB_SIZE];
|
||||
static uint32_t blocksize;
|
||||
static int mtdfd;
|
||||
static uint32_t num_sectors;
|
||||
static uint8_t *sectors;
|
||||
static uint32_t *sector_ids;
|
||||
|
||||
static inline void sector_mark_bad(int num)
|
||||
{
|
||||
sectors[num / 8] &= ~(0x80 >> (num % 8));
|
||||
};
|
||||
|
||||
static inline uint8_t sector_get_good(int num)
|
||||
{
|
||||
return sectors[num / 8] & 0x80 >> (num % 8);
|
||||
};
|
||||
|
||||
struct tffs_entry_segment {
|
||||
uint32_t len;
|
||||
void *val;
|
||||
};
|
||||
|
||||
struct tffs_entry {
|
||||
uint32_t len;
|
||||
void *val;
|
||||
};
|
||||
|
||||
struct tffs_name_table_entry {
|
||||
uint32_t id;
|
||||
char *val;
|
||||
};
|
||||
|
||||
struct tffs_key_name_table {
|
||||
uint32_t size;
|
||||
struct tffs_name_table_entry *entries;
|
||||
};
|
||||
|
||||
static inline uint8_t read_uint8(void *buf, ptrdiff_t off)
|
||||
{
|
||||
return *(uint8_t *)(buf + off);
|
||||
}
|
||||
|
||||
static inline uint32_t read_uint32(void *buf, ptrdiff_t off)
|
||||
{
|
||||
uint32_t tmp = *(uint32_t *)(buf + off);
|
||||
if (swap_bytes) {
|
||||
tmp = be32toh(tmp);
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static inline uint64_t read_uint64(void *buf, ptrdiff_t off)
|
||||
{
|
||||
uint64_t tmp = *(uint64_t *)(buf + off);
|
||||
if (swap_bytes) {
|
||||
tmp = be64toh(tmp);
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static int read_sector(off_t pos)
|
||||
{
|
||||
if (pread(mtdfd, readbuf, TFFS_SECTOR_SIZE, pos) != TFFS_SECTOR_SIZE) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
sector_ids[pos / TFFS_SECTOR_SIZE] = read_uint32(readbuf, 0x00);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int read_sectoroob(off_t pos)
|
||||
{
|
||||
struct mtd_oob_buf oob = {
|
||||
.start = pos,
|
||||
.length = TFFS_SECTOR_OOB_SIZE,
|
||||
.ptr = oobbuf
|
||||
};
|
||||
|
||||
if (ioctl(mtdfd, MEMREADOOB, &oob) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline uint32_t get_walk_size(uint32_t entry_len)
|
||||
{
|
||||
return (entry_len + 3) & ~0x03;
|
||||
}
|
||||
|
||||
static void print_entry_value(const struct tffs_entry *entry)
|
||||
{
|
||||
/* These are NOT NULL terminated. */
|
||||
fwrite(entry->val, 1, entry->len, stdout);
|
||||
}
|
||||
|
||||
static int find_entry(uint32_t id, struct tffs_entry *entry)
|
||||
{
|
||||
uint32_t rev = 0;
|
||||
uint32_t num_segments = 0;
|
||||
struct tffs_entry_segment *segments = NULL;
|
||||
|
||||
off_t pos = 0;
|
||||
uint8_t block_end = 0;
|
||||
for (uint32_t sector = 0; sector < num_sectors; sector++, pos += TFFS_SECTOR_SIZE) {
|
||||
if (block_end) {
|
||||
if (pos % blocksize == 0) {
|
||||
block_end = 0;
|
||||
}
|
||||
} else if (sector_get_good(sector)) {
|
||||
if (sector_ids[sector]) {
|
||||
if (sector_ids[sector] == TFFS_ID_END) {
|
||||
/* no more entries in this block */
|
||||
block_end = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sector_ids[sector] != id)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (read_sectoroob(pos) || read_sector(pos)) {
|
||||
fprintf(stderr, "ERROR: sector isn't readable, but has been previously!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
uint32_t read_id = read_uint32(readbuf, 0x00);
|
||||
uint32_t read_len = read_uint32(readbuf, 0x04);
|
||||
uint32_t read_rev = read_uint32(readbuf, 0x0c);
|
||||
if (read_oob_sector_health) {
|
||||
uint32_t oob_id = read_uint32(oobbuf, 0x02);
|
||||
uint32_t oob_len = read_uint32(oobbuf, 0x06);
|
||||
uint32_t oob_rev = read_uint32(oobbuf, 0x0a);
|
||||
|
||||
if (oob_id != read_id || oob_len != read_len || oob_rev != read_rev) {
|
||||
fprintf(stderr, "Warning: sector has inconsistent metadata\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (read_id == TFFS_ID_END) {
|
||||
/* no more entries in this block */
|
||||
block_end = 1;
|
||||
continue;
|
||||
}
|
||||
if (read_len > TFFS_MAXIMUM_SEGMENT_SIZE) {
|
||||
fprintf(stderr, "Warning: segment is longer than possible\n");
|
||||
continue;
|
||||
}
|
||||
if (read_id == id) {
|
||||
if (read_rev < rev) {
|
||||
/* obsolete revision => ignore this */
|
||||
continue;
|
||||
}
|
||||
if (read_rev > rev) {
|
||||
/* newer revision => clear old data */
|
||||
for (uint32_t i = 0; i < num_segments; i++) {
|
||||
free(segments[i].val);
|
||||
}
|
||||
free (segments);
|
||||
rev = read_rev;
|
||||
num_segments = 0;
|
||||
segments = NULL;
|
||||
}
|
||||
|
||||
uint32_t seg = read_uint32(readbuf, 0x10);
|
||||
|
||||
if (seg == TFFS_SEGMENT_CLEARED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32_t next_seg = read_uint32(readbuf, 0x14);
|
||||
|
||||
uint32_t new_num_segs = next_seg == 0 ? seg + 1 : next_seg + 1;
|
||||
if (new_num_segs > num_segments) {
|
||||
segments = realloc(segments, new_num_segs * sizeof(struct tffs_entry_segment));
|
||||
memset(segments + (num_segments * sizeof(struct tffs_entry_segment)), 0x0,
|
||||
(new_num_segs - num_segments) * sizeof(struct tffs_entry_segment));
|
||||
num_segments = new_num_segs;
|
||||
}
|
||||
segments[seg].len = read_len;
|
||||
segments[seg].val = malloc(read_len);
|
||||
memcpy(segments[seg].val, readbuf + TFFS_ENTRY_HEADER_SIZE, read_len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (num_segments == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
assert (segments != NULL);
|
||||
|
||||
uint32_t len = 0;
|
||||
for (uint32_t i = 0; i < num_segments; i++) {
|
||||
if (segments[i].val == NULL) {
|
||||
/* missing segment */
|
||||
return 0;
|
||||
}
|
||||
|
||||
len += segments[i].len;
|
||||
}
|
||||
|
||||
void *p = malloc(len);
|
||||
entry->val = p;
|
||||
entry->len = len;
|
||||
for (uint32_t i = 0; i < num_segments; i++) {
|
||||
memcpy(p, segments[i].val, segments[i].len);
|
||||
p += segments[i].len;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void parse_key_names(struct tffs_entry *names_entry,
|
||||
struct tffs_key_name_table *key_names)
|
||||
{
|
||||
uint32_t pos = 0, i = 0;
|
||||
struct tffs_name_table_entry *name_item;
|
||||
|
||||
key_names->entries = NULL;
|
||||
|
||||
do {
|
||||
key_names->entries = realloc(key_names->entries,
|
||||
sizeof(struct tffs_name_table_entry) * (i + 1));
|
||||
if (key_names->entries == NULL) {
|
||||
fprintf(stderr, "ERROR: memory allocation failed!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
name_item = &key_names->entries[i];
|
||||
|
||||
name_item->id = read_uint32(names_entry->val, pos);
|
||||
pos += sizeof(uint32_t);
|
||||
name_item->val = strdup((const char *)(names_entry->val + pos));
|
||||
|
||||
/*
|
||||
* There is no "length" field because the string values are
|
||||
* simply NULL-terminated -> strlen() gives us the size.
|
||||
*/
|
||||
pos += get_walk_size(strlen(name_item->val) + 1);
|
||||
|
||||
++i;
|
||||
} while (pos < names_entry->len);
|
||||
|
||||
key_names->size = i;
|
||||
}
|
||||
|
||||
static void show_all_key_names(struct tffs_key_name_table *key_names)
|
||||
{
|
||||
for (uint32_t i = 0; i < key_names->size; i++)
|
||||
printf("%s\n", key_names->entries[i].val);
|
||||
}
|
||||
|
||||
static int show_all_key_value_pairs(struct tffs_key_name_table *key_names)
|
||||
{
|
||||
uint8_t has_value = 0;
|
||||
struct tffs_entry tmp;
|
||||
|
||||
for (uint32_t i = 0; i < key_names->size; i++) {
|
||||
if (find_entry(key_names->entries[i].id, &tmp)) {
|
||||
printf("%s=", (const char *)key_names->entries[i].val);
|
||||
print_entry_value(&tmp);
|
||||
printf("\n");
|
||||
has_value++;
|
||||
free(tmp.val);
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_value) {
|
||||
fprintf(stderr, "ERROR: no values found!\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static int show_matching_key_value(struct tffs_key_name_table *key_names)
|
||||
{
|
||||
struct tffs_entry tmp;
|
||||
const char *name;
|
||||
|
||||
for (uint32_t i = 0; i < key_names->size; i++) {
|
||||
name = key_names->entries[i].val;
|
||||
|
||||
if (strcmp(name, name_filter) == 0) {
|
||||
if (find_entry(key_names->entries[i].id, &tmp)) {
|
||||
print_entry_value(&tmp);
|
||||
printf("\n");
|
||||
free(tmp.val);
|
||||
return EXIT_SUCCESS;
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"ERROR: no value found for name %s!\n",
|
||||
name);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, "ERROR: Unknown key name %s!\n", name_filter);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
static int check_sector(off_t pos)
|
||||
{
|
||||
if (!read_oob_sector_health) {
|
||||
return 1;
|
||||
}
|
||||
if (read_sectoroob(pos)) {
|
||||
return 0;
|
||||
}
|
||||
if (read_uint8(oobbuf, 0x00) != 0xff) {
|
||||
/* block is bad */
|
||||
return 0;
|
||||
}
|
||||
if (read_uint8(oobbuf, 0x01) != 0xff) {
|
||||
/* sector is bad */
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int check_block(off_t pos, uint32_t sector)
|
||||
{
|
||||
if (!check_sector(pos)) {
|
||||
return 0;
|
||||
}
|
||||
if (read_sector(pos)) {
|
||||
return 0;
|
||||
}
|
||||
if (read_uint64(readbuf, 0x00) != TFFS_BLOCK_HEADER_MAGIC) {
|
||||
fprintf(stderr, "Warning: block without magic header. Skipping block\n");
|
||||
return 0;
|
||||
}
|
||||
if (read_uint32(readbuf, 0x0c) != TFFS_SECTORS_PER_PAGE) {
|
||||
fprintf(stderr, "Warning: block with wrong number of sectors per page. Skipping block\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t num_hdr_bad = read_uint32(readbuf, 0x0c);
|
||||
for (uint32_t i = 0; i < num_hdr_bad; i++) {
|
||||
uint32_t bad = sector + read_uint64(readbuf, 0x1c + sizeof(uint64_t)*i);
|
||||
sector_mark_bad(bad);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int scan_mtd(void)
|
||||
{
|
||||
struct mtd_info_user info;
|
||||
|
||||
if (ioctl(mtdfd, MEMGETINFO, &info)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
blocksize = info.erasesize;
|
||||
|
||||
num_sectors = info.size / TFFS_SECTOR_SIZE;
|
||||
sectors = malloc((num_sectors + 7) / 8);
|
||||
sector_ids = calloc(num_sectors, sizeof(uint32_t));
|
||||
if (!sectors || !sector_ids) {
|
||||
fprintf(stderr, "ERROR: memory allocation failed!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
memset(sectors, 0xff, (num_sectors + 7) / 8);
|
||||
|
||||
uint32_t sector = 0, valid_blocks = 0;
|
||||
uint8_t block_ok = 0;
|
||||
for (off_t pos = 0; pos < info.size; sector++, pos += TFFS_SECTOR_SIZE) {
|
||||
if (pos % info.erasesize == 0) {
|
||||
block_ok = check_block(pos, sector);
|
||||
/* first sector of the block contains metadata
|
||||
=> handle it like a bad sector */
|
||||
sector_mark_bad(sector);
|
||||
if (block_ok) {
|
||||
valid_blocks++;
|
||||
}
|
||||
} else if (!block_ok || !sector_get_good(sector) || !check_sector(pos)) {
|
||||
sector_mark_bad(sector);
|
||||
}
|
||||
}
|
||||
|
||||
return valid_blocks;
|
||||
}
|
||||
|
||||
static void usage(int status)
|
||||
{
|
||||
FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout;
|
||||
|
||||
fprintf(stream, "Usage: %s [OPTIONS...]\n", progname);
|
||||
fprintf(stream,
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -a list all key value pairs found in the TFFS file/device\n"
|
||||
" -d <mtd> inspect the TFFS on mtd device <mtd>\n"
|
||||
" -h show this screen\n"
|
||||
" -l list all supported keys\n"
|
||||
" -n <key name> display the value of the given key\n"
|
||||
" -o read OOB information about sector health\n"
|
||||
);
|
||||
|
||||
exit(status);
|
||||
}
|
||||
|
||||
static void parse_options(int argc, char *argv[])
|
||||
{
|
||||
while (1) {
|
||||
int c;
|
||||
|
||||
c = getopt(argc, argv, "abd:hln:o");
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case 'a':
|
||||
show_all = true;
|
||||
name_filter = NULL;
|
||||
print_all_key_names = false;
|
||||
break;
|
||||
case 'b':
|
||||
swap_bytes = 1;
|
||||
break;
|
||||
case 'd':
|
||||
mtddev = optarg;
|
||||
break;
|
||||
case 'h':
|
||||
usage(EXIT_SUCCESS);
|
||||
break;
|
||||
case 'l':
|
||||
print_all_key_names = true;
|
||||
show_all = false;
|
||||
name_filter = NULL;
|
||||
break;
|
||||
case 'n':
|
||||
name_filter = optarg;
|
||||
show_all = false;
|
||||
print_all_key_names = false;
|
||||
break;
|
||||
case 'o':
|
||||
read_oob_sector_health = true;
|
||||
break;
|
||||
default:
|
||||
usage(EXIT_FAILURE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mtddev) {
|
||||
fprintf(stderr, "ERROR: No input file (-d <file>) given!\n");
|
||||
usage(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!show_all && !name_filter && !print_all_key_names) {
|
||||
fprintf(stderr,
|
||||
"ERROR: either -l, -a or -n <key name> is required!\n");
|
||||
usage(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret = EXIT_FAILURE;
|
||||
struct tffs_entry name_table;
|
||||
struct tffs_key_name_table key_names;
|
||||
|
||||
progname = basename(argv[0]);
|
||||
|
||||
parse_options(argc, argv);
|
||||
|
||||
mtdfd = open(mtddev, O_RDONLY);
|
||||
if (mtdfd < 0) {
|
||||
fprintf(stderr, "ERROR: Failed to open tffs device %s\n",
|
||||
mtddev);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!scan_mtd()) {
|
||||
fprintf(stderr, "ERROR: Parsing blocks from tffs device %s failed\n", mtddev);
|
||||
fprintf(stderr, " Is byte-swapping (-b) required?\n");
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
if (!find_entry(TFFS_ID_TABLE_NAME, &name_table)) {
|
||||
fprintf(stderr, "ERROR: No name table found on tffs device %s\n",
|
||||
mtddev);
|
||||
goto out_free_sectors;
|
||||
}
|
||||
|
||||
parse_key_names(&name_table, &key_names);
|
||||
if (key_names.size < 1) {
|
||||
fprintf(stderr, "ERROR: No name table found on tffs device %s\n",
|
||||
mtddev);
|
||||
goto out_free_entry;
|
||||
}
|
||||
|
||||
if (print_all_key_names) {
|
||||
show_all_key_names(&key_names);
|
||||
ret = EXIT_SUCCESS;
|
||||
} else if (show_all) {
|
||||
ret = show_all_key_value_pairs(&key_names);
|
||||
} else {
|
||||
ret = show_matching_key_value(&key_names);
|
||||
}
|
||||
|
||||
free(key_names.entries);
|
||||
out_free_entry:
|
||||
free(name_table.val);
|
||||
out_free_sectors:
|
||||
free(sector_ids);
|
||||
free(sectors);
|
||||
out_close:
|
||||
close(mtdfd);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
379
package/utils/fritz-tools/src/fritz_tffs_read.c
Normal file
379
package/utils/fritz-tools/src/fritz_tffs_read.c
Normal file
@@ -0,0 +1,379 @@
|
||||
/*
|
||||
* A tool for reading the TFFS partitions (a name-value storage usually
|
||||
* found in AVM Fritz!Box based devices).
|
||||
*
|
||||
* Copyright (c) 2015-2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
*
|
||||
* Based on the TFFS 2.0 kernel driver from AVM:
|
||||
* Copyright (c) 2004-2007 AVM GmbH <fritzbox_info@avm.de>
|
||||
* and the OpenWrt TFFS kernel driver:
|
||||
* Copyright (c) 2013 John Crispin <blogic@openwrt.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
#include <getopt.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#define TFFS_ID_END 0xffff
|
||||
#define TFFS_ID_TABLE_NAME 0x01ff
|
||||
|
||||
static char *progname;
|
||||
static char *input_file;
|
||||
static unsigned long tffs_size;
|
||||
static char *name_filter = NULL;
|
||||
static bool show_all = false;
|
||||
static bool print_all_key_names = false;
|
||||
static bool swap_bytes = false;
|
||||
|
||||
struct tffs_entry_header {
|
||||
uint16_t id;
|
||||
uint16_t len;
|
||||
};
|
||||
|
||||
struct tffs_entry {
|
||||
const struct tffs_entry_header *header;
|
||||
char *name;
|
||||
uint8_t *val;
|
||||
};
|
||||
|
||||
struct tffs_name_table_entry {
|
||||
const uint32_t *id;
|
||||
const char *val;
|
||||
};
|
||||
|
||||
struct tffs_key_name_table {
|
||||
uint32_t size;
|
||||
struct tffs_name_table_entry *entries;
|
||||
};
|
||||
|
||||
static inline uint16_t get_header_len(const struct tffs_entry_header *header)
|
||||
{
|
||||
if (swap_bytes)
|
||||
return ntohs(header->len);
|
||||
|
||||
return header->len;
|
||||
}
|
||||
|
||||
static inline uint16_t get_header_id(const struct tffs_entry_header *header)
|
||||
{
|
||||
if (swap_bytes)
|
||||
return ntohs(header->id);
|
||||
|
||||
return header->id;
|
||||
}
|
||||
|
||||
static inline uint16_t to_entry_header_id(uint32_t name_id)
|
||||
{
|
||||
if (swap_bytes)
|
||||
return ntohl(name_id) & 0xffff;
|
||||
|
||||
return name_id & 0xffff;
|
||||
}
|
||||
|
||||
static inline uint32_t get_walk_size(uint32_t entry_len)
|
||||
{
|
||||
return (entry_len + 3) & ~0x03;
|
||||
}
|
||||
|
||||
static void print_entry_value(const struct tffs_entry *entry)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* These are NOT NULL terminated. */
|
||||
for (i = 0; i < get_header_len(entry->header); i++)
|
||||
fprintf(stdout, "%c", entry->val[i]);
|
||||
}
|
||||
|
||||
static void parse_entry(uint8_t *buffer, uint32_t pos,
|
||||
struct tffs_entry *entry)
|
||||
{
|
||||
entry->header = (struct tffs_entry_header *) &buffer[pos];
|
||||
entry->val = &buffer[pos + sizeof(struct tffs_entry_header)];
|
||||
}
|
||||
|
||||
static int find_entry(uint8_t *buffer, uint16_t id, struct tffs_entry *entry)
|
||||
{
|
||||
uint32_t pos = 0;
|
||||
|
||||
do {
|
||||
parse_entry(buffer, pos, entry);
|
||||
|
||||
if (get_header_id(entry->header) == id)
|
||||
return 1;
|
||||
|
||||
pos += sizeof(struct tffs_entry_header);
|
||||
pos += get_walk_size(get_header_len(entry->header));
|
||||
} while (pos < tffs_size && entry->header->id != TFFS_ID_END);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void parse_key_names(struct tffs_entry *names_entry,
|
||||
struct tffs_key_name_table *key_names)
|
||||
{
|
||||
uint32_t pos = 0, i = 0;
|
||||
struct tffs_name_table_entry *name_item;
|
||||
|
||||
key_names->entries = calloc(sizeof(*name_item), 1);
|
||||
|
||||
do {
|
||||
name_item = &key_names->entries[i];
|
||||
|
||||
name_item->id = (uint32_t *) &names_entry->val[pos];
|
||||
pos += sizeof(*name_item->id);
|
||||
name_item->val = (const char *) &names_entry->val[pos];
|
||||
|
||||
/*
|
||||
* There is no "length" field because the string values are
|
||||
* simply NULL-terminated -> strlen() gives us the size.
|
||||
*/
|
||||
pos += get_walk_size(strlen(name_item->val) + 1);
|
||||
|
||||
++i;
|
||||
key_names->entries = realloc(key_names->entries,
|
||||
sizeof(*name_item) * (i + 1));
|
||||
} while (pos < get_header_len(names_entry->header));
|
||||
|
||||
key_names->size = i;
|
||||
}
|
||||
|
||||
static void show_all_key_names(struct tffs_key_name_table *key_names)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < key_names->size; i++)
|
||||
printf("%s\n", key_names->entries[i].val);
|
||||
}
|
||||
|
||||
static int show_all_key_value_pairs(uint8_t *buffer,
|
||||
struct tffs_key_name_table *key_names)
|
||||
{
|
||||
int i, has_value = 0;
|
||||
uint16_t id;
|
||||
struct tffs_entry tmp;
|
||||
|
||||
for (i = 0; i < key_names->size; i++) {
|
||||
id = to_entry_header_id(*key_names->entries[i].id);
|
||||
|
||||
if (find_entry(buffer, id, &tmp)) {
|
||||
printf("%s=", key_names->entries[i].val);
|
||||
print_entry_value(&tmp);
|
||||
printf("\n");
|
||||
has_value++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_value) {
|
||||
fprintf(stderr, "ERROR: no values found!\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static int show_matching_key_value(uint8_t *buffer,
|
||||
struct tffs_key_name_table *key_names)
|
||||
{
|
||||
int i;
|
||||
uint16_t id;
|
||||
struct tffs_entry tmp;
|
||||
const char *name;
|
||||
|
||||
for (i = 0; i < key_names->size; i++) {
|
||||
name = key_names->entries[i].val;
|
||||
|
||||
if (strcmp(name, name_filter) == 0) {
|
||||
id = to_entry_header_id(*key_names->entries[i].id);
|
||||
|
||||
if (find_entry(buffer, id, &tmp)) {
|
||||
print_entry_value(&tmp);
|
||||
printf("\n");
|
||||
return EXIT_SUCCESS;
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"ERROR: no value found for name %s!\n",
|
||||
name);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, "ERROR: Unknown key name %s!\n", name_filter);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
static void usage(int status)
|
||||
{
|
||||
FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout;
|
||||
|
||||
fprintf(stream, "Usage: %s [OPTIONS...]\n", progname);
|
||||
fprintf(stream,
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -a list all key value pairs found in the TFFS file/device\n"
|
||||
" -b swap bytes while parsing the TFFS file/device\n"
|
||||
" -h show this screen\n"
|
||||
" -i <file> inspect the given TFFS file/device <file>\n"
|
||||
" -l list all supported keys\n"
|
||||
" -n <key name> display the value of the given key\n"
|
||||
" -s <size> the (max) size of the TFFS file/device <size>\n"
|
||||
);
|
||||
|
||||
exit(status);
|
||||
}
|
||||
|
||||
static int file_exist(char *filename)
|
||||
{
|
||||
struct stat buffer;
|
||||
|
||||
return stat(filename, &buffer) == 0;
|
||||
}
|
||||
|
||||
static void parse_options(int argc, char *argv[])
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
int c;
|
||||
|
||||
c = getopt(argc, argv, "abhi:ln:s:");
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c) {
|
||||
case 'a':
|
||||
show_all = true;
|
||||
name_filter = NULL;
|
||||
print_all_key_names = false;
|
||||
break;
|
||||
case 'b':
|
||||
swap_bytes = 1;
|
||||
break;
|
||||
case 'h':
|
||||
usage(EXIT_SUCCESS);
|
||||
break;
|
||||
case 'i':
|
||||
input_file = optarg;
|
||||
break;
|
||||
case 'l':
|
||||
print_all_key_names = true;
|
||||
show_all = false;
|
||||
name_filter = NULL;
|
||||
break;
|
||||
case 'n':
|
||||
name_filter = optarg;
|
||||
show_all = false;
|
||||
print_all_key_names = false;
|
||||
break;
|
||||
case 's':
|
||||
tffs_size = strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
default:
|
||||
usage(EXIT_FAILURE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!input_file) {
|
||||
fprintf(stderr, "ERROR: No input file (-i <file>) given!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!file_exist(input_file)) {
|
||||
fprintf(stderr, "ERROR: %s does not exist\n", input_file);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!show_all && !name_filter && !print_all_key_names) {
|
||||
fprintf(stderr,
|
||||
"ERROR: either -l, -a or -n <key name> is required!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret = EXIT_FAILURE;
|
||||
uint8_t *buffer;
|
||||
FILE *fp;
|
||||
struct tffs_entry name_table;
|
||||
struct tffs_key_name_table key_names;
|
||||
|
||||
progname = basename(argv[0]);
|
||||
|
||||
parse_options(argc, argv);
|
||||
|
||||
fp = fopen(input_file, "r");
|
||||
|
||||
if (!fp) {
|
||||
fprintf(stderr, "ERROR: Failed to open tffs input file %s\n",
|
||||
input_file);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (tffs_size == 0) {
|
||||
fseek(fp, 0L, SEEK_END);
|
||||
tffs_size = ftell(fp);
|
||||
fseek(fp, 0L, SEEK_SET);
|
||||
}
|
||||
|
||||
buffer = malloc(tffs_size);
|
||||
|
||||
if (fread(buffer, 1, tffs_size, fp) != tffs_size) {
|
||||
fprintf(stderr, "ERROR: Failed read tffs file %s\n",
|
||||
input_file);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (!find_entry(buffer, TFFS_ID_TABLE_NAME, &name_table)) {
|
||||
fprintf(stderr,"ERROR: No name table found in tffs file %s\n",
|
||||
input_file);
|
||||
fprintf(stderr," Is byte-swapping (-b) required?\n");
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
parse_key_names(&name_table, &key_names);
|
||||
if (key_names.size < 1) {
|
||||
fprintf(stderr, "ERROR: No name table found in tffs file %s\n",
|
||||
input_file);
|
||||
goto out_free_names;
|
||||
}
|
||||
|
||||
if (print_all_key_names) {
|
||||
show_all_key_names(&key_names);
|
||||
ret = EXIT_SUCCESS;
|
||||
} else if (show_all) {
|
||||
ret = show_all_key_value_pairs(buffer, &key_names);
|
||||
} else {
|
||||
ret = show_matching_key_value(buffer, &key_names);
|
||||
}
|
||||
|
||||
out_free_names:
|
||||
free(key_names.entries);
|
||||
out_free:
|
||||
fclose(fp);
|
||||
free(buffer);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
28
package/utils/jboot-tools/Makefile
Normal file
28
package/utils/jboot-tools/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=jboot-tools
|
||||
PKG_RELEASE:=1
|
||||
CMAKE_INSTALL:=1
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/jboot-tools
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
DEPENDS:=@TARGET_ramips
|
||||
TITLE:=Utilites for accessing JBOOT based D-Link devices Calibration data
|
||||
endef
|
||||
|
||||
define Package/jboot-tools/description
|
||||
This package contains:
|
||||
jboot_config_read.c: partially read the config partition of JBOOT based D-Link devices.
|
||||
endef
|
||||
|
||||
define Package/jboot-tools/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/jboot_config_read $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,jboot-tools))
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user