Browse Source

- busybox: rework target; use only one minimal config and use KCONFIG macros to modify

master
vanhofen 6 years ago
parent
commit
c953b1b077
  1. 1
      configs/busybox-armbox-bre2ze4k.config
  2. 1177
      configs/busybox-armbox-hd51.config
  3. 1177
      configs/busybox-coolstream-hd2.config
  4. 0
      configs/busybox-minimal.config
  5. 53
      make/target-tools.mk

1
configs/busybox-armbox-bre2ze4k.config

@ -1 +0,0 @@
busybox-armbox-hd51.config

1177
configs/busybox-armbox-hd51.config

File diff suppressed because it is too large

1177
configs/busybox-coolstream-hd2.config

File diff suppressed because it is too large

0
configs/busybox-coolstream-hd1.config → configs/busybox-minimal.config

53
make/target-tools.mk

@ -21,6 +21,7 @@ BUSYBOX_PATCH += busybox-mount_single_uuid.patch
# mounting with BusyBox # mounting with BusyBox
BUSYBOX_CFLAGS = $(TARGET_CFLAGS) BUSYBOX_CFLAGS = $(TARGET_CFLAGS)
BUSYBOX_CFLAGS += "`$(PKG_CONFIG) --cflags libtirpc`" BUSYBOX_CFLAGS += "`$(PKG_CONFIG) --cflags libtirpc`"
# Don't use LDFLAGS for -ltirpc, because LDFLAGS is used for the non-final link # Don't use LDFLAGS for -ltirpc, because LDFLAGS is used for the non-final link
# of modules as well. # of modules as well.
BUSYBOX_CFLAGS_busybox = "`$(PKG_CONFIG) --libs libtirpc`" BUSYBOX_CFLAGS_busybox = "`$(PKG_CONFIG) --libs libtirpc`"
@ -36,13 +37,59 @@ BUSYBOX_MAKE_OPTS = \
EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
CONFIG_PREFIX="$(TARGET_DIR)" CONFIG_PREFIX="$(TARGET_DIR)"
BUSYBOX_BUILD_CONFIG = $(BUILD_TMP)/$(BUSYBOX_TMP)/.config
define BUSYBOX_INSTALL_CONFIG
$(INSTALL_DATA) $(CONFIGS)/busybox-minimal.config $(BUSYBOX_BUILD_CONFIG)
$(call KCONFIG_SET_OPT,CONFIG_PREFIX,"$(TARGET_DIR)",$(BUSYBOX_BUILD_CONFIG))
endef
ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd2 hd51 bre2ze4k))
define BUSYBOX_SET_BLKDISCARD
$(call KCONFIG_ENABLE_OPT,CONFIG_BLKDISCARD,$(BUSYBOX_BUILD_CONFIG))
endef
define BUSYBOX_SET_IPV6
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_IPV6,$(BUSYBOX_BUILD_CONFIG))
$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_IFUPDOWN_IPV6,$(BUSYBOX_BUILD_CONFIG))
endef
ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd51 bre2ze4k))
define BUSYBOX_SET_SWAP
$(call KCONFIG_ENABLE_OPT,CONFIG_SWAPON,$(BUSYBOX_BUILD_CONFIG))
$(call KCONFIG_ENABLE_OPT,CONFIG_SWAPOFF,$(BUSYBOX_BUILD_CONFIG))
endef
define BUSYBOX_SET_HEXDUMP
$(call KCONFIG_ENABLE_OPT,CONFIG_HEXDUMP,$(BUSYBOX_BUILD_CONFIG))
endef
define BUSYBOX_SET_PKILL
$(call KCONFIG_ENABLE_OPT,CONFIG_PKILL,$(BUSYBOX_BUILD_CONFIG))
endef
endif
endif
define BUSYBOX_MODIFY_CONFIG
$(BUSYBOX_SET_BLKDISCARD)
$(BUSYBOX_SET_IPV6)
$(BUSYBOX_SET_SWAP)
$(BUSYBOX_SET_HEXDUMP)
$(BUSYBOX_SET_PKILL)
endef
$(D)/busybox: $(D)/libtirpc $(ARCHIVE)/$(BUSYBOX_SOURCE) | $(TARGET_DIR) $(D)/busybox: $(D)/libtirpc $(ARCHIVE)/$(BUSYBOX_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(BUSYBOX_TMP) $(REMOVE)/$(BUSYBOX_TMP)
$(UNTAR)/$(BUSYBOX_SOURCE) $(UNTAR)/$(BUSYBOX_SOURCE)
$(CHDIR)/$(BUSYBOX_TMP); \ $(CHDIR)/$(BUSYBOX_TMP); \
$(call apply_patches, $(BUSYBOX_PATCH)); \ $(call apply_patches, $(BUSYBOX_PATCH))
cp $(CONFIGS)/busybox-$(BOXTYPE)-$(BOXSERIES).config .config; \ $(BUSYBOX_INSTALL_CONFIG)
sed -i -e 's|^CONFIG_PREFIX=.*|CONFIG_PREFIX="$(TARGET_DIR)"|' .config; \ $(BUSYBOX_MODIFY_CONFIG)
$(CHDIR)/$(BUSYBOX_TMP); \
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) busybox; \ $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) busybox; \
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) install-noclobber $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) install-noclobber
$(REMOVE)/$(BUSYBOX_TMP) $(REMOVE)/$(BUSYBOX_TMP)

Loading…
Cancel
Save