build system overhaul
This commit is contained in:
parent
8f8f268cfd
commit
7d219aab70
104
Config.in
104
Config.in
@ -13,7 +13,7 @@ menu "Busybox Settings"
|
||||
|
||||
menu "General Configuration"
|
||||
|
||||
config CONFIG_NITPICK
|
||||
config NITPICK
|
||||
bool "See lots more (probably unnecessary) configuration options."
|
||||
default n
|
||||
help
|
||||
@ -29,7 +29,7 @@ config CONFIG_NITPICK
|
||||
|
||||
You have been warned.
|
||||
|
||||
config CONFIG_DESKTOP
|
||||
config DESKTOP
|
||||
bool "Enable options for full-blown desktop systems."
|
||||
default n
|
||||
help
|
||||
@ -39,8 +39,8 @@ config CONFIG_DESKTOP
|
||||
|
||||
choice
|
||||
prompt "Buffer allocation policy"
|
||||
default CONFIG_FEATURE_BUFFERS_USE_MALLOC
|
||||
depends on CONFIG_NITPICK
|
||||
default FEATURE_BUFFERS_USE_MALLOC
|
||||
depends on NITPICK
|
||||
help
|
||||
There are 3 ways BusyBox can handle buffer allocations:
|
||||
- Use malloc. This costs code size for the call to xmalloc.
|
||||
@ -51,18 +51,18 @@ choice
|
||||
behavior was the only one available for BusyBox versions 0.48 and
|
||||
earlier.
|
||||
|
||||
config CONFIG_FEATURE_BUFFERS_USE_MALLOC
|
||||
config FEATURE_BUFFERS_USE_MALLOC
|
||||
bool "Allocate with Malloc"
|
||||
|
||||
config CONFIG_FEATURE_BUFFERS_GO_ON_STACK
|
||||
config FEATURE_BUFFERS_GO_ON_STACK
|
||||
bool "Allocate on the Stack"
|
||||
|
||||
config CONFIG_FEATURE_BUFFERS_GO_IN_BSS
|
||||
config FEATURE_BUFFERS_GO_IN_BSS
|
||||
bool "Allocate in the .bss section"
|
||||
|
||||
endchoice
|
||||
|
||||
config CONFIG_SHOW_USAGE
|
||||
config SHOW_USAGE
|
||||
bool "Show terse applet usage messages"
|
||||
default y
|
||||
help
|
||||
@ -71,20 +71,20 @@ config CONFIG_SHOW_USAGE
|
||||
messages if you say no here.
|
||||
This will save you up to 7k.
|
||||
|
||||
config CONFIG_FEATURE_VERBOSE_USAGE
|
||||
config FEATURE_VERBOSE_USAGE
|
||||
bool "Show verbose applet usage messages"
|
||||
default n
|
||||
select CONFIG_SHOW_USAGE
|
||||
select SHOW_USAGE
|
||||
help
|
||||
All BusyBox applets will show more verbose help messages when
|
||||
busybox is invoked with --help. This will add a lot of text to the
|
||||
busybox binary. In the default configuration, this will add about
|
||||
13k, but it can add much more depending on your configuration.
|
||||
|
||||
config CONFIG_FEATURE_COMPRESS_USAGE
|
||||
config FEATURE_COMPRESS_USAGE
|
||||
bool "Store applet usage messages in compressed form"
|
||||
default y
|
||||
depends on CONFIG_SHOW_USAGE
|
||||
depends on SHOW_USAGE
|
||||
help
|
||||
Store usage messages in compressed form, uncompress them on-the-fly
|
||||
when <applet> --help is called.
|
||||
@ -95,7 +95,7 @@ config CONFIG_FEATURE_COMPRESS_USAGE
|
||||
and have very little memory, this might not be a win. Otherwise,
|
||||
you probably want this.
|
||||
|
||||
config CONFIG_FEATURE_INSTALLER
|
||||
config FEATURE_INSTALLER
|
||||
bool "Support --install [-s] to install applet links at runtime"
|
||||
default n
|
||||
help
|
||||
@ -104,14 +104,14 @@ config CONFIG_FEATURE_INSTALLER
|
||||
applets that are compiled into busybox. This feature requires the
|
||||
/proc filesystem.
|
||||
|
||||
config CONFIG_LOCALE_SUPPORT
|
||||
config LOCALE_SUPPORT
|
||||
bool "Enable locale support (system needs locale for this to work)"
|
||||
default n
|
||||
help
|
||||
Enable this if your system has locale support and you would like
|
||||
busybox to support locale settings.
|
||||
|
||||
config CONFIG_GETOPT_LONG
|
||||
config GETOPT_LONG
|
||||
bool
|
||||
default y
|
||||
# bool "Enable support for --long-options"
|
||||
@ -120,7 +120,7 @@ config CONFIG_GETOPT_LONG
|
||||
# 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 CONFIG_FEATURE_DEVPTS
|
||||
config FEATURE_DEVPTS
|
||||
bool "Use the devpts filesystem for Unix98 PTYs"
|
||||
default y
|
||||
help
|
||||
@ -130,10 +130,10 @@ config CONFIG_FEATURE_DEVPTS
|
||||
/dev/ttyp<number> will be used. To use this option, you should have
|
||||
devpts mounted.
|
||||
|
||||
config CONFIG_FEATURE_CLEAN_UP
|
||||
config FEATURE_CLEAN_UP
|
||||
bool "Clean up all memory before exiting (usually not needed)"
|
||||
default n
|
||||
depends on CONFIG_NITPICK
|
||||
depends on NITPICK
|
||||
help
|
||||
As a size optimization, busybox normally exits without explicitly
|
||||
freeing dynamically allocated memory or closing files. This saves
|
||||
@ -143,7 +143,7 @@ config CONFIG_FEATURE_CLEAN_UP
|
||||
Don't enable this unless you have a really good reason to clean
|
||||
things up manually.
|
||||
|
||||
config CONFIG_FEATURE_SUID
|
||||
config FEATURE_SUID
|
||||
bool "Support for SUID/SGID handling"
|
||||
default n
|
||||
help
|
||||
@ -158,17 +158,17 @@ config CONFIG_FEATURE_SUID
|
||||
are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs,
|
||||
and vlock.
|
||||
|
||||
config CONFIG_FEATURE_SYSLOG
|
||||
config FEATURE_SYSLOG
|
||||
bool "Support for syslog"
|
||||
default n
|
||||
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.
|
||||
|
||||
config CONFIG_FEATURE_SUID_CONFIG
|
||||
config FEATURE_SUID_CONFIG
|
||||
bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
|
||||
default n if CONFIG_FEATURE_SUID
|
||||
depends on CONFIG_FEATURE_SUID
|
||||
default n if FEATURE_SUID
|
||||
depends on 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.)
|
||||
@ -197,15 +197,15 @@ config CONFIG_FEATURE_SUID_CONFIG
|
||||
Robert 'sandman' Griebl has more information here:
|
||||
<url: http://www.softforge.de/bb/suid.html >.
|
||||
|
||||
config CONFIG_FEATURE_SUID_CONFIG_QUIET
|
||||
config FEATURE_SUID_CONFIG_QUIET
|
||||
bool "Suppress warning message if /etc/busybox.conf is not readable"
|
||||
default y
|
||||
depends on CONFIG_FEATURE_SUID_CONFIG
|
||||
depends on 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 CONFIG_SELINUX
|
||||
config SELINUX
|
||||
bool "Support NSA Security Enhanced Linux"
|
||||
default n
|
||||
help
|
||||
@ -225,7 +225,7 @@ config CONFIG_SELINUX
|
||||
|
||||
Most people will leave this set to 'N'.
|
||||
|
||||
config CONFIG_BUSYBOX_EXEC_PATH
|
||||
config BUSYBOX_EXEC_PATH
|
||||
string "Path to BusyBox executable"
|
||||
default "/proc/self/exe"
|
||||
help
|
||||
@ -239,7 +239,7 @@ endmenu
|
||||
|
||||
menu 'Build Options'
|
||||
|
||||
config CONFIG_STATIC
|
||||
config STATIC
|
||||
bool "Build BusyBox as a static binary (no shared libs)"
|
||||
default n
|
||||
help
|
||||
@ -253,7 +253,7 @@ config CONFIG_STATIC
|
||||
|
||||
Most people will leave this set to 'N'.
|
||||
|
||||
config CONFIG_BUILD_LIBBUSYBOX
|
||||
config BUILD_LIBBUSYBOX
|
||||
bool "Build shared libbusybox"
|
||||
default n
|
||||
help
|
||||
@ -265,10 +265,10 @@ config CONFIG_BUILD_LIBBUSYBOX
|
||||
binary serves no purpose (and increases the size). You should
|
||||
almost certainly say "no" to this right now.
|
||||
|
||||
config CONFIG_FEATURE_FULL_LIBBUSYBOX
|
||||
config FEATURE_FULL_LIBBUSYBOX
|
||||
bool "Feature-complete libbusybox"
|
||||
default n if !CONFIG_FEATURE_SHARED_BUSYBOX
|
||||
depends on CONFIG_BUILD_LIBBUSYBOX
|
||||
default n if !FEATURE_SHARED_BUSYBOX
|
||||
depends on BUILD_LIBBUSYBOX
|
||||
help
|
||||
Build a libbusybox with the complete feature-set, disregarding
|
||||
the actually selected config.
|
||||
@ -284,15 +284,15 @@ config CONFIG_FEATURE_FULL_LIBBUSYBOX
|
||||
|
||||
Say 'N' if in doubt.
|
||||
|
||||
config CONFIG_FEATURE_SHARED_BUSYBOX
|
||||
config FEATURE_SHARED_BUSYBOX
|
||||
bool "Use shared libbusybox for busybox"
|
||||
default y if CONFIG_BUILD_LIBBUSYBOX
|
||||
depends on !CONFIG_STATIC && CONFIG_BUILD_LIBBUSYBOX
|
||||
default y if BUILD_LIBBUSYBOX
|
||||
depends on !STATIC && BUILD_LIBBUSYBOX
|
||||
help
|
||||
Use libbusybox.so also for busybox itself.
|
||||
You need to have a working dynamic linker to use this variant.
|
||||
|
||||
config CONFIG_LFS
|
||||
config LFS
|
||||
bool "Build with Large File Support (for accessing files > 2 GB)"
|
||||
default n
|
||||
select FDISK_SUPPORT_LARGE_DISKS
|
||||
@ -304,7 +304,7 @@ config CONFIG_LFS
|
||||
cp, mount, tar, and many others. If you want to access files larger
|
||||
than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
|
||||
|
||||
config CONFIG_BUILD_AT_ONCE
|
||||
config BUILD_AT_ONCE
|
||||
bool "Compile all sources at once"
|
||||
default n
|
||||
help
|
||||
@ -327,7 +327,7 @@ endmenu
|
||||
|
||||
menu 'Debugging Options'
|
||||
|
||||
config CONFIG_DEBUG
|
||||
config DEBUG
|
||||
bool "Build BusyBox with extra Debugging symbols"
|
||||
default n
|
||||
help
|
||||
@ -338,10 +338,10 @@ config CONFIG_DEBUG
|
||||
|
||||
Most people should answer N.
|
||||
|
||||
config CONFIG_DEBUG_PESSIMIZE
|
||||
config DEBUG_PESSIMIZE
|
||||
bool "Disable compiler optimizations."
|
||||
default n
|
||||
depends on CONFIG_DEBUG
|
||||
depends on DEBUG
|
||||
help
|
||||
The compiler's optimization of source code can eliminate and reorder
|
||||
code, resulting in an executable that's hard to understand when
|
||||
@ -351,8 +351,8 @@ config CONFIG_DEBUG_PESSIMIZE
|
||||
|
||||
choice
|
||||
prompt "Additional debugging library"
|
||||
default CONFIG_NO_DEBUG_LIB
|
||||
depends on CONFIG_DEBUG
|
||||
default NO_DEBUG_LIB
|
||||
depends on DEBUG
|
||||
help
|
||||
Using an additional debugging library will make BusyBox become
|
||||
considerable larger and will cause it to run more slowly. You
|
||||
@ -380,18 +380,18 @@ choice
|
||||
you are hunting a hard to find memory problem.
|
||||
|
||||
|
||||
config CONFIG_NO_DEBUG_LIB
|
||||
config NO_DEBUG_LIB
|
||||
bool "None"
|
||||
|
||||
config CONFIG_DMALLOC
|
||||
config DMALLOC
|
||||
bool "Dmalloc"
|
||||
|
||||
config CONFIG_EFENCE
|
||||
config EFENCE
|
||||
bool "Electric-fence"
|
||||
|
||||
endchoice
|
||||
|
||||
config CONFIG_DEBUG_YANK_SUSv2
|
||||
config DEBUG_YANK_SUSv2
|
||||
bool "Disable obsolete features removed before SUSv3?"
|
||||
default y
|
||||
help
|
||||
@ -404,7 +404,7 @@ endmenu
|
||||
|
||||
menu 'Installation Options'
|
||||
|
||||
config CONFIG_INSTALL_NO_USR
|
||||
config INSTALL_NO_USR
|
||||
bool "Don't use /usr"
|
||||
default n
|
||||
help
|
||||
@ -413,27 +413,27 @@ config CONFIG_INSTALL_NO_USR
|
||||
|
||||
choice
|
||||
prompt "Applets links"
|
||||
default CONFIG_INSTALL_APPLET_SYMLINKS
|
||||
default INSTALL_APPLET_SYMLINKS
|
||||
help
|
||||
Choose how you install applets links.
|
||||
|
||||
config CONFIG_INSTALL_APPLET_SYMLINKS
|
||||
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 CONFIG_INSTALL_APPLET_HARDLINKS
|
||||
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 CONFIG_INSTALL_APPLET_DONT
|
||||
config INSTALL_APPLET_DONT
|
||||
bool
|
||||
prompt "not installed"
|
||||
depends on CONFIG_FEATURE_INSTALLER || CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
depends on FEATURE_INSTALLER || FEATURE_SH_STANDALONE_SHELL
|
||||
help
|
||||
Do not install applets links. Usefull when using the -install feature
|
||||
or a standalone shell for rescue pruposes.
|
||||
|
131
Makefile.custom
Normal file
131
Makefile.custom
Normal file
@ -0,0 +1,131 @@
|
||||
### # defconfig is allyesconfig minus any features that are specialized enough
|
||||
### # or cause enough behavior change that the user really should switch them on
|
||||
### # manually if that's what they want. Sort of "maximum sane config".
|
||||
|
||||
### defconfig: scripts/config/conf
|
||||
### @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
|
||||
### @$(SED) -i -r -e "s/^(CONFIG_(DEBUG.*|STATIC|SELINUX|NITPICK|BUILD_(AT_ONCE|LIBBUSYBOX)|FEATURE_(DEVFS|FULL_LIBBUSYBOX|SHARED_BUSYBOX|MTAB_SUPPORT|CLEAN_UP|UDHCP_DEBUG)|INSTALL_NO_USR))=.*/# \1 is not set/" .config
|
||||
### @./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
|
||||
|
||||
### allbareconfig: scripts/config/conf
|
||||
### @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null
|
||||
### @$(SED) -i -r -e "s/^(CONFIG_(DEBUG|STATIC|SELINUX|DEVFSD|NC_GAPING_SECURITY_HOLE|BUILD_AT_ONCE)).*/# \1 is not set/" .config
|
||||
### @$(SED) -i -e "/FEATURE/s/=.*//;/^[^#]/s/.*FEATURE.*/# \0 is not set/;" .config
|
||||
### @echo "CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y" >> .config
|
||||
### @yes n | ./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null
|
||||
|
||||
### hosttools:
|
||||
### $(Q)cp .config .config.bak || noold=yea
|
||||
### $(Q)$(MAKE) CC="$(HOSTCC)" CFLAGS="$(HOSTCFLAGS) $(INCS)" allnoconfig
|
||||
### $(Q)mv .config .config.in
|
||||
### $(Q)(grep -v CONFIG_SED .config.in ; \
|
||||
### echo "CONFIG_SED=y" ; ) > .config
|
||||
### $(Q)$(MAKE) CC="$(HOSTCC)" CFLAGS="$(HOSTCFLAGS) $(INCS)" oldconfig include/bb_config.h
|
||||
### $(Q)$(MAKE) CC="$(HOSTCC)" CFLAGS="$(HOSTCFLAGS) $(INCS)" busybox
|
||||
### $(Q)[ -f .config.bak ] && mv .config.bak .config || rm .config
|
||||
### mv busybox sed
|
||||
### @echo "Now do: $(MAKE) SED=$(objtree)/sed <target>"
|
||||
|
||||
%.bflt: %_unstripped
|
||||
$(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@
|
||||
|
||||
busybox.links: $(srctree)/applets/busybox.mkll include/bb_config.h $(srctree)/include/applets.h
|
||||
$(Q)-$(SHELL) $^ >$@
|
||||
|
||||
.PHONY: install
|
||||
install: $(srctree)/applets/install.sh busybox busybox.links
|
||||
$(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \
|
||||
$(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS)
|
||||
ifeq ($(strip $(CONFIG_FEATURE_SUID)),y)
|
||||
@echo
|
||||
@echo
|
||||
@echo --------------------------------------------------
|
||||
@echo You will probably need to make your busybox binary
|
||||
@echo setuid root to ensure all configured applets will
|
||||
@echo work properly.
|
||||
@echo --------------------------------------------------
|
||||
@echo
|
||||
endif
|
||||
|
||||
uninstall: busybox.links
|
||||
rm -f $(CONFIG_PREFIX)/bin/busybox
|
||||
for i in `cat busybox.links` ; do rm -f $(CONFIG_PREFIX)$$i; done
|
||||
ifneq ($(strip $(DO_INSTALL_LIBS)),n)
|
||||
for i in $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS); do \
|
||||
rm -f $(CONFIG_PREFIX)$$i; \
|
||||
done
|
||||
endif
|
||||
|
||||
check test: busybox
|
||||
bindir=$(objtree) srcdir=$(srctree)/testsuite SED="$(SED)" \
|
||||
$(SHELL) $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:1=),-v)
|
||||
|
||||
### checkhelp:
|
||||
### $(Q)$(srctree)/scripts/checkhelp.awk \
|
||||
### $(wildcard $(patsubst %,%/Config.in,$(SRC_DIRS) ./))
|
||||
|
||||
.PHONY: sizes
|
||||
sizes: busybox_unstripped
|
||||
$(NM) --size-sort $(<)
|
||||
|
||||
.PHONY: bloatcheck
|
||||
bloatcheck: busybox_old busybox_unstripped
|
||||
@$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped
|
||||
|
||||
.PHONY: baseline
|
||||
baseline: busybox_unstripped
|
||||
@mv busybox_unstripped busybox_old
|
||||
|
||||
.PHONY: objsizes
|
||||
objsizes: busybox_unstripped
|
||||
$(SHELL) $(srctree)/scripts/objsizes
|
||||
|
||||
# Documentation Targets
|
||||
.PHONY: doc
|
||||
doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html
|
||||
|
||||
docs/busybox.pod: $(srctree)/docs/busybox_header.pod \
|
||||
$(srctree)/include/usage.h \
|
||||
$(srctree)/docs/busybox_footer.pod \
|
||||
$(srctree)/docs/autodocifier.pl
|
||||
$(disp_doc)
|
||||
$(Q)-mkdir -p docs
|
||||
$(Q)-( cat $(srctree)/docs/busybox_header.pod ; \
|
||||
$(srctree)/docs/autodocifier.pl $(srctree)/include/usage.h ; \
|
||||
cat $(srctree)/docs/busybox_footer.pod ; ) > docs/busybox.pod
|
||||
|
||||
docs/BusyBox.txt: docs/busybox.pod
|
||||
$(disp_doc)
|
||||
$(Q)-mkdir -p docs
|
||||
$(Q)-pod2text $< > $@
|
||||
|
||||
docs/BusyBox.1: docs/busybox.pod
|
||||
$(disp_doc)
|
||||
$(Q)-mkdir -p docs
|
||||
$(Q)-pod2man --center=BusyBox --release="version $(VERSION)" \
|
||||
$< > $@
|
||||
|
||||
docs/BusyBox.html: docs/busybox.net/BusyBox.html
|
||||
$(disp_doc)
|
||||
$(Q)-mkdir -p docs
|
||||
$(Q)-rm -f docs/BusyBox.html
|
||||
$(Q)-cp docs/busybox.net/BusyBox.html docs/BusyBox.html
|
||||
|
||||
docs/busybox.net/BusyBox.html: docs/busybox.pod
|
||||
$(Q)-mkdir -p docs/busybox.net
|
||||
$(Q)-pod2html --noindex $< > \
|
||||
docs/busybox.net/BusyBox.html
|
||||
$(Q)-rm -f pod2htm*
|
||||
|
||||
# documentation, cross-reference
|
||||
# Modern distributions already ship synopsis packages (e.g. debian)
|
||||
# If you have an old distribution go to http://synopsis.fresco.org/
|
||||
syn_tgt := $(wildcard $(patsubst %,%/*.c,$(SRC_DIRS)))
|
||||
syn := $(patsubst %.c, %.syn, $(syn_tgt))
|
||||
|
||||
%.syn: %.c
|
||||
synopsis -p C -l Comments.SSDFilter,Comments.Previous $(INCS) -Wp,verbose,debug,preprocess,cppflags="'$(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) $(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) $(APPLETS_DEFINE) $(BUSYBOX_DEFINE)'" -o $@ $<
|
||||
|
||||
.PHONY: html
|
||||
html: $(syn)
|
||||
synopsis -f HTML -Wf,title="'BusyBox Documentation'" -o $@ $^
|
19
Makefile.flags
Normal file
19
Makefile.flags
Normal file
@ -0,0 +1,19 @@
|
||||
# ==========================================================================
|
||||
# Building
|
||||
# ==========================================================================
|
||||
|
||||
BB_VER = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
|
||||
|
||||
CPPFLAGS += \
|
||||
-Iinclude -Ilibbb \
|
||||
$(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) -I$(srctree)/libbb \
|
||||
-include include/autoconf.h \
|
||||
-D_GNU_SOURCE -DNDEBUG \
|
||||
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
|
||||
-D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP \
|
||||
-Wall -Wstrict-prototypes -Wshadow -Werror \
|
||||
-funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \
|
||||
-Os -march=i386 -mpreferred-stack-boundary=2 \
|
||||
-falign-functions=1 -falign-jumps=1 -falign-loops=1 \
|
||||
-fomit-frame-pointer -ffunction-sections -fdata-sections \
|
||||
-funsigned-char -fno-builtin-strlen \
|
88
Makefile.help
Normal file
88
Makefile.help
Normal file
@ -0,0 +1,88 @@
|
||||
### Kernel's one:
|
||||
### help:
|
||||
### @echo 'Cleaning targets:'
|
||||
### @echo ' clean - remove most generated files but keep the config'
|
||||
### @echo ' mrproper - remove all generated files + config + various backup files'
|
||||
### @echo ''
|
||||
### @echo 'Configuration targets:'
|
||||
### @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
|
||||
### @echo ''
|
||||
### @echo 'Other generic targets:'
|
||||
### @echo ' all - Build all targets marked with [*]'
|
||||
### @echo '* busybox - Build the bare kernel'
|
||||
### @echo '* modules - Build all modules'
|
||||
### @echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
|
||||
### @echo ' dir/ - Build all files in dir and below'
|
||||
### @echo ' dir/file.[ois] - Build specified target only'
|
||||
### @echo ' dir/file.ko - Build module including final link'
|
||||
### @echo ' rpm - Build a kernel as an RPM package'
|
||||
### @echo ' tags/TAGS - Generate tags file for editors'
|
||||
### @echo ' cscope - Generate cscope index'
|
||||
### @echo ' kernelrelease - Output the release version string'
|
||||
### @echo ' kernelversion - Output the version stored in Makefile'
|
||||
### @echo ''
|
||||
### @echo 'Static analysers'
|
||||
### @echo ' checkstack - Generate a list of stack hogs'
|
||||
### @echo ' namespacecheck - Name space analysis on compiled kernel'
|
||||
### @echo ''
|
||||
### @echo 'Kernel packaging:'
|
||||
### @$(MAKE) $(build)=$(package-dir) help
|
||||
### @echo ''
|
||||
### @echo 'Documentation targets:'
|
||||
### @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
|
||||
### @echo ''
|
||||
### @echo 'Architecture specific targets ($(ARCH)):'
|
||||
### @$(if $(archhelp),$(archhelp),\
|
||||
### echo ' No architecture specific help defined for $(ARCH)')
|
||||
### @echo ''
|
||||
### @$(if $(boards), \
|
||||
### $(foreach b, $(boards), \
|
||||
### printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \
|
||||
### echo '')
|
||||
###
|
||||
### @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
|
||||
### @echo ' make O=dir [targets] Locate all output files in "dir", including .config'
|
||||
### @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse)'
|
||||
### @echo ' make C=2 [targets] Force check of all c source with $$CHECK (sparse)'
|
||||
### @echo ''
|
||||
### @echo 'Execute "make" or "make all" to build all targets marked with [*] '
|
||||
### @echo 'For further info see the ./README file'
|
||||
|
||||
help:
|
||||
@echo 'Cleaning:'
|
||||
@echo ' clean - delete temporary files created by build'
|
||||
@echo ' distclean - delete all non-source files (including .config)'
|
||||
@echo
|
||||
@echo 'Build:'
|
||||
@echo ' all - Executable and documentation'
|
||||
@echo ' busybox - the swiss-army executable'
|
||||
@echo ' doc - docs/BusyBox.{txt,html,1}'
|
||||
@echo ' html - create html-based cross-reference'
|
||||
@echo
|
||||
@echo 'Configuration:'
|
||||
@echo ' allnoconfig - disable all symbols in .config'
|
||||
@echo ' allyesconfig - enable all symbols in .config (see defconfig)'
|
||||
@echo ' allbareconfig - enable all applets without any sub-features'
|
||||
@echo ' config - text based configurator (of last resort)'
|
||||
@echo ' defconfig - set .config to largest generic configuration'
|
||||
@echo ' menuconfig - interactive curses-based configurator'
|
||||
@echo ' oldconfig - resolve any unresolved symbols in .config'
|
||||
@echo ' hosttools - build sed for the host.'
|
||||
@echo ' You can use these commands if the commands on the host'
|
||||
@echo ' is unusable. Afterwards use it like:'
|
||||
@echo ' make SED="$(objtree)/sed"'
|
||||
@echo
|
||||
@echo 'Installation:'
|
||||
@echo ' install - install busybox into $(PREFIX)'
|
||||
@echo ' uninstall'
|
||||
@echo
|
||||
@echo 'Development:'
|
||||
@echo ' baseline - create busybox_old for bloatcheck.'
|
||||
@echo ' bloatcheck - show size difference between old and new versions'
|
||||
@echo ' check - run the test suite for all applets'
|
||||
@echo ' checkhelp - check for missing help-entries in Config.in'
|
||||
@echo ' randconfig - generate a random configuration'
|
||||
@echo ' release - create a distribution tarball'
|
||||
@echo ' sizes - show size of all enabled busybox symbols'
|
||||
@echo ' objsizes - show size of each .o object built'
|
||||
@echo
|
436
Rules.mak
436
Rules.mak
@ -1,436 +0,0 @@
|
||||
# Rules.make for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under GPLv2, see the file LICENSE in this tarball for details.
|
||||
#
|
||||
|
||||
# Pull in the user's busybox configuration
|
||||
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
|
||||
-include $(top_builddir)/.config
|
||||
endif
|
||||
|
||||
#--------------------------------------------------------
|
||||
PROG := busybox
|
||||
MAJOR_VERSION :=1
|
||||
MINOR_VERSION :=2
|
||||
SUBLEVEL_VERSION:=0
|
||||
EXTRAVERSION :=-svn
|
||||
VERSION :=$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL_VERSION)$(EXTRAVERSION)
|
||||
BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
|
||||
|
||||
|
||||
#--------------------------------------------------------
|
||||
# With a modern GNU make(1) (highly recommended, that's what all the
|
||||
# developers use), all of the following configuration values can be
|
||||
# overridden at the command line. For example:
|
||||
# make CROSS_COMPILE=powerpc-linux- top_srcdir="$HOME/busybox" PREFIX=/mnt/app
|
||||
#--------------------------------------------------------
|
||||
|
||||
# If you are running a cross compiler, you will want to set CROSS_COMPILE
|
||||
# to something more interesting... Target architecture is determined
|
||||
# by asking the CC compiler what arch it compiles things for, so unless
|
||||
# your compiler is broken, you should not need to specify TARGET_ARCH
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
AS = $(CROSS_COMPILE)as
|
||||
LD = $(CROSS_COMPILE)ld
|
||||
NM = $(CROSS_COMPILE)nm
|
||||
STRIP = $(CROSS_COMPILE)strip
|
||||
ELF2FLT = $(CROSS_COMPILE)elf2flt
|
||||
CPP = $(CC) -E
|
||||
SED ?= sed
|
||||
BZIP2 ?= bzip2
|
||||
|
||||
|
||||
# What OS are you compiling busybox for? This allows you to include
|
||||
# OS specific things, syscall overrides, etc.
|
||||
TARGET_OS=linux
|
||||
|
||||
# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
|
||||
LC_ALL:= C
|
||||
|
||||
# This must bind late because srcdir is reset for every source subdirectory.
|
||||
INCS:=-I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
CFLAGS=$(INCS) -I$(srcdir) -D_GNU_SOURCE
|
||||
CFLAGS+=$(CHECKED_CFLAGS)
|
||||
ARFLAGS=cru
|
||||
|
||||
# gcc centric. Perhaps fiddle with findstring gcc,$(CC) for the rest
|
||||
# get the CC MAJOR/MINOR version
|
||||
CC_MAJOR:=$(shell printf "%02d" $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n 1))
|
||||
CC_MINOR:=$(shell printf "%02d" $(shell echo __GNUC_MINOR__ | $(CC) -E -xc - | tail -n 1))
|
||||
|
||||
#--------------------------------------------------------
|
||||
export VERSION BUILDTIME HOSTCC HOSTCFLAGS CROSS_COMPILE CC AR AS LD NM STRIP CPP
|
||||
ifeq ($(strip $(TARGET_ARCH)),)
|
||||
TARGET_ARCH:=$(shell $(CC) -dumpmachine | $(SED) -e s'/-.*//' \
|
||||
-e 's/i.86/i386/' \
|
||||
-e 's/sparc.*/sparc/' \
|
||||
-e 's/arm.*/arm/g' \
|
||||
-e 's/m68k.*/m68k/' \
|
||||
-e 's/ppc/powerpc/g' \
|
||||
-e 's/v850.*/v850/g' \
|
||||
-e 's/sh[234]/sh/' \
|
||||
-e 's/mips-.*/mips/' \
|
||||
-e 's/mipsel-.*/mipsel/' \
|
||||
-e 's/cris.*/cris/' \
|
||||
)
|
||||
endif
|
||||
|
||||
# A nifty macro to make testing gcc features easier, but note that everything
|
||||
# that uses this _must_ use := or it will be re-evaluated everytime it is
|
||||
# referenced.
|
||||
ifeq ($(strip $(BUILD_VERBOSE)),2)
|
||||
VERBOSE_CHECK_CC=echo CC=\"$(1)\" check_cc $(2) >&2;
|
||||
endif
|
||||
check_cc=$(shell \
|
||||
$(VERBOSE_CHECK_CC) \
|
||||
if [ "x$(1)" != "x" ] && [ "x$(2)" != "x" ]; then \
|
||||
echo "int i;" > ./conftest.c; \
|
||||
if $(1) $(2) -c -o conftest.o conftest.c > /dev/null 2>&1; \
|
||||
then echo "$(2)"; else echo "$(3)"; fi ; \
|
||||
rm -f conftest.c conftest.o; \
|
||||
fi)
|
||||
|
||||
ifneq ($(filter $(nocheck_targets),$(MAKECMDGOALS)),)
|
||||
check_cc:=
|
||||
endif
|
||||
|
||||
# A not very robust macro to check for available ld flags
|
||||
ifeq ($(strip $(BUILD_VERBOSE)),2)
|
||||
VERBOSE_CHECK_LD=echo LD=\"$(1)\" check_ld $(2) >&2;
|
||||
endif
|
||||
check_ld=$(shell \
|
||||
$(VERBOSE_CHECK_LD) \
|
||||
if [ "x$(1)" != "x" ] && [ "x$(2)" != "x" ]; then \
|
||||
$(1) -o /dev/null -b binary /dev/null > /dev/null 2>&1 && \
|
||||
echo "-Wl,$(2)" ; \
|
||||
fi)
|
||||
|
||||
ifneq ($(filter $(nocheck_targets),$(MAKECMDGOALS)),)
|
||||
check_ld:=
|
||||
endif
|
||||
|
||||
# A not very robust macro to check for available strip flags
|
||||
ifeq ($(strip $(BUILD_VERBOSE)),2)
|
||||
VERBOSE_CHECK_STRIP=echo STRIPCMD=\"$(1)\" check_strip $(2) >&2;
|
||||
endif
|
||||
check_strip=$(shell \
|
||||
$(VERBOSE_CHECK_STRIP) \
|
||||
if [ "x$(1)" != "x" ] && [ "x$(2)" != "x" ]; then \
|
||||
echo "int i;" > ./conftest.c ; \
|
||||
$(CC) -c -o conftest.o conftest.c > /dev/null 2>&1 ; \
|
||||
$(1) $(2) conftest.o > /dev/null 2>&1 && \
|
||||
echo "$(1) $(2)" || echo "$(3)"; \
|
||||
rm -f conftest.c conftest.o > /dev/null 2>&1 ; \
|
||||
fi)
|
||||
|
||||
ifneq ($(filter $(nocheck_targets),$(MAKECMDGOALS)),)
|
||||
check_strip:=
|
||||
endif
|
||||
|
||||
|
||||
# Select the compiler needed to build binaries for your development system
|
||||
HOSTCC = gcc
|
||||
HOSTCFLAGS:=$(call check_cc,$(HOSTCC),-Wall,)
|
||||
HOSTCFLAGS+=$(call check_cc,$(HOSTCC),-Wstrict-prototypes,)
|
||||
HOSTCFLAGS+=$(call check_cc,$(HOSTCC),-O2,)
|
||||
HOSTCFLAGS+=$(call check_cc,$(HOSTCC),-fomit-frame-pointer,)
|
||||
|
||||
LD_WHOLE_ARCHIVE:=$(shell echo "int i;" > conftest.c ; \
|
||||
$(CC) -c -o conftest.o conftest.c ; \
|
||||
echo "int main(void){return 0;}" > conftest_main.c ; \
|
||||
$(CC) -c -o conftest_main.o conftest_main.c ; \
|
||||
$(AR) $(ARFLAGS) conftest.a conftest.o ; \
|
||||
$(CC) -Wl,--whole-archive conftest.a -Wl,--no-whole-archive \
|
||||
conftest_main.o -o conftest > /dev/null 2>&1 \
|
||||
&& echo "-Wl,--whole-archive" ; \
|
||||
rm conftest_main.o conftest_main.c conftest.o conftest.c \
|
||||
conftest.a conftest > /dev/null 2>&1 ; )
|
||||
ifneq ($(findstring whole-archive,$(LD_WHOLE_ARCHIVE)),)
|
||||
LD_NO_WHOLE_ARCHIVE:= -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
LD_START_GROUP:=$(shell echo "int bar(void){return 0;}" > conftest.c ; \
|
||||
$(CC) -c -o conftest.o conftest.c ; \
|
||||
echo "int main(void){return bar();}" > conftest_main.c ; \
|
||||
$(CC) -c -o conftest_main.o conftest_main.c ; \
|
||||
$(AR) $(ARFLAGS) conftest.a conftest.o ; \
|
||||
$(CC) -Wl,--start-group conftest.a conftest_main.o -Wl,--end-group \
|
||||
-o conftest > /dev/null 2>&1 && echo "-Wl,--start-group" ; \
|
||||
rm conftest_main.o conftest_main.c conftest.o conftest.c \
|
||||
conftest.a conftest > /dev/null 2>&1 ; )
|
||||
ifneq ($(findstring start-group,$(LD_START_GROUP)),)
|
||||
LD_END_GROUP:= -Wl,--end-group
|
||||
endif
|
||||
|
||||
CHECKED_LDFLAGS := $(call check_ld,$(LD),--warn-common,)
|
||||
#CHECKED_LDFLAGS := $(call check_ld,$(LD),-static-libgcc,)
|
||||
|
||||
# Pin CHECKED_CFLAGS with := so it's only evaluated once.
|
||||
CHECKED_CFLAGS:=$(call check_cc,$(CC),-Wall,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wstrict-prototypes,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wshadow,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-funsigned-char,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-fno-builtin-strlen,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-finline-limit=0,)
|
||||
|
||||
# gcc 2.95 exits with 0 for "unrecognized option"
|
||||
ifeq ($(strip $(shell [ $(CC_MAJOR) -ge 3 ] ; echo $$?)),0)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-static-libgcc,)
|
||||
endif
|
||||
|
||||
# Preemptively pin this too.
|
||||
PROG_CFLAGS:=
|
||||
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Arch specific compiler optimization stuff should go here.
|
||||
# Unless you want to override the defaults, do not set anything
|
||||
# for OPTIMIZATION...
|
||||
|
||||
# use '-Os' optimization if available, else use -O2
|
||||
OPTIMIZATION:=$(call check_cc,$(CC),-Os,-O2)
|
||||
|
||||
ifeq ($(CONFIG_BUILD_AT_ONCE),y)
|
||||
# gcc 2.95 exits with 0 for "unrecognized option"
|
||||
ifeq ($(strip $(shell [ $(CC_MAJOR) -ge 3 ] ; echo $$?)),0)
|
||||
CFLAGS_COMBINE:=$(call check_cc,$(CC),--combine,)
|
||||
endif
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-funit-at-a-time,)
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-fgcse-after-reload,)
|
||||
ifneq ($(CONFIG_BUILD_LIBBUSYBOX),y)
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25795
|
||||
# This prevents us from using -fwhole-program when we build the lib
|
||||
PROG_CFLAGS+=$(call check_cc,$(CC),-fwhole-program,)
|
||||
endif # CONFIG_BUILD_LIBBUSYBOX
|
||||
endif # CONFIG_BUILD_AT_ONCE
|
||||
|
||||
LIB_LDFLAGS:=$(call check_ld,$(LD),--enable-new-dtags,)
|
||||
#LIB_LDFLAGS+=$(call check_ld,$(LD),--reduce-memory-overheads,)
|
||||
#LIB_LDFLAGS+=$(call check_ld,$(LD),--as-needed,)
|
||||
#LIB_LDFLAGS+=$(call check_ld,$(LD),--warn-shared-textrel,)
|
||||
|
||||
|
||||
# Some nice architecture specific optimizations
|
||||
ifeq ($(strip $(TARGET_ARCH)),arm)
|
||||
OPTIMIZATION+=-fstrict-aliasing
|
||||
endif
|
||||
ifeq ($(strip $(TARGET_ARCH)),i386)
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-march=i386,)
|
||||
# gcc-4.0 and older seem to benefit from these
|
||||
ifneq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0)
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-mpreferred-stack-boundary=2,)
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-falign-functions=1 -falign-jumps=1 -falign-loops=1, -malign-functions=0 -malign-jumps=0 -malign-loops=0,)
|
||||
|
||||
# gcc 4.1 produces many broken, totally invalid warnings
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Werror,)
|
||||
endif # gcc-4.0 and older
|
||||
|
||||
# gcc-4.1 and beyond seem to benefit from these
|
||||
ifeq ($(strip $(shell [ $(CC_MAJOR) -ge 4 -a $(CC_MINOR) -ge 1 ] ; echo $$?)),0)
|
||||
# turn off flags which hurt -Os
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-fno-tree-loop-optimize,)
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-fno-tree-dominator-opts,)
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-fno-strength-reduce,)
|
||||
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-fno-branch-count-reg,)
|
||||
endif # gcc-4.1 and beyond
|
||||
endif
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-fomit-frame-pointer,)
|
||||
CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,)
|
||||
|
||||
#
|
||||
#--------------------------------------------------------
|
||||
# If you're going to do a lot of builds with a non-vanilla configuration,
|
||||
# it makes sense to adjust parameters above, so you can type "make"
|
||||
# by itself, instead of following it by the same half-dozen overrides
|
||||
# every time. The stuff below, on the other hand, is probably less
|
||||
# prone to casual user adjustment.
|
||||
#
|
||||
|
||||
ifeq ($(strip $(CONFIG_LFS)),y)
|
||||
# For large file summit support
|
||||
CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
endif
|
||||
ifeq ($(strip $(CONFIG_DMALLOC)),y)
|
||||
# For testing mem leaks with dmalloc
|
||||
CFLAGS+=-DDMALLOC
|
||||
LIBRARIES:=-ldmalloc
|
||||
else
|
||||
ifeq ($(strip $(CONFIG_EFENCE)),y)
|
||||
LIBRARIES:=-lefence
|
||||
endif
|
||||
endif
|
||||
|
||||
# Debugging info
|
||||
|
||||
ifeq ($(strip $(CONFIG_DEBUG)),y)
|
||||
CFLAGS +=-g
|
||||
else
|
||||
CFLAGS +=-DNDEBUG
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y)
|
||||
CFLAGS += $(OPTIMIZATION)
|
||||
endif
|
||||
|
||||
# warn a bit more verbosely for non-release versions
|
||||
ifneq ($(EXTRAVERSION),)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wstrict-prototypes,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wmissing-prototypes,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wmissing-declarations,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wunused,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Winit-self,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wshadow,)
|
||||
CHECKED_CFLAGS+=$(call check_cc,$(CC),-Wcast-align,)
|
||||
endif
|
||||
STRIPCMD:=$(call check_strip,$(STRIP),-s --remove-section=.note --remove-section=.comment,$(STRIP))
|
||||
ifeq ($(strip $(CONFIG_STATIC)),y)
|
||||
PROG_CFLAGS += $(call check_cc,$(CC),-static,)
|
||||
else
|
||||
ifneq ($(strip $(CONFIG_DEBUG)),y)
|
||||
OPTIMIZATION+=$(call check_cc,$(CC),-ffunction-sections -fdata-sections,)
|
||||
CHECKED_LDFLAGS += $(call check_ld,$(LD),--gc-sections,)
|
||||
endif
|
||||
endif
|
||||
CFLAGS_SHARED := $(call check_cc,$(CC),-shared,)
|
||||
LIB_CFLAGS+=$(CFLAGS_SHARED)
|
||||
|
||||
ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y)
|
||||
CFLAGS_PIC:= $(call check_cc,$(CC),-fPIC,)
|
||||
LIB_CFLAGS+=$(CFLAGS_PIC)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONFIG_SELINUX)),y)
|
||||
LIBRARIES += -lselinux -lsepol
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PREFIX)),)
|
||||
PREFIX:=`pwd`/_install
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(CONFIG_GETOPT_LONG)),y)
|
||||
CFLAGS += -D__need_getopt
|
||||
endif
|
||||
|
||||
# Additional complications due to support for pristine source dir.
|
||||
# Include files in the build directory should take precedence over
|
||||
# the copy in top_srcdir, both during the compilation phase and the
|
||||
# shell script that finds the list of object files.
|
||||
# Work in progress by <ldoolitt@recycle.lbl.gov>.
|
||||
|
||||
|
||||
OBJECTS:=$(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o
|
||||
CFLAGS += $(CHECKED_CFLAGS) $(CROSS_CFLAGS)
|
||||
LDFLAGS += $(CHECKED_LDFLAGS)
|
||||
|
||||
ifdef BB_INIT_SCRIPT
|
||||
CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'
|
||||
endif
|
||||
|
||||
# Put user-supplied flags at the end, where they
|
||||
# have a chance of winning.
|
||||
-include $(top_builddir)/.config.mak
|
||||
|
||||
#------------------------------------------------------------
|
||||
# Installation options
|
||||
ifeq ($(strip $(CONFIG_INSTALL_APPLET_HARDLINKS)),y)
|
||||
INSTALL_OPTS=--hardlinks
|
||||
endif
|
||||
ifeq ($(strip $(CONFIG_INSTALL_APPLET_SYMLINKS)),y)
|
||||
INSTALL_OPTS=--symlinks
|
||||
endif
|
||||
ifeq ($(strip $(CONFIG_INSTALL_APPLET_DONT)),y)
|
||||
INSTALL_OPTS=
|
||||
endif
|
||||
|
||||
#------------------------------------------------------------
|
||||
# Make the output nice and tight
|
||||
MAKEFLAGS += --no-print-directory
|
||||
export MAKE_IS_SILENT=n
|
||||
ifneq ($(findstring s,$(MAKEFLAGS)),)
|
||||
export MAKE_IS_SILENT=y
|
||||
SECHO := @-false
|
||||
DISP := sil
|
||||
Q := @
|
||||
else
|
||||
ifneq ($(BUILD_VERBOSE),)
|
||||
SECHO := @-false
|
||||
DISP := ver
|
||||
Q :=
|
||||
else
|
||||
SECHO := @echo
|
||||
DISP := pur
|
||||
Q := @
|
||||
endif
|
||||
endif
|
||||
|
||||
show_objs = $(subst $(top_builddir)/,,$(subst ../,,$@))
|
||||
pur_disp_compile.c = echo " "CC $(show_objs) ;
|
||||
pur_disp_compile.h = echo " "HOSTCC $(show_objs) ;
|
||||
pur_disp_strip = echo " "STRIP $(show_objs) ;
|
||||
pur_disp_link = echo " "LINK $(show_objs) ;
|
||||
pur_disp_link.h = echo " "HOSTLINK $(show_objs) ;
|
||||
pur_disp_ar = echo " "AR $(ARFLAGS) $(show_objs) ;
|
||||
pur_disp_elf2flt = echo " "ELF2FLT $(ELF2FLTFLAGS) $(show_objs) ;
|
||||
sil_disp_compile.c =
|
||||
sil_disp_compile.h =
|
||||
sil_disp_strip =
|
||||
sil_disp_link =
|
||||
sil_disp_link.h =
|
||||
sil_disp_ar =
|
||||
sil_disp_elf2flt =
|
||||
ver_disp_compile.c =
|
||||
ver_disp_compile.h =
|
||||
ver_disp_strip =
|
||||
ver_disp_link =
|
||||
ver_disp_link.h =
|
||||
ver_disp_ar =
|
||||
ver_disp_elf2flt =
|
||||
disp_compile.c = $(Q)$($(DISP)_disp_compile.c)
|
||||
disp_compile.h = $(Q)$($(DISP)_disp_compile.h)
|
||||
disp_strip = $(Q)$($(DISP)_disp_strip)
|
||||
disp_link = $(Q)$($(DISP)_disp_link)
|
||||
disp_link.h = $(Q)$($(DISP)_disp_link.h)
|
||||
disp_ar = $(Q)$($(DISP)_disp_ar)
|
||||
disp_elf2flt = $(Q)$($(DISP)_disp_elf2flt)
|
||||
disp_gen = $(SECHO) " "GEN $@ ; true
|
||||
disp_doc = $(SECHO) " "DOC $(subst docs/,,$@) ; true
|
||||
cmd_compile.c = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
|
||||
cmd_compile.h = $(HOSTCC) $(HOSTCFLAGS) $(INCS) -c -o $@ $<
|
||||
cmd_strip = $(STRIPCMD) $@
|
||||
cmd_link = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) \
|
||||
$(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) \
|
||||
-o $@ $(LD_START_GROUP) \
|
||||
$(APPLETS_DEFINE) $(APPLET_SRC) \
|
||||
$(BUSYBOX_DEFINE) $(BUSYBOX_SRC) $(libraries-y) \
|
||||
$(LDBUSYBOX) $(LIBRARIES) \
|
||||
$(LD_END_GROUP)
|
||||
cmd_link.so = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) \
|
||||
$(LIB_CFLAGS) $(CFLAGS_COMBINE) $(LIB_LDFLAGS) \
|
||||
-o $(@) $(LD_START_GROUP) $(LD_WHOLE_ARCHIVE) \
|
||||
$(LIBRARY_DEFINE) $(^) \
|
||||
$(LD_NO_WHOLE_ARCHIVE) $(LD_END_GROUP)
|
||||
cmd_link.h = $(HOSTCC) $(HOSTCFLAGS) $(INCS) $< -o $@
|
||||
cmd_ar = $(AR) $(ARFLAGS) $@ $^
|
||||
cmd_elf2flt = $(ELF2FLT) $(ELF2FLTFLAGS) $< -o $@
|
||||
compile.c = $(disp_compile.c) $(cmd_compile.c)
|
||||
compile.h = $(disp_compile.h) $(cmd_compile.h)
|
||||
do_strip = $(disp_strip) $(cmd_strip)
|
||||
do_link = $(disp_link) $(cmd_link)
|
||||
do_link.so = $(disp_link) $(cmd_link.so)
|
||||
do_link.h = $(disp_link.h) $(cmd_link.h)
|
||||
do_ar = $(disp_ar) $(cmd_ar)
|
||||
do_elf2flt = $(disp_elf2flt) $(cmd_elf2flt)
|
||||
|
||||
uppercase = $(shell echo $1 | $(SED) -e "y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/")
|
||||
%.a:
|
||||
@if test -z "$($(call uppercase,$*)_DIR)" ; then \
|
||||
echo "Invalid target $@" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
$(Q)$(MAKE) $($(call uppercase,$*)_DIR)$@
|
||||
|
||||
.PHONY: dummy
|
9
applets/Kbuild
Normal file
9
applets/Kbuild
Normal file
@ -0,0 +1,9 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
obj-y:=
|
||||
obj-y += applets.o
|
||||
obj-y += busybox.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/applets
|
||||
APPLETS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir).depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,26 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
APPLETS_AR:=applets.a
|
||||
ifndef $(APPLETS_DIR)
|
||||
APPLETS_DIR:=$(top_builddir)/applets/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/applets
|
||||
|
||||
APPLET_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c)
|
||||
APPLET_OBJ:= $(patsubst $(srcdir)/%.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
|
||||
|
||||
APPLET_SRC-y+=$(APPLET_SRC)
|
||||
APPLET_SRC-a+=$(APPLET_SRC)
|
||||
|
||||
libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
|
||||
|
||||
$(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ)
|
||||
$(do_ar)
|
||||
|
||||
$(APPLET_OBJ): $(top_builddir)/.config
|
||||
$(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -42,8 +42,6 @@ const size_t NUM_APPLETS = (sizeof (applets) / sizeof (struct BB_applet) - 1);
|
||||
#ifdef CONFIG_FEATURE_SUID_CONFIG
|
||||
|
||||
#include <ctype.h>
|
||||
#include "pwd_.h"
|
||||
#include "grp_.h"
|
||||
|
||||
#define CONFIG_FILE "/etc/busybox.conf"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
menu "Archival Utilities"
|
||||
|
||||
config CONFIG_AR
|
||||
config AR
|
||||
bool "ar"
|
||||
default n
|
||||
help
|
||||
@ -28,17 +28,17 @@ config CONFIG_AR
|
||||
Unless you have a specific application which requires ar, you should
|
||||
probably say N here.
|
||||
|
||||
config CONFIG_FEATURE_AR_LONG_FILENAMES
|
||||
config FEATURE_AR_LONG_FILENAMES
|
||||
bool "Enable support for long filenames (not need for debs)"
|
||||
default n
|
||||
depends on CONFIG_AR
|
||||
depends on 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 CONFIG_BUNZIP2
|
||||
config BUNZIP2
|
||||
bool "bunzip2"
|
||||
default n
|
||||
help
|
||||
@ -54,7 +54,7 @@ config CONFIG_BUNZIP2
|
||||
Unless you have a specific application which requires bunzip2, you
|
||||
should probably say N here.
|
||||
|
||||
config CONFIG_CPIO
|
||||
config CPIO
|
||||
bool "cpio"
|
||||
default n
|
||||
help
|
||||
@ -68,7 +68,7 @@ config CONFIG_CPIO
|
||||
Unless you have a specific application which requires cpio, you should
|
||||
probably say N here.
|
||||
|
||||
config CONFIG_DPKG
|
||||
config DPKG
|
||||
bool "dpkg"
|
||||
default n
|
||||
help
|
||||
@ -77,7 +77,7 @@ config CONFIG_DPKG
|
||||
This implementation of dpkg has a number of limitations, you should use the
|
||||
official dpkg if possible.
|
||||
|
||||
config CONFIG_DPKG_DEB
|
||||
config DPKG_DEB
|
||||
bool "dpkg_deb"
|
||||
default n
|
||||
help
|
||||
@ -88,16 +88,16 @@ config CONFIG_DPKG_DEB
|
||||
Unless you have a specific application which requires dpkg-deb, you should
|
||||
probably say N here.
|
||||
|
||||
config CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY
|
||||
config FEATURE_DPKG_DEB_EXTRACT_ONLY
|
||||
bool "extract only (-x)"
|
||||
default n
|
||||
depends on CONFIG_DPKG_DEB
|
||||
depends on DPKG_DEB
|
||||
help
|
||||
This reduces dpkg-deb to the equivalent of "ar -p <deb> data.tar.gz | tar -zx".
|
||||
However it saves space as none of the extra dpkg-deb, ar or tar options are
|
||||
needed, they are linked to internally.
|
||||
|
||||
config CONFIG_GUNZIP
|
||||
config GUNZIP
|
||||
bool "gunzip"
|
||||
default n
|
||||
help
|
||||
@ -105,35 +105,35 @@ config CONFIG_GUNZIP
|
||||
You can use the `-t' option to test the integrity of
|
||||
an archive, without decompressing it.
|
||||
|
||||
config CONFIG_FEATURE_GUNZIP_UNCOMPRESS
|
||||
config FEATURE_GUNZIP_UNCOMPRESS
|
||||
bool "Uncompress support"
|
||||
default n
|
||||
depends on CONFIG_GUNZIP
|
||||
depends on GUNZIP
|
||||
help
|
||||
Enable if you want gunzip to have the ability to decompress
|
||||
archives created by the program compress (not much
|
||||
used anymore).
|
||||
|
||||
config CONFIG_GZIP
|
||||
config GZIP
|
||||
bool "gzip"
|
||||
default n
|
||||
help
|
||||
gzip is used to compress files.
|
||||
It's probably the most widely used UNIX compression program.
|
||||
|
||||
config CONFIG_RPM2CPIO
|
||||
config RPM2CPIO
|
||||
bool "rpm2cpio"
|
||||
default n
|
||||
help
|
||||
Converts an RPM file into a CPIO archive.
|
||||
|
||||
config CONFIG_RPM
|
||||
config RPM
|
||||
bool "rpm"
|
||||
default n
|
||||
help
|
||||
Mini RPM applet - queries and extracts
|
||||
|
||||
config CONFIG_TAR
|
||||
config TAR
|
||||
bool "tar"
|
||||
default n
|
||||
help
|
||||
@ -141,86 +141,86 @@ config CONFIG_TAR
|
||||
create compressed archives. It's probably the most widely used
|
||||
UNIX archive program.
|
||||
|
||||
config CONFIG_FEATURE_TAR_CREATE
|
||||
config FEATURE_TAR_CREATE
|
||||
bool "Enable archive creation"
|
||||
default y
|
||||
depends on CONFIG_TAR
|
||||
depends on TAR
|
||||
help
|
||||
If you enable this option you'll be able to create
|
||||
tar archives using the `-c' option.
|
||||
|
||||
config CONFIG_FEATURE_TAR_BZIP2
|
||||
config FEATURE_TAR_BZIP2
|
||||
bool "Enable -j option to handle .tar.bz2 files"
|
||||
default n
|
||||
depends on CONFIG_TAR
|
||||
depends on TAR
|
||||
help
|
||||
If you enable this option you'll be able to extract
|
||||
archives compressed with bzip2.
|
||||
|
||||
config CONFIG_FEATURE_TAR_LZMA
|
||||
config FEATURE_TAR_LZMA
|
||||
bool "Enable -a option to handle .tar.lzma files"
|
||||
default n
|
||||
depends on CONFIG_TAR
|
||||
depends on TAR
|
||||
help
|
||||
If you enable this option you'll be able to extract
|
||||
archives compressed with lzma.
|
||||
|
||||
config CONFIG_FEATURE_TAR_FROM
|
||||
config FEATURE_TAR_FROM
|
||||
bool "Enable -X (exclude from) and -T (include from) options)"
|
||||
default n
|
||||
depends on CONFIG_TAR
|
||||
depends on 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 CONFIG_FEATURE_TAR_GZIP
|
||||
config FEATURE_TAR_GZIP
|
||||
bool "Enable -z option"
|
||||
default y
|
||||
depends on CONFIG_TAR
|
||||
depends on TAR
|
||||
help
|
||||
If you enable this option tar will be able to call gzip,
|
||||
when creating or extracting tar gziped archives.
|
||||
|
||||
config CONFIG_FEATURE_TAR_COMPRESS
|
||||
config FEATURE_TAR_COMPRESS
|
||||
bool "Enable -Z option"
|
||||
default n
|
||||
depends on CONFIG_TAR
|
||||
depends on TAR
|
||||
help
|
||||
If you enable this option tar will be able to call uncompress,
|
||||
when extracting .tar.Z archives.
|
||||
|
||||
config CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY
|
||||
config FEATURE_TAR_OLDGNU_COMPATIBILITY
|
||||
bool "Enable support for old tar header format"
|
||||
default N
|
||||
depends on CONFIG_TAR
|
||||
depends on TAR
|
||||
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 CONFIG_FEATURE_TAR_GNU_EXTENSIONS
|
||||
config FEATURE_TAR_GNU_EXTENSIONS
|
||||
bool "Enable support for some GNU tar extensions"
|
||||
default y
|
||||
depends on CONFIG_TAR
|
||||
depends on TAR
|
||||
help
|
||||
With this option busybox supports GNU long filenames and
|
||||
linknames.
|
||||
|
||||
config CONFIG_FEATURE_TAR_LONG_OPTIONS
|
||||
config FEATURE_TAR_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_TAR && CONFIG_GETOPT_LONG
|
||||
depends on TAR && GETOPT_LONG
|
||||
help
|
||||
Enable use of long options, increases size by about 400 Bytes
|
||||
|
||||
config CONFIG_UNCOMPRESS
|
||||
config UNCOMPRESS
|
||||
bool "uncompress"
|
||||
default n
|
||||
help
|
||||
uncompress is used to decompress archives created by compress.
|
||||
Not much used anymore, replaced by gzip/gunzip.
|
||||
|
||||
config CONFIG_UNLZMA
|
||||
config UNLZMA
|
||||
bool "unlzma"
|
||||
default n
|
||||
help
|
||||
@ -235,15 +235,15 @@ config CONFIG_UNLZMA
|
||||
Unless you have a specific application which requires unlzma, you
|
||||
should probably say N here.
|
||||
|
||||
config CONFIG_FEATURE_LZMA_FAST
|
||||
config FEATURE_LZMA_FAST
|
||||
bool "Optimze unlzma for speed"
|
||||
default n
|
||||
depends on CONFIG_UNLZMA
|
||||
depends on UNLZMA
|
||||
help
|
||||
This option reduces decompression time by about 33% at the cost of
|
||||
a 2K bigger binary.
|
||||
|
||||
config CONFIG_UNZIP
|
||||
config UNZIP
|
||||
bool "unzip"
|
||||
default n
|
||||
help
|
||||
@ -254,31 +254,31 @@ config CONFIG_UNZIP
|
||||
directory of your choice.
|
||||
|
||||
comment "Common options for cpio and tar"
|
||||
depends on CONFIG_CPIO || CONFIG_TAR
|
||||
depends on CPIO || TAR
|
||||
|
||||
config CONFIG_FEATURE_UNARCHIVE_TAPE
|
||||
config FEATURE_UNARCHIVE_TAPE
|
||||
bool "Enable tape drive support"
|
||||
default n
|
||||
depends on CONFIG_CPIO || CONFIG_TAR
|
||||
depends on CPIO || TAR
|
||||
help
|
||||
I don't think this is needed anymore.
|
||||
|
||||
comment "Common options for dpkg and dpkg_deb"
|
||||
depends on CONFIG_DPKG || CONFIG_DPKG_DEB
|
||||
depends on DPKG || DPKG_DEB
|
||||
|
||||
config CONFIG_FEATURE_DEB_TAR_GZ
|
||||
config FEATURE_DEB_TAR_GZ
|
||||
bool "gzip debian packages (normal)"
|
||||
default y if CONFIG_DPKG || CONFIG_DPKG_DEB
|
||||
depends on CONFIG_DPKG || CONFIG_DPKG_DEB
|
||||
default y if DPKG || DPKG_DEB
|
||||
depends on DPKG || DPKG_DEB
|
||||
help
|
||||
This is the default compression method inside the debian ar file.
|
||||
|
||||
If you want compatibility with standard .deb's you should say yes here.
|
||||
|
||||
config CONFIG_FEATURE_DEB_TAR_BZ2
|
||||
config FEATURE_DEB_TAR_BZ2
|
||||
bool "bzip2 debian packages"
|
||||
default n
|
||||
depends on CONFIG_DPKG || CONFIG_DPKG_DEB
|
||||
depends on DPKG || DPKG_DEB
|
||||
help
|
||||
This allows dpkg and dpkg-deb to extract deb's that are compressed internally
|
||||
with bzip2 instead of gzip.
|
||||
@ -286,10 +286,10 @@ config CONFIG_FEATURE_DEB_TAR_BZ2
|
||||
You only want this if you are creating your own custom debian packages that
|
||||
use an internal control.tar.bz2 or data.tar.bz2.
|
||||
|
||||
config CONFIG_FEATURE_DEB_TAR_LZMA
|
||||
config FEATURE_DEB_TAR_LZMA
|
||||
bool "lzma debian packages"
|
||||
default n
|
||||
depends on CONFIG_DPKG || CONFIG_DPKG_DEB
|
||||
depends on DPKG || DPKG_DEB
|
||||
help
|
||||
This allows dpkg and dpkg-deb to extract deb's that are compressed
|
||||
internally with lzma instead of gzip.
|
||||
|
22
archival/Kbuild
Normal file
22
archival/Kbuild
Normal file
@ -0,0 +1,22 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
libs-y += libunarchive/
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_AR) += ar.o
|
||||
lib-$(CONFIG_BUNZIP2) += bunzip2.o
|
||||
lib-$(CONFIG_UNLZMA) += unlzma.o
|
||||
lib-$(CONFIG_CPIO) += cpio.o
|
||||
lib-$(CONFIG_DPKG) += dpkg.o
|
||||
lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
|
||||
lib-$(CONFIG_GUNZIP) += gunzip.o
|
||||
lib-$(CONFIG_GZIP) += gzip.o
|
||||
lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
|
||||
lib-$(CONFIG_RPM) += rpm.o
|
||||
lib-$(CONFIG_TAR) += tar.o
|
||||
lib-$(CONFIG_UNCOMPRESS) += uncompress.o
|
||||
lib-$(CONFIG_UNZIP) += unzip.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
ARCHIVAL_DIR:=./
|
||||
srcdir=$(top_srcdir)/archival
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,41 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ARCHIVAL_AR:=archival.a
|
||||
ifndef $(ARCHIVAL_DIR)
|
||||
ARCHIVAL_DIR:=$(top_builddir)/archival/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/archival
|
||||
|
||||
ARCHIVAL-y:=
|
||||
ARCHIVAL-$(CONFIG_AR) += ar.o
|
||||
ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o
|
||||
ARCHIVAL-$(CONFIG_UNLZMA) += unlzma.o
|
||||
ARCHIVAL-$(CONFIG_CPIO) += cpio.o
|
||||
ARCHIVAL-$(CONFIG_DPKG) += dpkg.o
|
||||
ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o
|
||||
ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o
|
||||
ARCHIVAL-$(CONFIG_GZIP) += gzip.o
|
||||
ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o
|
||||
ARCHIVAL-$(CONFIG_RPM) += rpm.o
|
||||
ARCHIVAL-$(CONFIG_TAR) += tar.o
|
||||
ARCHIVAL-$(CONFIG_UNCOMPRESS) += uncompress.o
|
||||
ARCHIVAL-$(CONFIG_UNZIP) += unzip.o
|
||||
|
||||
ifneq ($(strip $(ARCHIVAL-y)),)
|
||||
libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR)
|
||||
endif
|
||||
|
||||
ARCHIVAL_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(ARCHIVAL-y))
|
||||
ARCHIVAL_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(ARCHIVAL_SRC-y)
|
||||
APPLET_SRC-a+=$(ARCHIVAL_SRC-a)
|
||||
|
||||
$(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
|
||||
$(do_ar)
|
||||
|
||||
$(ARCHIVAL_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
59
archival/libunarchive/Kbuild
Normal file
59
archival/libunarchive/Kbuild
Normal file
@ -0,0 +1,59 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:= \
|
||||
\
|
||||
data_skip.o \
|
||||
data_extract_all.o \
|
||||
data_extract_to_stdout.o \
|
||||
data_extract_to_buffer.o \
|
||||
\
|
||||
filter_accept_all.o \
|
||||
filter_accept_list.o \
|
||||
filter_accept_reject_list.o \
|
||||
\
|
||||
header_skip.o \
|
||||
header_list.o \
|
||||
header_verbose_list.o \
|
||||
\
|
||||
archive_xread_all_eof.o \
|
||||
\
|
||||
seek_by_char.o \
|
||||
seek_by_jump.o \
|
||||
\
|
||||
data_align.o \
|
||||
find_list_entry.o \
|
||||
open_transformer.o \
|
||||
init_handle.o
|
||||
|
||||
GUNZIP_FILES:= check_header_gzip.o decompress_unzip.o
|
||||
DPKG_FILES:= \
|
||||
get_header_ar.o \
|
||||
unpack_ar_archive.o \
|
||||
get_header_tar.o \
|
||||
filter_accept_list_reassign.o
|
||||
|
||||
lib-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o
|
||||
lib-$(CONFIG_BUNZIP2) += decompress_bunzip2.o
|
||||
lib-$(CONFIG_UNLZMA) += decompress_unlzma.o
|
||||
lib-$(CONFIG_CPIO) += get_header_cpio.o
|
||||
lib-$(CONFIG_DPKG) += $(DPKG_FILES)
|
||||
lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
|
||||
lib-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o
|
||||
lib-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
|
||||
lib-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
|
||||
lib-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
|
||||
lib-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
|
||||
lib-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
|
||||
lib-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
|
||||
lib-$(CONFIG_TAR) += get_header_tar.o
|
||||
lib-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o
|
||||
lib-$(CONFIG_FEATURE_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
|
||||
lib-$(CONFIG_FEATURE_TAR_GZIP) += $(GUNZIP_FILES) get_header_tar_gz.o
|
||||
lib-$(CONFIG_FEATURE_TAR_COMPRESS) += decompress_uncompress.o
|
||||
lib-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o
|
||||
lib-$(CONFIG_UNZIP) += $(GUNZIP_FILES)
|
||||
lib-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o
|
@ -1,36 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=../..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=../..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/archival/libunarchive
|
||||
LIBUNARCHIVE_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,83 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
||||
|
||||
LIBUNARCHIVE_AR:=libunarchive.a
|
||||
ifndef $(LIBUNARCHIVE_DIR)
|
||||
LIBUNARCHIVE_DIR:=$(top_builddir)/archival/libunarchive
|
||||
endif
|
||||
srcdir=$(top_srcdir)/archival/libunarchive
|
||||
|
||||
LIBUNARCHIVE-obj:=$(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR)
|
||||
|
||||
libraries-y+=$(LIBUNARCHIVE-obj)
|
||||
|
||||
LIBUNARCHIVE-y:= \
|
||||
\
|
||||
data_skip.o \
|
||||
data_extract_all.o \
|
||||
data_extract_to_stdout.o \
|
||||
data_extract_to_buffer.o \
|
||||
\
|
||||
filter_accept_all.o \
|
||||
filter_accept_list.o \
|
||||
filter_accept_reject_list.o \
|
||||
\
|
||||
header_skip.o \
|
||||
header_list.o \
|
||||
header_verbose_list.o \
|
||||
\
|
||||
archive_xread_all_eof.o \
|
||||
\
|
||||
seek_by_char.o \
|
||||
seek_by_jump.o \
|
||||
\
|
||||
data_align.o \
|
||||
find_list_entry.o \
|
||||
open_transformer.o \
|
||||
init_handle.o
|
||||
|
||||
GUNZIP_FILES:= check_header_gzip.o decompress_unzip.o
|
||||
DPKG_FILES:= \
|
||||
get_header_ar.o \
|
||||
unpack_ar_archive.o \
|
||||
get_header_tar.o \
|
||||
filter_accept_list_reassign.o
|
||||
|
||||
LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o
|
||||
LIBUNARCHIVE-$(CONFIG_BUNZIP2) += decompress_bunzip2.o
|
||||
LIBUNARCHIVE-$(CONFIG_UNLZMA) += decompress_unlzma.o
|
||||
LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o
|
||||
LIBUNARCHIVE-$(CONFIG_DPKG) += $(DPKG_FILES)
|
||||
LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
|
||||
LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += decompress_uncompress.o
|
||||
LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
|
||||
LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
|
||||
LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_LZMA) += decompress_unlzma.o get_header_tar_lzma.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_GZIP) += $(GUNZIP_FILES) get_header_tar_gz.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_COMPRESS) += decompress_uncompress.o
|
||||
LIBUNARCHIVE-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o
|
||||
LIBUNARCHIVE-$(CONFIG_UNZIP) += $(GUNZIP_FILES)
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_COMPRESS_USAGE) += decompress_bunzip2.o
|
||||
|
||||
|
||||
LIBUNARCHIVE-y:=$(sort $(LIBUNARCHIVE-y))
|
||||
|
||||
LIBUNARCHIVE_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBUNARCHIVE-y)))
|
||||
LIBUNARCHIVE_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
LIBRARY_SRC-y+=$(LIBUNARCHIVE_SRC-y)
|
||||
LIBRARY_SRC-a+=$(LIBUNARCHIVE_SRC-a)
|
||||
|
||||
$(LIBUNARCHIVE_DIR)/$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)/%,$(LIBUNARCHIVE-y))
|
||||
$(do_ar)
|
||||
|
||||
$(LIBUNARCHIVE_DIR)/%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -5,81 +5,81 @@
|
||||
|
||||
menu "Console Utilities"
|
||||
|
||||
config CONFIG_CHVT
|
||||
config CHVT
|
||||
bool "chvt"
|
||||
default n
|
||||
help
|
||||
This program is used to change to another terminal.
|
||||
Example: chvt 4 (change to terminal /dev/tty4)
|
||||
|
||||
config CONFIG_CLEAR
|
||||
config CLEAR
|
||||
bool "clear"
|
||||
default n
|
||||
help
|
||||
This program clears the terminal screen.
|
||||
|
||||
config CONFIG_DEALLOCVT
|
||||
config DEALLOCVT
|
||||
bool "deallocvt"
|
||||
default n
|
||||
help
|
||||
This program deallocates unused virtual consoles.
|
||||
|
||||
config CONFIG_DUMPKMAP
|
||||
config DUMPKMAP
|
||||
bool "dumpkmap"
|
||||
default n
|
||||
help
|
||||
This program dumps the kernel's keyboard translation table to
|
||||
stdout, in binary format. You can then use loadkmap to load it.
|
||||
|
||||
config CONFIG_LOADFONT
|
||||
config LOADFONT
|
||||
bool "loadfont"
|
||||
default n
|
||||
help
|
||||
This program loads a console font from standard input.
|
||||
|
||||
config CONFIG_LOADKMAP
|
||||
config LOADKMAP
|
||||
bool "loadkmap"
|
||||
default n
|
||||
help
|
||||
This program loads a keyboard translation table from
|
||||
standard input.
|
||||
|
||||
config CONFIG_OPENVT
|
||||
config OPENVT
|
||||
bool "openvt"
|
||||
default n
|
||||
help
|
||||
This program is used to start a command on an unused
|
||||
virtual terminal.
|
||||
|
||||
config CONFIG_RESET
|
||||
config RESET
|
||||
bool "reset"
|
||||
default n
|
||||
help
|
||||
This program is used to reset the terminal screen, if it
|
||||
gets messed up.
|
||||
|
||||
config CONFIG_SETCONSOLE
|
||||
config SETCONSOLE
|
||||
bool "setconsole"
|
||||
default n
|
||||
help
|
||||
This program redirects the system console to another device,
|
||||
like the current tty while logged in via telnet.
|
||||
|
||||
config CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS
|
||||
config FEATURE_SETCONSOLE_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_SET_CONSOLE && CONFIG_GETOPT_LONG
|
||||
depends on SET_CONSOLE && GETOPT_LONG
|
||||
help
|
||||
Support long options for the setconsole applet.
|
||||
|
||||
config CONFIG_SETKEYCODES
|
||||
config SETKEYCODES
|
||||
bool "setkeycodes"
|
||||
default n
|
||||
help
|
||||
This program loads entries into the kernel's scancode-to-keycode
|
||||
map, allowing unusual keyboards to generate usable keycodes.
|
||||
|
||||
config CONFIG_SETLOGCONS
|
||||
config SETLOGCONS
|
||||
bool "setlogcons"
|
||||
default n
|
||||
help
|
||||
|
18
console-tools/Kbuild
Normal file
18
console-tools/Kbuild
Normal file
@ -0,0 +1,18 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_CHVT) += chvt.o
|
||||
lib-$(CONFIG_CLEAR) += clear.o
|
||||
lib-$(CONFIG_DEALLOCVT) += deallocvt.o
|
||||
lib-$(CONFIG_DUMPKMAP) += dumpkmap.o
|
||||
lib-$(CONFIG_SETCONSOLE) += setconsole.o
|
||||
lib-$(CONFIG_LOADFONT) += loadfont.o
|
||||
lib-$(CONFIG_LOADKMAP) += loadkmap.o
|
||||
lib-$(CONFIG_OPENVT) += openvt.o
|
||||
lib-$(CONFIG_RESET) += reset.o
|
||||
lib-$(CONFIG_SETKEYCODES) += setkeycodes.o
|
||||
lib-$(CONFIG_SETLOGCONS) += setlogcons.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/console/tools
|
||||
CONSOLETOOLS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,38 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
CONSOLETOOLS_AR:=console-tools.a
|
||||
ifndef $(CONSOLETOOLS_DIR)
|
||||
CONSOLETOOLS_DIR:=$(top_builddir)/console-tools/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/console-tools
|
||||
|
||||
CONSOLETOOLS-y:=
|
||||
CONSOLETOOLS-$(CONFIG_CHVT) += chvt.o
|
||||
CONSOLETOOLS-$(CONFIG_CLEAR) += clear.o
|
||||
CONSOLETOOLS-$(CONFIG_DEALLOCVT) += deallocvt.o
|
||||
CONSOLETOOLS-$(CONFIG_DUMPKMAP) += dumpkmap.o
|
||||
CONSOLETOOLS-$(CONFIG_SETCONSOLE) += setconsole.o
|
||||
CONSOLETOOLS-$(CONFIG_LOADFONT) += loadfont.o
|
||||
CONSOLETOOLS-$(CONFIG_LOADKMAP) += loadkmap.o
|
||||
CONSOLETOOLS-$(CONFIG_OPENVT) += openvt.o
|
||||
CONSOLETOOLS-$(CONFIG_RESET) += reset.o
|
||||
CONSOLETOOLS-$(CONFIG_SETKEYCODES) += setkeycodes.o
|
||||
CONSOLETOOLS-$(CONFIG_SETLOGCONS) += setlogcons.o
|
||||
|
||||
ifneq ($(strip $(CONSOLETOOLS-y)),)
|
||||
libraries-y+=$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR)
|
||||
endif
|
||||
CONSOLETOOLS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(CONSOLETOOLS-y))
|
||||
CONSOLETOOLS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(CONSOLETOOLS_SRC-y)
|
||||
APPLET_SRC-a+=$(CONSOLETOOLS_SRC-a)
|
||||
|
||||
$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR): $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(CONSOLETOOLS_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -5,7 +5,7 @@
|
||||
|
||||
menu "Coreutils"
|
||||
|
||||
config CONFIG_BASENAME
|
||||
config BASENAME
|
||||
bool "basename"
|
||||
default n
|
||||
help
|
||||
@ -13,101 +13,101 @@ config CONFIG_BASENAME
|
||||
leaving just the filename itself. Enable this option if you wish
|
||||
to enable the 'basename' utility.
|
||||
|
||||
config CONFIG_CAL
|
||||
config CAL
|
||||
bool "cal"
|
||||
default n
|
||||
help
|
||||
cal is used to display a monthly calender.
|
||||
|
||||
config CONFIG_CAT
|
||||
config CAT
|
||||
bool "cat"
|
||||
default n
|
||||
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 CONFIG_CATV
|
||||
config CATV
|
||||
bool "catv"
|
||||
default n
|
||||
help
|
||||
Display nonprinting characters as escape sequences (like some
|
||||
implementations' cat -v option).
|
||||
|
||||
config CONFIG_CHGRP
|
||||
config CHGRP
|
||||
bool "chgrp"
|
||||
default n
|
||||
help
|
||||
chgrp is used to change the group ownership of files.
|
||||
|
||||
config CONFIG_CHMOD
|
||||
config CHMOD
|
||||
bool "chmod"
|
||||
default n
|
||||
help
|
||||
chmod is used to change the access permission of files.
|
||||
|
||||
config CONFIG_CHOWN
|
||||
config CHOWN
|
||||
bool "chown"
|
||||
default n
|
||||
help
|
||||
chown is used to change the user and/or group ownership
|
||||
of files.
|
||||
|
||||
config CONFIG_CHROOT
|
||||
config CHROOT
|
||||
bool "chroot"
|
||||
default n
|
||||
help
|
||||
chroot is used to change the root directory and run a command.
|
||||
The default command is `/bin/sh'.
|
||||
|
||||
config CONFIG_CKSUM
|
||||
config CKSUM
|
||||
bool "cksum"
|
||||
default n
|
||||
help
|
||||
cksum is used to calculate the CRC32 checksum of a file.
|
||||
|
||||
config CONFIG_CMP
|
||||
config CMP
|
||||
bool "cmp"
|
||||
default n
|
||||
help
|
||||
cmp is used to compare two files and returns the result
|
||||
to standard output.
|
||||
|
||||
config CONFIG_COMM
|
||||
config COMM
|
||||
bool "comm"
|
||||
default n
|
||||
help
|
||||
comm is used to compare two files line by line and return
|
||||
a three-column output.
|
||||
|
||||
config CONFIG_CP
|
||||
config CP
|
||||
bool "cp"
|
||||
default n
|
||||
help
|
||||
cp is used to copy files and directories.
|
||||
|
||||
config CONFIG_CUT
|
||||
config CUT
|
||||
bool "cut"
|
||||
default n
|
||||
help
|
||||
cut is used to print selected parts of lines from
|
||||
each file to stdout.
|
||||
|
||||
config CONFIG_DATE
|
||||
config DATE
|
||||
bool "date"
|
||||
default n
|
||||
help
|
||||
date is used to set the system date or display the
|
||||
current time in the given format.
|
||||
|
||||
config CONFIG_FEATURE_DATE_ISOFMT
|
||||
config FEATURE_DATE_ISOFMT
|
||||
bool "Enable ISO date format output (-I)"
|
||||
default y
|
||||
depends on CONFIG_DATE
|
||||
depends on DATE
|
||||
help
|
||||
Enable option (-I) to output an ISO-8601 compliant
|
||||
date/time string.
|
||||
|
||||
config CONFIG_DD
|
||||
config DD
|
||||
bool "dd"
|
||||
default n
|
||||
help
|
||||
@ -115,10 +115,10 @@ config CONFIG_DD
|
||||
by default) using specific input and output blocksizes,
|
||||
while optionally performing conversions on it.
|
||||
|
||||
config CONFIG_FEATURE_DD_SIGNAL_HANDLING
|
||||
config FEATURE_DD_SIGNAL_HANDLING
|
||||
bool "Enable DD signal handling for status reporting"
|
||||
default y
|
||||
depends on CONFIG_DD
|
||||
depends on DD
|
||||
help
|
||||
sending a SIGUSR1 signal to a running `dd' process makes it
|
||||
print to standard error the number of records read and written
|
||||
@ -127,22 +127,22 @@ config CONFIG_FEATURE_DD_SIGNAL_HANDLING
|
||||
$ dd if=/dev/zero of=/dev/null& pid=$! $ kill -USR1 $pid; sleep 1; kill $pid
|
||||
10899206+0 records in 10899206+0 records out
|
||||
|
||||
config CONFIG_FEATURE_DD_IBS_OBS
|
||||
config FEATURE_DD_IBS_OBS
|
||||
bool "Enable ibs, obs and conv options"
|
||||
default n
|
||||
depends on CONFIG_DD
|
||||
depends on DD
|
||||
help
|
||||
Enables support for writing a certain number of bytes in and out,
|
||||
at a time, and performing conversions on the data stream.
|
||||
|
||||
config CONFIG_DF
|
||||
config DF
|
||||
bool "df"
|
||||
default n
|
||||
help
|
||||
df reports the amount of disk space used and available
|
||||
on filesystems.
|
||||
|
||||
config CONFIG_DIFF
|
||||
config DIFF
|
||||
bool "diff"
|
||||
default n
|
||||
help
|
||||
@ -150,81 +150,81 @@ config CONFIG_DIFF
|
||||
differences between them in a form that can be given to
|
||||
the patch command.
|
||||
|
||||
config CONFIG_FEATURE_DIFF_BINARY
|
||||
config FEATURE_DIFF_BINARY
|
||||
bool "Enable checks for binary files"
|
||||
default y
|
||||
depends on CONFIG_DIFF
|
||||
depends on DIFF
|
||||
help
|
||||
This option enables support for checking for binary files
|
||||
before a comparison is carried out.
|
||||
|
||||
config CONFIG_FEATURE_DIFF_DIR
|
||||
config FEATURE_DIFF_DIR
|
||||
bool "Enable directory support"
|
||||
default y
|
||||
depends on CONFIG_DIFF
|
||||
depends on DIFF
|
||||
help
|
||||
This option enables support for directory and subdirectory
|
||||
comparison.
|
||||
|
||||
config CONFIG_FEATURE_DIFF_MINIMAL
|
||||
config FEATURE_DIFF_MINIMAL
|
||||
bool "Enable -d option to find smaller sets of changes"
|
||||
default n
|
||||
depends on CONFIG_DIFF
|
||||
depends on DIFF
|
||||
help
|
||||
Enabling this option allows the use of -d to make diff
|
||||
try hard to find the smallest possible set of changes.
|
||||
|
||||
config CONFIG_DIRNAME
|
||||
config DIRNAME
|
||||
bool "dirname"
|
||||
default n
|
||||
help
|
||||
dirname is used to strip a non-directory suffix from
|
||||
a file name.
|
||||
|
||||
config CONFIG_DOS2UNIX
|
||||
config DOS2UNIX
|
||||
bool "dos2unix/unix2dos"
|
||||
default n
|
||||
help
|
||||
dos2unix is used to convert a text file from DOS format to
|
||||
UNIX format, and vice versa.
|
||||
|
||||
config CONFIG_UNIX2DOS
|
||||
config UNIX2DOS
|
||||
bool
|
||||
default y
|
||||
depends on CONFIG_DOS2UNIX
|
||||
depends on DOS2UNIX
|
||||
help
|
||||
unix2dos is used to convert a text file from UNIX format to
|
||||
DOS format, and vice versa.
|
||||
|
||||
config CONFIG_DU
|
||||
config DU
|
||||
bool "du (default blocksize of 512 bytes)"
|
||||
default n
|
||||
help
|
||||
du is used to report the amount of disk space used
|
||||
for specified files.
|
||||
|
||||
config CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
|
||||
config FEATURE_DU_DEFAULT_BLOCKSIZE_1K
|
||||
bool "Use a default blocksize of 1024 bytes (1K)"
|
||||
default y
|
||||
depends on CONFIG_DU
|
||||
depends on DU
|
||||
help
|
||||
Use a blocksize of (1K) instead of the default 512b.
|
||||
|
||||
config CONFIG_ECHO
|
||||
config ECHO
|
||||
bool "echo (basic SuSv3 version taking no options)"
|
||||
default n
|
||||
help
|
||||
echo is used to print a specified string to stdout.
|
||||
|
||||
# this entry also appears in shell/Config.in, next to the echo builtin
|
||||
config CONFIG_FEATURE_FANCY_ECHO
|
||||
config FEATURE_FANCY_ECHO
|
||||
bool "Enable echo options (-n and -e)"
|
||||
default y
|
||||
depends on CONFIG_ECHO
|
||||
depends on ECHO
|
||||
help
|
||||
This adds options (-n and -e) to echo.
|
||||
|
||||
config CONFIG_ENV
|
||||
config ENV
|
||||
bool "env"
|
||||
default n
|
||||
help
|
||||
@ -232,158 +232,158 @@ config CONFIG_ENV
|
||||
a command; without options it displays the current
|
||||
environment.
|
||||
|
||||
config CONFIG_FEATURE_ENV_LONG_OPTIONS
|
||||
config FEATURE_ENV_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_ENV && CONFIG_GETOPT_LONG
|
||||
depends on ENV && GETOPT_LONG
|
||||
help
|
||||
Support long options for the env applet.
|
||||
|
||||
config CONFIG_EXPR
|
||||
config EXPR
|
||||
bool "expr"
|
||||
default n
|
||||
help
|
||||
expr is used to calculate numbers and print the result
|
||||
to standard output.
|
||||
|
||||
config CONFIG_EXPR_MATH_SUPPORT_64
|
||||
config EXPR_MATH_SUPPORT_64
|
||||
bool "Extend Posix numbers support to 64 bit"
|
||||
default n
|
||||
depends on CONFIG_EXPR
|
||||
depends on 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 CONFIG_FALSE
|
||||
config FALSE
|
||||
bool "false"
|
||||
default n
|
||||
help
|
||||
false returns an exit code of FALSE (1).
|
||||
|
||||
config CONFIG_FOLD
|
||||
config FOLD
|
||||
bool "fold"
|
||||
default n
|
||||
help
|
||||
Wrap text to fit a specific width.
|
||||
|
||||
config CONFIG_HEAD
|
||||
config HEAD
|
||||
bool "head"
|
||||
default n
|
||||
help
|
||||
head is used to print the first specified number of lines
|
||||
from files.
|
||||
|
||||
config CONFIG_FEATURE_FANCY_HEAD
|
||||
config FEATURE_FANCY_HEAD
|
||||
bool "Enable head options (-c, -q, and -v)"
|
||||
default n
|
||||
depends on CONFIG_HEAD
|
||||
depends on HEAD
|
||||
help
|
||||
This enables the head options (-c, -q, and -v).
|
||||
|
||||
config CONFIG_HOSTID
|
||||
config HOSTID
|
||||
bool "hostid"
|
||||
default n
|
||||
help
|
||||
hostid prints the numeric identifier (in hexadecimal) for
|
||||
the current host.
|
||||
|
||||
config CONFIG_ID
|
||||
config ID
|
||||
bool "id"
|
||||
default n
|
||||
help
|
||||
id displays the current user and group ID names.
|
||||
|
||||
config CONFIG_INSTALL
|
||||
config INSTALL
|
||||
bool "install"
|
||||
default n
|
||||
help
|
||||
Copy files and set attributes.
|
||||
|
||||
config CONFIG_FEATURE_INSTALL_LONG_OPTIONS
|
||||
config FEATURE_INSTALL_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_INSTALL && CONFIG_GETOPT_LONG
|
||||
depends on INSTALL && GETOPT_LONG
|
||||
help
|
||||
Support long options for the install applet.
|
||||
|
||||
config CONFIG_LENGTH
|
||||
config LENGTH
|
||||
bool "length"
|
||||
default n
|
||||
help
|
||||
length is used to print out the length of a specified string.
|
||||
|
||||
config CONFIG_LN
|
||||
config LN
|
||||
bool "ln"
|
||||
default n
|
||||
help
|
||||
ln is used to create hard or soft links between files.
|
||||
|
||||
config CONFIG_LOGNAME
|
||||
config LOGNAME
|
||||
bool "logname"
|
||||
default n
|
||||
help
|
||||
logname is used to print the current user's login name.
|
||||
|
||||
config CONFIG_LS
|
||||
config LS
|
||||
bool "ls"
|
||||
default n
|
||||
help
|
||||
ls is used to list the contents of directories.
|
||||
|
||||
config CONFIG_FEATURE_LS_FILETYPES
|
||||
config FEATURE_LS_FILETYPES
|
||||
bool "Enable filetyping options (-p and -F)"
|
||||
default y
|
||||
depends on CONFIG_LS
|
||||
depends on LS
|
||||
help
|
||||
Enable the ls options (-p and -F).
|
||||
|
||||
config CONFIG_FEATURE_LS_FOLLOWLINKS
|
||||
config FEATURE_LS_FOLLOWLINKS
|
||||
bool "Enable symlinks dereferencing (-L)"
|
||||
default y
|
||||
depends on CONFIG_LS
|
||||
depends on LS
|
||||
help
|
||||
Enable the ls option (-L).
|
||||
|
||||
config CONFIG_FEATURE_LS_RECURSIVE
|
||||
config FEATURE_LS_RECURSIVE
|
||||
bool "Enable recursion (-R)"
|
||||
default y
|
||||
depends on CONFIG_LS
|
||||
depends on LS
|
||||
help
|
||||
Enable the ls option (-R).
|
||||
|
||||
config CONFIG_FEATURE_LS_SORTFILES
|
||||
config FEATURE_LS_SORTFILES
|
||||
bool "Sort the file names"
|
||||
default y
|
||||
depends on CONFIG_LS
|
||||
depends on LS
|
||||
help
|
||||
Allow ls to sort file names alphabetically.
|
||||
|
||||
config CONFIG_FEATURE_LS_TIMESTAMPS
|
||||
config FEATURE_LS_TIMESTAMPS
|
||||
bool "Show file timestamps"
|
||||
default y
|
||||
depends on CONFIG_LS
|
||||
depends on LS
|
||||
help
|
||||
Allow ls to display timestamps for files.
|
||||
|
||||
config CONFIG_FEATURE_LS_USERNAME
|
||||
config FEATURE_LS_USERNAME
|
||||
bool "Show username/groupnames"
|
||||
default y
|
||||
depends on CONFIG_LS
|
||||
depends on LS
|
||||
help
|
||||
Allow ls to display username/groupname for files.
|
||||
|
||||
config CONFIG_FEATURE_LS_COLOR
|
||||
config FEATURE_LS_COLOR
|
||||
bool "Allow use of color to identify file types"
|
||||
default y
|
||||
depends on CONFIG_LS && CONFIG_GETOPT_LONG
|
||||
depends on LS && GETOPT_LONG
|
||||
help
|
||||
This enables the --color option to ls.
|
||||
|
||||
config CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
|
||||
config FEATURE_LS_COLOR_IS_DEFAULT
|
||||
bool "Produce colored ls output by default"
|
||||
default n
|
||||
depends on CONFIG_FEATURE_LS_COLOR
|
||||
depends on FEATURE_LS_COLOR
|
||||
help
|
||||
Saying yes here will turn coloring on by default,
|
||||
even if no "--color" option is given to the ls command.
|
||||
@ -391,143 +391,143 @@ config CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
|
||||
configurable, and the output may not be legible on
|
||||
many output screens.
|
||||
|
||||
config CONFIG_MD5SUM
|
||||
config MD5SUM
|
||||
bool "md5sum"
|
||||
default n
|
||||
help
|
||||
md5sum is used to print or check MD5 checksums.
|
||||
|
||||
config CONFIG_MKDIR
|
||||
config MKDIR
|
||||
bool "mkdir"
|
||||
default n
|
||||
help
|
||||
mkdir is used to create directories with the specified names.
|
||||
|
||||
config CONFIG_FEATURE_MKDIR_LONG_OPTIONS
|
||||
config FEATURE_MKDIR_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_MKDIR && CONFIG_GETOPT_LONG
|
||||
depends on MKDIR && GETOPT_LONG
|
||||
help
|
||||
Support long options for the mkdir applet.
|
||||
|
||||
config CONFIG_MKFIFO
|
||||
config MKFIFO
|
||||
bool "mkfifo"
|
||||
default n
|
||||
help
|
||||
mkfifo is used to create FIFOs (named pipes).
|
||||
The `mknod' program can also create FIFOs.
|
||||
|
||||
config CONFIG_MKNOD
|
||||
config MKNOD
|
||||
bool "mknod"
|
||||
default n
|
||||
help
|
||||
mknod is used to create FIFOs or block/character special
|
||||
files with the specified names.
|
||||
|
||||
config CONFIG_MV
|
||||
config MV
|
||||
bool "mv"
|
||||
default n
|
||||
help
|
||||
mv is used to move or rename files or directories.
|
||||
|
||||
config CONFIG_FEATURE_MV_LONG_OPTIONS
|
||||
config FEATURE_MV_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_MV && CONFIG_GETOPT_LONG
|
||||
depends on MV && GETOPT_LONG
|
||||
help
|
||||
Support long options for the mv applet.
|
||||
|
||||
config CONFIG_NICE
|
||||
config NICE
|
||||
bool "nice"
|
||||
default n
|
||||
help
|
||||
nice runs a program with modified scheduling priority.
|
||||
|
||||
config CONFIG_NOHUP
|
||||
config NOHUP
|
||||
bool "nohup"
|
||||
default n
|
||||
help
|
||||
run a command immune to hangups, with output to a non-tty.
|
||||
|
||||
config CONFIG_OD
|
||||
config OD
|
||||
bool "od"
|
||||
default n
|
||||
help
|
||||
od is used to dump binary files in octal and other formats.
|
||||
|
||||
config CONFIG_PRINTENV
|
||||
config PRINTENV
|
||||
bool "printenv"
|
||||
default n
|
||||
help
|
||||
printenv is used to print all or part of environment.
|
||||
|
||||
config CONFIG_PRINTF
|
||||
config PRINTF
|
||||
bool "printf"
|
||||
default n
|
||||
help
|
||||
printf is used to format and print specified strings.
|
||||
It's similar to `echo' except it has more options.
|
||||
|
||||
config CONFIG_PWD
|
||||
config PWD
|
||||
bool "pwd"
|
||||
default n
|
||||
help
|
||||
pwd is used to print the current directory.
|
||||
|
||||
config CONFIG_REALPATH
|
||||
config REALPATH
|
||||
bool "realpath"
|
||||
default n
|
||||
help
|
||||
Return the canonicalized absolute pathname.
|
||||
This isn't provided by GNU shellutils, but where else does it belong.
|
||||
|
||||
config CONFIG_RM
|
||||
config RM
|
||||
bool "rm"
|
||||
default n
|
||||
help
|
||||
rm is used to remove files or directories.
|
||||
|
||||
config CONFIG_RMDIR
|
||||
config RMDIR
|
||||
bool "rmdir"
|
||||
default n
|
||||
help
|
||||
rmdir is used to remove empty directories.
|
||||
|
||||
config CONFIG_SEQ
|
||||
config SEQ
|
||||
bool "seq"
|
||||
default n
|
||||
help
|
||||
print a sequence of numbers
|
||||
|
||||
config CONFIG_SHA1SUM
|
||||
config SHA1SUM
|
||||
bool "sha1sum"
|
||||
default n
|
||||
help
|
||||
Compute and check SHA1 message digest
|
||||
|
||||
config CONFIG_SLEEP
|
||||
config SLEEP
|
||||
bool "sleep (single integer arg with no suffix)"
|
||||
default n
|
||||
help
|
||||
sleep is used to pause for a specified number of seconds,
|
||||
|
||||
config CONFIG_FEATURE_FANCY_SLEEP
|
||||
config FEATURE_FANCY_SLEEP
|
||||
bool "Enable multiple integer args and optional time suffixes"
|
||||
default n
|
||||
depends on CONFIG_SLEEP
|
||||
depends on SLEEP
|
||||
help
|
||||
Allow sleep to pause for specified minutes, hours, and days.
|
||||
|
||||
config CONFIG_SORT
|
||||
config SORT
|
||||
bool "sort"
|
||||
default n
|
||||
help
|
||||
sort is used to sort lines of text in specified files.
|
||||
|
||||
config CONFIG_FEATURE_SORT_BIG
|
||||
config FEATURE_SORT_BIG
|
||||
bool "full SuSv3 compliant sort (Support -ktcsbdfiozgM)"
|
||||
default y
|
||||
depends on CONFIG_SORT
|
||||
depends on SORT
|
||||
help
|
||||
Without this, sort only supports -r, -u, and an integer version
|
||||
of -n. Selecting this adds sort keys, floating point support, and
|
||||
@ -536,69 +536,69 @@ config CONFIG_FEATURE_SORT_BIG
|
||||
The SuSv3 sort standard is available at:
|
||||
http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
|
||||
|
||||
config CONFIG_STAT
|
||||
config STAT
|
||||
bool "stat"
|
||||
default n
|
||||
help
|
||||
display file or filesystem status.
|
||||
|
||||
config CONFIG_FEATURE_STAT_FORMAT
|
||||
config FEATURE_STAT_FORMAT
|
||||
bool "Enable custom formats (-c)"
|
||||
default n
|
||||
depends on CONFIG_STAT
|
||||
depends on 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 CONFIG_STTY
|
||||
config STTY
|
||||
bool "stty"
|
||||
default n
|
||||
help
|
||||
stty is used to change and print terminal line settings.
|
||||
|
||||
config CONFIG_SUM
|
||||
config SUM
|
||||
bool "sum"
|
||||
default n
|
||||
help
|
||||
checksum and count the blocks in a file
|
||||
|
||||
config CONFIG_SYNC
|
||||
config SYNC
|
||||
bool "sync"
|
||||
default n
|
||||
help
|
||||
sync is used to flush filesystem buffers.
|
||||
|
||||
config CONFIG_TAIL
|
||||
config TAIL
|
||||
bool "tail"
|
||||
default n
|
||||
help
|
||||
tail is used to print the last specified number of lines
|
||||
from files.
|
||||
|
||||
config CONFIG_FEATURE_FANCY_TAIL
|
||||
config FEATURE_FANCY_TAIL
|
||||
bool "Enable extra tail options (-q, -s, and -v)"
|
||||
default y
|
||||
depends on CONFIG_TAIL
|
||||
depends on TAIL
|
||||
help
|
||||
The options (-q, -s, and -v) are provided by GNU tail, but
|
||||
are not specific in the SUSv3 standard.
|
||||
|
||||
config CONFIG_TEE
|
||||
config TEE
|
||||
bool "tee"
|
||||
default n
|
||||
help
|
||||
tee is used to read from standard input and write
|
||||
to standard output and files.
|
||||
|
||||
config CONFIG_FEATURE_TEE_USE_BLOCK_IO
|
||||
config FEATURE_TEE_USE_BLOCK_IO
|
||||
bool "Enable block i/o (larger/faster) instead of byte i/o."
|
||||
default n
|
||||
depends on CONFIG_TEE
|
||||
depends on TEE
|
||||
help
|
||||
Enable this option for a faster tee, at expense of size.
|
||||
|
||||
config CONFIG_TEST
|
||||
config TEST
|
||||
bool "test"
|
||||
default n
|
||||
help
|
||||
@ -606,39 +606,39 @@ config CONFIG_TEST
|
||||
returning an appropriate exit code. The bash shell
|
||||
has test built in, ash can build it in optionally.
|
||||
|
||||
config CONFIG_FEATURE_TEST_64
|
||||
config FEATURE_TEST_64
|
||||
bool "Extend test to 64 bit"
|
||||
default n
|
||||
depends on CONFIG_TEST
|
||||
depends on TEST
|
||||
help
|
||||
Enable 64-bit support in test.
|
||||
|
||||
config CONFIG_TOUCH
|
||||
config TOUCH
|
||||
bool "touch"
|
||||
default n
|
||||
help
|
||||
touch is used to create or change the access and/or
|
||||
modification timestamp of specified files.
|
||||
|
||||
config CONFIG_TR
|
||||
config TR
|
||||
bool "tr"
|
||||
default n
|
||||
help
|
||||
tr is used to squeeze, and/or delete characters from standard
|
||||
input, writing to standard output.
|
||||
|
||||
config CONFIG_FEATURE_TR_CLASSES
|
||||
config FEATURE_TR_CLASSES
|
||||
bool "Enable character classes (such as [:upper:])"
|
||||
default n
|
||||
depends on CONFIG_TR
|
||||
depends on TR
|
||||
help
|
||||
Enable character classes, enabling commands such as:
|
||||
tr [:upper:] [:lower:] to convert input into lowercase.
|
||||
|
||||
config CONFIG_FEATURE_TR_EQUIV
|
||||
config FEATURE_TR_EQUIV
|
||||
bool "Enable equivalence classes"
|
||||
default n
|
||||
depends on CONFIG_TR
|
||||
depends on TR
|
||||
help
|
||||
Enable equivalence classes, which essentially add the enclosed
|
||||
character to the current set. For instance, tr [=a=] xyz would
|
||||
@ -646,86 +646,86 @@ config CONFIG_FEATURE_TR_EQUIV
|
||||
useful for cases when no other way of expressing a character
|
||||
is possible.
|
||||
|
||||
config CONFIG_TRUE
|
||||
config TRUE
|
||||
bool "true"
|
||||
default n
|
||||
help
|
||||
true returns an exit code of TRUE (0).
|
||||
|
||||
config CONFIG_TTY
|
||||
config TTY
|
||||
bool "tty"
|
||||
default n
|
||||
help
|
||||
tty is used to print the name of the current terminal to
|
||||
standard output.
|
||||
|
||||
config CONFIG_UNAME
|
||||
config UNAME
|
||||
bool "uname"
|
||||
default n
|
||||
help
|
||||
uname is used to print system information.
|
||||
|
||||
config CONFIG_UNIQ
|
||||
config UNIQ
|
||||
bool "uniq"
|
||||
default n
|
||||
help
|
||||
uniq is used to remove duplicate lines from a sorted file.
|
||||
|
||||
config CONFIG_USLEEP
|
||||
config USLEEP
|
||||
bool "usleep"
|
||||
default n
|
||||
help
|
||||
usleep is used to pause for a specified number of microseconds.
|
||||
|
||||
config CONFIG_UUDECODE
|
||||
config UUDECODE
|
||||
bool "uudecode"
|
||||
default n
|
||||
help
|
||||
uudecode is used to decode a uuencoded file.
|
||||
|
||||
config CONFIG_UUENCODE
|
||||
config UUENCODE
|
||||
bool "uuencode"
|
||||
default n
|
||||
help
|
||||
uuencode is used to uuencode a file.
|
||||
|
||||
config CONFIG_WATCH
|
||||
config WATCH
|
||||
bool "watch"
|
||||
default n
|
||||
select CONFIG_DATE
|
||||
select DATE
|
||||
help
|
||||
watch is used to execute a program periodically, showing
|
||||
output to the screen.
|
||||
|
||||
config CONFIG_WC
|
||||
config WC
|
||||
bool "wc"
|
||||
default n
|
||||
help
|
||||
wc is used to print the number of bytes, words, and lines,
|
||||
in specified files.
|
||||
|
||||
config CONFIG_FEATURE_WC_LARGE
|
||||
config FEATURE_WC_LARGE
|
||||
bool "Support very large files in wc"
|
||||
default n
|
||||
depends on CONFIG_WC
|
||||
depends on WC
|
||||
help
|
||||
Use "unsigned long long" in wc for count variables
|
||||
|
||||
config CONFIG_WHO
|
||||
config WHO
|
||||
bool "who"
|
||||
default n
|
||||
select CONFIG_FEATURE_UTMP
|
||||
select FEATURE_UTMP
|
||||
help
|
||||
who is used to show who is logged on.
|
||||
|
||||
config CONFIG_WHOAMI
|
||||
config WHOAMI
|
||||
bool "whoami"
|
||||
default n
|
||||
help
|
||||
whoami is used to print the username of the current
|
||||
user id (same as id -un).
|
||||
|
||||
config CONFIG_YES
|
||||
config YES
|
||||
bool "yes"
|
||||
default n
|
||||
help
|
||||
@ -733,22 +733,22 @@ config CONFIG_YES
|
||||
the default string `y'.
|
||||
|
||||
comment "Common options for cp and mv"
|
||||
depends on CONFIG_CP || CONFIG_MV
|
||||
depends on CP || MV
|
||||
|
||||
config CONFIG_FEATURE_PRESERVE_HARDLINKS
|
||||
config FEATURE_PRESERVE_HARDLINKS
|
||||
bool "Preserve hard links"
|
||||
default n
|
||||
depends on CONFIG_CP || CONFIG_MV
|
||||
depends on CP || MV
|
||||
help
|
||||
Allow cp and mv to preserve hard links.
|
||||
|
||||
comment "Common options for ls, more and telnet"
|
||||
depends on CONFIG_LS || CONFIG_MORE || CONFIG_TELNET
|
||||
depends on LS || MORE || TELNET
|
||||
|
||||
config CONFIG_FEATURE_AUTOWIDTH
|
||||
config FEATURE_AUTOWIDTH
|
||||
bool "Calculate terminal & column widths"
|
||||
default y
|
||||
depends on CONFIG_LS || CONFIG_MORE || CONFIG_TELNET
|
||||
depends on LS || MORE || TELNET
|
||||
help
|
||||
This option allows utilities such as 'ls', 'more' and 'telnet'
|
||||
to determine the width of the screen, which can allow them to
|
||||
@ -757,22 +757,22 @@ config CONFIG_FEATURE_AUTOWIDTH
|
||||
primitive and will be unable to determine the current screen width.
|
||||
|
||||
comment "Common options for df, du, ls"
|
||||
depends on CONFIG_DF || CONFIG_DU || CONFIG_LS
|
||||
depends on DF || DU || LS
|
||||
|
||||
config CONFIG_FEATURE_HUMAN_READABLE
|
||||
config FEATURE_HUMAN_READABLE
|
||||
bool "Support for human readable output (example 13k, 23M, 235G)"
|
||||
default n
|
||||
depends on CONFIG_DF || CONFIG_DU || CONFIG_LS
|
||||
depends on DF || DU || LS
|
||||
help
|
||||
Allow df, du, and ls to have human readable output.
|
||||
|
||||
comment "Common options for md5sum, sha1sum"
|
||||
depends on CONFIG_MD5SUM || CONFIG_SHA1SUM
|
||||
depends on MD5SUM || SHA1SUM
|
||||
|
||||
config CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
|
||||
config FEATURE_MD5_SHA1_SUM_CHECK
|
||||
bool "Enable -c, -s and -w options"
|
||||
default n
|
||||
depends on CONFIG_MD5SUM || CONFIG_SHA1SUM
|
||||
depends on MD5SUM || SHA1SUM
|
||||
help
|
||||
Enabling the -c options allows files to be checked
|
||||
against pre-calculated hash values.
|
||||
|
81
coreutils/Kbuild
Normal file
81
coreutils/Kbuild
Normal file
@ -0,0 +1,81 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
libs-y += libcoreutils/
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_BASENAME) += basename.o
|
||||
lib-$(CONFIG_CAL) += cal.o
|
||||
lib-$(CONFIG_CAT) += cat.o
|
||||
lib-$(CONFIG_CATV) += catv.o
|
||||
lib-$(CONFIG_CHGRP) += chgrp.o
|
||||
lib-$(CONFIG_CHMOD) += chmod.o
|
||||
lib-$(CONFIG_CHOWN) += chown.o
|
||||
lib-$(CONFIG_CHROOT) += chroot.o
|
||||
lib-$(CONFIG_CKSUM) += cksum.o
|
||||
lib-$(CONFIG_CMP) += cmp.o
|
||||
lib-$(CONFIG_COMM) += comm.o
|
||||
lib-$(CONFIG_CP) += cp.o
|
||||
lib-$(CONFIG_CUT) += cut.o
|
||||
lib-$(CONFIG_DATE) += date.o
|
||||
lib-$(CONFIG_DD) += dd.o
|
||||
lib-$(CONFIG_DF) += df.o
|
||||
lib-$(CONFIG_DIFF) += diff.o
|
||||
lib-$(CONFIG_DIRNAME) += dirname.o
|
||||
lib-$(CONFIG_DOS2UNIX) += dos2unix.o
|
||||
lib-$(CONFIG_DU) += du.o
|
||||
lib-$(CONFIG_ECHO) += echo.o
|
||||
lib-$(CONFIG_ENV) += env.o
|
||||
lib-$(CONFIG_EXPR) += expr.o
|
||||
lib-$(CONFIG_FALSE) += false.o
|
||||
lib-$(CONFIG_FOLD) += fold.o
|
||||
lib-$(CONFIG_HEAD) += head.o
|
||||
lib-$(CONFIG_HOSTID) += hostid.o
|
||||
lib-$(CONFIG_ID) += id.o
|
||||
lib-$(CONFIG_INSTALL) += install.o
|
||||
lib-$(CONFIG_LENGTH) += length.o
|
||||
lib-$(CONFIG_LN) += ln.o
|
||||
lib-$(CONFIG_LOGNAME) += logname.o
|
||||
lib-$(CONFIG_LS) += ls.o
|
||||
lib-$(CONFIG_MD5SUM) += md5_sha1_sum.o
|
||||
lib-$(CONFIG_MKDIR) += mkdir.o
|
||||
lib-$(CONFIG_MKFIFO) += mkfifo.o
|
||||
lib-$(CONFIG_MKNOD) += mknod.o
|
||||
lib-$(CONFIG_MV) += mv.o
|
||||
lib-$(CONFIG_NICE) += nice.o
|
||||
lib-$(CONFIG_NOHUP) += nohup.o
|
||||
lib-$(CONFIG_OD) += od.o
|
||||
lib-$(CONFIG_PRINTENV) += printenv.o
|
||||
lib-$(CONFIG_PRINTF) += printf.o
|
||||
lib-$(CONFIG_PWD) += pwd.o
|
||||
lib-$(CONFIG_REALPATH) += realpath.o
|
||||
lib-$(CONFIG_RM) += rm.o
|
||||
lib-$(CONFIG_RMDIR) += rmdir.o
|
||||
lib-$(CONFIG_SEQ) += seq.o
|
||||
lib-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
|
||||
lib-$(CONFIG_SLEEP) += sleep.o
|
||||
lib-$(CONFIG_SORT) += sort.o
|
||||
lib-$(CONFIG_STAT) += stat.o
|
||||
lib-$(CONFIG_STTY) += stty.o
|
||||
lib-$(CONFIG_SUM) += sum.o
|
||||
lib-$(CONFIG_SYNC) += sync.o
|
||||
lib-$(CONFIG_TAIL) += tail.o
|
||||
lib-$(CONFIG_TEE) += tee.o
|
||||
lib-$(CONFIG_TEST) += test.o
|
||||
lib-$(CONFIG_TOUCH) += touch.o
|
||||
lib-$(CONFIG_TR) += tr.o
|
||||
lib-$(CONFIG_TRUE) += true.o
|
||||
lib-$(CONFIG_TTY) += tty.o
|
||||
lib-$(CONFIG_UNAME) += uname.o
|
||||
lib-$(CONFIG_UNIQ) += uniq.o
|
||||
lib-$(CONFIG_USLEEP) += usleep.o
|
||||
lib-$(CONFIG_UUDECODE) += uudecode.o
|
||||
lib-$(CONFIG_UUENCODE) += uuencode.o
|
||||
lib-$(CONFIG_WATCH) += watch.o
|
||||
lib-$(CONFIG_WC) += wc.o
|
||||
lib-$(CONFIG_WHO) += who.o
|
||||
lib-$(CONFIG_WHOAMI) += whoami.o
|
||||
lib-$(CONFIG_YES) += yes.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/coreutils
|
||||
SHELLUTILS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,102 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
COREUTILS_AR:=coreutils.a
|
||||
ifndef $(COREUTILS_DIR)
|
||||
COREUTILS_DIR:=$(top_builddir)/coreutils/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/coreutils
|
||||
|
||||
COREUTILS-y:=
|
||||
COREUTILS-$(CONFIG_BASENAME) += basename.o
|
||||
COREUTILS-$(CONFIG_CAL) += cal.o
|
||||
COREUTILS-$(CONFIG_CAT) += cat.o
|
||||
COREUTILS-$(CONFIG_CATV) += catv.o
|
||||
COREUTILS-$(CONFIG_CHGRP) += chgrp.o
|
||||
COREUTILS-$(CONFIG_CHMOD) += chmod.o
|
||||
COREUTILS-$(CONFIG_CHOWN) += chown.o
|
||||
COREUTILS-$(CONFIG_CHROOT) += chroot.o
|
||||
COREUTILS-$(CONFIG_CKSUM) += cksum.o
|
||||
COREUTILS-$(CONFIG_CMP) += cmp.o
|
||||
COREUTILS-$(CONFIG_COMM) += comm.o
|
||||
COREUTILS-$(CONFIG_CP) += cp.o
|
||||
COREUTILS-$(CONFIG_CUT) += cut.o
|
||||
COREUTILS-$(CONFIG_DATE) += date.o
|
||||
COREUTILS-$(CONFIG_DD) += dd.o
|
||||
COREUTILS-$(CONFIG_DF) += df.o
|
||||
COREUTILS-$(CONFIG_DIFF) += diff.o
|
||||
COREUTILS-$(CONFIG_DIRNAME) += dirname.o
|
||||
COREUTILS-$(CONFIG_DOS2UNIX) += dos2unix.o
|
||||
COREUTILS-$(CONFIG_DU) += du.o
|
||||
COREUTILS-$(CONFIG_ECHO) += echo.o
|
||||
COREUTILS-$(CONFIG_ENV) += env.o
|
||||
COREUTILS-$(CONFIG_EXPR) += expr.o
|
||||
COREUTILS-$(CONFIG_FALSE) += false.o
|
||||
COREUTILS-$(CONFIG_FOLD) += fold.o
|
||||
COREUTILS-$(CONFIG_HEAD) += head.o
|
||||
COREUTILS-$(CONFIG_HOSTID) += hostid.o
|
||||
COREUTILS-$(CONFIG_ID) += id.o
|
||||
COREUTILS-$(CONFIG_INSTALL) += install.o
|
||||
COREUTILS-$(CONFIG_LENGTH) += length.o
|
||||
COREUTILS-$(CONFIG_LN) += ln.o
|
||||
COREUTILS-$(CONFIG_LOGNAME) += logname.o
|
||||
COREUTILS-$(CONFIG_LS) += ls.o
|
||||
COREUTILS-$(CONFIG_MD5SUM) += md5_sha1_sum.o
|
||||
COREUTILS-$(CONFIG_MKDIR) += mkdir.o
|
||||
COREUTILS-$(CONFIG_MKFIFO) += mkfifo.o
|
||||
COREUTILS-$(CONFIG_MKNOD) += mknod.o
|
||||
COREUTILS-$(CONFIG_MV) += mv.o
|
||||
COREUTILS-$(CONFIG_NICE) += nice.o
|
||||
COREUTILS-$(CONFIG_NOHUP) += nohup.o
|
||||
COREUTILS-$(CONFIG_OD) += od.o
|
||||
COREUTILS-$(CONFIG_PRINTENV) += printenv.o
|
||||
COREUTILS-$(CONFIG_PRINTF) += printf.o
|
||||
COREUTILS-$(CONFIG_PWD) += pwd.o
|
||||
COREUTILS-$(CONFIG_REALPATH) += realpath.o
|
||||
COREUTILS-$(CONFIG_RM) += rm.o
|
||||
COREUTILS-$(CONFIG_RMDIR) += rmdir.o
|
||||
COREUTILS-$(CONFIG_SEQ) += seq.o
|
||||
COREUTILS-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
|
||||
COREUTILS-$(CONFIG_SLEEP) += sleep.o
|
||||
COREUTILS-$(CONFIG_SORT) += sort.o
|
||||
COREUTILS-$(CONFIG_STAT) += stat.o
|
||||
COREUTILS-$(CONFIG_STTY) += stty.o
|
||||
COREUTILS-$(CONFIG_SUM) += sum.o
|
||||
COREUTILS-$(CONFIG_SYNC) += sync.o
|
||||
COREUTILS-$(CONFIG_TAIL) += tail.o
|
||||
COREUTILS-$(CONFIG_TEE) += tee.o
|
||||
COREUTILS-$(CONFIG_TEST) += test.o
|
||||
COREUTILS-$(CONFIG_TOUCH) += touch.o
|
||||
COREUTILS-$(CONFIG_TR) += tr.o
|
||||
COREUTILS-$(CONFIG_TRUE) += true.o
|
||||
COREUTILS-$(CONFIG_TTY) += tty.o
|
||||
COREUTILS-$(CONFIG_UNAME) += uname.o
|
||||
COREUTILS-$(CONFIG_UNIQ) += uniq.o
|
||||
COREUTILS-$(CONFIG_USLEEP) += usleep.o
|
||||
COREUTILS-$(CONFIG_UUDECODE) += uudecode.o
|
||||
COREUTILS-$(CONFIG_UUENCODE) += uuencode.o
|
||||
COREUTILS-$(CONFIG_WATCH) += watch.o
|
||||
COREUTILS-$(CONFIG_WC) += wc.o
|
||||
COREUTILS-$(CONFIG_WHO) += who.o
|
||||
COREUTILS-$(CONFIG_WHOAMI) += whoami.o
|
||||
COREUTILS-$(CONFIG_YES) += yes.o
|
||||
|
||||
COREUTILS-y:=$(sort $(COREUTILS-y))
|
||||
|
||||
ifneq ($(strip $(COREUTILS-y)),)
|
||||
libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR)
|
||||
endif
|
||||
|
||||
COREUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(COREUTILS-y))
|
||||
COREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(COREUTILS_SRC-y)
|
||||
APPLET_SRC-a+=$(COREUTILS_SRC-a)
|
||||
|
||||
$(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(COREUTILS_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -1165,9 +1165,8 @@ int diff_main(int argc, char **argv)
|
||||
llist_t *L_arg = NULL;
|
||||
|
||||
opt_complementary = "L::";
|
||||
cmd_flags =
|
||||
getopt32(argc, argv, "abdiL:NqrsS:tTU:wu", &L_arg, &start,
|
||||
&U_opt);
|
||||
cmd_flags = getopt32(argc, argv, "abdiL:NqrsS:tTU:wu",
|
||||
&L_arg, &start, &U_opt);
|
||||
|
||||
if (cmd_flags & FLAG_L) {
|
||||
while (L_arg) {
|
||||
|
@ -13,7 +13,6 @@
|
||||
*/
|
||||
|
||||
#include "busybox.h"
|
||||
#include "pwd_.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
12
coreutils/libcoreutils/Kbuild
Normal file
12
coreutils/libcoreutils/Kbuild
Normal file
@ -0,0 +1,12 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
|
||||
lib-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
|
||||
lib-$(CONFIG_INSTALL) += cp_mv_stat.o
|
||||
lib-$(CONFIG_CP) += cp_mv_stat.o
|
||||
lib-$(CONFIG_MV) += cp_mv_stat.o
|
@ -1,37 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=../..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=../..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/coreutils/libcoreutils
|
||||
LIBCOREUTILS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,39 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
||||
|
||||
LIBCOREUTILS_AR:=libcoreutils.a
|
||||
ifndef $(LIBCOREUTILS_DIR)
|
||||
LIBCOREUTILS_DIR:=$(top_builddir)/coreutils/libcoreutils
|
||||
endif
|
||||
srcdir=$(top_srcdir)/coreutils/libcoreutils
|
||||
|
||||
LIBCOREUTILS_ALL_SRC:= cp_mv_stat.c getopt_mk_fifo_nod.c
|
||||
|
||||
LIBCOREUTILS-y:=
|
||||
LIBCOREUTILS-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
|
||||
LIBCOREUTILS-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
|
||||
LIBCOREUTILS-$(CONFIG_INSTALL) += cp_mv_stat.o
|
||||
LIBCOREUTILS-$(CONFIG_CP) += cp_mv_stat.o
|
||||
LIBCOREUTILS-$(CONFIG_MV) += cp_mv_stat.o
|
||||
|
||||
LIBCOREUTILS-y:=$(sort $(LIBCOREUTILS-y))
|
||||
|
||||
LIBCOREUTILS_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBCOREUTILS-y)))
|
||||
LIBCOREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
LIBRARY_SRC-y+=$(LIBCOREUTILS_SRC-y)
|
||||
LIBRARY_SRC-a+=$(LIBCOREUTILS_SRC-a)
|
||||
|
||||
ifneq ($(strip $(LIBCOREUTILS-y)),)
|
||||
libraries-y+=$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR)
|
||||
endif
|
||||
|
||||
LIBCOREUTILS_OBJS=$(patsubst %,$(LIBCOREUTILS_DIR)/%, $(LIBCOREUTILS-y))
|
||||
|
||||
$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR): $(patsubst %,$(LIBCOREUTILS_DIR)/%,$(LIBCOREUTILS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(LIBCOREUTILS_DIR)/%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -5,33 +5,33 @@
|
||||
|
||||
menu "Debian Utilities"
|
||||
|
||||
config CONFIG_MKTEMP
|
||||
config MKTEMP
|
||||
bool "mktemp"
|
||||
default n
|
||||
help
|
||||
mktemp is used to create unique temporary files
|
||||
|
||||
config CONFIG_PIPE_PROGRESS
|
||||
config PIPE_PROGRESS
|
||||
bool "pipe_progress"
|
||||
default n
|
||||
help
|
||||
Display a dot to indicate pipe activity.
|
||||
|
||||
config CONFIG_READLINK
|
||||
config READLINK
|
||||
bool "readlink"
|
||||
default n
|
||||
help
|
||||
This program reads a symbolic link and returns the name
|
||||
of the file it points to
|
||||
|
||||
config CONFIG_FEATURE_READLINK_FOLLOW
|
||||
config FEATURE_READLINK_FOLLOW
|
||||
bool "Enable canonicalization by following all symlinks (-f)"
|
||||
default n
|
||||
depends on CONFIG_READLINK
|
||||
depends on READLINK
|
||||
help
|
||||
Enable the readlink option (-f).
|
||||
|
||||
config CONFIG_RUN_PARTS
|
||||
config RUN_PARTS
|
||||
bool "run-parts"
|
||||
default n
|
||||
help
|
||||
@ -46,14 +46,14 @@ config CONFIG_RUN_PARTS
|
||||
Unless you know that run-parts is used in some of your scripts
|
||||
you can safely say N here.
|
||||
|
||||
config CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS
|
||||
config FEATURE_RUN_PARTS_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_RUN_PARTS && CONFIG_GETOPT_LONG
|
||||
depends on RUN_PARTS && GETOPT_LONG
|
||||
help
|
||||
Support long options for the run-parts applet.
|
||||
|
||||
config CONFIG_START_STOP_DAEMON
|
||||
config START_STOP_DAEMON
|
||||
bool "start-stop-daemon"
|
||||
default y
|
||||
help
|
||||
@ -61,23 +61,23 @@ config CONFIG_START_STOP_DAEMON
|
||||
termination of system-level processes, usually the ones
|
||||
started during the startup of the system.
|
||||
|
||||
config CONFIG_FEATURE_START_STOP_DAEMON_FANCY
|
||||
config FEATURE_START_STOP_DAEMON_FANCY
|
||||
bool "Support additional arguments"
|
||||
default y
|
||||
depends on CONFIG_START_STOP_DAEMON
|
||||
depends on START_STOP_DAEMON
|
||||
help
|
||||
Support additional arguments.
|
||||
-o|--oknodo ignored since we exit with 0 anyway
|
||||
-v|--verbose
|
||||
|
||||
config CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS
|
||||
config FEATURE_START_STOP_DAEMON_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_START_STOP_DAEMON && CONFIG_GETOPT_LONG
|
||||
depends on START_STOP_DAEMON && GETOPT_LONG
|
||||
help
|
||||
Support long options for the start-stop-daemon applet.
|
||||
|
||||
config CONFIG_WHICH
|
||||
config WHICH
|
||||
bool "which"
|
||||
default n
|
||||
help
|
||||
|
13
debianutils/Kbuild
Normal file
13
debianutils/Kbuild
Normal file
@ -0,0 +1,13 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_MKTEMP) += mktemp.o
|
||||
lib-$(CONFIG_PIPE_PROGRESS) += pipe_progress.o
|
||||
lib-$(CONFIG_READLINK) += readlink.o
|
||||
lib-$(CONFIG_RUN_PARTS) += run_parts.o
|
||||
lib-$(CONFIG_START_STOP_DAEMON) += start_stop_daemon.o
|
||||
lib-$(CONFIG_WHICH) += which.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/debianutils
|
||||
DEBIANUTILS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,33 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
DEBIANUTILS_AR:=debianutils.a
|
||||
ifndef $(DEBIANUTILS_DIR)
|
||||
DEBIANUTILS_DIR:=$(top_builddir)/debianutils/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/debianutils
|
||||
|
||||
DEBIANUTILS-y:=
|
||||
DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o
|
||||
DEBIANUTILS-$(CONFIG_PIPE_PROGRESS) += pipe_progress.o
|
||||
DEBIANUTILS-$(CONFIG_READLINK) += readlink.o
|
||||
DEBIANUTILS-$(CONFIG_RUN_PARTS) += run_parts.o
|
||||
DEBIANUTILS-$(CONFIG_START_STOP_DAEMON) += start_stop_daemon.o
|
||||
DEBIANUTILS-$(CONFIG_WHICH) += which.o
|
||||
|
||||
ifneq ($(strip $(DEBIANUTILS-y)),)
|
||||
libraries-y+=$(DEBIANUTILS_DIR)$(DEBIANUTILS_AR)
|
||||
endif
|
||||
DEBIANUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(DEBIANUTILS-y))
|
||||
DEBIANUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(DEBIANUTILS_SRC-y)
|
||||
APPLET_SRC-a+=$(DEBIANUTILS_SRC-a)
|
||||
|
||||
$(DEBIANUTILS_DIR)$(DEBIANUTILS_AR): $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(DEBIANUTILS_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -5,13 +5,13 @@
|
||||
|
||||
menu "Linux Ext2 FS Progs"
|
||||
|
||||
config CONFIG_CHATTR
|
||||
config CHATTR
|
||||
bool "chattr"
|
||||
default n
|
||||
help
|
||||
chattr changes the file attributes on a second extended file system.
|
||||
|
||||
config CONFIG_E2FSCK
|
||||
config E2FSCK
|
||||
bool "e2fsck"
|
||||
default n
|
||||
help
|
||||
@ -20,7 +20,7 @@ config CONFIG_E2FSCK
|
||||
The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also
|
||||
provided.
|
||||
|
||||
config CONFIG_FSCK
|
||||
config FSCK
|
||||
bool "fsck"
|
||||
default n
|
||||
help
|
||||
@ -28,38 +28,38 @@ config CONFIG_FSCK
|
||||
In actuality, fsck is simply a front-end for the various file system
|
||||
checkers (fsck.fstype) available under Linux.
|
||||
|
||||
config CONFIG_LSATTR
|
||||
config LSATTR
|
||||
bool "lsattr"
|
||||
default n
|
||||
help
|
||||
lsattr lists the file attributes on a second extended file system.
|
||||
|
||||
config CONFIG_MKE2FS
|
||||
config MKE2FS
|
||||
bool "mke2fs"
|
||||
default n
|
||||
help
|
||||
mke2fs is used to create an ext2/ext3 filesystem. The normal compat
|
||||
symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided.
|
||||
|
||||
config CONFIG_TUNE2FS
|
||||
config TUNE2FS
|
||||
bool "tune2fs"
|
||||
default n
|
||||
help
|
||||
tune2fs allows the system administrator to adjust various tunable
|
||||
filesystem parameters on Linux ext2/ext3 filesystems.
|
||||
|
||||
config CONFIG_E2LABEL
|
||||
config E2LABEL
|
||||
bool "e2label"
|
||||
default n
|
||||
depends on CONFIG_TUNE2FS
|
||||
depends on TUNE2FS
|
||||
help
|
||||
e2label will display or change the filesystem label on the ext2
|
||||
filesystem located on device.
|
||||
|
||||
config CONFIG_FINDFS
|
||||
config FINDFS
|
||||
bool "findfs"
|
||||
default n
|
||||
depends on CONFIG_TUNE2FS
|
||||
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.
|
||||
|
27
e2fsprogs/Kbuild
Normal file
27
e2fsprogs/Kbuild
Normal file
@ -0,0 +1,27 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
|
||||
lib-$(CONFIG_CHATTR) += chattr.o
|
||||
libs-$(CONFIG_CHATTR) += e2p/
|
||||
|
||||
lib-$(CONFIG_E2FSCK) += e2fsck.o util.o
|
||||
libs-$(CONFIG_E2FSCK) += blkid/ ext2fs/ uuid/
|
||||
|
||||
lib-$(CONFIG_FSCK) += fsck.o util.o
|
||||
libs-$(CONFIG_FSCK) += blkid/ ext2fs/ uuid/
|
||||
|
||||
lib-$(CONFIG_LSATTR) += lsattr.o
|
||||
libs-$(CONFIG_LSATTR) += e2p/
|
||||
|
||||
lib-$(CONFIG_MKE2FS) += mke2fs.o util.o
|
||||
libs-$(CONFIG_MKE2FS) += e2p/ blkid/ ext2fs/ uuid/
|
||||
|
||||
lib-$(CONFIG_TUNE2FS) += tune2fs.o util.o
|
||||
libs-$(CONFIG_TUNE2FS) += e2p/ blkid/ ext2fs/ uuid/
|
||||
|
||||
CFLAGS += -include e2fsprogs/e2fsbb.h
|
@ -1,22 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/e2fsprogs
|
||||
E2FSPROGS_DIR:=./
|
||||
include $(top_builddir)/.config
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a */*.o $(AR_TARGET)
|
@ -1,86 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
E2FSPROGS_AR:=e2fsprogs.a
|
||||
|
||||
E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs
|
||||
E2FSPROGS_SRC:=$(top_srcdir)/e2fsprogs
|
||||
|
||||
E2FSPROGS_CFLAGS := -include $(E2FSPROGS_SRC)/e2fsbb.h
|
||||
|
||||
BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \
|
||||
probe.c read.c resolve.c save.c tag.c list.c
|
||||
BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC))
|
||||
BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS))
|
||||
|
||||
E2P_SRC := fgetsetflags.c fgetsetversion.c pf.c iod.c mntopts.c \
|
||||
feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c \
|
||||
parse_num.c
|
||||
E2P_SRCS := $(patsubst %,e2p/%, $(E2P_SRC))
|
||||
E2P_OBJS := $(patsubst %.c,%.o, $(E2P_SRCS))
|
||||
|
||||
EXT2FS_SRC := gen_bitmap.c bitops.c ismounted.c mkjournal.c unix_io.c \
|
||||
rw_bitmaps.c initialize.c bitmaps.c block.c \
|
||||
ind_block.c inode.c freefs.c alloc_stats.c closefs.c \
|
||||
openfs.c io_manager.c finddev.c read_bb.c alloc.c badblocks.c \
|
||||
getsize.c getsectsize.c alloc_tables.c read_bb_file.c mkdir.c \
|
||||
bb_inode.c newdir.c alloc_sb.c lookup.c dirblock.c expanddir.c \
|
||||
dir_iterate.c link.c res_gdt.c icount.c get_pathname.c dblist.c \
|
||||
dirhash.c version.c flushb.c unlink.c check_desc.c valid_blk.c \
|
||||
ext_attr.c bmap.c dblist_dir.c ext2fs_inline.c swapfs.c
|
||||
EXT2FS_SRCS := $(patsubst %,ext2fs/%, $(EXT2FS_SRC))
|
||||
EXT2FS_OBJS := $(patsubst %.c,%.o, $(EXT2FS_SRCS))
|
||||
|
||||
UUID_SRC := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \
|
||||
uuid_time.c
|
||||
UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC))
|
||||
UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS))
|
||||
|
||||
E2FSPROGS-y:=
|
||||
E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS)
|
||||
E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
||||
E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
||||
E2FSPROGS-$(CONFIG_LSATTR) += lsattr.o $(E2P_OBJS)
|
||||
E2FSPROGS-$(CONFIG_MKE2FS) += mke2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
||||
E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
||||
|
||||
E2FSPROGS-y:=$(sort $(E2FSPROGS-y))
|
||||
|
||||
ifneq ($(strip $(E2FSPROGS-y)),)
|
||||
libraries-y+=$(E2FSPROGS_DIR)/$(E2FSPROGS_AR)
|
||||
endif
|
||||
|
||||
E2FSPROGS_SRC-y:=$(patsubst %.o,$(E2FSPROGS_SRC)/%.c,$(E2FSPROGS-y))
|
||||
E2FSPROGS_SRC-a:=$(wildcard $(E2FSPROGS_SRC)/*.c) $(patsubst %,$(E2FSPROGS_SRC)/%,$(BLKID_SRCS) $(E2P_SRCS) $(EXT2FS_SRCS) $(UUID_SRCS))
|
||||
APPLET_SRC-y+=$(E2FSPROGS_SRC-y)
|
||||
APPLET_SRC-a+=$(E2FSPROGS_SRC-a)
|
||||
|
||||
# XXX: FIXME: change .c to include their stuff relative to $(E2FSPROGS_SRC)
|
||||
E2FSPROGS_TMP_KLUDGE:=$(patsubst %,-I$(E2FSPROGS_SRC)/%,blkid e2fsck e2p ext2fs uuid)
|
||||
|
||||
APPLETS_DEFINE-y+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
|
||||
APPLETS_DEFINE-a+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
|
||||
|
||||
$(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(E2FSPROGS_DIR)/%.o: $(subst $(top_builddir),$(top_srcdir),$(E2FSPROGS_DIR)/%.c)
|
||||
$(compile.c) $(E2FSPROGS_CFLAGS)
|
||||
|
||||
# for building out-of-tree we need to make sure that the directories to hold
|
||||
# the object tree are created
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, blkid e2fsck e2p ext2fs uuid):
|
||||
@mkdir -p "$@"
|
||||
|
||||
# make sure that the directories are order-only prerequisites. Otherwise we
|
||||
# may have object files created after the timestamp of the directory was
|
||||
# updated which would lead to spurious rebuilds (as some of the dentries
|
||||
# may be older than the dir itself).
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(BLKID_OBJS)):|$(E2FSPROGS_DIR)/blkid
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSCK_OBJS)):|$(E2FSPROGS_DIR)/e2fsck
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2P_OBJS)):|$(E2FSPROGS_DIR)/e2p
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(EXT2FS_OBJS)):|$(E2FSPROGS_DIR)/ext2fs
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(UUID_OBJS)):|$(E2FSPROGS_DIR)/uuid
|
18
e2fsprogs/blkid/Kbuild
Normal file
18
e2fsprogs/blkid/Kbuild
Normal file
@ -0,0 +1,18 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-y += cache.o dev.o devname.o devno.o blkid_getsize.o \
|
||||
probe.o read.o resolve.o save.o tag.o list.o
|
||||
|
||||
CFLAGS_dev.o := -include include/busybox.h
|
||||
CFLAGS_devname.o := -include include/busybox.h
|
||||
CFLAGS_devno.o := -include include/busybox.h
|
||||
CFLAGS_blkid_getsize.o := -include include/busybox.h
|
||||
CFLAGS_probe.o := -include include/busybox.h
|
||||
CFLAGS_save.o := -include include/busybox.h
|
||||
CFLAGS_tag.o := -include include/busybox.h
|
||||
CFLAGS_list.o := -include include/busybox.h
|
@ -14,9 +14,7 @@
|
||||
#include "blkidP.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
@ -23,9 +23,7 @@
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
@ -21,9 +21,7 @@
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <dirent.h>
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
|
10
e2fsprogs/e2p/Kbuild
Normal file
10
e2fsprogs/e2p/Kbuild
Normal file
@ -0,0 +1,10 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-y += fgetsetflags.o fgetsetversion.o pf.o iod.o mntopts.o \
|
||||
feature.o ls.o uuid.o pe.o ostype.o ps.o hashstr.o \
|
||||
parse_num.o
|
@ -63,8 +63,8 @@ int fgetsetflags (const char * name, unsigned long * get_flags, unsigned long se
|
||||
if (save_errno)
|
||||
errno = save_errno;
|
||||
return r;
|
||||
#endif /* HAVE_EXT2_IOCTLS */
|
||||
notsupp:
|
||||
#endif /* HAVE_EXT2_IOCTLS */
|
||||
errno = EOPNOTSUPP;
|
||||
return -1;
|
||||
}
|
||||
|
18
e2fsprogs/ext2fs/Kbuild
Normal file
18
e2fsprogs/ext2fs/Kbuild
Normal file
@ -0,0 +1,18 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-y += gen_bitmap.o bitops.o ismounted.o mkjournal.o unix_io.o \
|
||||
rw_bitmaps.o initialize.o bitmaps.o block.o \
|
||||
ind_block.o inode.o freefs.o alloc_stats.o closefs.o \
|
||||
openfs.o io_manager.o finddev.o read_bb.o alloc.o badblocks.o \
|
||||
getsize.o getsectsize.o alloc_tables.o read_bb_file.o mkdir.o \
|
||||
bb_inode.o newdir.o alloc_sb.o lookup.o dirblock.o expanddir.o \
|
||||
dir_iterate.o link.o res_gdt.o icount.o get_pathname.o dblist.o \
|
||||
dirhash.o version.o flushb.o unlink.o check_desc.o valid_blk.o \
|
||||
ext_attr.o bmap.o dblist_dir.o ext2fs_inline.o swapfs.o
|
||||
|
||||
CFLAGS += -include e2fsprogs/e2fsbb.h
|
@ -45,8 +45,6 @@
|
||||
#include "blkid/blkid.h"
|
||||
|
||||
#include "busybox.h"
|
||||
#include "grp_.h"
|
||||
#include "pwd_.h"
|
||||
|
||||
static char * device_name = NULL;
|
||||
static char * new_label, *new_last_mounted, *new_UUID;
|
||||
|
9
e2fsprogs/uuid/Kbuild
Normal file
9
e2fsprogs/uuid/Kbuild
Normal file
@ -0,0 +1,9 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-y += compare.o gen_uuid.o pack.o parse.o unpack.o unparse.o \
|
||||
uuid_time.o
|
@ -41,6 +41,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
@ -5,22 +5,22 @@
|
||||
|
||||
menu "Editors"
|
||||
|
||||
config CONFIG_AWK
|
||||
config AWK
|
||||
bool "awk"
|
||||
default n
|
||||
help
|
||||
Awk is used as a pattern scanning and processing language. This is
|
||||
the BusyBox implementation of that programming language.
|
||||
|
||||
config CONFIG_FEATURE_AWK_MATH
|
||||
config FEATURE_AWK_MATH
|
||||
bool "Enable math functions (requires libm)"
|
||||
default y
|
||||
depends on CONFIG_AWK
|
||||
depends on AWK
|
||||
help
|
||||
Enable math functions of the Awk programming language.
|
||||
NOTE: This will require libm to be present for linking.
|
||||
|
||||
config CONFIG_ED
|
||||
config ED
|
||||
bool "ed"
|
||||
default n
|
||||
help
|
||||
@ -28,20 +28,20 @@ config CONFIG_ED
|
||||
Small, simple, evil. Part of SUSv3. If you're not already using
|
||||
this, you don't need it.
|
||||
|
||||
config CONFIG_PATCH
|
||||
config PATCH
|
||||
bool "patch"
|
||||
default n
|
||||
help
|
||||
Apply a unified diff formatted patch.
|
||||
|
||||
config CONFIG_SED
|
||||
config SED
|
||||
bool "sed"
|
||||
default n
|
||||
help
|
||||
sed is used to perform text transformations on a file
|
||||
or input from a pipeline.
|
||||
|
||||
config CONFIG_VI
|
||||
config VI
|
||||
bool "vi"
|
||||
default n
|
||||
help
|
||||
@ -50,79 +50,79 @@ config CONFIG_VI
|
||||
learning curve. If you are not already comfortable with 'vi'
|
||||
you may wish to use something else.
|
||||
|
||||
config CONFIG_FEATURE_VI_COLON
|
||||
config FEATURE_VI_COLON
|
||||
bool "Enable \":\" colon commands (no \"ex\" mode)"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
Enable a limited set of colon commands for vi. This does not
|
||||
provide an "ex" mode.
|
||||
|
||||
config CONFIG_FEATURE_VI_YANKMARK
|
||||
config FEATURE_VI_YANKMARK
|
||||
bool "Enable yank/put commands and mark cmds"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
This will enable you to use yank and put, as well as mark in
|
||||
busybox vi.
|
||||
|
||||
config CONFIG_FEATURE_VI_SEARCH
|
||||
config FEATURE_VI_SEARCH
|
||||
bool "Enable search and replace cmds"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
Select this if you wish to be able to do search and replace in
|
||||
busybox vi.
|
||||
|
||||
config CONFIG_FEATURE_VI_USE_SIGNALS
|
||||
config FEATURE_VI_USE_SIGNALS
|
||||
bool "Catch signals"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
Selecting this option will make busybox vi signal aware. This will
|
||||
make busybox vi support SIGWINCH to deal with Window Changes, catch
|
||||
Ctrl-Z and Ctrl-C and alarms.
|
||||
|
||||
config CONFIG_FEATURE_VI_DOT_CMD
|
||||
config FEATURE_VI_DOT_CMD
|
||||
bool "Remember previous cmd and \".\" cmd"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
Make busybox vi remember the last command and be able to repeat it.
|
||||
|
||||
config CONFIG_FEATURE_VI_READONLY
|
||||
config FEATURE_VI_READONLY
|
||||
bool "Enable -R option and \"view\" mode"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
Enable the read-only command line option, which allows the user to
|
||||
open a file in read-only mode.
|
||||
|
||||
config CONFIG_FEATURE_VI_SETOPTS
|
||||
config FEATURE_VI_SETOPTS
|
||||
bool "Enable set-able options, ai ic showmatch"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
Enable the editor to set some (ai, ic, showmatch) options.
|
||||
|
||||
config CONFIG_FEATURE_VI_SET
|
||||
config FEATURE_VI_SET
|
||||
bool "Support for :set"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
Support for ":set".
|
||||
|
||||
config CONFIG_FEATURE_VI_WIN_RESIZE
|
||||
config FEATURE_VI_WIN_RESIZE
|
||||
bool "Handle window resize"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
Make busybox vi behave nicely with terminals that get resized.
|
||||
|
||||
config CONFIG_FEATURE_VI_OPTIMIZE_CURSOR
|
||||
config FEATURE_VI_OPTIMIZE_CURSOR
|
||||
bool "Optimize cursor movement"
|
||||
default y
|
||||
depends on CONFIG_VI
|
||||
depends on VI
|
||||
help
|
||||
This will make the cursor movement faster, but requires more memory
|
||||
and it makes the applet a tiny bit larger.
|
||||
|
12
editors/Kbuild
Normal file
12
editors/Kbuild
Normal file
@ -0,0 +1,12 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_AWK) += awk.o
|
||||
lib-$(CONFIG_ED) += ed.o
|
||||
lib-$(CONFIG_PATCH) += patch.o
|
||||
lib-$(CONFIG_SED) += sed.o
|
||||
lib-$(CONFIG_VI) += vi.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/editors
|
||||
EDITOR_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,40 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
EDITOR_AR:=editors.a
|
||||
ifndef $(EDITOR_DIR)
|
||||
EDITOR_DIR:=$(top_builddir)/editors/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/editors
|
||||
|
||||
EDITOR-y:=
|
||||
EDITOR-$(CONFIG_AWK) += awk.o
|
||||
EDITOR-$(CONFIG_ED) += ed.o
|
||||
EDITOR-$(CONFIG_PATCH) += patch.o
|
||||
EDITOR-$(CONFIG_SED) += sed.o
|
||||
EDITOR-$(CONFIG_VI) += vi.o
|
||||
|
||||
ifneq ($(strip $(EDITOR-y)),)
|
||||
libraries-y+=$(EDITOR_DIR)$(EDITOR_AR)
|
||||
endif
|
||||
|
||||
EDITOR_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(EDITOR-y))
|
||||
EDITOR_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(EDITOR_SRC-y)
|
||||
APPLET_SRC-a+=$(EDITOR_SRC-a)
|
||||
|
||||
needlibm-y:=
|
||||
needlibm-$(CONFIG_FEATURE_AWK_MATH) := y
|
||||
|
||||
ifeq ($(needlibm-y),y)
|
||||
LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES))
|
||||
endif
|
||||
|
||||
$(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
|
||||
$(do_ar)
|
||||
|
||||
$(EDITOR_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -5,152 +5,152 @@
|
||||
|
||||
menu "Finding Utilities"
|
||||
|
||||
config CONFIG_FIND
|
||||
config FIND
|
||||
bool "find"
|
||||
default n
|
||||
help
|
||||
find is used to search your system to find specified files.
|
||||
|
||||
config CONFIG_FEATURE_FIND_PRINT0
|
||||
config FEATURE_FIND_PRINT0
|
||||
bool "Enable -print0 option"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
Causes output names to be separated by a null character
|
||||
rather than a newline. This allows names that contain
|
||||
newlines and other whitespace to be more easily
|
||||
interpreted by other programs.
|
||||
|
||||
config CONFIG_FEATURE_FIND_MTIME
|
||||
config FEATURE_FIND_MTIME
|
||||
bool "Enable modified time matching (-mtime) option"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
Allow searching based on the modification time of
|
||||
files, in days.
|
||||
|
||||
config CONFIG_FEATURE_FIND_MMIN
|
||||
config FEATURE_FIND_MMIN
|
||||
bool "Enable modified time matching (-min) option"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
Allow searching based on the modification time of
|
||||
files, in minutes.
|
||||
|
||||
config CONFIG_FEATURE_FIND_PERM
|
||||
config FEATURE_FIND_PERM
|
||||
bool "Enable permissions matching (-perm) option"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
Enable searching based on file permissions.
|
||||
|
||||
config CONFIG_FEATURE_FIND_TYPE
|
||||
config FEATURE_FIND_TYPE
|
||||
bool "Enable filetype matching (-type) option"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
Enable searching based on file type (file,
|
||||
directory, socket, device, etc.).
|
||||
|
||||
config CONFIG_FEATURE_FIND_XDEV
|
||||
config FEATURE_FIND_XDEV
|
||||
bool "Enable stay in filesystem (-xdev) option"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
This option will allow find to restrict searches to a single
|
||||
filesystem.
|
||||
|
||||
config CONFIG_FEATURE_FIND_NEWER
|
||||
config FEATURE_FIND_NEWER
|
||||
bool "Enable -newer option for comparing file mtimes"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
Support the 'find -newer' option for finding any files which have
|
||||
a modified time that is more recent than the specified FILE.
|
||||
|
||||
config CONFIG_FEATURE_FIND_INUM
|
||||
config FEATURE_FIND_INUM
|
||||
bool "Enable inode number matching (-inum) option"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
Support the 'find -inum' option for searching by inode number.
|
||||
|
||||
config CONFIG_FEATURE_FIND_EXEC
|
||||
config FEATURE_FIND_EXEC
|
||||
bool "Enable (-exec) option allowing execution of commands"
|
||||
default y
|
||||
depends on CONFIG_FIND
|
||||
depends on FIND
|
||||
help
|
||||
Support the 'find -exec' option for executing commands based upon
|
||||
the files matched.
|
||||
|
||||
config CONFIG_GREP
|
||||
config GREP
|
||||
bool "grep"
|
||||
default n
|
||||
help
|
||||
grep is used to search files for a specified pattern.
|
||||
|
||||
config CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||
config FEATURE_GREP_EGREP_ALIAS
|
||||
bool "Support extended regular expressions (egrep & grep -E)"
|
||||
default y
|
||||
depends on CONFIG_GREP
|
||||
depends on GREP
|
||||
help
|
||||
Enabled support for extended regular expressions. Extended
|
||||
regular expressions allow for alternation (foo|bar), grouping,
|
||||
and various repetition operators.
|
||||
|
||||
config CONFIG_FEATURE_GREP_FGREP_ALIAS
|
||||
config FEATURE_GREP_FGREP_ALIAS
|
||||
bool "Alias fgrep to grep -F"
|
||||
default y
|
||||
depends on CONFIG_GREP
|
||||
depends on GREP
|
||||
help
|
||||
fgrep sees the search pattern as a normal string rather than
|
||||
regular expressions.
|
||||
grep -F is always builtin, this just creates the fgrep alias.
|
||||
|
||||
config CONFIG_FEATURE_GREP_CONTEXT
|
||||
config FEATURE_GREP_CONTEXT
|
||||
bool "Enable before and after context flags (-A, -B and -C)"
|
||||
default y
|
||||
depends on CONFIG_GREP
|
||||
depends on GREP
|
||||
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 CONFIG_XARGS
|
||||
config XARGS
|
||||
bool "xargs"
|
||||
default n
|
||||
help
|
||||
xargs is used to execute a specified command on
|
||||
every item from standard input.
|
||||
|
||||
config CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION
|
||||
config FEATURE_XARGS_SUPPORT_CONFIRMATION
|
||||
bool "Enable prompt and confirmation option -p"
|
||||
default n
|
||||
depends on CONFIG_XARGS
|
||||
depends on XARGS
|
||||
help
|
||||
Support prompt the user about whether to run each command
|
||||
line and read a line from the terminal.
|
||||
|
||||
config CONFIG_FEATURE_XARGS_SUPPORT_QUOTES
|
||||
config FEATURE_XARGS_SUPPORT_QUOTES
|
||||
bool "Enable support single and double quotes and backslash"
|
||||
default n
|
||||
depends on CONFIG_XARGS
|
||||
depends on XARGS
|
||||
help
|
||||
Default xargs unsupport single and double quotes
|
||||
and backslash for can use aruments with spaces.
|
||||
|
||||
config CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT
|
||||
config FEATURE_XARGS_SUPPORT_TERMOPT
|
||||
bool "Enable support options -x"
|
||||
default n
|
||||
depends on CONFIG_XARGS
|
||||
depends on XARGS
|
||||
help
|
||||
Enable support exit if the size (see the -s or -n option)
|
||||
is exceeded.
|
||||
|
||||
config CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM
|
||||
config FEATURE_XARGS_SUPPORT_ZERO_TERM
|
||||
bool "Enable null terminated option -0"
|
||||
default n
|
||||
depends on CONFIG_XARGS
|
||||
depends on XARGS
|
||||
help
|
||||
Enable input filenames are terminated by a null character
|
||||
instead of by whitespace, and the quotes and backslash
|
||||
|
10
findutils/Kbuild
Normal file
10
findutils/Kbuild
Normal file
@ -0,0 +1,10 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_FIND) += find.o
|
||||
lib-$(CONFIG_GREP) += grep.o
|
||||
lib-$(CONFIG_XARGS) += xargs.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/findutils
|
||||
FINDUTILS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
FINDUTILS_AR:=findutils.a
|
||||
ifndef $(FINDUTILS_DIR)
|
||||
FINDUTILS_DIR:=$(top_builddir)/findutils/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/findutils
|
||||
|
||||
FINDUTILS-y:=
|
||||
FINDUTILS-$(CONFIG_FIND) += find.o
|
||||
FINDUTILS-$(CONFIG_GREP) += grep.o
|
||||
FINDUTILS-$(CONFIG_XARGS) += xargs.o
|
||||
|
||||
ifneq ($(strip $(FINDUTILS-y)),)
|
||||
libraries-y+=$(FINDUTILS_DIR)$(FINDUTILS_AR)
|
||||
endif
|
||||
|
||||
FINDUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(FINDUTILS-y))
|
||||
FINDUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(FINDUTILS_SRC-y)
|
||||
APPLET_SRC-a+=$(FINDUTILS_SRC-a)
|
||||
|
||||
$(FINDUTILS_DIR)$(FINDUTILS_AR): $(patsubst %,$(FINDUTILS_DIR)%, $(FINDUTILS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(FINDUTILS_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
142
include/bb_config.h
Normal file
142
include/bb_config.h
Normal file
@ -0,0 +1,142 @@
|
||||
/* Hack. kbuild will not define needed macros for config symbols
|
||||
* which depend on other symbols, which themself are off.
|
||||
* Provide them here by hand. Need a better idea. */
|
||||
|
||||
#ifndef ENABLE_KILLALL5
|
||||
#define ENABLE_KILLALL5 0
|
||||
#define USE_KILLALL5(...)
|
||||
#define SKIP_KILLALL5(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_QUERY_MODULE_INTERFACE
|
||||
#define ENABLE_FEATURE_QUERY_MODULE_INTERFACE 0
|
||||
#define USE_FEATURE_QUERY_MODULE_INTERFACE(...)
|
||||
#define SKIP_FEATURE_QUERY_MODULE_INTERFACE(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_CLEAN_UP
|
||||
#define ENABLE_FEATURE_CLEAN_UP 0
|
||||
#define USE_FEATURE_CLEAN_UP(...)
|
||||
#define SKIP_FEATURE_CLEAN_UP(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_SH_STANDALONE_SHELL
|
||||
#define ENABLE_FEATURE_SH_STANDALONE_SHELL 0
|
||||
#define USE_FEATURE_SH_STANDALONE_SHELL(...)
|
||||
#define SKIP_FEATURE_SH_STANDALONE_SHELL(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_MTAB_SUPPORT
|
||||
#define ENABLE_FEATURE_MTAB_SUPPORT 0
|
||||
#define USE_FEATURE_MTAB_SUPPORT(...)
|
||||
#define SKIP_FEATURE_MTAB_SUPPORT(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_PRESERVE_HARDLINKS
|
||||
#define ENABLE_FEATURE_PRESERVE_HARDLINKS 0
|
||||
#define USE_FEATURE_PRESERVE_HARDLINKS(...)
|
||||
#define SKIP_FEATURE_PRESERVE_HARDLINKS(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_AUTOWIDTH
|
||||
#define ENABLE_FEATURE_AUTOWIDTH 0
|
||||
#define USE_FEATURE_AUTOWIDTH(...)
|
||||
#define SKIP_FEATURE_AUTOWIDTH(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_SUID_CONFIG
|
||||
#define ENABLE_FEATURE_SUID_CONFIG 0
|
||||
#define USE_FEATURE_SUID_CONFIG(...)
|
||||
#define SKIP_FEATURE_SUID_CONFIG(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_APP_DUMPLEASES
|
||||
#define ENABLE_APP_DUMPLEASES 0
|
||||
#define USE_APP_DUMPLEASES(...)
|
||||
#define SKIP_APP_DUMPLEASES(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_E2LABEL
|
||||
#define ENABLE_E2LABEL 0
|
||||
#define USE_E2LABEL(...)
|
||||
#define SKIP_E2LABEL(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_GREP_EGREP_ALIAS
|
||||
#define ENABLE_FEATURE_GREP_EGREP_ALIAS 0
|
||||
#define USE_FEATURE_GREP_EGREP_ALIAS(...)
|
||||
#define SKIP_FEATURE_GREP_EGREP_ALIAS(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_GREP_FGREP_ALIAS
|
||||
#define ENABLE_FEATURE_GREP_FGREP_ALIAS 0
|
||||
#define USE_FEATURE_GREP_FGREP_ALIAS(...)
|
||||
#define SKIP_FEATURE_GREP_FGREP_ALIAS(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FINDFS
|
||||
#define ENABLE_FINDFS 0
|
||||
#define USE_FINDFS(...)
|
||||
#define SKIP_FINDFS(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_IPADDR
|
||||
#define ENABLE_IPADDR 0
|
||||
#define USE_IPADDR(...)
|
||||
#define SKIP_IPADDR(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_IPLINK
|
||||
#define ENABLE_IPLINK 0
|
||||
#define USE_IPLINK(...)
|
||||
#define SKIP_IPLINK(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_IPROUTE
|
||||
|
||||
#define ENABLE_IPROUTE 0
|
||||
#define USE_IPROUTE(...)
|
||||
#define SKIP_IPROUTE(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_IPTUNNEL
|
||||
#define ENABLE_IPTUNNEL 0
|
||||
#define USE_IPTUNNEL(...)
|
||||
#define SKIP_IPTUNNEL(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_KILLALL
|
||||
#define ENABLE_KILLALL 0
|
||||
#define USE_KILLALL(...)
|
||||
#define SKIP_KILLALL(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_KLOGD
|
||||
#define ENABLE_KLOGD 0
|
||||
#define USE_KLOGD(...)
|
||||
#define SKIP_KLOGD(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEATURE_INITRD
|
||||
#define ENABLE_FEATURE_INITRD 0
|
||||
#define USE_FEATURE_INITRD(...)
|
||||
#define SKIP_FEATURE_INITRD(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_LOGREAD
|
||||
#define ENABLE_LOGREAD 0
|
||||
#define USE_LOGREAD(...)
|
||||
#define SKIP_LOGREAD(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_PING6
|
||||
#define ENABLE_PING6 0
|
||||
#define USE_PING6(...)
|
||||
#define SKIP_PING6(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_UNIX2DOS
|
||||
#define ENABLE_UNIX2DOS 0
|
||||
#define USE_UNIX2DOS(...)
|
||||
#define SKIP_UNIX2DOS(...) __VA_ARGS__
|
||||
#endif
|
@ -7,8 +7,6 @@
|
||||
#ifndef _BB_INTERNAL_H_
|
||||
#define _BB_INTERNAL_H_ 1
|
||||
|
||||
#include "bb_config.h"
|
||||
|
||||
#include "libbb.h"
|
||||
|
||||
/* order matters: used as index into "install_dir[]" in busybox.c */
|
||||
|
@ -30,12 +30,10 @@
|
||||
#ifndef _GRP_H
|
||||
#define _GRP_H 1
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <features.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/* The group structure. */
|
||||
struct group
|
||||
{
|
||||
|
@ -377,7 +377,6 @@ extern const char *applet_name;
|
||||
extern const char bb_msg_full_version[];
|
||||
extern const char bb_msg_memory_exhausted[];
|
||||
extern const char bb_msg_invalid_date[];
|
||||
extern const char bb_msg_io_error[];
|
||||
extern const char bb_msg_read_error[];
|
||||
extern const char bb_msg_write_error[];
|
||||
extern const char bb_msg_name_longer_than_foo[];
|
||||
|
@ -5,32 +5,32 @@
|
||||
|
||||
menu "Init Utilities"
|
||||
|
||||
config CONFIG_INIT
|
||||
config INIT
|
||||
bool "init"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
init is the first program run when the system boots.
|
||||
|
||||
config CONFIG_DEBUG_INIT
|
||||
config DEBUG_INIT
|
||||
bool "debugging aid"
|
||||
default n
|
||||
depends on CONFIG_INIT
|
||||
depends on INIT
|
||||
help
|
||||
Turn this on to disable all the dangerous
|
||||
rebooting stuff when debugging.
|
||||
|
||||
config CONFIG_FEATURE_USE_INITTAB
|
||||
config FEATURE_USE_INITTAB
|
||||
bool "Support reading an inittab file"
|
||||
default y
|
||||
depends on CONFIG_INIT
|
||||
depends on INIT
|
||||
help
|
||||
Allow init to read an inittab file when the system boot.
|
||||
|
||||
config CONFIG_FEATURE_INIT_SCTTY
|
||||
config FEATURE_INIT_SCTTY
|
||||
bool "Support running commands with a controlling-tty"
|
||||
default n
|
||||
depends on CONFIG_INIT
|
||||
depends on INIT
|
||||
help
|
||||
If this option is enabled a command starting with hyphen (-)
|
||||
is run in its own session (setsid(2)) and possibly with a
|
||||
@ -38,17 +38,17 @@ config CONFIG_FEATURE_INIT_SCTTY
|
||||
behavour, but is often what you want in an embedded system where
|
||||
the console is only accessed during development or for maintenance.
|
||||
|
||||
config CONFIG_FEATURE_EXTRA_QUIET
|
||||
config FEATURE_EXTRA_QUIET
|
||||
bool "Be _extra_ quiet on boot"
|
||||
default y
|
||||
depends on CONFIG_INIT
|
||||
depends on INIT
|
||||
help
|
||||
Prevent init from logging some messages to the console during boot.
|
||||
|
||||
config CONFIG_FEATURE_INIT_COREDUMPS
|
||||
config FEATURE_INIT_COREDUMPS
|
||||
bool "Support dumping core for child processes (debugging only)"
|
||||
default n
|
||||
depends on CONFIG_INIT
|
||||
depends on INIT
|
||||
help
|
||||
If this option is enabled and the file /.init_enable_core
|
||||
exists, then init will call setrlimit() to allow unlimited
|
||||
@ -57,10 +57,10 @@ config CONFIG_FEATURE_INIT_COREDUMPS
|
||||
|
||||
|
||||
|
||||
config CONFIG_FEATURE_INITRD
|
||||
config FEATURE_INITRD
|
||||
bool "Support running init from within an initrd (not initramfs)"
|
||||
default y
|
||||
depends on CONFIG_INIT
|
||||
depends on INIT
|
||||
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.
|
||||
@ -68,13 +68,13 @@ config CONFIG_FEATURE_INITRD
|
||||
This does not apply to initramfs, which runs /init as PID 1 and
|
||||
requires no special support.
|
||||
|
||||
config CONFIG_HALT
|
||||
config HALT
|
||||
bool "poweroff, halt, and reboot"
|
||||
default y
|
||||
help
|
||||
Stop all processes and either halt, reboot, or power off the system.
|
||||
|
||||
config CONFIG_MESG
|
||||
config MESG
|
||||
bool "mesg"
|
||||
default y
|
||||
help
|
||||
|
12
init/Kbuild
Normal file
12
init/Kbuild
Normal file
@ -0,0 +1,12 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_HALT) += halt.o
|
||||
lib-$(CONFIG_INIT) += init.o
|
||||
lib-$(CONFIG_MESG) += mesg.o
|
||||
lib-$(CONFIG_INIT) += init_shared.o
|
||||
lib-$(CONFIG_HALT) += init_shared.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/init
|
||||
INIT_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include $(srcdir)/Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,43 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
INIT_AR:=init.a
|
||||
ifndef $(INIT_DIR)
|
||||
INIT_DIR:=$(top_builddir)/init/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/init
|
||||
|
||||
INIT-y:=
|
||||
INIT-$(CONFIG_HALT) += halt.o
|
||||
INIT-$(CONFIG_INIT) += init.o
|
||||
INIT-$(CONFIG_MESG) += mesg.o
|
||||
|
||||
ifeq ($(strip $(CONFIG_HALT)),y)
|
||||
CONFIG_INIT_SHARED=y
|
||||
else
|
||||
ifeq ($(strip $(CONFIG_INIT)),y)
|
||||
CONFIG_INIT_SHARED=y
|
||||
else
|
||||
CONFIG_INIT_SHARED=n
|
||||
endif
|
||||
endif
|
||||
|
||||
INIT-$(CONFIG_INIT_SHARED) += init_shared.o
|
||||
|
||||
ifneq ($(strip $(INIT-y)),)
|
||||
libraries-y+=$(INIT_DIR)$(INIT_AR)
|
||||
endif
|
||||
|
||||
INIT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(INIT-y))
|
||||
INIT_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(INIT_SRC-y)
|
||||
APPLET_SRC-a+=$(INIT_SRC-a)
|
||||
|
||||
$(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y))
|
||||
$(do_ar)
|
||||
|
||||
$(INIT_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -5,14 +5,14 @@
|
||||
|
||||
menu "Busybox Library Tuning"
|
||||
|
||||
config CONFIG_PASSWORD_MINLEN
|
||||
config PASSWORD_MINLEN
|
||||
int "Minimum password length"
|
||||
default 6
|
||||
range 5 32
|
||||
help
|
||||
Minimum allowable password length.
|
||||
|
||||
config CONFIG_MD5_SIZE_VS_SPEED
|
||||
config MD5_SIZE_VS_SPEED
|
||||
int " MD5: Trade Bytes for Speed"
|
||||
default 2
|
||||
range 0 3
|
||||
|
61
libbb/Kbuild
Normal file
61
libbb/Kbuild
Normal file
@ -0,0 +1,61 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:= \
|
||||
ask_confirmation.o change_identity.o chomp.o \
|
||||
compare_string_array.o concat_path_file.o copy_file.o copyfd.o \
|
||||
crc32.o create_icmp_socket.o create_icmp6_socket.o \
|
||||
device_open.o dump.o error_msg.o error_msg_and_die.o \
|
||||
find_pid_by_name.o find_root_device.o fgets_str.o full_read.o \
|
||||
full_write.o get_last_path_component.o get_line_from_file.o \
|
||||
herror_msg.o herror_msg_and_die.o \
|
||||
human_readable.o inet_common.o inode_hash.o isdirectory.o \
|
||||
kernel_version.o last_char_is.o login.o \
|
||||
make_directory.o md5.o mode_string.o mtab_file.o \
|
||||
obscure.o parse_mode.o parse_number.o perror_msg.o \
|
||||
perror_msg_and_die.o get_console.o \
|
||||
process_escape_sequence.o procps.o \
|
||||
recursive_action.o remove_file.o \
|
||||
restricted_shell.o run_parts.o run_shell.o safe_read.o safe_write.o \
|
||||
safe_strncpy.o setup_environment.o sha1.o simplify_path.o \
|
||||
trim.o u_signal_names.o vdprintf.o verror_msg.o \
|
||||
vherror_msg.o vperror_msg.o wfopen.o xconnect.o xgetcwd.o \
|
||||
xgethostbyname.o xgethostbyname2.o xreadlink.o xgetlarg.o \
|
||||
fclose_nonstdin.o fflush_stdout_and_exit.o \
|
||||
getopt32.o default_error_retval.o wfopen_input.o speed_table.o \
|
||||
perror_nomsg_and_die.o perror_nomsg.o skip_whitespace.o bb_askpass.o \
|
||||
warn_ignoring_args.o concat_subpath_file.o vfork_daemon_rexec.o \
|
||||
bb_do_delay.o uuencode.o info_msg.o vinfo_msg.o
|
||||
|
||||
# conditionally compiled objects:
|
||||
lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o
|
||||
lib-$(CONFIG_LOSETUP) += loop.o
|
||||
lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o
|
||||
lib-$(CONFIG_PASSWD) += pw_encrypt.o
|
||||
lib-$(CONFIG_SULOGIN) += pw_encrypt.o
|
||||
lib-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) += pw_encrypt.o
|
||||
lib-$(CONFIG_VLOCK) += correct_password.o
|
||||
lib-$(CONFIG_SU) += correct_password.o
|
||||
lib-$(CONFIG_LOGIN) += correct_password.o
|
||||
lib-$(CONFIG_DF) += find_mount_point.o
|
||||
lib-$(CONFIG_EJECT) += find_mount_point.o
|
||||
|
||||
# We shouldn't build xregcomp.c if we don't need it - this ensures we don't
|
||||
# require regex.h to be in the include dir even if we don't need it thereby
|
||||
# allowing us to build busybox even if uclibc regex support is disabled.
|
||||
|
||||
lib-$(CONFIG_AWK) += xregcomp.o
|
||||
lib-$(CONFIG_SED) += xregcomp.o
|
||||
lib-$(CONFIG_LESS) += xregcomp.o
|
||||
lib-$(CONFIG_DEVFSD) += xregcomp.o
|
||||
|
||||
lib-y += messages.o
|
||||
lib-y += xfuncs.o
|
||||
lib-y += printf.o
|
||||
lib-y += xgetularg.o
|
||||
lib-y += safe_strtol.o
|
||||
lib-y += bb_pwd.o
|
||||
lib-y += llist.o
|
@ -1,29 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/libbb
|
||||
LIBBB_DIR:=./
|
||||
|
||||
# Ensure "all" is still the default target when make is run by itself in
|
||||
# libbb, even if the files we include define rules for targets.
|
||||
|
||||
all:
|
||||
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,155 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef $(LIBBB_DIR)
|
||||
LIBBB_DIR:=$(top_builddir)/libbb
|
||||
endif
|
||||
srcdir=$(top_srcdir)/libbb
|
||||
|
||||
LIBBB-n:=
|
||||
LIBBB-y:= \
|
||||
ask_confirmation.c change_identity.c chomp.c \
|
||||
compare_string_array.c concat_path_file.c copy_file.c copyfd.c \
|
||||
crc32.c create_icmp_socket.c create_icmp6_socket.c \
|
||||
device_open.c dump.c error_msg.c error_msg_and_die.c \
|
||||
find_pid_by_name.c find_root_device.c fgets_str.c full_read.c \
|
||||
full_write.c get_last_path_component.c get_line_from_file.c \
|
||||
herror_msg.c herror_msg_and_die.c \
|
||||
human_readable.c inet_common.c inode_hash.c isdirectory.c \
|
||||
kernel_version.c last_char_is.c login.c \
|
||||
make_directory.c md5.c mode_string.c mtab_file.c \
|
||||
obscure.c parse_mode.c parse_number.c perror_msg.c \
|
||||
perror_msg_and_die.c get_console.c process_escape_sequence.c procps.c \
|
||||
recursive_action.c remove_file.c info_msg.c vinfo_msg.c \
|
||||
restricted_shell.c run_parts.c run_shell.c safe_read.c safe_write.c \
|
||||
safe_strncpy.c setup_environment.c sha1.c simplify_path.c \
|
||||
trim.c u_signal_names.c vdprintf.c verror_msg.c \
|
||||
vherror_msg.c vperror_msg.c wfopen.c xconnect.c xgetcwd.c \
|
||||
xgethostbyname.c xgethostbyname2.c xreadlink.c xgetlarg.c \
|
||||
fclose_nonstdin.c fflush_stdout_and_exit.c \
|
||||
getopt32.c default_error_retval.c wfopen_input.c speed_table.c \
|
||||
perror_nomsg_and_die.c perror_nomsg.c skip_whitespace.c bb_askpass.c \
|
||||
warn_ignoring_args.c concat_subpath_file.c vfork_daemon_rexec.c \
|
||||
bb_do_delay.c
|
||||
|
||||
# conditionally compiled objects:
|
||||
LIBBB-$(CONFIG_FEATURE_MOUNT_LOOP)+= loop.c
|
||||
LIBBB-$(CONFIG_LOSETUP)+= loop.c
|
||||
LIBBB-$(CONFIG_FEATURE_MTAB_SUPPORT)+= mtab.c
|
||||
LIBBB-$(CONFIG_PASSWD)+= pw_encrypt.c
|
||||
LIBBB-$(CONFIG_SULOGIN)+= pw_encrypt.c
|
||||
LIBBB-$(CONFIG_FEATURE_HTTPD_AUTH_MD5)+= pw_encrypt.c
|
||||
LIBBB-$(CONFIG_VLOCK)+= correct_password.c
|
||||
LIBBB-$(CONFIG_SU)+= correct_password.c
|
||||
LIBBB-$(CONFIG_LOGIN)+= correct_password.c
|
||||
LIBBB-$(CONFIG_DF)+= find_mount_point.c
|
||||
LIBBB-$(CONFIG_EJECT)+= find_mount_point.c
|
||||
LIBBB-$(CONFIG_UUENCODE)+= uuencode.c
|
||||
LIBBB-$(CONFIG_WGET)+= uuencode.c
|
||||
|
||||
# We shouldn't build xregcomp.c if we don't need it - this ensures we don't
|
||||
# require regex.h to be in the include dir even if we don't need it thereby
|
||||
# allowing us to build busybox even if uclibc regex support is disabled.
|
||||
|
||||
regex-y:=
|
||||
regex-$(CONFIG_AWK) += xregcomp.c
|
||||
regex-$(CONFIG_SED) += xregcomp.c
|
||||
regex-$(CONFIG_LESS) += xregcomp.c
|
||||
regex-$(CONFIG_DEVFSD) += xregcomp.c
|
||||
regex-$(CONFIG_MDEV) += xregcomp.c
|
||||
regex-$(CONFIG_GREP) += xregcomp.c
|
||||
|
||||
# Sort has the happy side efect of returning a unique list
|
||||
LIBBB-y += $(sort $(regex-y))
|
||||
|
||||
LIBBB-y:=$(patsubst %,$(srcdir)/%,$(LIBBB-y))
|
||||
|
||||
get-file-subparts = $(addsuffix .o,$(shell sed -n -e "s/^\#ifdef L_//p" ${1}))
|
||||
|
||||
# 1:N objects
|
||||
LIBBB_MSRC0:=$(srcdir)/messages.c
|
||||
LIBBB_MOBJ0:=$(call get-file-subparts, ${LIBBB_MSRC0})
|
||||
LIBBB_MOBJ0:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ0))
|
||||
$(LIBBB_MOBJ0):$(LIBBB_MSRC0)
|
||||
$(compile.c) -DL_$(notdir $*)
|
||||
|
||||
LIBBB_MSRC1:=$(srcdir)/xfuncs.c
|
||||
LIBBB_MOBJ1:=$(call get-file-subparts, ${LIBBB_MSRC1})
|
||||
LIBBB_MOBJ1:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ1))
|
||||
$(LIBBB_MOBJ1):$(LIBBB_MSRC1)
|
||||
$(compile.c) -DL_$(notdir $*)
|
||||
|
||||
LIBBB_MSRC2:=$(srcdir)/printf.c
|
||||
LIBBB_MOBJ2:=$(call get-file-subparts, ${LIBBB_MSRC2})
|
||||
LIBBB_MOBJ2:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ2))
|
||||
$(LIBBB_MOBJ2):$(LIBBB_MSRC2)
|
||||
$(compile.c) -DL_$(notdir $*)
|
||||
|
||||
LIBBB_MSRC3:=$(srcdir)/xgetularg.c
|
||||
LIBBB_MOBJ3:=$(call get-file-subparts, ${LIBBB_MSRC3})
|
||||
LIBBB_MOBJ3:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ3))
|
||||
$(LIBBB_MOBJ3):$(LIBBB_MSRC3)
|
||||
$(compile.c) -DL_$(notdir $*)
|
||||
|
||||
LIBBB_MSRC4:=$(srcdir)/safe_strtol.c
|
||||
LIBBB_MOBJ4:=$(call get-file-subparts, ${LIBBB_MSRC4})
|
||||
LIBBB_MOBJ4:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ4))
|
||||
$(LIBBB_MOBJ4):$(LIBBB_MSRC4)
|
||||
$(compile.c) -DL_$(notdir $*)
|
||||
|
||||
LIBBB_MSRC5:=$(srcdir)/bb_pwd.c
|
||||
LIBBB_MOBJ5:=$(call get-file-subparts, ${LIBBB_MSRC5})
|
||||
LIBBB_MOBJ5:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ5))
|
||||
$(LIBBB_MOBJ5):$(LIBBB_MSRC5)
|
||||
$(compile.c) -DL_$(notdir $*)
|
||||
|
||||
LIBBB_MSRC6:=$(srcdir)/llist.c
|
||||
LIBBB_MOBJ6:=$(call get-file-subparts, ${LIBBB_MSRC6})
|
||||
LIBBB_MOBJ6:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ6))
|
||||
$(LIBBB_MOBJ6):$(LIBBB_MSRC6)
|
||||
$(compile.c) -DL_$(notdir $*)
|
||||
|
||||
# We need the names of the object files built from MSRC for the L_ defines
|
||||
LIBBB_ALL_MOBJ:=$(LIBBB_MOBJ0) $(LIBBB_MOBJ1) $(LIBBB_MOBJ2) $(LIBBB_MOBJ3) \
|
||||
$(LIBBB_MOBJ4) $(LIBBB_MOBJ5) $(LIBBB_MOBJ6)
|
||||
|
||||
LIBBB_ALL_MSRC:=$(LIBBB_MSRC0) $(LIBBB_MSRC1) $(LIBBB_MSRC2) $(LIBBB_MSRC3) \
|
||||
$(LIBBB_MSRC4) $(LIBBB_MSRC5) $(LIBBB_MSRC6)
|
||||
|
||||
LIBBB-y:=$(sort $(LIBBB-y) $(LIBBB_ALL_MSRC))
|
||||
|
||||
LIBBB_AR:=$(LIBBB_DIR)/libbb.a
|
||||
libraries-y+=$(LIBBB_AR)
|
||||
|
||||
needcrypt-y:=
|
||||
ifneq ($(filter $(srcdir)/pw_encrypt.c,$(LIBBB-y)),)
|
||||
needcrypt-y:=y
|
||||
else
|
||||
ifneq ($(filter $(srcdir)/correct_password.c,$(LIBBB-y)),)
|
||||
needcrypt-y:=y
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(needcrypt-y),y)
|
||||
LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES))
|
||||
endif
|
||||
|
||||
# all 1:1 objects
|
||||
LIBBB_OBJS:=$(patsubst $(srcdir)/%.c,$(LIBBB_DIR)/%.o, $(LIBBB-y))
|
||||
$(LIBBB_DIR)/%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
||||
|
||||
LIBBB_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
LIBRARY_SRC-y+=$(LIBBB-y)
|
||||
LIBRARY_SRC-a+=$(LIBBB_SRC-a)
|
||||
|
||||
# all defines needed for 1:N objects
|
||||
LIBBB_DEFINE-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBBB_ALL_MOBJ))))
|
||||
LIBRARY_DEFINE-y+=$(LIBBB_DEFINE-y)
|
||||
LIBRARY_DEFINE-a+=$(LIBBB_DEFINE-y)
|
||||
|
||||
$(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_ALL_MOBJ)
|
||||
$(do_ar)
|
@ -7,8 +7,11 @@
|
||||
* Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "libbb.h"
|
||||
|
||||
#ifdef L_bb_getgrgid
|
||||
/* Hacked by Tito Ragusa (c) 2004 <farmatito@tiscali.it> to make it more
|
||||
* flexible :
|
||||
*
|
||||
@ -26,9 +29,6 @@
|
||||
* the program exits.
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "grp_.h"
|
||||
|
||||
/* gets a groupname given a gid */
|
||||
char * bb_getgrgid(char *group, long gid, int bufsize)
|
||||
{
|
||||
@ -37,15 +37,6 @@ char * bb_getgrgid(char *group, long gid, int bufsize)
|
||||
return bb_getug(group, (mygroup) ?
|
||||
mygroup->gr_name : (char *)mygroup, gid, bufsize, 'g');
|
||||
}
|
||||
#endif /* L_bb_getgrgid */
|
||||
|
||||
#ifdef L_bb_xgetgrnam
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "libbb.h"
|
||||
#include "pwd_.h"
|
||||
#include "grp_.h"
|
||||
|
||||
|
||||
/* returns a gid given a group name */
|
||||
long bb_xgetgrnam(const char *name)
|
||||
@ -58,15 +49,6 @@ long bb_xgetgrnam(const char *name)
|
||||
|
||||
return (mygroup->gr_gid);
|
||||
}
|
||||
#endif /* L_bb_xgetgrnam */
|
||||
|
||||
#ifdef L_bb_xgetpwnam
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "libbb.h"
|
||||
#include "pwd_.h"
|
||||
#include "grp_.h"
|
||||
|
||||
|
||||
/* returns a uid given a username */
|
||||
long bb_xgetpwnam(const char *name)
|
||||
@ -79,9 +61,7 @@ long bb_xgetpwnam(const char *name)
|
||||
|
||||
return myuser->pw_uid;
|
||||
}
|
||||
#endif /* L_bb_xgetpwnam */
|
||||
|
||||
#ifdef L_bb_getpwuid
|
||||
/* Hacked by Tito Ragusa (c) 2004 <farmatito@tiscali.it> to make it more
|
||||
* flexible :
|
||||
*
|
||||
@ -99,9 +79,6 @@ long bb_xgetpwnam(const char *name)
|
||||
* the program exits.
|
||||
*/
|
||||
|
||||
#include "libbb.h"
|
||||
#include "pwd_.h"
|
||||
|
||||
/* gets a username given a uid */
|
||||
char * bb_getpwuid(char *name, long uid, int bufsize)
|
||||
{
|
||||
@ -110,9 +87,7 @@ char * bb_getpwuid(char *name, long uid, int bufsize)
|
||||
return bb_getug(name, (myuser) ?
|
||||
myuser->pw_name : (char *)myuser , uid, bufsize, 'u');
|
||||
}
|
||||
#endif /* L_bb_getpwuid */
|
||||
|
||||
#ifdef L_bb_getug
|
||||
/*
|
||||
* if bufsize is > 0 char *buffer can not be set to NULL.
|
||||
* If idname is not NULL it is written on the static
|
||||
@ -127,11 +102,6 @@ char * bb_getpwuid(char *name, long uid, int bufsize)
|
||||
* else an error message is printed and the program exits.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include "libbb.h"
|
||||
|
||||
|
||||
/* internal function for bb_getpwuid and bb_getgrgid */
|
||||
char * bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix)
|
||||
{
|
||||
@ -146,13 +116,6 @@ char * bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix)
|
||||
}
|
||||
return idname;
|
||||
}
|
||||
#endif /* L_bb_getug */
|
||||
|
||||
|
||||
#ifdef L_get_ug_id
|
||||
/* indirect dispatcher for pwd helpers. */
|
||||
#include <stdlib.h>
|
||||
#include "libbb.h"
|
||||
|
||||
unsigned long get_ug_id(const char *s,
|
||||
long (*__bb_getxxnam)(const char *))
|
||||
@ -167,4 +130,3 @@ unsigned long get_ug_id(const char *s,
|
||||
|
||||
return r;
|
||||
}
|
||||
#endif /* L_get_ug_id */
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include <stdlib.h>
|
||||
#include "libbb.h"
|
||||
|
||||
#ifdef L_llist_add_to
|
||||
/* Add data to the start of the linked list. */
|
||||
void llist_add_to(llist_t **old_head, void *data)
|
||||
{
|
||||
@ -22,9 +21,7 @@ void llist_add_to(llist_t **old_head, void *data)
|
||||
new_head->link = *old_head;
|
||||
*old_head = new_head;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_llist_add_to_end
|
||||
/* Add data to the end of the linked list. */
|
||||
void llist_add_to_end(llist_t **list_head, void *data)
|
||||
{
|
||||
@ -39,9 +36,7 @@ void llist_add_to_end(llist_t **list_head, void *data)
|
||||
tail->link = new_item;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_llist_pop
|
||||
/* Remove first element from the list and return it */
|
||||
void *llist_pop(llist_t **head)
|
||||
{
|
||||
@ -57,9 +52,7 @@ void *llist_pop(llist_t **head)
|
||||
|
||||
return data;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_llist_free
|
||||
/* Recursively free all elements in the linked list. If freeit != NULL
|
||||
* call it on each datum in the list */
|
||||
void llist_free(llist_t *elm, void (*freeit)(void *data))
|
||||
@ -69,4 +62,3 @@ void llist_free(llist_t *elm, void (*freeit)(void *data))
|
||||
if (freeit) freeit(data);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
105
libbb/messages.c
105
libbb/messages.c
@ -7,7 +7,6 @@
|
||||
|
||||
#include "libbb.h"
|
||||
|
||||
#ifdef L_full_version
|
||||
#ifndef BB_EXTRA_VERSION
|
||||
#define BANNER "BusyBox v" BB_VER " (" BB_BT ")"
|
||||
#else
|
||||
@ -15,92 +14,30 @@
|
||||
#endif
|
||||
const char BB_BANNER[] = BANNER;
|
||||
const char bb_msg_full_version[] = BANNER " multi-call binary";
|
||||
#endif
|
||||
|
||||
#ifdef L_memory_exhausted
|
||||
const char bb_msg_memory_exhausted[] = "memory exhausted";
|
||||
#endif
|
||||
#ifdef L_invalid_date
|
||||
const char bb_msg_invalid_date[] = "invalid date `%s'";
|
||||
#endif
|
||||
#ifdef L_io_error
|
||||
const char bb_msg_io_error[] = "%s: input/output error -- %m";
|
||||
#endif
|
||||
#ifdef L_write_error
|
||||
const char bb_msg_write_error[] = "write error";
|
||||
#endif
|
||||
#ifdef L_read_error
|
||||
const char bb_msg_read_error[] = "read error";
|
||||
#endif
|
||||
#ifdef L_name_longer_than_foo
|
||||
const char bb_msg_name_longer_than_foo[] = "names longer than %d chars not supported";
|
||||
#endif
|
||||
#ifdef L_unknown
|
||||
const char bb_msg_unknown[] = "(unknown)";
|
||||
#endif
|
||||
#ifdef L_can_not_create_raw_socket
|
||||
const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket";
|
||||
#endif
|
||||
#ifdef L_perm_denied_are_you_root
|
||||
const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)";
|
||||
#endif
|
||||
#ifdef L_msg_requires_arg
|
||||
const char bb_msg_requires_arg[] = "%s requires an argument";
|
||||
#endif
|
||||
#ifdef L_msg_invalid_arg
|
||||
const char bb_msg_invalid_arg[] = "invalid argument `%s' to `%s'";
|
||||
#endif
|
||||
#ifdef L_msg_standard_input
|
||||
const char bb_msg_standard_input[] = "standard input";
|
||||
#endif
|
||||
#ifdef L_msg_standard_output
|
||||
const char bb_msg_standard_output[] = "standard output";
|
||||
#endif
|
||||
const char bb_msg_memory_exhausted[] = "memory exhausted";
|
||||
const char bb_msg_invalid_date[] = "invalid date '%s'";
|
||||
const char bb_msg_write_error[] = "write error";
|
||||
const char bb_msg_read_error[] = "read error";
|
||||
const char bb_msg_name_longer_than_foo[] = "names longer than %d chars not supported";
|
||||
const char bb_msg_unknown[] = "(unknown)";
|
||||
const char bb_msg_can_not_create_raw_socket[] = "can't create raw socket";
|
||||
const char bb_msg_perm_denied_are_you_root[] = "permission denied. (are you root?)";
|
||||
const char bb_msg_requires_arg[] = "%s requires an argument";
|
||||
const char bb_msg_invalid_arg[] = "invalid argument '%s' to '%s'";
|
||||
const char bb_msg_standard_input[] = "standard input";
|
||||
const char bb_msg_standard_output[] = "standard output";
|
||||
|
||||
#ifdef L_passwd_file
|
||||
#define PASSWD_FILE "/etc/passwd"
|
||||
const char bb_path_passwd_file[] = PASSWD_FILE;
|
||||
#endif
|
||||
|
||||
#ifdef L_shadow_file
|
||||
#define SHADOW_FILE "/etc/shadow"
|
||||
const char bb_path_shadow_file[] = SHADOW_FILE;
|
||||
#endif
|
||||
|
||||
#ifdef L_group_file
|
||||
#define GROUP_FILE "/etc/group"
|
||||
const char bb_path_group_file[] = GROUP_FILE;
|
||||
#endif
|
||||
|
||||
#ifdef L_gshadow_file
|
||||
#define GSHADOW_FILE "/etc/gshadow"
|
||||
const char bb_path_gshadow_file[] = GSHADOW_FILE;
|
||||
#endif
|
||||
|
||||
#ifdef L_nologin_file
|
||||
#define NOLOGIN_FILE "/etc/nologin"
|
||||
const char bb_path_nologin_file[] = NOLOGIN_FILE;
|
||||
#endif
|
||||
|
||||
#ifdef L_securetty_file
|
||||
#define SECURETTY_FILE "/etc/securetty"
|
||||
const char bb_path_securetty_file[] = SECURETTY_FILE;
|
||||
#endif
|
||||
|
||||
#ifdef L_motd_file
|
||||
#define MOTD_FILE "/etc/motd"
|
||||
const char bb_path_motd_file[] = MOTD_FILE;
|
||||
#endif
|
||||
|
||||
#ifdef L_shell_file
|
||||
const char bb_path_passwd_file[] = "/etc/passwd";
|
||||
const char bb_path_shadow_file[] = "/etc/shadow";
|
||||
const char bb_path_group_file[] = "/etc/group";
|
||||
const char bb_path_gshadow_file[] = "/etc/gshadow";
|
||||
const char bb_path_nologin_file[] = "/etc/nologin";
|
||||
const char bb_path_securetty_file[] = "/etc/securetty";
|
||||
const char bb_path_motd_file[] = "/etc/motd";
|
||||
const char bb_default_login_shell[] = LIBBB_DEFAULT_LOGIN_SHELL;
|
||||
#endif
|
||||
|
||||
#ifdef L_bb_dev_null
|
||||
const char bb_dev_null[] = "/dev/null";
|
||||
#endif
|
||||
|
||||
#ifdef L_bb_path_wtmp_file
|
||||
#include <utmp.h>
|
||||
/* This is usually something like "/var/adm/wtmp" or "/var/log/wtmp" */
|
||||
const char bb_path_wtmp_file[] =
|
||||
@ -111,9 +48,5 @@ WTMP_FILE;
|
||||
#else
|
||||
# error unknown path to wtmp file
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef L_bb_common_bufsiz1
|
||||
char bb_common_bufsiz1[BUFSIZ+1];
|
||||
#endif
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <errno.h>
|
||||
#include "libbb.h"
|
||||
|
||||
#ifdef L_bb_vfprintf
|
||||
int bb_vfprintf(FILE * __restrict stream,
|
||||
const char * __restrict format,
|
||||
va_list arg)
|
||||
@ -65,16 +64,12 @@ int bb_vfprintf(FILE * __restrict stream,
|
||||
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_bb_vprintf
|
||||
int bb_vprintf(const char * __restrict format, va_list arg)
|
||||
{
|
||||
return bb_vfprintf(stdout, format, arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_bb_fprintf
|
||||
int bb_fprintf(FILE * __restrict stream,
|
||||
const char * __restrict format, ...)
|
||||
{
|
||||
@ -87,9 +82,7 @@ int bb_fprintf(FILE * __restrict stream,
|
||||
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_bb_printf
|
||||
int bb_printf(const char * __restrict format, ...)
|
||||
{
|
||||
va_list arg;
|
||||
@ -101,4 +94,3 @@ int bb_printf(const char * __restrict format, ...)
|
||||
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <assert.h>
|
||||
#include "libbb.h"
|
||||
|
||||
#ifdef L_safe_strtoi
|
||||
int safe_strtoi(char *arg, int* value)
|
||||
{
|
||||
int error;
|
||||
@ -21,9 +20,7 @@ int safe_strtoi(char *arg, int* value)
|
||||
*value = (int) lvalue;
|
||||
return error;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_safe_strtod
|
||||
int safe_strtod(char *arg, double* value)
|
||||
{
|
||||
char *endptr;
|
||||
@ -38,9 +35,7 @@ int safe_strtod(char *arg, double* value)
|
||||
errno = errno_save;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_safe_strtol
|
||||
int safe_strtol(char *arg, long* value)
|
||||
{
|
||||
char *endptr;
|
||||
@ -55,9 +50,7 @@ int safe_strtol(char *arg, long* value)
|
||||
errno = errno_save;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_safe_strtoul
|
||||
int safe_strtoul(char *arg, unsigned long* value)
|
||||
{
|
||||
char *endptr;
|
||||
@ -72,9 +65,7 @@ int safe_strtoul(char *arg, unsigned long* value)
|
||||
errno = errno_save;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_safe_strtoll
|
||||
int safe_strtoll(char *arg, long long* value)
|
||||
{
|
||||
char *endptr;
|
||||
@ -89,9 +80,7 @@ int safe_strtoll(char *arg, long long* value)
|
||||
errno = errno_save;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_safe_strtoull
|
||||
int safe_strtoull(char *arg, unsigned long long* value)
|
||||
{
|
||||
char *endptr;
|
||||
@ -106,5 +95,3 @@ int safe_strtoull(char *arg, unsigned long long* value)
|
||||
errno = errno_save;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
* Since dmalloc's prototypes overwrite the impls here as they are
|
||||
* included after these prototypes in libbb.h, all is well.
|
||||
*/
|
||||
#ifdef L_xmalloc
|
||||
// Die if we can't allocate size bytes of memory.
|
||||
void *xmalloc(size_t size)
|
||||
{
|
||||
@ -29,9 +28,7 @@ void *xmalloc(size_t size)
|
||||
bb_error_msg_and_die(bb_msg_memory_exhausted);
|
||||
return ptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xrealloc
|
||||
// Die if we can't resize previously allocated memory. (This returns a pointer
|
||||
// to the new memory, which may or may not be the same as the old memory.
|
||||
// It'll copy the contents to a new chunk and free the old one if necessary.)
|
||||
@ -42,11 +39,8 @@ void *xrealloc(void *ptr, size_t size)
|
||||
bb_error_msg_and_die(bb_msg_memory_exhausted);
|
||||
return ptr;
|
||||
}
|
||||
#endif
|
||||
#endif /* DMALLOC */
|
||||
|
||||
|
||||
#ifdef L_xzalloc
|
||||
// Die if we can't allocate and zero size bytes of memory.
|
||||
void *xzalloc(size_t size)
|
||||
{
|
||||
@ -54,9 +48,7 @@ void *xzalloc(size_t size)
|
||||
memset(ptr, 0, size);
|
||||
return ptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xstrdup
|
||||
// Die if we can't copy a string to freshly allocated memory.
|
||||
char * xstrdup(const char *s)
|
||||
{
|
||||
@ -72,9 +64,7 @@ char * xstrdup(const char *s)
|
||||
|
||||
return t;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xstrndup
|
||||
// Die if we can't allocate n+1 bytes (space for the null terminator) and copy
|
||||
// the (possibly truncated to length n) string into it.
|
||||
char * xstrndup(const char *s, int n)
|
||||
@ -88,9 +78,7 @@ char * xstrndup(const char *s, int n)
|
||||
|
||||
return safe_strncpy(t,s,n);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xfopen
|
||||
// Die if we can't open a file and return a FILE * to it.
|
||||
// Notice we haven't got xfread(), This is for use with fscanf() and friends.
|
||||
FILE *xfopen(const char *path, const char *mode)
|
||||
@ -100,9 +88,7 @@ FILE *xfopen(const char *path, const char *mode)
|
||||
bb_perror_msg_and_die("%s", path);
|
||||
return fp;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xopen
|
||||
// Die if we can't open an existing file and return an fd.
|
||||
int xopen(const char *pathname, int flags)
|
||||
{
|
||||
@ -111,9 +97,7 @@ int xopen(const char *pathname, int flags)
|
||||
|
||||
return xopen3(pathname, flags, 0777);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xopen3
|
||||
// Die if we can't open a new file and return an fd.
|
||||
int xopen3(const char *pathname, int flags, int mode)
|
||||
{
|
||||
@ -125,9 +109,7 @@ int xopen3(const char *pathname, int flags, int mode)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xread
|
||||
// Die with an error message if we can't read the entire buffer.
|
||||
void xread(int fd, void *buf, size_t count)
|
||||
{
|
||||
@ -140,9 +122,7 @@ void xread(int fd, void *buf, size_t count)
|
||||
buf = ((char *) buf) + size;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xwrite
|
||||
// Die with an error message if we can't write the entire buffer.
|
||||
void xwrite(int fd, void *buf, size_t count)
|
||||
{
|
||||
@ -155,17 +135,13 @@ void xwrite(int fd, void *buf, size_t count)
|
||||
buf = ((char *) buf) + size;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xlseek
|
||||
// Die with an error message if we can't lseek to the right spot.
|
||||
void xlseek(int fd, off_t offset, int whence)
|
||||
{
|
||||
if (offset != lseek(fd, offset, whence)) bb_error_msg_and_die("lseek");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xread_char
|
||||
// Die with an error message if we can't read one character.
|
||||
unsigned char xread_char(int fd)
|
||||
{
|
||||
@ -175,9 +151,7 @@ unsigned char xread_char(int fd)
|
||||
|
||||
return(tmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xferror
|
||||
// Die with supplied error message if this FILE * has ferror set.
|
||||
void xferror(FILE *fp, const char *fn)
|
||||
{
|
||||
@ -185,17 +159,13 @@ void xferror(FILE *fp, const char *fn)
|
||||
bb_error_msg_and_die("%s", fn);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xferror_stdout
|
||||
// Die with an error message if stdout has ferror set.
|
||||
void xferror_stdout(void)
|
||||
{
|
||||
xferror(stdout, bb_msg_standard_output);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xfflush_stdout
|
||||
// Die with an error message if we have trouble flushing stdout.
|
||||
void xfflush_stdout(void)
|
||||
{
|
||||
@ -203,9 +173,7 @@ void xfflush_stdout(void)
|
||||
bb_perror_msg_and_die(bb_msg_standard_output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_spawn
|
||||
// This does a fork/exec in one call, using vfork(). Return PID of new child,
|
||||
// -1 for failure. Runs argv[0], searching path if that has no / in it.
|
||||
pid_t spawn(char **argv)
|
||||
@ -230,9 +198,7 @@ pid_t spawn(char **argv)
|
||||
}
|
||||
return failed ? failed : pid;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xspawn
|
||||
// Die with an error message if we can't spawn a child process.
|
||||
pid_t xspawn(char **argv)
|
||||
{
|
||||
@ -240,9 +206,7 @@ pid_t xspawn(char **argv)
|
||||
if (pid < 0) bb_perror_msg_and_die("%s", *argv);
|
||||
return pid;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_wait4
|
||||
// Wait for the specified child PID to exit, returning child's error return.
|
||||
int wait4pid(int pid)
|
||||
{
|
||||
@ -253,17 +217,13 @@ int wait4pid(int pid)
|
||||
if (WIFSIGNALED(status)) return WTERMSIG(status);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xsetenv
|
||||
void xsetenv(const char *key, const char *value)
|
||||
{
|
||||
if(setenv(key, value, 1))
|
||||
bb_error_msg_and_die(bb_msg_memory_exhausted);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_itoa
|
||||
// Convert unsigned integer to ascii, writing into supplied buffer. A
|
||||
// truncated result is always null terminated (unless buflen is 0), and
|
||||
// contains the first few digits of the result ala strncpy.
|
||||
@ -319,9 +279,7 @@ char *itoa(int n)
|
||||
|
||||
return local_buf;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_setuid
|
||||
// Die with an error message if we can't set gid. (Because resource limits may
|
||||
// limit this user to a given number of processes, and if that fills up the
|
||||
// setgid() will fail and we'll _still_be_root_, which is bad.)
|
||||
@ -335,9 +293,7 @@ void xsetuid(uid_t uid)
|
||||
{
|
||||
if (setuid(uid)) bb_error_msg_and_die("setuid");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_fdlength
|
||||
// Return how long the file at fd is, if there's any way to determine it.
|
||||
off_t fdlength(int fd)
|
||||
{
|
||||
@ -375,9 +331,7 @@ off_t fdlength(int fd)
|
||||
|
||||
return pos + 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xasprintf
|
||||
// Die with an error message if we can't malloc() enough space and do an
|
||||
// sprintf() into that space.
|
||||
char *xasprintf(const char *format, ...)
|
||||
@ -405,9 +359,7 @@ char *xasprintf(const char *format, ...)
|
||||
if (r < 0) bb_error_msg_and_die(bb_msg_memory_exhausted);
|
||||
return string_ptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xprint_and_close_file
|
||||
// Die with an error message if we can't copy an entire FILE * to stdout, then
|
||||
// close that file.
|
||||
void xprint_and_close_file(FILE *file)
|
||||
@ -418,18 +370,14 @@ void xprint_and_close_file(FILE *file)
|
||||
|
||||
fclose(file);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xchdir
|
||||
// Die if we can't chdir to a new path.
|
||||
void xchdir(const char *path)
|
||||
{
|
||||
if (chdir(path))
|
||||
bb_perror_msg_and_die("chdir(%s)", path);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_warn_opendir
|
||||
// Print a warning message if opendir() fails, but don't die.
|
||||
DIR *warn_opendir(const char *path)
|
||||
{
|
||||
@ -441,9 +389,7 @@ DIR *warn_opendir(const char *path)
|
||||
}
|
||||
return dp;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xopendir
|
||||
// Die with an error message if opendir() fails.
|
||||
DIR *xopendir(const char *path)
|
||||
{
|
||||
@ -453,9 +399,7 @@ DIR *xopendir(const char *path)
|
||||
bb_perror_msg_and_die("unable to open `%s'", path);
|
||||
return dp;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xdaemon
|
||||
#ifndef BB_NOMMU
|
||||
// Die with an error message if we can't daemonize.
|
||||
void xdaemon(int nochdir, int noclose)
|
||||
@ -463,9 +407,7 @@ void xdaemon(int nochdir, int noclose)
|
||||
if (daemon(nochdir, noclose)) bb_perror_msg_and_die("daemon");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef L_xsocket
|
||||
// Die with an error message if we can't open a new socket.
|
||||
int xsocket(int domain, int type, int protocol)
|
||||
{
|
||||
@ -475,34 +417,26 @@ int xsocket(int domain, int type, int protocol)
|
||||
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xbind
|
||||
// Die with an error message if we can't bind a socket to an address.
|
||||
void xbind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen)
|
||||
{
|
||||
if (bind(sockfd, my_addr, addrlen)) bb_perror_msg_and_die("bind");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xlisten
|
||||
// Die with an error message if we can't listen for connections on a socket.
|
||||
void xlisten(int s, int backlog)
|
||||
{
|
||||
if (listen(s, backlog)) bb_perror_msg_and_die("listen");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xstat
|
||||
// xstat() - a stat() which dies on failure with meaningful error message
|
||||
void xstat(char *name, struct stat *stat_buf)
|
||||
{
|
||||
if (stat(name, stat_buf))
|
||||
bb_perror_msg_and_die("can't stat '%s'", name);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_get_terminal_width_height
|
||||
/* It is perfectly ok to pass in a NULL for either width or for
|
||||
* * height, in which case that value will not be set. */
|
||||
int get_terminal_width_height(int fd, int *width, int *height)
|
||||
@ -524,4 +458,3 @@ int get_terminal_width_height(int fd, int *width, int *height)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <assert.h>
|
||||
#include "libbb.h"
|
||||
|
||||
#ifdef L_xgetularg_bnd_sfx
|
||||
unsigned long bb_xgetularg_bnd_sfx(const char *arg, int base,
|
||||
unsigned long lower,
|
||||
unsigned long upper,
|
||||
@ -75,9 +74,7 @@ unsigned long bb_xgetularg_bnd_sfx(const char *arg, int base,
|
||||
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xgetlarg_bnd_sfx
|
||||
long bb_xgetlarg_bnd_sfx(const char *arg, int base,
|
||||
long lower,
|
||||
long upper,
|
||||
@ -104,36 +101,27 @@ long bb_xgetlarg_bnd_sfx(const char *arg, int base,
|
||||
|
||||
return r;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_getlarg10_sfx
|
||||
long bb_xgetlarg10_sfx(const char *arg, const struct suffix_mult *suffixes)
|
||||
{
|
||||
return bb_xgetlarg_bnd_sfx(arg, 10, LONG_MIN, LONG_MAX, suffixes);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xgetularg_bnd
|
||||
unsigned long bb_xgetularg_bnd(const char *arg, int base,
|
||||
unsigned long lower,
|
||||
unsigned long upper)
|
||||
{
|
||||
return bb_xgetularg_bnd_sfx(arg, base, lower, upper, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xgetularg10_bnd
|
||||
unsigned long bb_xgetularg10_bnd(const char *arg,
|
||||
unsigned long lower,
|
||||
unsigned long upper)
|
||||
{
|
||||
return bb_xgetularg_bnd(arg, 10, lower, upper);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef L_xgetularg10
|
||||
unsigned long bb_xgetularg10(const char *arg)
|
||||
{
|
||||
return bb_xgetularg10_bnd(arg, 0, ULONG_MAX);
|
||||
}
|
||||
#endif
|
||||
|
7
libpwdgrp/Kbuild
Normal file
7
libpwdgrp/Kbuild
Normal file
@ -0,0 +1,7 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=pwd_grp.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/libpwgrp
|
||||
LIBPWDGRP_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,51 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
LIBPWDGRP_AR:=libpwdgrp.a
|
||||
ifndef $(LIBPWDGRP_DIR)
|
||||
LIBPWDGRP_DIR:=$(top_builddir)/libpwdgrp
|
||||
endif
|
||||
srcdir=$(top_srcdir)/libpwdgrp
|
||||
|
||||
LIBPWDGRP-obj:=$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR)
|
||||
|
||||
libraries-y+=$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR)
|
||||
|
||||
LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c
|
||||
LIBPWDGRP_MOBJ0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r.o fgetgrent_r.o \
|
||||
fgetpwent.o fgetgrent.o getpwnam_r.o getgrnam_r.o getpwuid_r.o \
|
||||
getgrgid_r.o getpwuid.o getgrgid.o getpwnam.o getgrnam.o getpw.o \
|
||||
getpwent_r.o getgrent_r.o getpwent.o getgrent.o \
|
||||
initgroups.o putpwent.o putgrent.o
|
||||
LIBPWDGRP_MOBJS0=$(patsubst %,$(LIBPWDGRP_DIR)/%, $(LIBPWDGRP_MOBJ0-y))
|
||||
|
||||
LIBPWDGRP_MSRC1:=$(srcdir)/pwd_grp.c
|
||||
LIBPWDGRP_MOBJ1-$(CONFIG_USE_BB_PWD_GRP):= __parsepwent.o __parsegrent.o \
|
||||
__pgsreader.o fgetspent_r.o fgetspent.o sgetspent_r.o getspnam_r.o \
|
||||
getspnam.o getspent_r.o getspent.o sgetspent.o \
|
||||
putspent.o __parsespent.o # getspuid_r.o getspuid.o
|
||||
LIBPWDGRP_MOBJS1=$(patsubst %,$(LIBPWDGRP_DIR)/%, $(LIBPWDGRP_MOBJ1-y))
|
||||
|
||||
LIBPWDGRP_DEFINE0-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBPWDGRP_MOBJS0))))
|
||||
LIBPWDGRP_DEFINE1-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBPWDGRP_MOBJS1))))
|
||||
|
||||
LIBPWDGRP_SRC-y:=$(LIBPWDGRP_MSRC0)
|
||||
|
||||
LIBRARY_SRC-y+=$(LIBPWDGRP_SRC-y)
|
||||
LIBRARY_SRC-a+=$(LIBPWDGRP_SRC-y)
|
||||
|
||||
LIBRARY_DEFINE-y+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)
|
||||
LIBRARY_DEFINE-a+=$(LIBPWDGRP_DEFINE0-y) $(LIBPWDGRP_DEFINE1-y)
|
||||
|
||||
|
||||
$(LIBPWDGRP_DIR)/$(LIBPWDGRP_AR): $(LIBPWDGRP_MOBJS0) $(LIBPWDGRP_MOBJS1)
|
||||
$(do_ar)
|
||||
|
||||
$(LIBPWDGRP_MOBJS0): $(LIBPWDGRP_MSRC0)
|
||||
$(compile.c) -DL_$(notdir $*)
|
||||
|
||||
$(LIBPWDGRP_MOBJS1): $(LIBPWDGRP_MSRC1)
|
||||
$(compile.c) -DL_$(notdir $*)
|
@ -29,8 +29,6 @@
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "shadow_.h"
|
||||
|
||||
#ifndef _PATH_SHADOW
|
||||
#define _PATH_SHADOW "/etc/shadow"
|
||||
#endif
|
||||
@ -57,7 +55,7 @@ extern int __parsegrent(void *gr, char *line);
|
||||
extern int __parsespent(void *sp, char *line);
|
||||
|
||||
extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
|
||||
char *__restrict line_buff, size_t buflen, FILE *f);
|
||||
char *__restrict line_buff, size_t buflen, FILE *f);
|
||||
|
||||
/**********************************************************************/
|
||||
/* For the various fget??ent_r funcs, return
|
||||
@ -75,8 +73,6 @@ extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
#ifdef L_fgetpwent_r
|
||||
|
||||
int fgetpwent_r(FILE *__restrict stream, struct passwd *__restrict resultbuf,
|
||||
char *__restrict buffer, size_t buflen,
|
||||
struct passwd **__restrict result)
|
||||
@ -92,10 +88,6 @@ int fgetpwent_r(FILE *__restrict stream, struct passwd *__restrict resultbuf,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_fgetgrent_r
|
||||
|
||||
int fgetgrent_r(FILE *__restrict stream, struct group *__restrict resultbuf,
|
||||
char *__restrict buffer, size_t buflen,
|
||||
struct group **__restrict result)
|
||||
@ -111,10 +103,6 @@ int fgetgrent_r(FILE *__restrict stream, struct group *__restrict resultbuf,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_fgetspent_r
|
||||
|
||||
int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
|
||||
char *__restrict buffer, size_t buflen,
|
||||
struct spwd **__restrict result)
|
||||
@ -130,13 +118,11 @@ int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
/* For the various fget??ent funcs, return NULL on failure and a
|
||||
* pointer to the appropriate struct (statically allocated) on success.
|
||||
*/
|
||||
/**********************************************************************/
|
||||
#ifdef L_fgetpwent
|
||||
|
||||
struct passwd *fgetpwent(FILE *stream)
|
||||
{
|
||||
@ -148,10 +134,6 @@ struct passwd *fgetpwent(FILE *stream)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_fgetgrent
|
||||
|
||||
struct group *fgetgrent(FILE *stream)
|
||||
{
|
||||
static char buffer[GRP_BUFFER_SIZE];
|
||||
@ -162,10 +144,6 @@ struct group *fgetgrent(FILE *stream)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_fgetspent
|
||||
|
||||
extern int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf,
|
||||
char *__restrict buffer, size_t buflen,
|
||||
struct spwd **__restrict result);
|
||||
@ -179,10 +157,6 @@ struct spwd *fgetspent(FILE *stream)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_sgetspent_r
|
||||
|
||||
int sgetspent_r(const char *string, struct spwd *result_buf,
|
||||
char *buffer, size_t buflen, struct spwd **result)
|
||||
{
|
||||
@ -211,65 +185,53 @@ int sgetspent_r(const char *string, struct spwd *result_buf,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
|
||||
#ifdef GETXXKEY_R_FUNC
|
||||
#error GETXXKEY_R_FUNC is already defined!
|
||||
#endif
|
||||
|
||||
#ifdef L_getpwnam_r
|
||||
#define GETXXKEY_R_FUNC getpwnam_r
|
||||
#define GETXXKEY_R_FUNC getpwnam_R
|
||||
#define GETXXKEY_R_PARSER __parsepwent
|
||||
#define GETXXKEY_R_ENTTYPE struct passwd
|
||||
#define GETXXKEY_R_TEST(ENT) (!strcmp((ENT)->pw_name, key))
|
||||
#define DO_GETXXKEY_R_KEYTYPE const char *__restrict
|
||||
#define DO_GETXXKEY_R_PATHNAME _PATH_PASSWD
|
||||
#include "pwd_grp_internal.c"
|
||||
#endif
|
||||
|
||||
#ifdef L_getgrnam_r
|
||||
#define GETXXKEY_R_FUNC getgrnam_r
|
||||
#define GETXXKEY_R_FUNC getgrnam_R
|
||||
#define GETXXKEY_R_PARSER __parsegrent
|
||||
#define GETXXKEY_R_ENTTYPE struct group
|
||||
#define GETXXKEY_R_TEST(ENT) (!strcmp((ENT)->gr_name, key))
|
||||
#define DO_GETXXKEY_R_KEYTYPE const char *__restrict
|
||||
#define DO_GETXXKEY_R_PATHNAME _PATH_GROUP
|
||||
#include "pwd_grp_internal.c"
|
||||
#endif
|
||||
|
||||
#ifdef L_getspnam_r
|
||||
#define GETXXKEY_R_FUNC getspnam_r
|
||||
#define GETXXKEY_R_FUNC getspnam_R
|
||||
#define GETXXKEY_R_PARSER __parsespent
|
||||
#define GETXXKEY_R_ENTTYPE struct spwd
|
||||
#define GETXXKEY_R_TEST(ENT) (!strcmp((ENT)->sp_namp, key))
|
||||
#define DO_GETXXKEY_R_KEYTYPE const char *__restrict
|
||||
#define DO_GETXXKEY_R_PATHNAME _PATH_SHADOW
|
||||
#include "pwd_grp_internal.c"
|
||||
#endif
|
||||
|
||||
#ifdef L_getpwuid_r
|
||||
#define GETXXKEY_R_FUNC getpwuid_r
|
||||
#define GETXXKEY_R_FUNC getpwuid_R
|
||||
#define GETXXKEY_R_PARSER __parsepwent
|
||||
#define GETXXKEY_R_ENTTYPE struct passwd
|
||||
#define GETXXKEY_R_TEST(ENT) ((ENT)->pw_uid == key)
|
||||
#define DO_GETXXKEY_R_KEYTYPE uid_t
|
||||
#define DO_GETXXKEY_R_PATHNAME _PATH_PASSWD
|
||||
#include "pwd_grp_internal.c"
|
||||
#endif
|
||||
|
||||
#ifdef L_getgrgid_r
|
||||
#define GETXXKEY_R_FUNC getgrgid_r
|
||||
#define GETXXKEY_R_FUNC getgrgid_R
|
||||
#define GETXXKEY_R_PARSER __parsegrent
|
||||
#define GETXXKEY_R_ENTTYPE struct group
|
||||
#define GETXXKEY_R_TEST(ENT) ((ENT)->gr_gid == key)
|
||||
#define DO_GETXXKEY_R_KEYTYPE gid_t
|
||||
#define DO_GETXXKEY_R_PATHNAME _PATH_GROUP
|
||||
#include "pwd_grp_internal.c"
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
#ifdef L_getpwuid
|
||||
|
||||
struct passwd *getpwuid(uid_t uid)
|
||||
{
|
||||
@ -281,10 +243,6 @@ struct passwd *getpwuid(uid_t uid)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getgrgid
|
||||
|
||||
struct group *getgrgid(gid_t gid)
|
||||
{
|
||||
static char buffer[GRP_BUFFER_SIZE];
|
||||
@ -295,10 +253,6 @@ struct group *getgrgid(gid_t gid)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getspuid_r
|
||||
|
||||
/* This function is non-standard and is currently not built. It seems
|
||||
* to have been created as a reentrant version of the non-standard
|
||||
* functions getspuid. Why getspuid was added, I do not know. */
|
||||
@ -320,10 +274,6 @@ int getspuid_r(uid_t uid, struct spwd *__restrict resultbuf,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getspuid
|
||||
|
||||
/* This function is non-standard and is currently not built.
|
||||
* Why it was added, I do not know. */
|
||||
|
||||
@ -337,10 +287,6 @@ struct spwd *getspuid(uid_t uid)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getpwnam
|
||||
|
||||
struct passwd *getpwnam(const char *name)
|
||||
{
|
||||
static char buffer[PWD_BUFFER_SIZE];
|
||||
@ -351,10 +297,6 @@ struct passwd *getpwnam(const char *name)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getgrnam
|
||||
|
||||
struct group *getgrnam(const char *name)
|
||||
{
|
||||
static char buffer[GRP_BUFFER_SIZE];
|
||||
@ -365,10 +307,6 @@ struct group *getgrnam(const char *name)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getspnam
|
||||
|
||||
struct spwd *getspnam(const char *name)
|
||||
{
|
||||
static char buffer[PWD_BUFFER_SIZE];
|
||||
@ -379,10 +317,6 @@ struct spwd *getspnam(const char *name)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getpw
|
||||
|
||||
int getpw(uid_t uid, char *buf)
|
||||
{
|
||||
struct passwd resultbuf;
|
||||
@ -406,10 +340,8 @@ int getpw(uid_t uid, char *buf)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
|
||||
#if defined(L_getpwent_r) || defined(L_getgrent_r) || defined(L_getspent_r)
|
||||
#if defined CONFIG_USE_BB_THREADSAFE_SHADOW && defined PTHREAD_MUTEX_INITIALIZER
|
||||
static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
|
||||
# define LOCK pthread_mutex_lock(&mylock)
|
||||
@ -418,9 +350,7 @@ static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
|
||||
# define LOCK ((void) 0)
|
||||
# define UNLOCK ((void) 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef L_getpwent_r
|
||||
static FILE *pwf /*= NULL*/;
|
||||
void setpwent(void)
|
||||
{
|
||||
@ -468,10 +398,6 @@ int getpwent_r(struct passwd *__restrict resultbuf,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getgrent_r
|
||||
|
||||
static FILE *grf /*= NULL*/;
|
||||
void setgrent(void)
|
||||
{
|
||||
@ -518,10 +444,6 @@ int getgrent_r(struct group *__restrict resultbuf,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getspent_r
|
||||
|
||||
static FILE *spf /*= NULL*/;
|
||||
void setspent(void)
|
||||
{
|
||||
@ -567,10 +489,6 @@ int getspent_r(struct spwd *resultbuf, char *buffer,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getpwent
|
||||
|
||||
struct passwd *getpwent(void)
|
||||
{
|
||||
static char line_buff[PWD_BUFFER_SIZE];
|
||||
@ -581,10 +499,6 @@ struct passwd *getpwent(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getgrent
|
||||
|
||||
struct group *getgrent(void)
|
||||
{
|
||||
static char line_buff[GRP_BUFFER_SIZE];
|
||||
@ -595,10 +509,6 @@ struct group *getgrent(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_getspent
|
||||
|
||||
struct spwd *getspent(void)
|
||||
{
|
||||
static char line_buff[PWD_BUFFER_SIZE];
|
||||
@ -609,10 +519,6 @@ struct spwd *getspent(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_sgetspent
|
||||
|
||||
struct spwd *sgetspent(const char *string)
|
||||
{
|
||||
static char line_buff[PWD_BUFFER_SIZE];
|
||||
@ -623,10 +529,6 @@ struct spwd *sgetspent(const char *string)
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_initgroups
|
||||
|
||||
int initgroups(const char *user, gid_t gid)
|
||||
{
|
||||
FILE *grfile;
|
||||
@ -679,10 +581,6 @@ int initgroups(const char *user, gid_t gid)
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_putpwent
|
||||
|
||||
int putpwent(const struct passwd *__restrict p, FILE *__restrict f)
|
||||
{
|
||||
int rv = -1;
|
||||
@ -704,10 +602,6 @@ int putpwent(const struct passwd *__restrict p, FILE *__restrict f)
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_putgrent
|
||||
|
||||
int putgrent(const struct group *__restrict p, FILE *__restrict f)
|
||||
{
|
||||
static const char format[] = ",%s";
|
||||
@ -749,10 +643,6 @@ int putgrent(const struct group *__restrict p, FILE *__restrict f)
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L_putspent
|
||||
|
||||
static const unsigned char _sp_off[] = {
|
||||
offsetof(struct spwd, sp_lstchg), /* 2 - not a char ptr */
|
||||
offsetof(struct spwd, sp_min), /* 3 - not a char ptr */
|
||||
@ -799,11 +689,9 @@ DO_UNLOCK:
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
/* Internal uClibc functions. */
|
||||
/**********************************************************************/
|
||||
#ifdef L___parsepwent
|
||||
|
||||
static const unsigned char pw_off[] = {
|
||||
offsetof(struct passwd, pw_name), /* 0 */
|
||||
@ -860,9 +748,7 @@ int __parsepwent(void *data, char *line)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L___parsegrent
|
||||
|
||||
static const unsigned char gr_off[] = {
|
||||
offsetof(struct group, gr_name), /* 0 */
|
||||
@ -958,9 +844,7 @@ int __parsegrent(void *data, char *line)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L___parsespent
|
||||
|
||||
static const unsigned char sp_off[] = {
|
||||
offsetof(struct spwd, sp_namp), /* 0 */
|
||||
@ -1017,9 +901,7 @@ int __parsespent(void *data, char * line)
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef L___pgsreader
|
||||
|
||||
/* Reads until if EOF, or until if finds a line which fits in the buffer
|
||||
* and for which the parser function succeeds.
|
||||
@ -1084,5 +966,4 @@ int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
|
@ -18,96 +18,45 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <features.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "pwd_.h"
|
||||
#include "grp_.h"
|
||||
#include "shadow_.h"
|
||||
#include "libbb.h"
|
||||
|
||||
#ifndef _PATH_SHADOW
|
||||
#define _PATH_SHADOW "/etc/shadow"
|
||||
#endif
|
||||
#ifndef _PATH_PASSWD
|
||||
#define _PATH_PASSWD "/etc/passwd"
|
||||
#endif
|
||||
#ifndef _PATH_GROUP
|
||||
#define _PATH_GROUP "/etc/group"
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
/* Sizes for statically allocated buffers. */
|
||||
|
||||
/* If you change these values, also change _SC_GETPW_R_SIZE_MAX and
|
||||
* _SC_GETGR_R_SIZE_MAX in libc/unistd/sysconf.c to match */
|
||||
#define PWD_BUFFER_SIZE 256
|
||||
#define GRP_BUFFER_SIZE 256
|
||||
|
||||
/**********************************************************************/
|
||||
/* Prototypes for internal functions. */
|
||||
|
||||
extern int __parsepwent(void *pw, char *line);
|
||||
extern int __parsegrent(void *gr, char *line);
|
||||
extern int __parsespent(void *sp, char *line);
|
||||
|
||||
extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
|
||||
char *__restrict line_buff, size_t buflen, FILE *f);
|
||||
|
||||
|
||||
#ifndef GETXXKEY_R_FUNC
|
||||
#error GETXXKEY_R_FUNC is not defined!
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#ifdef GETXXKEY_R_FUNC
|
||||
|
||||
int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,
|
||||
GETXXKEY_R_ENTTYPE *__restrict resultbuf,
|
||||
char *__restrict buffer, size_t buflen,
|
||||
GETXXKEY_R_ENTTYPE **__restrict result)
|
||||
GETXXKEY_R_ENTTYPE *__restrict resultbuf,
|
||||
char *__restrict buffer, size_t buflen,
|
||||
GETXXKEY_R_ENTTYPE **__restrict result)
|
||||
{
|
||||
FILE *stream;
|
||||
int rv;
|
||||
|
||||
*result = NULL;
|
||||
|
||||
if (!(stream = fopen(DO_GETXXKEY_R_PATHNAME, "r"))) {
|
||||
rv = errno;
|
||||
} else {
|
||||
do {
|
||||
if (!(rv = __pgsreader(GETXXKEY_R_PARSER, resultbuf,
|
||||
buffer, buflen, stream))
|
||||
) {
|
||||
if (GETXXKEY_R_TEST(resultbuf)) { /* Found key? */
|
||||
*result = resultbuf;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (rv == ENOENT) { /* end-of-file encountered. */
|
||||
rv = 0;
|
||||
}
|
||||
stream = fopen(DO_GETXXKEY_R_PATHNAME, "r");
|
||||
if (!stream)
|
||||
return errno;
|
||||
while (1) {
|
||||
rv = __pgsreader(GETXXKEY_R_PARSER, resultbuf, buffer, buflen, stream);
|
||||
if (!rv) {
|
||||
if (GETXXKEY_R_TEST(resultbuf)) { /* Found key? */
|
||||
*result = resultbuf;
|
||||
break;
|
||||
}
|
||||
} while (1);
|
||||
fclose(stream);
|
||||
} else {
|
||||
if (rv == ENOENT) { /* end-of-file encountered. */
|
||||
rv = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose(stream);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
#endif
|
||||
/**********************************************************************/
|
||||
#undef GETXXKEY_R_FUNC
|
||||
#undef GETXXKEY_R_PARSER
|
||||
#undef GETXXKEY_R_ENTTYPE
|
||||
#undef GETXXKEY_R_TEST
|
||||
#undef DO_GETXXKEY_R_KEYTYPE
|
||||
#undef DO_GETXXKEY_R_PATHNAME
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
menu "Login/Password Management Utilities"
|
||||
|
||||
config CONFIG_FEATURE_SHADOWPASSWDS
|
||||
config FEATURE_SHADOWPASSWDS
|
||||
bool "Support for shadow passwords"
|
||||
default n
|
||||
help
|
||||
@ -13,10 +13,10 @@ config CONFIG_FEATURE_SHADOWPASSWDS
|
||||
readable by root and thus the encrypted passwords are no longer
|
||||
publicly readable.
|
||||
|
||||
config CONFIG_USE_BB_SHADOW
|
||||
config USE_BB_SHADOW
|
||||
bool " Use busybox shadow password functions"
|
||||
default y
|
||||
depends on CONFIG_USE_BB_PWD_GRP && CONFIG_FEATURE_SHADOWPASSWDS
|
||||
depends on USE_BB_PWD_GRP && 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
|
||||
@ -32,7 +32,7 @@ config CONFIG_USE_BB_SHADOW
|
||||
able to use PAM to access shadow passwords from remote LDAP
|
||||
password servers and whatnot.
|
||||
|
||||
config CONFIG_USE_BB_PWD_GRP
|
||||
config USE_BB_PWD_GRP
|
||||
bool "Use internal password and group functions rather than system functions"
|
||||
default n
|
||||
help
|
||||
@ -53,86 +53,86 @@ config CONFIG_USE_BB_PWD_GRP
|
||||
|
||||
If you enable this option, it will add about 1.5k to busybox.
|
||||
|
||||
config CONFIG_ADDGROUP
|
||||
config ADDGROUP
|
||||
bool "addgroup"
|
||||
default n
|
||||
help
|
||||
Utility for creating a new group account.
|
||||
|
||||
config CONFIG_DELGROUP
|
||||
config DELGROUP
|
||||
bool "delgroup"
|
||||
default n
|
||||
help
|
||||
Utility for deleting a group account.
|
||||
|
||||
config CONFIG_ADDUSER
|
||||
config ADDUSER
|
||||
bool "adduser"
|
||||
default n
|
||||
help
|
||||
Utility for creating a new user account.
|
||||
|
||||
config CONFIG_DELUSER
|
||||
config DELUSER
|
||||
bool "deluser"
|
||||
default n
|
||||
help
|
||||
Utility for deleting a user account.
|
||||
|
||||
config CONFIG_GETTY
|
||||
config GETTY
|
||||
bool "getty"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
getty lets you log in on a tty, it is normally invoked by init.
|
||||
|
||||
config CONFIG_FEATURE_UTMP
|
||||
config FEATURE_UTMP
|
||||
bool "Support utmp file"
|
||||
depends on CONFIG_GETTY || CONFIG_LOGIN || CONFIG_SU || CONFIG_WHO
|
||||
depends on GETTY || LOGIN || SU || WHO
|
||||
default n
|
||||
help
|
||||
The file /var/run/utmp is used to track who is currently logged in.
|
||||
|
||||
config CONFIG_FEATURE_WTMP
|
||||
config FEATURE_WTMP
|
||||
bool "Support wtmp file"
|
||||
depends on CONFIG_GETTY || CONFIG_LOGIN || CONFIG_SU || CONFIG_LAST
|
||||
depends on GETTY || LOGIN || SU || LAST
|
||||
default n
|
||||
select CONFIG_FEATURE_UTMP
|
||||
select FEATURE_UTMP
|
||||
help
|
||||
The file /var/run/wtmp is used to track when user's have logged into
|
||||
and logged out of the system.
|
||||
|
||||
config CONFIG_LOGIN
|
||||
config LOGIN
|
||||
bool "login"
|
||||
default n
|
||||
select CONFIG_FEATURE_SUID
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SUID
|
||||
select 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 CONFIG_LOGIN_SCRIPTS
|
||||
config LOGIN_SCRIPTS
|
||||
bool "Support for login scripts"
|
||||
depends on CONFIG_LOGIN
|
||||
depends on LOGIN
|
||||
default n
|
||||
help
|
||||
Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT
|
||||
just prior to swithching from root to logged-in user.
|
||||
|
||||
config CONFIG_FEATURE_SECURETTY
|
||||
config FEATURE_SECURETTY
|
||||
bool "Support for /etc/securetty"
|
||||
default y
|
||||
depends on CONFIG_LOGIN
|
||||
depends on 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 CONFIG_PASSWD
|
||||
config PASSWD
|
||||
bool "passwd"
|
||||
default n
|
||||
select CONFIG_FEATURE_SUID
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SUID
|
||||
select 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
|
||||
@ -142,11 +142,11 @@ config CONFIG_PASSWD
|
||||
Note that Busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
|
||||
config CONFIG_SU
|
||||
config SU
|
||||
bool "su"
|
||||
default n
|
||||
select CONFIG_FEATURE_SUID
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SUID
|
||||
select 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.
|
||||
@ -154,25 +154,25 @@ config CONFIG_SU
|
||||
Note that Busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
|
||||
config CONFIG_SU_SYSLOG
|
||||
config SU_SYSLOG
|
||||
bool "Support for syslog in su"
|
||||
default y
|
||||
depends on CONFIG_SU
|
||||
depends on SU
|
||||
help
|
||||
Enables support for syslog in su.
|
||||
|
||||
config CONFIG_SULOGIN
|
||||
config SULOGIN
|
||||
bool "sulogin"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
sulogin is invoked when the system goes into single user
|
||||
mode (this is done through an entry in inittab).
|
||||
|
||||
config CONFIG_VLOCK
|
||||
config VLOCK
|
||||
bool "vlock"
|
||||
default n
|
||||
select CONFIG_FEATURE_SUID
|
||||
select FEATURE_SUID
|
||||
help
|
||||
Build the "vlock" applet which allows you to lock (virtual) terminals.
|
||||
|
||||
|
17
loginutils/Kbuild
Normal file
17
loginutils/Kbuild
Normal file
@ -0,0 +1,17 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_ADDGROUP) += addgroup.o
|
||||
lib-$(CONFIG_ADDUSER) += adduser.o
|
||||
lib-$(CONFIG_GETTY) += getty.o
|
||||
lib-$(CONFIG_LOGIN) += login.o
|
||||
lib-$(CONFIG_PASSWD) += passwd.o
|
||||
lib-$(CONFIG_SU) += su.o
|
||||
lib-$(CONFIG_SULOGIN) += sulogin.o
|
||||
lib-$(CONFIG_VLOCK) += vlock.o
|
||||
lib-$(CONFIG_DELUSER) += deluser.o
|
||||
lib-$(CONFIG_DELGROUP) += deluser.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/loginutils
|
||||
LOGINUTILS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,52 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
LOGINUTILS_AR:=loginutils.a
|
||||
ifndef LOGINUTILS_DIR
|
||||
LOGINUTILS_DIR:=$(top_builddir)/loginutils/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/loginutils
|
||||
|
||||
LOGINUTILS-y:=
|
||||
LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o
|
||||
LOGINUTILS-$(CONFIG_ADDUSER) += adduser.o
|
||||
LOGINUTILS-$(CONFIG_GETTY) += getty.o
|
||||
LOGINUTILS-$(CONFIG_LOGIN) += login.o
|
||||
LOGINUTILS-$(CONFIG_PASSWD) += passwd.o
|
||||
LOGINUTILS-$(CONFIG_SU) += su.o
|
||||
LOGINUTILS-$(CONFIG_SULOGIN) += sulogin.o
|
||||
LOGINUTILS-$(CONFIG_VLOCK) += vlock.o
|
||||
LOGINUTILS-$(CONFIG_DELUSER) += deluser.o
|
||||
LOGINUTILS-$(CONFIG_DELGROUP) += deluser.o
|
||||
|
||||
LOGINUTILS-y:=$(sort $(LOGINUTILS-y))
|
||||
|
||||
ifneq ($(strip $(LOGINUTILS-y)),)
|
||||
libraries-y+=$(LOGINUTILS_DIR)$(LOGINUTILS_AR)
|
||||
endif
|
||||
|
||||
LOGINUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(LOGINUTILS-y))
|
||||
LOGINUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(LOGINUTILS_SRC-y)
|
||||
APPLET_SRC-a+=$(LOGINUTILS_SRC-a)
|
||||
|
||||
needcrypt-y:=
|
||||
needcrypt-$(CONFIG_LOGIN) := y
|
||||
needcrypt-$(CONFIG_PASSWD) := y
|
||||
needcrypt-$(CONFIG_SU) := y
|
||||
needcrypt-$(CONFIG_SULOGIN) := y
|
||||
needcrypt-$(CONFIG_VLOCK) := y
|
||||
|
||||
|
||||
ifeq ($(needcrypt-y),y)
|
||||
LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES))
|
||||
endif
|
||||
|
||||
$(LOGINUTILS_DIR)$(LOGINUTILS_AR): $(patsubst %,$(LOGINUTILS_DIR)%, $(LOGINUTILS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(LOGINUTILS_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -5,25 +5,25 @@
|
||||
|
||||
menu "Miscellaneous Utilities"
|
||||
|
||||
config CONFIG_ADJTIMEX
|
||||
config ADJTIMEX
|
||||
bool "adjtimex"
|
||||
default n
|
||||
help
|
||||
Adjtimex reads and optionally sets adjustment parameters for
|
||||
the Linux clock adjustment algorithm.
|
||||
|
||||
config CONFIG_BBCONFIG
|
||||
config BBCONFIG
|
||||
bool "bbconfig"
|
||||
default n
|
||||
help
|
||||
The bbconfig applet will print the config file with which
|
||||
busybox was built.
|
||||
|
||||
config CONFIG_CROND
|
||||
config CROND
|
||||
bool "crond"
|
||||
default n
|
||||
select CONFIG_FEATURE_SUID
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SUID
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
Crond is a background daemon that parses individual crontab
|
||||
files and executes commands on behalf of the users in question.
|
||||
@ -35,39 +35,39 @@ config CONFIG_CROND
|
||||
Note that Busybox binary must be setuid root for this applet to
|
||||
work properly.
|
||||
|
||||
config CONFIG_DEBUG_CROND_OPTION
|
||||
config DEBUG_CROND_OPTION
|
||||
bool "Support debug option -d"
|
||||
depends on CONFIG_CROND
|
||||
depends on CROND
|
||||
default n
|
||||
help
|
||||
Support option -d to enter debug mode.
|
||||
|
||||
config CONFIG_FEATURE_CROND_CALL_SENDMAIL
|
||||
config FEATURE_CROND_CALL_SENDMAIL
|
||||
bool "Using /usr/sbin/sendmail?"
|
||||
default n
|
||||
depends on CONFIG_CROND
|
||||
depends on CROND
|
||||
help
|
||||
Support calling /usr/sbin/sendmail for send cmd outputs.
|
||||
|
||||
config CONFIG_CRONTAB
|
||||
config CRONTAB
|
||||
bool "crontab"
|
||||
default n
|
||||
select CONFIG_FEATURE_SUID
|
||||
select FEATURE_SUID
|
||||
help
|
||||
Crontab manipulates the crontab for a particular user. Only
|
||||
the superuser may specify a different user and/or crontab directory.
|
||||
|
||||
config CONFIG_DC
|
||||
config DC
|
||||
bool "dc"
|
||||
default n
|
||||
help
|
||||
Dc is a reverse-polish desk calculator which supports unlimited
|
||||
precision arithmetic.
|
||||
|
||||
config CONFIG_DEVFSD
|
||||
config DEVFSD
|
||||
bool "devfsd (obsolete)"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
This is deprecated, and will be removed at the end of 2008.
|
||||
|
||||
@ -80,30 +80,30 @@ config CONFIG_DEVFSD
|
||||
|
||||
But only if they are written UPPERCASE!!!!!!!!
|
||||
|
||||
config CONFIG_DEVFSD_MODLOAD
|
||||
config DEVFSD_MODLOAD
|
||||
bool "Adds support for MODLOAD keyword in devsfd.conf"
|
||||
default n
|
||||
depends on CONFIG_DEVFSD
|
||||
depends on DEVFSD
|
||||
help
|
||||
This actually doesn't work with busybox modutils but needs
|
||||
the external modutils.
|
||||
|
||||
config CONFIG_DEVFSD_FG_NP
|
||||
config DEVFSD_FG_NP
|
||||
bool "Enables the -fg and -np options"
|
||||
default n
|
||||
depends on CONFIG_DEVFSD
|
||||
depends on DEVFSD
|
||||
help
|
||||
-fg Run the daemon in the foreground.
|
||||
-np Exit after parsing the configuration file. Do not poll for events.
|
||||
|
||||
config CONFIG_DEVFSD_VERBOSE
|
||||
config DEVFSD_VERBOSE
|
||||
bool "Increases logging (and size)"
|
||||
default n
|
||||
depends on CONFIG_DEVFSD
|
||||
depends on DEVFSD
|
||||
help
|
||||
Increases logging to stderr or syslog.
|
||||
|
||||
config CONFIG_FEATURE_DEVFS
|
||||
config FEATURE_DEVFS
|
||||
bool " Use devfs names for all devices (obsolete)"
|
||||
default n
|
||||
help
|
||||
@ -113,126 +113,126 @@ config CONFIG_FEATURE_DEVFS
|
||||
/dev/loop0. If your /dev directory has normal names instead of
|
||||
devfs names, you don't want this.
|
||||
|
||||
config CONFIG_EJECT
|
||||
config EJECT
|
||||
bool "eject"
|
||||
default n
|
||||
help
|
||||
Used to eject cdroms. (defaults to /dev/cdrom)
|
||||
|
||||
config CONFIG_LAST
|
||||
config LAST
|
||||
bool "last"
|
||||
default n
|
||||
select CONFIG_FEATURE_WTMP
|
||||
select FEATURE_WTMP
|
||||
help
|
||||
'last' displays a list of the last users that logged into the system.
|
||||
|
||||
config CONFIG_LESS
|
||||
config LESS
|
||||
bool "less"
|
||||
default n
|
||||
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 CONFIG_FEATURE_LESS_BRACKETS
|
||||
config FEATURE_LESS_BRACKETS
|
||||
bool "Enable bracket searching"
|
||||
default y
|
||||
depends on CONFIG_LESS
|
||||
depends on LESS
|
||||
help
|
||||
This option adds the capability to search for matching left and right
|
||||
brackets, facilitating programming.
|
||||
|
||||
config CONFIG_FEATURE_LESS_FLAGS
|
||||
config FEATURE_LESS_FLAGS
|
||||
bool "Enable extra flags"
|
||||
default y
|
||||
depends on CONFIG_LESS
|
||||
depends on LESS
|
||||
help
|
||||
The extra flags provided do the following:
|
||||
|
||||
The -M flag enables a more sophisticated status line.
|
||||
The -m flag enables a simpler status line with a percentage.
|
||||
|
||||
config CONFIG_FEATURE_LESS_FLAGCS
|
||||
config FEATURE_LESS_FLAGCS
|
||||
bool "Enable flag changes"
|
||||
default n
|
||||
depends on CONFIG_LESS
|
||||
depends on LESS
|
||||
help
|
||||
This enables the ability to change command-line flags within
|
||||
less itself.
|
||||
|
||||
config CONFIG_FEATURE_LESS_MARKS
|
||||
config FEATURE_LESS_MARKS
|
||||
bool "Enable marks"
|
||||
default n
|
||||
depends on CONFIG_LESS
|
||||
depends on LESS
|
||||
help
|
||||
Marks enable positions in a file to be stored for easy reference.
|
||||
|
||||
config CONFIG_FEATURE_LESS_REGEXP
|
||||
config FEATURE_LESS_REGEXP
|
||||
bool "Enable regular expressions"
|
||||
default n
|
||||
depends on CONFIG_LESS
|
||||
depends on LESS
|
||||
help
|
||||
Enable regular expressions, allowing complex file searches.
|
||||
|
||||
config CONFIG_HDPARM
|
||||
config HDPARM
|
||||
bool "hdparm"
|
||||
default n
|
||||
help
|
||||
Get/Set hard drive parameters. Primarily intended for ATA
|
||||
drives. Adds about 13k (or around 30k if you enable the
|
||||
CONFIG_FEATURE_HDPARM_GET_IDENTITY option)....
|
||||
FEATURE_HDPARM_GET_IDENTITY option)....
|
||||
|
||||
config CONFIG_FEATURE_HDPARM_GET_IDENTITY
|
||||
config FEATURE_HDPARM_GET_IDENTITY
|
||||
bool "Support obtaining detailed information directly from drives"
|
||||
default y
|
||||
depends on CONFIG_HDPARM
|
||||
depends on HDPARM
|
||||
help
|
||||
Enables 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 CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF
|
||||
config FEATURE_HDPARM_HDIO_SCAN_HWIF
|
||||
bool "Register an IDE interface (DANGEROUS)"
|
||||
default n
|
||||
depends on CONFIG_HDPARM
|
||||
depends on HDPARM
|
||||
help
|
||||
Enables the 'hdparm -R' option to register an IDE interface.
|
||||
This is dangerous stuff, so you should probably say N.
|
||||
|
||||
config CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
|
||||
config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
|
||||
bool "Un-register an IDE interface (DANGEROUS)"
|
||||
default n
|
||||
depends on CONFIG_HDPARM
|
||||
depends on HDPARM
|
||||
help
|
||||
Enables the 'hdparm -U' option to un-register an IDE interface.
|
||||
This is dangerous stuff, so you should probably say N.
|
||||
|
||||
config CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET
|
||||
config FEATURE_HDPARM_HDIO_DRIVE_RESET
|
||||
bool "perform device reset (DANGEROUS)"
|
||||
default n
|
||||
depends on CONFIG_HDPARM
|
||||
depends on HDPARM
|
||||
help
|
||||
Enables the 'hdparm -w' option to perform a device reset.
|
||||
This is dangerous stuff, so you should probably say N.
|
||||
|
||||
config CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
|
||||
config FEATURE_HDPARM_HDIO_TRISTATE_HWIF
|
||||
bool "tristate device for hotswap (DANGEROUS)"
|
||||
default n
|
||||
depends on CONFIG_HDPARM
|
||||
depends on HDPARM
|
||||
help
|
||||
Enables 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 CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA
|
||||
config FEATURE_HDPARM_HDIO_GETSET_DMA
|
||||
bool "get/set using_dma flag (DANGEROUS)"
|
||||
default n
|
||||
depends on CONFIG_HDPARM
|
||||
depends on HDPARM
|
||||
help
|
||||
Enables the 'hdparm -d' option to get/set using_dma flag.
|
||||
This is dangerous stuff, so you should probably say N.
|
||||
|
||||
config CONFIG_MAKEDEVS
|
||||
config MAKEDEVS
|
||||
bool "makedevs"
|
||||
default n
|
||||
help
|
||||
@ -253,24 +253,24 @@ config CONFIG_MAKEDEVS
|
||||
|
||||
choice
|
||||
prompt "Choose makedevs behaviour"
|
||||
depends CONFIG_MAKEDEVS
|
||||
default CONFIG_FEATURE_MAKEDEVS_TABLE
|
||||
depends MAKEDEVS
|
||||
default FEATURE_MAKEDEVS_TABLE
|
||||
|
||||
config CONFIG_FEATURE_MAKEDEVS_LEAF
|
||||
config FEATURE_MAKEDEVS_LEAF
|
||||
bool "leaf"
|
||||
|
||||
config CONFIG_FEATURE_MAKEDEVS_TABLE
|
||||
config FEATURE_MAKEDEVS_TABLE
|
||||
bool "table"
|
||||
|
||||
endchoice
|
||||
|
||||
config CONFIG_MOUNTPOINT
|
||||
config MOUNTPOINT
|
||||
bool "mountpoint"
|
||||
default n
|
||||
help
|
||||
mountpoint checks if the directory is a mountpoint.
|
||||
|
||||
config CONFIG_MT
|
||||
config MT
|
||||
bool "mt"
|
||||
default n
|
||||
help
|
||||
@ -278,7 +278,7 @@ config CONFIG_MT
|
||||
to advance or rewind a tape past a specified number of archive
|
||||
files on the tape.
|
||||
|
||||
config CONFIG_READAHEAD
|
||||
config READAHEAD
|
||||
bool "readahead"
|
||||
default n
|
||||
help
|
||||
@ -294,7 +294,7 @@ config CONFIG_READAHEAD
|
||||
As readahead(2) blocks until each file has been read, it is best to
|
||||
run this applet as a background job.
|
||||
|
||||
config CONFIG_RUNLEVEL
|
||||
config RUNLEVEL
|
||||
bool "runlevel"
|
||||
default n
|
||||
help
|
||||
@ -303,32 +303,32 @@ config CONFIG_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 CONFIG_RX
|
||||
config RX
|
||||
bool "rx"
|
||||
default n
|
||||
help
|
||||
Receive files using the Xmodem protocol.
|
||||
|
||||
config CONFIG_STRINGS
|
||||
config STRINGS
|
||||
bool "strings"
|
||||
default n
|
||||
help
|
||||
strings prints the printable character sequences for each file
|
||||
specified.
|
||||
|
||||
config CONFIG_SETSID
|
||||
config SETSID
|
||||
bool "setsid"
|
||||
default n
|
||||
help
|
||||
setsid runs a program in a new session
|
||||
|
||||
config CONFIG_TASKSET
|
||||
config TASKSET
|
||||
bool "taskset"
|
||||
default n
|
||||
help
|
||||
Retrieve or set a processes's CPU affinity.
|
||||
|
||||
config CONFIG_TIME
|
||||
config TIME
|
||||
bool "time"
|
||||
default n
|
||||
help
|
||||
@ -336,7 +336,7 @@ config CONFIG_TIME
|
||||
When the command finishes, time writes a message to standard output
|
||||
giving timing statistics about this program run.
|
||||
|
||||
config CONFIG_WATCHDOG
|
||||
config WATCHDOG
|
||||
bool "watchdog"
|
||||
default n
|
||||
help
|
||||
|
27
miscutils/Kbuild
Normal file
27
miscutils/Kbuild
Normal file
@ -0,0 +1,27 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_ADJTIMEX) += adjtimex.o
|
||||
lib-$(CONFIG_CROND) += crond.o
|
||||
lib-$(CONFIG_CRONTAB) += crontab.o
|
||||
lib-$(CONFIG_BBCONFIG) += bbconfig.o
|
||||
lib-$(CONFIG_DC) += dc.o
|
||||
lib-$(CONFIG_DEVFSD) += devfsd.o
|
||||
lib-$(CONFIG_EJECT) += eject.o
|
||||
lib-$(CONFIG_HDPARM) += hdparm.o
|
||||
lib-$(CONFIG_LAST) += last.o
|
||||
lib-$(CONFIG_LESS) += less.o
|
||||
lib-$(CONFIG_MAKEDEVS) += makedevs.o
|
||||
lib-$(CONFIG_MOUNTPOINT) += mountpoint.o
|
||||
lib-$(CONFIG_MT) += mt.o
|
||||
lib-$(CONFIG_READAHEAD) += readahead.o
|
||||
lib-$(CONFIG_RUNLEVEL) += runlevel.o
|
||||
lib-$(CONFIG_RX) += rx.o
|
||||
lib-$(CONFIG_SETSID) += setsid.o
|
||||
lib-$(CONFIG_STRINGS) += strings.o
|
||||
lib-$(CONFIG_TIME) += time.o
|
||||
lib-$(CONFIG_WATCHDOG) += watchdog.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/miscutils
|
||||
MISCUTILS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,55 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
MISCUTILS_AR:=miscutils.a
|
||||
ifndef $(MISCUTILS_DIR)
|
||||
MISCUTILS_DIR:=$(top_builddir)/miscutils/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/miscutils
|
||||
|
||||
MISCUTILS-y:=
|
||||
MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o
|
||||
MISCUTILS-$(CONFIG_CROND) += crond.o
|
||||
MISCUTILS-$(CONFIG_CRONTAB) += crontab.o
|
||||
MISCUTILS-$(CONFIG_BBCONFIG) += bbconfig.o
|
||||
MISCUTILS-$(CONFIG_DC) += dc.o
|
||||
MISCUTILS-$(CONFIG_DEVFSD) += devfsd.o
|
||||
MISCUTILS-$(CONFIG_EJECT) += eject.o
|
||||
MISCUTILS-$(CONFIG_HDPARM) += hdparm.o
|
||||
MISCUTILS-$(CONFIG_LAST) += last.o
|
||||
MISCUTILS-$(CONFIG_LESS) += less.o
|
||||
MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o
|
||||
MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o
|
||||
MISCUTILS-$(CONFIG_MT) += mt.o
|
||||
MISCUTILS-$(CONFIG_READAHEAD) += readahead.o
|
||||
MISCUTILS-$(CONFIG_RUNLEVEL) += runlevel.o
|
||||
MISCUTILS-$(CONFIG_RX) += rx.o
|
||||
MISCUTILS-$(CONFIG_SETSID) += setsid.o
|
||||
MISCUTILS-$(CONFIG_STRINGS) += strings.o
|
||||
MISCUTILS-$(CONFIG_TIME) += time.o
|
||||
MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o
|
||||
|
||||
ifneq ($(strip $(MISCUTILS-y)),)
|
||||
libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR)
|
||||
endif
|
||||
|
||||
MISCUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MISCUTILS-y))
|
||||
MISCUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(MISCUTILS_SRC-y)
|
||||
APPLET_SRC-a+=$(MISCUTILS_SRC-a)
|
||||
|
||||
needlibm-y:=
|
||||
needlibm-$(CONFIG_DC) := y
|
||||
|
||||
ifeq ($(needlibm-y),y)
|
||||
LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES))
|
||||
endif
|
||||
|
||||
$(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(MISCUTILS_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -266,7 +266,7 @@ int rx_main(int argc, char **argv)
|
||||
filefd = xopen3(fn, O_RDWR|O_CREAT|O_TRUNC, 0666);
|
||||
|
||||
if (tcgetattr(ttyfd, &tty) < 0)
|
||||
bb_perror_msg_and_die("%s: tcgetattr failed", argv[0]);
|
||||
bb_perror_msg_and_die("tcgetattr");
|
||||
|
||||
orig_tty = tty;
|
||||
|
||||
@ -284,8 +284,7 @@ int rx_main(int argc, char **argv)
|
||||
tcsetattr(ttyfd, TCSAFLUSH, &orig_tty);
|
||||
|
||||
if (n < 0)
|
||||
bb_error_msg_and_die("\n%s: receive failed:\n %s",
|
||||
argv[0], error_buf);
|
||||
bb_error_msg_and_die("\nreceive failed:\n %s", error_buf);
|
||||
|
||||
bb_fflush_stdout_and_exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
@ -5,24 +5,24 @@
|
||||
|
||||
menu "Linux Module Utilities"
|
||||
|
||||
config CONFIG_INSMOD
|
||||
config INSMOD
|
||||
bool "insmod"
|
||||
default n
|
||||
help
|
||||
insmod is used to load specified modules in the running kernel.
|
||||
|
||||
config CONFIG_FEATURE_INSMOD_VERSION_CHECKING
|
||||
config FEATURE_INSMOD_VERSION_CHECKING
|
||||
bool "Module version checking"
|
||||
default n
|
||||
depends on CONFIG_INSMOD && CONFIG_FEATURE_2_4_MODULES
|
||||
depends on INSMOD && FEATURE_2_4_MODULES
|
||||
help
|
||||
Support checking of versions for modules. This is used to
|
||||
ensure that the kernel and module are made for each other.
|
||||
|
||||
config CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
|
||||
config FEATURE_INSMOD_KSYMOOPS_SYMBOLS
|
||||
bool "Add module symbols to kernel symbol table"
|
||||
default n
|
||||
depends on CONFIG_INSMOD && CONFIG_FEATURE_2_4_MODULES
|
||||
depends on INSMOD && FEATURE_2_4_MODULES
|
||||
help
|
||||
By adding module symbols to the kernel symbol table, Oops messages
|
||||
occuring within kernel modules can be properly debugged. By enabling
|
||||
@ -30,20 +30,20 @@ config CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS
|
||||
table for properly debugging support. If you are not interested in
|
||||
Oops messages from kernel modules, say N.
|
||||
|
||||
config CONFIG_FEATURE_INSMOD_LOADINKMEM
|
||||
config FEATURE_INSMOD_LOADINKMEM
|
||||
bool "In kernel memory optimization (uClinux only)"
|
||||
default n
|
||||
depends on CONFIG_INSMOD && CONFIG_FEATURE_2_4_MODULES
|
||||
depends on INSMOD && FEATURE_2_4_MODULES
|
||||
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 CONFIG_FEATURE_INSMOD_LOAD_MAP
|
||||
config FEATURE_INSMOD_LOAD_MAP
|
||||
bool "Enable load map (-m) option"
|
||||
default n
|
||||
depends on CONFIG_INSMOD && CONFIG_FEATURE_2_4_MODULES
|
||||
depends on INSMOD && FEATURE_2_4_MODULES
|
||||
help
|
||||
Enabling this, one would be able to get a load map
|
||||
output on stdout. This makes kernel module debugging
|
||||
@ -51,36 +51,36 @@ config CONFIG_FEATURE_INSMOD_LOAD_MAP
|
||||
If you don't plan to debug kernel modules, you
|
||||
don't need this option.
|
||||
|
||||
config CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL
|
||||
config FEATURE_INSMOD_LOAD_MAP_FULL
|
||||
bool "Symbols in load map"
|
||||
default y
|
||||
depends on CONFIG_FEATURE_INSMOD_LOAD_MAP
|
||||
depends on 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 CONFIG_RMMOD
|
||||
config RMMOD
|
||||
bool "rmmod"
|
||||
default n
|
||||
help
|
||||
rmmod is used to unload specified modules from the kernel.
|
||||
|
||||
config CONFIG_LSMOD
|
||||
config LSMOD
|
||||
bool "lsmod"
|
||||
default n
|
||||
help
|
||||
lsmod is used to display a list of loaded modules.
|
||||
|
||||
config CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
|
||||
config FEATURE_LSMOD_PRETTY_2_6_OUTPUT
|
||||
bool "lsmod pretty output for 2.6.x Linux kernels "
|
||||
default n
|
||||
depends on CONFIG_LSMOD
|
||||
depends on LSMOD
|
||||
help
|
||||
This option makes output format of lsmod adjusted to
|
||||
the format of module-init-tools for Linux kernel 2.6.
|
||||
|
||||
config CONFIG_MODPROBE
|
||||
config MODPROBE
|
||||
bool "modprobe"
|
||||
default n
|
||||
help
|
||||
@ -90,11 +90,11 @@ config CONFIG_MODPROBE
|
||||
Note that in the state, modprobe does not understand multiple
|
||||
module options from the configuration file. See option below.
|
||||
|
||||
config CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS
|
||||
config FEATURE_MODPROBE_MULTIPLE_OPTIONS
|
||||
bool
|
||||
prompt "Multiple options parsing" if CONFIG_NITPICK
|
||||
prompt "Multiple options parsing" if NITPICK
|
||||
default y
|
||||
depends on CONFIG_MODPROBE
|
||||
depends on MODPROBE
|
||||
help
|
||||
Allow modprobe to understand more than one option to pass to
|
||||
modules.
|
||||
@ -107,51 +107,51 @@ config CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS
|
||||
Saying Y here is not a bad idea if you're not that short
|
||||
on storage capacity.
|
||||
|
||||
config CONFIG_FEATURE_MODPROBE_FANCY_ALIAS
|
||||
config FEATURE_MODPROBE_FANCY_ALIAS
|
||||
bool
|
||||
prompt "Fancy alias parsing" if CONFIG_NITPICK
|
||||
prompt "Fancy alias parsing" if NITPICK
|
||||
default y
|
||||
depends on CONFIG_MODPROBE && CONFIG_FEATURE_2_6_MODULES
|
||||
depends on MODPROBE && FEATURE_2_6_MODULES
|
||||
help
|
||||
Say 'y' here to enable parsing of aliases with underscore/dash
|
||||
mismatch between module name and file name, along with bus-specific
|
||||
aliases (such as pci:... or usb:... aliases).
|
||||
|
||||
comment "Options common to multiple modutils"
|
||||
depends on CONFIG_INSMOD || CONFIG_RMMOD || CONFIG_MODPROBE || CONFIG_LSMOD
|
||||
depends on INSMOD || RMMOD || MODPROBE || LSMOD
|
||||
|
||||
config CONFIG_FEATURE_CHECK_TAINTED_MODULE
|
||||
config FEATURE_CHECK_TAINTED_MODULE
|
||||
# Simulate indentation
|
||||
bool "Support tainted module checking with new kernels"
|
||||
default y
|
||||
depends on CONFIG_INSMOD || CONFIG_LSMOD
|
||||
depends on INSMOD || LSMOD
|
||||
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 CONFIG_FEATURE_2_4_MODULES
|
||||
config FEATURE_2_4_MODULES
|
||||
# Simulate indentation
|
||||
bool "Support version 2.2.x to 2.4.x Linux kernels"
|
||||
default y
|
||||
depends on CONFIG_INSMOD || CONFIG_RMMOD
|
||||
depends on INSMOD || RMMOD
|
||||
help
|
||||
Support module loading for 2.2.x and 2.4.x Linux kernels.
|
||||
|
||||
config CONFIG_FEATURE_2_6_MODULES
|
||||
config FEATURE_2_6_MODULES
|
||||
# Simulate indentation
|
||||
bool "Support version 2.6.x Linux kernels"
|
||||
default y
|
||||
depends on CONFIG_INSMOD || CONFIG_RMMOD || CONFIG_MODPROBE
|
||||
depends on INSMOD || RMMOD || MODPROBE
|
||||
help
|
||||
Support module loading for newer 2.6.x Linux kernels.
|
||||
|
||||
|
||||
config CONFIG_FEATURE_QUERY_MODULE_INTERFACE
|
||||
config FEATURE_QUERY_MODULE_INTERFACE
|
||||
bool
|
||||
default y
|
||||
depends on CONFIG_FEATURE_2_4_MODULES && !CONFIG_FEATURE_2_6_MODULES
|
||||
depends on FEATURE_2_4_MODULES && !FEATURE_2_6_MODULES
|
||||
|
||||
|
||||
endmenu
|
||||
|
11
modutils/Kbuild
Normal file
11
modutils/Kbuild
Normal file
@ -0,0 +1,11 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_INSMOD) += insmod.o
|
||||
lib-$(CONFIG_LSMOD) += lsmod.o
|
||||
lib-$(CONFIG_MODPROBE) += modprobe.o
|
||||
lib-$(CONFIG_RMMOD) += rmmod.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/modutils
|
||||
MODUTILS_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,32 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
MODUTILS_AR:=modutils.a
|
||||
ifndef $(MODUTILS_DIR)
|
||||
MODUTILS_DIR:=$(top_builddir)/modutils/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/modutils
|
||||
|
||||
MODUTILS-y:=
|
||||
MODUTILS-$(CONFIG_INSMOD) += insmod.o
|
||||
MODUTILS-$(CONFIG_LSMOD) += lsmod.o
|
||||
MODUTILS-$(CONFIG_MODPROBE) += modprobe.o
|
||||
MODUTILS-$(CONFIG_RMMOD) += rmmod.o
|
||||
|
||||
ifneq ($(strip $(MODUTILS-y)),)
|
||||
libraries-y+=$(MODUTILS_DIR)$(MODUTILS_AR)
|
||||
endif
|
||||
|
||||
MODUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MODUTILS-y))
|
||||
MODUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(MODUTILS_SRC-y)
|
||||
APPLET_SRC-a+=$(MODUTILS_SRC-a)
|
||||
|
||||
$(MODUTILS_DIR)$(MODUTILS_AR): $(patsubst %,$(MODUTILS_DIR)%, $(MODUTILS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(MODUTILS_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
@ -5,132 +5,132 @@
|
||||
|
||||
menu "Networking Utilities"
|
||||
|
||||
config CONFIG_FEATURE_IPV6
|
||||
config FEATURE_IPV6
|
||||
bool "Enable IPv6 support"
|
||||
default n
|
||||
help
|
||||
Enable IPv6 support in busybox.
|
||||
This adds IPv6 support in the networking applets.
|
||||
|
||||
config CONFIG_ARPING
|
||||
config ARPING
|
||||
bool "arping"
|
||||
default n
|
||||
help
|
||||
Ping hosts by ARP packets
|
||||
|
||||
config CONFIG_DNSD
|
||||
config DNSD
|
||||
bool "dnsd"
|
||||
default n
|
||||
help
|
||||
Small and static DNS server daemon.
|
||||
|
||||
config CONFIG_ETHER_WAKE
|
||||
config ETHER_WAKE
|
||||
bool "ether-wake"
|
||||
default n
|
||||
help
|
||||
Send a magic packet to wake up sleeping machines.
|
||||
|
||||
config CONFIG_FAKEIDENTD
|
||||
config FAKEIDENTD
|
||||
bool "fakeidentd"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
fakeidentd listens on the ident port and returns a predefined
|
||||
fake value on any query.
|
||||
|
||||
config CONFIG_FTPGET
|
||||
config FTPGET
|
||||
bool "ftpget"
|
||||
default n
|
||||
help
|
||||
Retrieve a remote file via FTP.
|
||||
|
||||
config CONFIG_FTPPUT
|
||||
config FTPPUT
|
||||
bool "ftpput"
|
||||
default n
|
||||
help
|
||||
Store a remote file via FTP.
|
||||
|
||||
config CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS
|
||||
config FEATURE_FTPGETPUT_LONG_OPTIONS
|
||||
bool "Enable long options in ftpget/ftpput"
|
||||
default n
|
||||
depends on CONFIG_GETOPT_LONG && (CONFIG_FTPGET || CONFIG_FTPPUT)
|
||||
depends on GETOPT_LONG && (CONFIG_FTPGET || FTPPUT)
|
||||
help
|
||||
Support long options for the ftpget/ftpput applet.
|
||||
|
||||
config CONFIG_HOSTNAME
|
||||
config HOSTNAME
|
||||
bool "hostname"
|
||||
default n
|
||||
help
|
||||
Show or set the system's host name
|
||||
|
||||
config CONFIG_HTTPD
|
||||
config HTTPD
|
||||
bool "httpd"
|
||||
default n
|
||||
help
|
||||
Serve web pages via an HTTP server.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_WITHOUT_INETD
|
||||
config FEATURE_HTTPD_WITHOUT_INETD
|
||||
bool "Support using httpd as a daemon (not from inetd)"
|
||||
default n
|
||||
depends on CONFIG_HTTPD
|
||||
depends on HTTPD
|
||||
help
|
||||
This option enables uid and port options for the httpd applet,
|
||||
and eliminates the need to be called from the inetd server daemon.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
|
||||
config FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
|
||||
bool "Support reloading the global config file using hup signal"
|
||||
default n
|
||||
depends on CONFIG_HTTPD && CONFIG_FEATURE_HTTPD_WITHOUT_INETD
|
||||
depends on HTTPD && FEATURE_HTTPD_WITHOUT_INETD
|
||||
help
|
||||
This option enables processing of SIGHUP to reload cached
|
||||
configuration settings.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_SETUID
|
||||
config FEATURE_HTTPD_SETUID
|
||||
bool "Enable support -u <user> option"
|
||||
default n
|
||||
depends on CONFIG_HTTPD && CONFIG_FEATURE_HTTPD_WITHOUT_INETD
|
||||
depends on HTTPD && FEATURE_HTTPD_WITHOUT_INETD
|
||||
help
|
||||
This option allows the server to run as a specific user
|
||||
rather than defaulting to the user that starts the server.
|
||||
Use of this option requires special privileges to change to a
|
||||
different user.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_BASIC_AUTH
|
||||
config FEATURE_HTTPD_BASIC_AUTH
|
||||
bool "Enable Basic http Authentication"
|
||||
default y
|
||||
depends on CONFIG_HTTPD
|
||||
depends on HTTPD
|
||||
help
|
||||
Utilizes password settings from /etc/httpd.conf for basic
|
||||
authentication on a per url basis.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_AUTH_MD5
|
||||
config FEATURE_HTTPD_AUTH_MD5
|
||||
bool "Support MD5 crypted passwords for http Authentication"
|
||||
default n
|
||||
depends on CONFIG_FEATURE_HTTPD_BASIC_AUTH
|
||||
depends on FEATURE_HTTPD_BASIC_AUTH
|
||||
help
|
||||
Enables basic per URL authentication from /etc/httpd.conf
|
||||
using md5 passwords.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES
|
||||
config FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES
|
||||
bool "Support loading additional MIME types at run-time"
|
||||
default n
|
||||
depends on CONFIG_HTTPD
|
||||
depends on HTTPD
|
||||
help
|
||||
This option enables support for additional MIME types at
|
||||
run-time to be specified in the configuration file.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_CGI
|
||||
config FEATURE_HTTPD_CGI
|
||||
bool "Support Common Gateway Interface (CGI)"
|
||||
default y
|
||||
depends on CONFIG_HTTPD
|
||||
depends on HTTPD
|
||||
help
|
||||
This option allows scripts and executables to be invoked
|
||||
when specific URLs are requested.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
|
||||
config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
|
||||
bool "Enable support for running scripts through an interpreter"
|
||||
default n
|
||||
depends on CONFIG_FEATURE_HTTPD_CGI
|
||||
depends on FEATURE_HTTPD_CGI
|
||||
help
|
||||
This option enables support for running scripts through an
|
||||
interpreter. Turn this on if you want PHP scripts to work
|
||||
@ -138,81 +138,81 @@ config CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
|
||||
config file:
|
||||
*.php:/path/to/your/php
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
|
||||
config FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
|
||||
bool "Support the REMOTE_PORT environment variable for CGI"
|
||||
default n
|
||||
depends on CONFIG_FEATURE_HTTPD_CGI
|
||||
depends on FEATURE_HTTPD_CGI
|
||||
help
|
||||
Use of this option can assist scripts in generating
|
||||
references that contain a unique port number.
|
||||
|
||||
config CONFIG_FEATURE_HTTPD_ENCODE_URL_STR
|
||||
config FEATURE_HTTPD_ENCODE_URL_STR
|
||||
bool "Enable the -e option for shell script CGI simplification."
|
||||
default y
|
||||
depends on CONFIG_HTTPD
|
||||
depends on HTTPD
|
||||
help
|
||||
This option allows html encoding arbitrary
|
||||
strings for display of the browser. Output goes to stdout.
|
||||
For example, httpd -e "<Hello World>" as
|
||||
"<Hello World>".
|
||||
|
||||
config CONFIG_IFCONFIG
|
||||
config IFCONFIG
|
||||
bool "ifconfig"
|
||||
default n
|
||||
help
|
||||
Ifconfig is used to configure the kernel-resident network interfaces.
|
||||
|
||||
config CONFIG_FEATURE_IFCONFIG_STATUS
|
||||
config FEATURE_IFCONFIG_STATUS
|
||||
bool "Enable status reporting output (+7k)"
|
||||
default y
|
||||
depends on CONFIG_IFCONFIG
|
||||
depends on IFCONFIG
|
||||
help
|
||||
If ifconfig is called with no arguments it will display the status
|
||||
of the currently active interfaces.
|
||||
|
||||
config CONFIG_FEATURE_IFCONFIG_SLIP
|
||||
config FEATURE_IFCONFIG_SLIP
|
||||
bool "Enable slip-specific options \"keepalive\" and \"outfill\""
|
||||
default n
|
||||
depends on CONFIG_IFCONFIG
|
||||
depends on IFCONFIG
|
||||
help
|
||||
Allow "keepalive" and "outfill" support for SLIP. If you're not
|
||||
planning on using serial lines, leave this unchecked.
|
||||
|
||||
config CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
config FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
bool "Enable options \"mem_start\", \"io_addr\", and \"irq\""
|
||||
default n
|
||||
depends on CONFIG_IFCONFIG
|
||||
depends on IFCONFIG
|
||||
help
|
||||
Allow the start address for shared memory, start address for I/O,
|
||||
and/or the interrupt line used by the specified device.
|
||||
|
||||
config CONFIG_FEATURE_IFCONFIG_HW
|
||||
config FEATURE_IFCONFIG_HW
|
||||
bool "Enable option \"hw\" (ether only)"
|
||||
default y
|
||||
depends on CONFIG_IFCONFIG
|
||||
depends on IFCONFIG
|
||||
help
|
||||
Set the hardware address of this interface, if the device driver
|
||||
supports this operation. Currently, we only support the 'ether'
|
||||
class.
|
||||
|
||||
config CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS
|
||||
config FEATURE_IFCONFIG_BROADCAST_PLUS
|
||||
bool "Set the broadcast automatically"
|
||||
default n
|
||||
depends on CONFIG_IFCONFIG
|
||||
depends on IFCONFIG
|
||||
help
|
||||
Setting this will make ifconfig attempt to find the broadcast
|
||||
automatically if the value '+' is used.
|
||||
|
||||
config CONFIG_IFUPDOWN
|
||||
config IFUPDOWN
|
||||
bool "ifupdown"
|
||||
default n
|
||||
select CONFIG_RUN_PARTS
|
||||
select RUN_PARTS
|
||||
help
|
||||
Activate or deactivate the specified interfaces. This applet makes
|
||||
use of either "ifconfig" and "route" or the "ip" command to actually
|
||||
configure network interfaces. Therefore, you will probably also want
|
||||
to enable either CONFIG_IFCONFIG and CONFIG_ROUTE, or enable
|
||||
CONFIG_FEATURE_IFUPDOWN_IP and the various CONFIG_IP options. Of
|
||||
to enable either IFCONFIG and ROUTE, or enable
|
||||
FEATURE_IFUPDOWN_IP and the various IP options. Of
|
||||
course you could use non-busybox versions of these programs, so
|
||||
against my better judgement (since this will surely result in plenty
|
||||
of support questions on the mailing list), I do not force you to
|
||||
@ -220,34 +220,34 @@ config CONFIG_IFUPDOWN
|
||||
"ifconfig" and "route" or the "ip" command, either via busybox or via
|
||||
standalone utilities.
|
||||
|
||||
config CONFIG_FEATURE_IFUPDOWN_IP
|
||||
config FEATURE_IFUPDOWN_IP
|
||||
bool "Use ip applet"
|
||||
default n
|
||||
depends on CONFIG_IFUPDOWN
|
||||
depends on IFUPDOWN
|
||||
help
|
||||
Use the iproute "ip" command to implement "ifup" and "ifdown", rather
|
||||
than the default of using the older 'ifconfig' and 'route' utilities.
|
||||
|
||||
config CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN
|
||||
config FEATURE_IFUPDOWN_IP_BUILTIN
|
||||
bool "Use busybox ip applet"
|
||||
default y
|
||||
depends on CONFIG_FEATURE_IFUPDOWN_IP
|
||||
select CONFIG_IP
|
||||
select CONFIG_FEATURE_IP_ADDRESS
|
||||
select CONFIG_FEATURE_IP_LINK
|
||||
select CONFIG_FEATURE_IP_ROUTE
|
||||
depends on FEATURE_IFUPDOWN_IP
|
||||
select IP
|
||||
select FEATURE_IP_ADDRESS
|
||||
select FEATURE_IP_LINK
|
||||
select FEATURE_IP_ROUTE
|
||||
help
|
||||
Use the busybox iproute "ip" applet to implement "ifupdown".
|
||||
|
||||
If leave this disabled, you must install the full-blown iproute2
|
||||
utility or the "ifup" and "ifdown" applets will not work.
|
||||
|
||||
config CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN
|
||||
config FEATURE_IFUPDOWN_IP_BUILTIN
|
||||
bool "Use busybox ifconfig and route applets"
|
||||
default y
|
||||
depends on CONFIG_IFUPDOWN && !CONFIG_FEATURE_IFUPDOWN_IP
|
||||
select CONFIG_IFCONFIG
|
||||
select CONFIG_ROUTE
|
||||
depends on IFUPDOWN && !CONFIG_FEATURE_IFUPDOWN_IP
|
||||
select IFCONFIG
|
||||
select ROUTE
|
||||
help
|
||||
Use the busybox iproute "ifconfig" and "route" applets to
|
||||
implement the "ifup" and "ifdown" utilities.
|
||||
@ -256,87 +256,87 @@ config CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN
|
||||
and route utilities, or the "ifup" and "ifdown" applets will not
|
||||
work.
|
||||
|
||||
config CONFIG_FEATURE_IFUPDOWN_IPV4
|
||||
config FEATURE_IFUPDOWN_IPV4
|
||||
bool "Enable support for IPv4"
|
||||
default y
|
||||
depends on CONFIG_IFUPDOWN
|
||||
depends on IFUPDOWN
|
||||
help
|
||||
If you want busybox to talk IPv4, leave this on.
|
||||
|
||||
config CONFIG_FEATURE_IFUPDOWN_IPV6
|
||||
config FEATURE_IFUPDOWN_IPV6
|
||||
bool "Enable support for IPv6"
|
||||
default n
|
||||
depends on CONFIG_IFUPDOWN && CONFIG_FEATURE_IPV6
|
||||
depends on IFUPDOWN && FEATURE_IPV6
|
||||
help
|
||||
If you need support for IPv6, turn this option on.
|
||||
|
||||
config CONFIG_FEATURE_IFUPDOWN_IPX
|
||||
config FEATURE_IFUPDOWN_IPX
|
||||
bool "Enable support for IPX"
|
||||
default n
|
||||
depends on CONFIG_IFUPDOWN
|
||||
depends on IFUPDOWN
|
||||
help
|
||||
If this option is selected you can use busybox to work with IPX
|
||||
networks.
|
||||
|
||||
config CONFIG_FEATURE_IFUPDOWN_MAPPING
|
||||
config FEATURE_IFUPDOWN_MAPPING
|
||||
bool "Enable mapping support"
|
||||
default n
|
||||
depends on CONFIG_IFUPDOWN
|
||||
depends on IFUPDOWN
|
||||
help
|
||||
This enables support for the "mapping" stanza, unless you have
|
||||
a weird network setup you don't need it.
|
||||
|
||||
config CONFIG_INETD
|
||||
config INETD
|
||||
bool "inetd"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
Internet superserver daemon
|
||||
|
||||
config CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
|
||||
config FEATURE_INETD_SUPPORT_BUILTIN_ECHO
|
||||
bool "Support echo service"
|
||||
default y
|
||||
depends on CONFIG_INETD
|
||||
depends on INETD
|
||||
help
|
||||
Echo received data internal inetd service
|
||||
|
||||
config CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
|
||||
config FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
|
||||
bool "Support discard service"
|
||||
default y
|
||||
depends on CONFIG_INETD
|
||||
depends on INETD
|
||||
help
|
||||
Internet /dev/null internal inetd service
|
||||
|
||||
config CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME
|
||||
config FEATURE_INETD_SUPPORT_BUILTIN_TIME
|
||||
bool "Support time service"
|
||||
default y
|
||||
depends on CONFIG_INETD
|
||||
depends on INETD
|
||||
help
|
||||
Return 32 bit time since 1900 internal inetd service
|
||||
|
||||
config CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
|
||||
config FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
|
||||
bool "Support daytime service"
|
||||
default y
|
||||
depends on CONFIG_INETD
|
||||
depends on INETD
|
||||
help
|
||||
Return human-readable time internal inetd service
|
||||
|
||||
config CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN
|
||||
config FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN
|
||||
bool "Support chargen service"
|
||||
default y
|
||||
depends on CONFIG_INETD
|
||||
depends on INETD
|
||||
help
|
||||
Familiar character generator internal inetd service
|
||||
|
||||
config CONFIG_FEATURE_INETD_RPC
|
||||
config FEATURE_INETD_RPC
|
||||
bool "Support RPC services"
|
||||
default n
|
||||
depends on CONFIG_INETD
|
||||
depends on INETD
|
||||
help
|
||||
Suuport Sun-RPC based services
|
||||
|
||||
|
||||
config CONFIG_IP
|
||||
config IP
|
||||
bool "ip"
|
||||
default n
|
||||
help
|
||||
@ -344,38 +344,38 @@ config CONFIG_IP
|
||||
utility. You generally don't need "ip" to use busybox with
|
||||
TCP/IP.
|
||||
|
||||
config CONFIG_FEATURE_IP_ADDRESS
|
||||
config FEATURE_IP_ADDRESS
|
||||
bool "ip address"
|
||||
default y
|
||||
depends on CONFIG_IP
|
||||
depends on IP
|
||||
help
|
||||
Address manipulation support for the "ip" applet.
|
||||
|
||||
config CONFIG_FEATURE_IP_LINK
|
||||
config FEATURE_IP_LINK
|
||||
bool "ip link"
|
||||
default y
|
||||
depends on CONFIG_IP
|
||||
depends on IP
|
||||
help
|
||||
Configure network devices with "ip".
|
||||
|
||||
config CONFIG_FEATURE_IP_ROUTE
|
||||
config FEATURE_IP_ROUTE
|
||||
bool "ip route"
|
||||
default y
|
||||
depends on CONFIG_IP
|
||||
depends on IP
|
||||
help
|
||||
Add support for routing table management to "ip".
|
||||
|
||||
config CONFIG_FEATURE_IP_TUNNEL
|
||||
config FEATURE_IP_TUNNEL
|
||||
bool "ip tunnel"
|
||||
default n
|
||||
depends on CONFIG_IP
|
||||
depends on IP
|
||||
help
|
||||
Add support for tunneling commands to "ip".
|
||||
|
||||
config CONFIG_FEATURE_IP_SHORT_FORMS
|
||||
config FEATURE_IP_SHORT_FORMS
|
||||
bool "Support short forms of ip commands."
|
||||
default n
|
||||
depends on CONFIG_IP
|
||||
depends on IP
|
||||
help
|
||||
Also support short-form of ip <OBJECT> commands:
|
||||
ip addr -> ipaddr
|
||||
@ -386,51 +386,51 @@ config CONFIG_FEATURE_IP_SHORT_FORMS
|
||||
Say N unless you desparately need the short form of the ip
|
||||
object commands.
|
||||
|
||||
config CONFIG_IPADDR
|
||||
config IPADDR
|
||||
bool
|
||||
default y
|
||||
depends on CONFIG_FEATURE_IP_SHORT_FORMS && CONFIG_FEATURE_IP_ADDRESS
|
||||
depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_ADDRESS
|
||||
|
||||
config CONFIG_IPLINK
|
||||
config IPLINK
|
||||
bool
|
||||
default y
|
||||
depends on CONFIG_FEATURE_IP_SHORT_FORMS && CONFIG_FEATURE_IP_LINK
|
||||
depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_LINK
|
||||
|
||||
config CONFIG_IPROUTE
|
||||
config IPROUTE
|
||||
bool
|
||||
default y
|
||||
depends on CONFIG_FEATURE_IP_SHORT_FORMS && CONFIG_FEATURE_IP_ROUTE
|
||||
depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_ROUTE
|
||||
|
||||
config CONFIG_IPTUNNEL
|
||||
config IPTUNNEL
|
||||
bool
|
||||
default y
|
||||
depends on CONFIG_FEATURE_IP_SHORT_FORMS && CONFIG_FEATURE_IP_TUNNEL
|
||||
depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_TUNNEL
|
||||
|
||||
config CONFIG_IPCALC
|
||||
config IPCALC
|
||||
bool "ipcalc"
|
||||
default n
|
||||
help
|
||||
ipcalc takes an IP address and netmask and calculates the
|
||||
resulting broadcast, network, and host range.
|
||||
|
||||
config CONFIG_FEATURE_IPCALC_FANCY
|
||||
config FEATURE_IPCALC_FANCY
|
||||
bool "Fancy IPCALC, more options, adds 1 kbyte"
|
||||
default y
|
||||
depends on CONFIG_IPCALC
|
||||
depends on IPCALC
|
||||
help
|
||||
Adds the options hostname, prefix and silent to the output of "ipcalc".
|
||||
|
||||
config CONFIG_FEATURE_IPCALC_LONG_OPTIONS
|
||||
config FEATURE_IPCALC_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_IPCALC && CONFIG_GETOPT_LONG
|
||||
depends on IPCALC && GETOPT_LONG
|
||||
help
|
||||
Support long options for the ipcalc applet.
|
||||
|
||||
config CONFIG_NAMEIF
|
||||
config NAMEIF
|
||||
bool "nameif"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
nameif is used to rename network interface by its MAC address.
|
||||
Renamed interfaces MUST be in the down state.
|
||||
@ -442,107 +442,107 @@ config CONFIG_NAMEIF
|
||||
# Comment
|
||||
new_interface_name XX:XX:XX:XX:XX:XX
|
||||
|
||||
config CONFIG_NC
|
||||
config NC
|
||||
bool "nc"
|
||||
default n
|
||||
help
|
||||
A simple Unix utility which reads and writes data across network
|
||||
connections.
|
||||
|
||||
config CONFIG_NC_SERVER
|
||||
config NC_SERVER
|
||||
bool "Netcat server options (-lp)"
|
||||
default n
|
||||
depends on CONFIG_NC
|
||||
depends on NC
|
||||
help
|
||||
Allow netcat to act as a server.
|
||||
|
||||
config CONFIG_NC_EXTRA
|
||||
config NC_EXTRA
|
||||
bool "Netcat extensions (-eiw and filename)"
|
||||
default n
|
||||
depends on CONFIG_NC
|
||||
depends on NC
|
||||
help
|
||||
Add -e (support for executing the rest of the command line after
|
||||
making or receiving a successful connection), -i (delay interval for
|
||||
lines sent), -w (timeout for initial connection).
|
||||
|
||||
config CONFIG_NETSTAT
|
||||
config NETSTAT
|
||||
bool "netstat"
|
||||
default n
|
||||
help
|
||||
netstat prints information about the Linux networking subsystem.
|
||||
|
||||
config CONFIG_NSLOOKUP
|
||||
config NSLOOKUP
|
||||
bool "nslookup"
|
||||
default n
|
||||
help
|
||||
nslookup is a tool to query Internet name servers.
|
||||
|
||||
config CONFIG_PING
|
||||
config PING
|
||||
bool "ping"
|
||||
default n
|
||||
help
|
||||
ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
|
||||
elicit an ICMP ECHO_RESPONSE from a host or gateway.
|
||||
|
||||
config CONFIG_FEATURE_FANCY_PING
|
||||
config FEATURE_FANCY_PING
|
||||
bool "Enable fancy ping output"
|
||||
default y
|
||||
depends on CONFIG_PING
|
||||
depends on PING
|
||||
help
|
||||
Make the output from the ping applet include statistics, and at the
|
||||
same time provide full support for ICMP packets.
|
||||
|
||||
config CONFIG_PING6
|
||||
config PING6
|
||||
bool "ping6"
|
||||
default n
|
||||
depends on CONFIG_FEATURE_IPV6
|
||||
depends on FEATURE_IPV6
|
||||
help
|
||||
This will give you a ping that can talk IPv6.
|
||||
|
||||
config CONFIG_FEATURE_FANCY_PING6
|
||||
config FEATURE_FANCY_PING6
|
||||
bool "Enable fancy ping6 output"
|
||||
default y
|
||||
depends on CONFIG_PING6
|
||||
depends on PING6
|
||||
help
|
||||
Make the output from the ping6 applet include statistics, and at the
|
||||
same time provide full support for ICMP packets.
|
||||
|
||||
config CONFIG_ROUTE
|
||||
config ROUTE
|
||||
bool "route"
|
||||
default n
|
||||
help
|
||||
Route displays or manipulates the kernel's IP routing tables.
|
||||
|
||||
config CONFIG_TELNET
|
||||
config TELNET
|
||||
bool "telnet"
|
||||
default n
|
||||
help
|
||||
Telnet is an interface to the TELNET protocol, but is also commonly
|
||||
used to test other simple protocols.
|
||||
|
||||
config CONFIG_FEATURE_TELNET_TTYPE
|
||||
config FEATURE_TELNET_TTYPE
|
||||
bool "Pass TERM type to remote host"
|
||||
default y
|
||||
depends on CONFIG_TELNET
|
||||
depends on TELNET
|
||||
help
|
||||
Setting this option will forward the TERM environment variable to the
|
||||
remote host you are connecting to. This is useful to make sure that
|
||||
things like ANSI colors and other control sequences behave.
|
||||
|
||||
config CONFIG_FEATURE_TELNET_AUTOLOGIN
|
||||
config FEATURE_TELNET_AUTOLOGIN
|
||||
bool "Pass USER type to remote host"
|
||||
default y
|
||||
depends on CONFIG_TELNET
|
||||
depends on TELNET
|
||||
help
|
||||
Setting this option will forward the USER environment variable to the
|
||||
remote host you are connecting to. This is useful when you need to
|
||||
log into a machine without telling the username (autologin). This
|
||||
option enables `-a' and `-l USER' arguments.
|
||||
|
||||
config CONFIG_TELNETD
|
||||
config TELNETD
|
||||
bool "telnetd"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
A daemon for the TELNET protocol, allowing you to log onto the host
|
||||
running the daemon. Please keep in mind that the TELNET protocol
|
||||
@ -554,8 +554,8 @@ config CONFIG_TELNETD
|
||||
|
||||
Note that for busybox telnetd to work you need several things:
|
||||
First of all, your kernel needs:
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
CONFIG_DEVPTS_FS=y
|
||||
UNIX98_PTYS=y
|
||||
DEVPTS_FS=y
|
||||
|
||||
Next, you need a /dev/pts directory on your root filesystem:
|
||||
|
||||
@ -572,8 +572,8 @@ config CONFIG_TELNETD
|
||||
|
||||
mount -t devpts devpts /dev/pts
|
||||
|
||||
You need to be sure that Busybox has CONFIG_LOGIN and
|
||||
CONFIG_FEATURE_SUID enabled. And finally, you should make
|
||||
You need to be sure that Busybox has LOGIN and
|
||||
FEATURE_SUID enabled. And finally, you should make
|
||||
certain that Busybox has been installed setuid root:
|
||||
|
||||
chown root.root /bin/busybox
|
||||
@ -582,15 +582,15 @@ config CONFIG_TELNETD
|
||||
with all that done, telnetd _should_ work....
|
||||
|
||||
|
||||
config CONFIG_FEATURE_TELNETD_INETD
|
||||
config FEATURE_TELNETD_INETD
|
||||
bool "Support call from inetd only"
|
||||
default n
|
||||
depends on CONFIG_TELNETD
|
||||
depends on TELNETD
|
||||
help
|
||||
Selecting this will make telnetd only callable from inetd,
|
||||
removing the standalone support.
|
||||
|
||||
config CONFIG_TFTP
|
||||
config TFTP
|
||||
bool "tftp"
|
||||
default n
|
||||
help
|
||||
@ -598,114 +598,114 @@ config CONFIG_TFTP
|
||||
is usually used for simple, small transfers such as a root image
|
||||
for a network-enabled bootloader.
|
||||
|
||||
config CONFIG_FEATURE_TFTP_GET
|
||||
config FEATURE_TFTP_GET
|
||||
bool "Enable \"get\" command"
|
||||
default y
|
||||
depends on CONFIG_TFTP
|
||||
depends on TFTP
|
||||
help
|
||||
Add support for the GET command within the TFTP client. This allows
|
||||
a client to retrieve a file from a TFTP server.
|
||||
|
||||
config CONFIG_FEATURE_TFTP_PUT
|
||||
config FEATURE_TFTP_PUT
|
||||
bool "Enable \"put\" command"
|
||||
default y
|
||||
depends on CONFIG_TFTP
|
||||
depends on TFTP
|
||||
help
|
||||
Add support for the PUT command within the TFTP client. This allows
|
||||
a client to transfer a file to a TFTP server.
|
||||
|
||||
config CONFIG_FEATURE_TFTP_BLOCKSIZE
|
||||
config FEATURE_TFTP_BLOCKSIZE
|
||||
bool "Enable \"blocksize\" command"
|
||||
default n
|
||||
depends on CONFIG_TFTP
|
||||
depends on TFTP
|
||||
help
|
||||
Allow the client to specify the desired block size for transfers.
|
||||
|
||||
config CONFIG_DEBUG_TFTP
|
||||
config DEBUG_TFTP
|
||||
bool "Enable debug"
|
||||
default n
|
||||
depends on CONFIG_TFTP
|
||||
depends on TFTP
|
||||
help
|
||||
Enable debug settings for tftp. This is useful if you're running
|
||||
into problems with tftp as the protocol doesn't help you much when
|
||||
you run into problems.
|
||||
|
||||
config CONFIG_TRACEROUTE
|
||||
config TRACEROUTE
|
||||
bool "traceroute"
|
||||
default n
|
||||
help
|
||||
Utility to trace the route of IP packets
|
||||
|
||||
config CONFIG_FEATURE_TRACEROUTE_VERBOSE
|
||||
config FEATURE_TRACEROUTE_VERBOSE
|
||||
bool "Enable verbose output"
|
||||
default n
|
||||
depends on CONFIG_TRACEROUTE
|
||||
depends on TRACEROUTE
|
||||
help
|
||||
Add some verbosity to traceroute. This includes amongst other things
|
||||
hostnames and ICMP response types.
|
||||
|
||||
config CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE
|
||||
config FEATURE_TRACEROUTE_SOURCE_ROUTE
|
||||
bool "Enable loose source route"
|
||||
default n
|
||||
depends on CONFIG_TRACEROUTE
|
||||
depends on TRACEROUTE
|
||||
help
|
||||
Add option to specify a loose source route gateway
|
||||
(8 maximum).
|
||||
|
||||
config CONFIG_FEATURE_TRACEROUTE_USE_ICMP
|
||||
config FEATURE_TRACEROUTE_USE_ICMP
|
||||
bool "Use ICMP instead of UDP"
|
||||
default n
|
||||
depends on CONFIG_TRACEROUTE
|
||||
depends on TRACEROUTE
|
||||
help
|
||||
Add feature to allow for ICMP ECHO instead of UDP datagrams.
|
||||
|
||||
source networking/udhcp/Config.in
|
||||
|
||||
config CONFIG_VCONFIG
|
||||
config VCONFIG
|
||||
bool "vconfig"
|
||||
default n
|
||||
help
|
||||
Creates, removes, and configures VLAN interfaces
|
||||
|
||||
config CONFIG_WGET
|
||||
config WGET
|
||||
bool "wget"
|
||||
default n
|
||||
help
|
||||
wget is a utility for non-interactive download of files from HTTP,
|
||||
HTTPS, and FTP servers.
|
||||
|
||||
config CONFIG_FEATURE_WGET_STATUSBAR
|
||||
config FEATURE_WGET_STATUSBAR
|
||||
bool "Enable a nifty process meter (+2k)"
|
||||
default y
|
||||
depends on CONFIG_WGET
|
||||
depends on WGET
|
||||
help
|
||||
Enable the transfer progress bar for wget transfers.
|
||||
|
||||
config CONFIG_FEATURE_WGET_AUTHENTICATION
|
||||
config FEATURE_WGET_AUTHENTICATION
|
||||
bool "Enable HTTP authentication"
|
||||
default y
|
||||
depends on CONFIG_WGET
|
||||
depends on WGET
|
||||
help
|
||||
Support authenticated HTTP transfers.
|
||||
|
||||
config CONFIG_FEATURE_WGET_IP6_LITERAL
|
||||
config FEATURE_WGET_IP6_LITERAL
|
||||
bool "Enable IPv6 literal addresses"
|
||||
default y
|
||||
depends on CONFIG_WGET && CONFIG_FEATURE_IPV6
|
||||
depends on WGET && FEATURE_IPV6
|
||||
help
|
||||
Support IPv6 address literal notation in URLs.
|
||||
|
||||
config CONFIG_FEATURE_WGET_LONG_OPTIONS
|
||||
config FEATURE_WGET_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default n
|
||||
depends on CONFIG_WGET && CONFIG_GETOPT_LONG
|
||||
depends on WGET && GETOPT_LONG
|
||||
help
|
||||
Support long options for the wget applet.
|
||||
|
||||
config CONFIG_ZCIP
|
||||
config ZCIP
|
||||
bool "zcip"
|
||||
default n
|
||||
select CONFIG_FEATURE_SYSLOG
|
||||
select FEATURE_SYSLOG
|
||||
help
|
||||
ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927.
|
||||
It's a daemon that allocates and defends a dynamically assigned
|
||||
|
38
networking/Kbuild
Normal file
38
networking/Kbuild
Normal file
@ -0,0 +1,38 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_ARPING) += arping.o
|
||||
lib-$(CONFIG_DNSD) += dnsd.o
|
||||
lib-$(CONFIG_ETHER_WAKE) += ether-wake.o
|
||||
lib-$(CONFIG_FAKEIDENTD) += fakeidentd.o
|
||||
lib-$(CONFIG_FTPGET) += ftpgetput.o
|
||||
lib-$(CONFIG_FTPPUT) += ftpgetput.o
|
||||
lib-$(CONFIG_HOSTNAME) += hostname.o
|
||||
lib-$(CONFIG_HTTPD) += httpd.o
|
||||
lib-$(CONFIG_IFCONFIG) += ifconfig.o interface.o
|
||||
lib-$(CONFIG_IFUPDOWN) += ifupdown.o
|
||||
lib-$(CONFIG_INETD) += inetd.o
|
||||
lib-$(CONFIG_IP) += ip.o
|
||||
lib-$(CONFIG_IPCALC) += ipcalc.o
|
||||
lib-$(CONFIG_IPADDR) += ipaddr.o
|
||||
lib-$(CONFIG_IPLINK) += iplink.o
|
||||
lib-$(CONFIG_IPROUTE) += iproute.o
|
||||
lib-$(CONFIG_IPTUNNEL) += iptunnel.o
|
||||
lib-$(CONFIG_NAMEIF) += nameif.o
|
||||
lib-$(CONFIG_NC) += nc.o
|
||||
lib-$(CONFIG_NETSTAT) += netstat.o
|
||||
lib-$(CONFIG_NSLOOKUP) += nslookup.o
|
||||
lib-$(CONFIG_PING) += ping.o
|
||||
lib-$(CONFIG_PING6) += ping6.o
|
||||
lib-$(CONFIG_ROUTE) += route.o
|
||||
lib-$(CONFIG_TELNET) += telnet.o
|
||||
lib-$(CONFIG_TELNETD) += telnetd.o
|
||||
lib-$(CONFIG_TFTP) += tftp.o
|
||||
lib-$(CONFIG_TRACEROUTE) += traceroute.o
|
||||
lib-$(CONFIG_VCONFIG) += vconfig.o
|
||||
lib-$(CONFIG_WGET) += wget.o
|
||||
lib-$(CONFIG_ZCIP) += zcip.o
|
@ -1,23 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/networking
|
||||
NETWORKING_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,70 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
NETWORKING_AR:=networking.a
|
||||
ifndef $(NETWORKING_DIR)
|
||||
NETWORKING_DIR:=$(top_builddir)/networking/
|
||||
endif
|
||||
srcdir=$(top_srcdir)/networking
|
||||
|
||||
NETWORKING-y:=
|
||||
NETWORKING-$(CONFIG_ARPING) += arping.o
|
||||
NETWORKING-$(CONFIG_DNSD) += dnsd.o
|
||||
NETWORKING-$(CONFIG_ETHER_WAKE) += ether-wake.o
|
||||
NETWORKING-$(CONFIG_FAKEIDENTD) += fakeidentd.o
|
||||
NETWORKING-$(CONFIG_FTPGET) += ftpgetput.o
|
||||
NETWORKING-$(CONFIG_FTPPUT) += ftpgetput.o
|
||||
NETWORKING-$(CONFIG_HOSTNAME) += hostname.o
|
||||
NETWORKING-$(CONFIG_HTTPD) += httpd.o
|
||||
NETWORKING-$(CONFIG_IFCONFIG) += ifconfig.o interface.o
|
||||
NETWORKING-$(CONFIG_IFUPDOWN) += ifupdown.o
|
||||
NETWORKING-$(CONFIG_INETD) += inetd.o
|
||||
NETWORKING-$(CONFIG_IP) += ip.o
|
||||
NETWORKING-$(CONFIG_IPCALC) += ipcalc.o
|
||||
NETWORKING-$(CONFIG_IPADDR) += ipaddr.o
|
||||
NETWORKING-$(CONFIG_IPLINK) += iplink.o
|
||||
NETWORKING-$(CONFIG_IPROUTE) += iproute.o
|
||||
NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o
|
||||
NETWORKING-$(CONFIG_NAMEIF) += nameif.o
|
||||
NETWORKING-$(CONFIG_NC) += nc.o
|
||||
NETWORKING-$(CONFIG_NETSTAT) += netstat.o
|
||||
NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o
|
||||
NETWORKING-$(CONFIG_PING) += ping.o
|
||||
NETWORKING-$(CONFIG_PING6) += ping6.o
|
||||
NETWORKING-$(CONFIG_ROUTE) += route.o
|
||||
NETWORKING-$(CONFIG_TELNET) += telnet.o
|
||||
NETWORKING-$(CONFIG_TELNETD) += telnetd.o
|
||||
NETWORKING-$(CONFIG_TFTP) += tftp.o
|
||||
NETWORKING-$(CONFIG_TRACEROUTE) += traceroute.o
|
||||
NETWORKING-$(CONFIG_VCONFIG) += vconfig.o
|
||||
NETWORKING-$(CONFIG_WGET) += wget.o
|
||||
NETWORKING-$(CONFIG_ZCIP) += zcip.o
|
||||
|
||||
NETWORKING-y:=$(sort $(NETWORKING-y))
|
||||
ifneq ($(strip $(NETWORKING-y)),)
|
||||
libraries-y+=$(NETWORKING_DIR)$(NETWORKING_AR)
|
||||
endif
|
||||
|
||||
NETWORKING_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(NETWORKING-y))
|
||||
NETWORKING_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
APPLET_SRC-y+=$(NETWORKING_SRC-y)
|
||||
APPLET_SRC-a+=$(NETWORKING_SRC-a)
|
||||
|
||||
LIBRARY_DEFINE-y+= -I$(top_srcdir)/networking
|
||||
LIBRARY_DEFINE-a+= -I$(top_srcdir)/networking
|
||||
|
||||
needcrypt-y:=
|
||||
needcrypt-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) := y
|
||||
|
||||
ifeq ($(needcrypt-y),y)
|
||||
LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES))
|
||||
endif
|
||||
|
||||
$(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y))
|
||||
$(do_ar)
|
||||
|
||||
$(NETWORKING_DIR)%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
58
networking/libiproute/Kbuild
Normal file
58
networking/libiproute/Kbuild
Normal file
@ -0,0 +1,58 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
||||
#
|
||||
|
||||
lib-y:=
|
||||
lib-$(CONFIG_IP) += \
|
||||
ip_parse_common_args.o \
|
||||
ipaddress.o \
|
||||
iplink.o \
|
||||
iproute.o \
|
||||
iptunnel.o \
|
||||
libnetlink.o \
|
||||
ll_addr.o \
|
||||
ll_map.o \
|
||||
ll_proto.o \
|
||||
ll_types.o \
|
||||
rt_names.o \
|
||||
rtm_map.o \
|
||||
utils.o
|
||||
|
||||
lib-$(CONFIG_IPADDR) += \
|
||||
ip_parse_common_args.o \
|
||||
ipaddress.o \
|
||||
libnetlink.o \
|
||||
ll_addr.o \
|
||||
ll_map.o \
|
||||
ll_types.o \
|
||||
rt_names.o \
|
||||
utils.o
|
||||
|
||||
lib-$(CONFIG_IPLINK) += \
|
||||
ip_parse_common_args.o \
|
||||
ipaddress.o \
|
||||
iplink.o \
|
||||
libnetlink.o \
|
||||
ll_addr.o \
|
||||
ll_map.o \
|
||||
ll_types.o \
|
||||
rt_names.o \
|
||||
utils.o
|
||||
|
||||
lib-$(CONFIG_IPROUTE) += \
|
||||
ip_parse_common_args.o \
|
||||
iproute.o \
|
||||
libnetlink.o \
|
||||
ll_map.o \
|
||||
rt_names.o \
|
||||
rtm_map.o \
|
||||
utils.o
|
||||
|
||||
lib-$(CONFIG_IPTUNNEL) += \
|
||||
ip_parse_common_args.o \
|
||||
iptunnel.o \
|
||||
rt_names.o \
|
||||
utils.o
|
@ -1,36 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=../..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=../..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/networking/libiproute
|
||||
LIBIPROUTE_DIR:=./
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include $(top_builddir)/.config
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
@ -1,83 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
|
||||
#
|
||||
|
||||
LIBIPROUTE_AR:=libiproute.a
|
||||
ifndef $(LIBIPROUTE_DIR)
|
||||
LIBIPROUTE_DIR:=$(top_builddir)/networking/libiproute
|
||||
endif
|
||||
srcdir=$(top_srcdir)/networking/libiproute
|
||||
|
||||
LIBIPROUTE-y:=
|
||||
LIBIPROUTE-$(CONFIG_IP) += \
|
||||
ip_parse_common_args.o \
|
||||
ipaddress.o \
|
||||
iplink.o \
|
||||
iproute.o \
|
||||
iptunnel.o \
|
||||
libnetlink.o \
|
||||
ll_addr.o \
|
||||
ll_map.o \
|
||||
ll_proto.o \
|
||||
ll_types.o \
|
||||
rt_names.o \
|
||||
rtm_map.o \
|
||||
utils.o
|
||||
|
||||
LIBIPROUTE-$(CONFIG_IPADDR) += \
|
||||
ip_parse_common_args.o \
|
||||
ipaddress.o \
|
||||
libnetlink.o \
|
||||
ll_addr.o \
|
||||
ll_map.o \
|
||||
ll_types.o \
|
||||
rt_names.o \
|
||||
utils.o
|
||||
|
||||
LIBIPROUTE-$(CONFIG_IPLINK) += \
|
||||
ip_parse_common_args.o \
|
||||
ipaddress.o \
|
||||
iplink.o \
|
||||
libnetlink.o \
|
||||
ll_addr.o \
|
||||
ll_map.o \
|
||||
ll_types.o \
|
||||
rt_names.o \
|
||||
utils.o
|
||||
|
||||
LIBIPROUTE-$(CONFIG_IPROUTE) += \
|
||||
ip_parse_common_args.o \
|
||||
iproute.o \
|
||||
libnetlink.o \
|
||||
ll_map.o \
|
||||
rt_names.o \
|
||||
rtm_map.o \
|
||||
utils.o
|
||||
|
||||
LIBIPROUTE-$(CONFIG_IPTUNNEL) += \
|
||||
ip_parse_common_args.o \
|
||||
iptunnel.o \
|
||||
rt_names.o \
|
||||
utils.o
|
||||
|
||||
LIBIPROUTE-y:=$(sort $(LIBIPROUTE-y))
|
||||
|
||||
LIBIPROUTE_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBIPROUTE-y)))
|
||||
LIBIPROUTE_SRC-a:=$(wildcard $(srcdir)/*.c)
|
||||
LIBRARY_SRC-y+=$(LIBIPROUTE_SRC-y)
|
||||
LIBRARY_SRC-a+=$(LIBIPROUTE_SRC-a)
|
||||
|
||||
LIBIPROUTE-obj:=$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR)
|
||||
|
||||
ifneq ($(strip $(LIBIPROUTE-y)),)
|
||||
libraries-y+=$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR)
|
||||
endif
|
||||
|
||||
$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR): $(patsubst %,$(LIBIPROUTE_DIR)/%,$(LIBIPROUTE-y))
|
||||
$(do_ar)
|
||||
|
||||
$(LIBIPROUTE_DIR)/%.o: $(srcdir)/%.c
|
||||
$(compile.c)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user