ltq-atm/ltq-ptm: avoid unnecessary build dependencies

Right now, both ltq-adsl-mei and ltq-vdsl-mei are always built, even
when they aren't necessary for the selected variant. This can cause the
build to fail, for example ltq-vdsl-mei doesn't build successfully here
on xway target due to the vectoring callback.

Make these dependencies conditional on the specific package variants,
so they are only built when actually needed.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
(cherry picked from commit 2f484aeff5fe5ba3a832f98ca409adde3257e832)
This commit is contained in:
Jan Hoffmann 2022-04-25 21:43:50 +02:00 committed by Hauke Mehrtens
parent 290c13b7d7
commit ea0744fbc6
2 changed files with 11 additions and 6 deletions

View File

@ -22,13 +22,18 @@ define KernelPackage/ltq-atm-template
URL:=http://www.lantiq.com/ URL:=http://www.lantiq.com/
VARIANT:=$(1) VARIANT:=$(1)
DEPENDS:=@$(2) +kmod-atm +br2684ctl DEPENDS:=@$(2) +kmod-atm +br2684ctl
ifeq ($(1),vr9)
DEPENDS+= +PACKAGE_kmod-ltq-atm-$(1):kmod-ltq-vdsl-vr9-mei
else
DEPENDS+= +PACKAGE_kmod-ltq-atm-$(1):kmod-ltq-adsl-$(1)-mei
endif
FILES:=$(PKG_BUILD_DIR)/ltq_atm_$(1).ko FILES:=$(PKG_BUILD_DIR)/ltq_atm_$(1).ko
endef endef
KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy) +kmod-ltq-adsl-danube-mei) KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway +kmod-ltq-adsl-ar9-mei) KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway)
KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase +kmod-ltq-adsl-ase-mei) KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase)
KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200 +kmod-ltq-vdsl-vr9-mei) KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200)
define Build/Configure define Build/Configure
endef endef

View File

@ -24,9 +24,9 @@ define KernelPackage/ltq-ptm-template
VARIANT:=$(1) VARIANT:=$(1)
DEPENDS:=@TARGET_lantiq_$(2) DEPENDS:=@TARGET_lantiq_$(2)
ifeq ($(1),vr9) ifeq ($(1),vr9)
DEPENDS+= +kmod-ltq-vdsl-vr9-mei DEPENDS+= +PACKAGE_kmod-ltq-ptm-$(1):kmod-ltq-vdsl-vr9-mei
else else
DEPENDS+= +kmod-ltq-adsl-$(1)-mei DEPENDS+= +PACKAGE_kmod-ltq-ptm-$(1):kmod-ltq-adsl-$(1)-mei
endif endif
ifeq ($(1),ase) ifeq ($(1),ase)
DEPENDS+=@BROKEN DEPENDS+=@BROKEN