Changeset 39435


Ignore:
Timestamp:
2014-01-31T14:50:16+01:00 (4 years ago)
Author:
nbd
Message:

busybox: add a reworked implementation of menuconfig support, this time with a guard option that keeps all symbols at default values until an extra option is activated

Signed-off-by: Felix Fietkau <nbd@…>

Location:
trunk/package/utils/busybox
Files:
50 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/utils/busybox/Config.in

    r39125 r39435  
    11if PACKAGE_busybox 
    22 
    3 config BUSYBOX_CONFIG_FEATURE_MOUNT_NFS 
    4         bool "Enable NFS mount support" 
     3config BUSYBOX_CUSTOM 
     4        bool "Customize busybox options" 
     5        default n 
     6 
     7        source "package/utils/busybox/Config-defaults.in" 
     8 
     9        if BUSYBOX_CUSTOM 
     10        source "package/utils/busybox/config/Config.in" 
     11        endif 
     12 
     13config BUSYBOX_USE_LIBRPC 
     14        bool 
     15        default y if BUSYBOX_CUSTOM && BUSYBOX_CONFIG_FEATURE_HAVE_RPC 
     16        default y if !BUSYBOX_CUSTOM && BUSYBOX_DEFAULT_FEATURE_HAVE_RPC 
    517 
    618endif 
  • trunk/package/utils/busybox/Makefile

    r39434 r39435  
    1818PKG_MD5SUM:=9c0cae5a0379228e7b55e5b29528df8e 
    1919 
    20 PKG_CONFIG_DEPENDS:=CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_NFS 
     20PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc 
    2121PKG_BUILD_PARALLEL:=1 
    2222 
     
    2525 
    2626include $(INCLUDE_DIR)/package.mk 
     27 
     28ifeq ($(DUMP),) 
     29  STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell $(SH_FUNC) grep '^CONFIG_BUSYBOX_' $(TOPDIR)/.config | md5s) 
     30endif 
    2731 
    2832ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) 
     
    3539  SECTION:=base 
    3640  CATEGORY:=Base system 
    37   MAINTAINER:=Nicolas Thill <nico@openwrt.org> 
     41  MAINTAINER:=Felix Fietkau <nbd@openwrt.org> 
    3842  TITLE:=Core utilities for embedded Linux 
    3943  URL:=http://busybox.net/ 
    40   DEPENDS:=+BUSYBOX_CONFIG_FEATURE_MOUNT_NFS:librpc 
     44  DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc 
    4145  MENU:=1 
    4246endef 
     
    5155endef 
    5256 
    53 CONFIG_TEMPLATE:=./config/default 
    54  
    55 LDLIBS:=m crypt 
    56 ifdef CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_NFS 
    57   TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include 
    58   export LDFLAGS=$(TARGET_LDFLAGS) 
    59   LDLIBS += rpc 
    60 endif 
    61  
    62 CONFIG_TEMPLATE:=+ $(CONFIG_TEMPLATE) $(PKG_BUILD_DIR)/.config.build 
    63  
    64 ENV_CONFIG:=$(wildcard $(TOPDIR)/env/busybox-config) 
    65 ifneq ($(ENV_CONFIG),) 
    66   CONFIG_TEMPLATE:=+ $(CONFIG_TEMPLATE) $(ENV_CONFIG) 
    67   STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(shell $(SH_FUNC) md5s < $(ENV_CONFIG)) 
    68 endif 
     57BUSYBOX_SYM=$(if $(CONFIG_BUSYBOX_CUSTOM),CONFIG,DEFAULT) 
    6958 
    7059define Build/Configure 
    71         grep -E '^(# )?CONFIG_BUSYBOX_CONFIG_' $(TOPDIR)/.config | \ 
    72                 sed -e 's,CONFIG_BUSYBOX_CONFIG_,CONFIG_,' > $(PKG_BUILD_DIR)/.config.build 
    73         $(SCRIPT_DIR)/kconfig.pl $(CONFIG_TEMPLATE) > $(PKG_BUILD_DIR)/.config 
     60        rm -f $(PKG_BUILD_DIR)/.configured* 
     61        grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config 
    7462        yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) \ 
    7563                CC="$(TARGET_CC)" \ 
     
    8371ifdef CONFIG_GCC_VERSION_LLVM 
    8472  TARGET_CFLAGS += -fnested-functions 
     73endif 
     74 
     75LDLIBS:=m crypt 
     76ifdef CONFIG_BUSYBOX_USE_LIBRPC 
     77  TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include 
     78  export LDFLAGS=$(TARGET_LDFLAGS) 
     79  LDLIBS += rpc 
    8580endif 
    8681 
  • trunk/package/utils/busybox/patches/340-lock_util.patch

    r37007 r39435  
    1111--- a/miscutils/Config.src 
    1212+++ b/miscutils/Config.src 
    13 @@ -419,6 +419,11 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA 
     13@@ -419,6 +419,12 @@ config FEATURE_HDPARM_HDIO_GETSET_DMA 
    1414        help 
    1515          Enables the 'hdparm -d' option to get/set using_dma flag. 
     
    1717+config LOCK 
    1818+       bool "lock" 
     19+       default n 
    1920+       help 
    2021+         Small utility for using locks in scripts 
Note: See TracChangeset for help on using the changeset viewer.