diff --git a/include/target.mk b/include/target.mk index e2274171a9..df34f937d3 100644 --- a/include/target.mk +++ b/include/target.mk @@ -6,6 +6,15 @@ ifneq ($(__target_inc),1) __target_inc=1 +ifneq ($(DUMP),) + # Parse generic config that might be set before a .config is generated to modify the + # default package configuration + GENERIC_CONFIG := CONFIG_USE_APK CONFIG_SELINUX CONFIG_SMALL_FLASH CONFIG_SECCOMP + $(foreach config, $(GENERIC_CONFIG), \ + $(eval $(config) := $(shell grep "$(config)=y" $(TOPDIR)/.config 2>/dev/null)) \ + ) +endif + # default device type DEVICE_TYPE?=router @@ -26,7 +35,7 @@ DEFAULT_PACKAGES:=\ urandom-seed \ urngd -ifdef CONFIG_USE_APK +ifneq ($(CONFIG_USE_APK),) DEFAULT_PACKAGES+=apk-mbedtls else DEFAULT_PACKAGES+=opkg