build: move all generic config generation to targets/generic
As the default package list is now handled using the 'packages' directive, explicit wpad-mini removals in target definitions can be dropped.
This commit is contained in:
parent
587c5016cb
commit
08cbbf9925
34
Makefile
34
Makefile
@ -60,6 +60,15 @@ LEDEMAKE = $(MAKE) -C lede
|
|||||||
|
|
||||||
BOARD := $(GLUON_TARGET_$(GLUON_TARGET)_BOARD)
|
BOARD := $(GLUON_TARGET_$(GLUON_TARGET)_BOARD)
|
||||||
SUBTARGET := $(GLUON_TARGET_$(GLUON_TARGET)_SUBTARGET)
|
SUBTARGET := $(GLUON_TARGET_$(GLUON_TARGET)_SUBTARGET)
|
||||||
|
|
||||||
|
GLUON_CONFIG_VARS := \
|
||||||
|
GLUON_SITEDIR='$(GLUON_SITEDIR)' \
|
||||||
|
GLUON_RELEASE='$(GLUON_RELEASE)' \
|
||||||
|
GLUON_BRANCH='$(GLUON_BRANCH)' \
|
||||||
|
GLUON_LANGS='$(GLUON_LANGS)' \
|
||||||
|
BOARD='$(BOARD)' \
|
||||||
|
SUBTARGET='$(SUBTARGET)'
|
||||||
|
|
||||||
LEDE_TARGET := $(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
|
LEDE_TARGET := $(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
|
||||||
|
|
||||||
export LEDE_TARGET
|
export LEDE_TARGET
|
||||||
@ -75,8 +84,6 @@ list-targets: FORCE
|
|||||||
@$(foreach target,$(GLUON_TARGETS),echo '$(target)';)
|
@$(foreach target,$(GLUON_TARGETS),echo '$(target)';)
|
||||||
|
|
||||||
|
|
||||||
GLUON_DEFAULT_PACKAGES := -odhcpd -ppp -ppp-mod-pppoe -wpad-mini gluon-core ip6tables hostapd-mini
|
|
||||||
|
|
||||||
GLUON_FEATURE_PACKAGES := $(shell scripts/features.sh '$(GLUON_FEATURES)' || echo '__ERROR__')
|
GLUON_FEATURE_PACKAGES := $(shell scripts/features.sh '$(GLUON_FEATURES)' || echo '__ERROR__')
|
||||||
ifneq ($(filter __ERROR__,$(GLUON_FEATURE_PACKAGES)),)
|
ifneq ($(filter __ERROR__,$(GLUON_FEATURE_PACKAGES)),)
|
||||||
$(error Error while evaluating GLUON_FEATURES)
|
$(error Error while evaluating GLUON_FEATURES)
|
||||||
@ -89,30 +96,19 @@ define merge_packages
|
|||||||
GLUON_PACKAGES := $$(strip $$(filter-out -$$(patsubst -%,%,$(pkg)) $$(patsubst -%,%,$(pkg)),$$(GLUON_PACKAGES)) $(pkg))
|
GLUON_PACKAGES := $$(strip $$(filter-out -$$(patsubst -%,%,$(pkg)) $$(patsubst -%,%,$(pkg)),$$(GLUON_PACKAGES)) $(pkg))
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
$(eval $(call merge_packages,$(GLUON_DEFAULT_PACKAGES) $(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES)))
|
$(eval $(call merge_packages,$(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES)))
|
||||||
|
|
||||||
GLUON_PACKAGES_YES := $(filter-out -%,$(GLUON_PACKAGES))
|
|
||||||
GLUON_PACKAGES_NO := $(patsubst -%,%,$(filter -%,$(GLUON_PACKAGES)))
|
|
||||||
|
|
||||||
|
|
||||||
config: FORCE
|
config: FORCE
|
||||||
@$(CheckExternal)
|
@$(CheckExternal)
|
||||||
@$(CheckTarget)
|
@$(CheckTarget)
|
||||||
|
|
||||||
@( \
|
@$(GLUON_CONFIG_VARS) \
|
||||||
echo 'CONFIG_TARGET_$(BOARD)=y' \
|
scripts/target_config.sh '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' \
|
||||||
$(if $(SUBTARGET),&& echo 'CONFIG_TARGET_$(BOARD)_$(SUBTARGET)=y') \
|
> lede/.config
|
||||||
$(foreach pkg,$(GLUON_PACKAGES_NO),&& echo '# CONFIG_PACKAGE_$(pkg) is not set') \
|
|
||||||
&& GLUON_SITEDIR='$(GLUON_SITEDIR)' scripts/target_config.sh '$(GLUON_TARGET)' \
|
|
||||||
$(foreach pkg,$(GLUON_PACKAGES_YES),&& echo 'CONFIG_PACKAGE_$(pkg)=y') \
|
|
||||||
$(foreach lang,$(GLUON_LANGS),&& echo 'CONFIG_GLUON_WEB_LANG_$(lang)=y') \
|
|
||||||
&& echo 'CONFIG_GLUON_RELEASE="$(GLUON_RELEASE)"' \
|
|
||||||
&& echo 'CONFIG_GLUON_SITEDIR="$(GLUON_SITEDIR)"' \
|
|
||||||
&& echo 'CONFIG_GLUON_BRANCH="$(GLUON_BRANCH)"' \
|
|
||||||
) > lede/.config
|
|
||||||
+@$(LEDEMAKE) defconfig
|
+@$(LEDEMAKE) defconfig
|
||||||
|
|
||||||
@GLUON_SITEDIR='$(GLUON_SITEDIR)' scripts/target_config_check.sh '$(GLUON_TARGET)' '$(GLUON_PACKAGES_YES)'
|
@$(GLUON_CONFIG_VARS) \
|
||||||
|
scripts/target_config_check.sh '$(GLUON_TARGET)' '$(GLUON_PACKAGES)'
|
||||||
|
|
||||||
|
|
||||||
LUA := lede/staging_dir/hostpkg/bin/lua
|
LUA := lede/staging_dir/hostpkg/bin/lua
|
||||||
|
@ -4,6 +4,9 @@ set -e
|
|||||||
|
|
||||||
[ "$LEDE_TARGET" ] || exit 1
|
[ "$LEDE_TARGET" ] || exit 1
|
||||||
|
|
||||||
|
target="$1"
|
||||||
|
packages=$2
|
||||||
|
|
||||||
|
|
||||||
output=
|
output=
|
||||||
profile=
|
profile=
|
||||||
@ -59,7 +62,7 @@ packages() {
|
|||||||
|
|
||||||
for package in "$@"; do
|
for package in "$@"; do
|
||||||
if [ "${package:0:1}" = '-' ]; then
|
if [ "${package:0:1}" = '-' ]; then
|
||||||
echo "CONFIG_PACKAGE_${package:1}=m"
|
echo "# CONFIG_PACKAGE_${package:1} is not set"
|
||||||
else
|
else
|
||||||
echo "CONFIG_PACKAGE_${package}=y"
|
echo "CONFIG_PACKAGE_${package}=y"
|
||||||
fi
|
fi
|
||||||
@ -67,8 +70,13 @@ packages() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
. targets/generic
|
|
||||||
|
|
||||||
# The sort will not only remove duplicate entries,
|
# The sort will not only remove duplicate entries,
|
||||||
# but also magically make =y entries override =m ones
|
# but also magically make =y entries override =m ones
|
||||||
(. targets/"$1"; emit) | sort -u
|
(
|
||||||
|
. targets/generic
|
||||||
|
packages $packages
|
||||||
|
|
||||||
|
. targets/"$target"
|
||||||
|
emit
|
||||||
|
) | sort -u
|
||||||
|
@ -93,12 +93,10 @@ packages() {
|
|||||||
|
|
||||||
|
|
||||||
. targets/generic
|
. targets/generic
|
||||||
|
packages $packages
|
||||||
|
|
||||||
. targets/"$target"
|
. targets/"$target"
|
||||||
check_devices
|
check_devices
|
||||||
|
|
||||||
|
|
||||||
for package in $packages; do
|
|
||||||
check_package "$package" 'y'
|
|
||||||
done
|
|
||||||
|
|
||||||
exit $ret
|
exit $ret
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
device raspberry-pi rpi
|
device raspberry-pi rpi
|
||||||
factory -ext4-sdcard .img.gz
|
factory -ext4-sdcard .img.gz
|
||||||
sysupgrade -ext4-sdcard .img.gz
|
sysupgrade -ext4-sdcard .img.gz
|
||||||
packages '-wpad-mini' # clashes with hostapd-mini
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
device raspberry-pi-3 rpi-3
|
device raspberry-pi-3 rpi-3
|
||||||
factory -ext4-sdcard .img.gz
|
factory -ext4-sdcard .img.gz
|
||||||
sysupgrade -ext4-sdcard .img.gz
|
sysupgrade -ext4-sdcard .img.gz
|
||||||
packages '-wpad-mini' # clashes with hostapd-mini
|
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
[ "$GLUON_SITEDIR" -a "$GLUON_RELEASE" -a "$BOARD" ] || exit 1
|
||||||
|
|
||||||
|
config "CONFIG_GLUON_SITEDIR=\"$GLUON_SITEDIR\""
|
||||||
|
config "CONFIG_GLUON_RELEASE=\"$GLUON_RELEASE\""
|
||||||
|
try_config "CONFIG_GLUON_BRANCH=\"$GLUON_BRANCH\""
|
||||||
|
|
||||||
|
for lang in $GLUON_LANGS; do
|
||||||
|
try_config "CONFIG_GLUON_WEB_LANG_${lang}=y"
|
||||||
|
done
|
||||||
|
|
||||||
|
[ "$BOARD" ] && config "CONFIG_TARGET_${BOARD}=y"
|
||||||
|
[ -z "$SUBTARGET" ] || config "CONFIG_TARGET_${BOARD}_${SUBTARGET}=y"
|
||||||
|
|
||||||
|
|
||||||
config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set'
|
config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set'
|
||||||
|
|
||||||
config 'CONFIG_ALL_NONSHARED=y'
|
config 'CONFIG_ALL_NONSHARED=y'
|
||||||
@ -17,3 +31,7 @@ then
|
|||||||
config '# CONFIG_USE_STRIP is not set'
|
config '# CONFIG_USE_STRIP is not set'
|
||||||
config '# CONFIG_USE_SSTRIP is not set'
|
config '# CONFIG_USE_SSTRIP is not set'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
packages '-odhcpd' '-ppp' '-ppp-mod-pppoe' '-wpad-mini'
|
||||||
|
packages 'gluon-core' 'ip6tables' 'hostapd-mini'
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
device linksys-wrt1200ac linksys-wrt1200ac
|
device linksys-wrt1200ac linksys-wrt1200ac
|
||||||
packages '-wpad-mini' # clashes with hostapd-mini
|
|
||||||
factory .img
|
factory .img
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
packages '-wpad-mini' # clashes with hostapd-mini
|
|
||||||
|
|
||||||
# GL Innovations
|
# GL Innovations
|
||||||
device gl-mt300a gl-mt300a
|
device gl-mt300a gl-mt300a
|
||||||
factory
|
factory
|
||||||
|
@ -6,4 +6,3 @@ device lemaker-banana-pi sun7i-a20-bananapi
|
|||||||
device lemaker-banana-pro sun7i-a20-bananapro
|
device lemaker-banana-pro sun7i-a20-bananapro
|
||||||
|
|
||||||
device lamobo-r1 sun7i-a20-lamobo-r1
|
device lamobo-r1 sun7i-a20-lamobo-r1
|
||||||
packages '-wpad-mini' # clashes with hostapd-mini
|
|
||||||
|
Loading…
Reference in New Issue
Block a user