Handle PLATFORM_DIR for target/linux/feeds/
Prasun Maiti
prasunmaiti87 at gmail.com
Thu Apr 21 06:27:04 PDT 2022
When we are installing targets to target/linux/feeds, BOARD is not available
under target/linux/.
Ref Commit: ebc36ebb2349ef5d492dd2bd5be962bac26bb19a
So, we need to handle this scenario by taking proper target path
Signed-off-by: Prasun Maiti <prasunmaiti87 at gmail.com>
---
include/target.mk | 3 +++
target/linux/Makefile | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/target.mk b/include/target.mk
index 64db3b0b..912f36d8 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -69,6 +69,9 @@ endif
target_conf=$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
ifeq ($(DUMP),)
PLATFORM_DIR:=$(TOPDIR)/target/linux/$(BOARD)
+ ifeq ("$(wildcard $(PLATFORM_DIR))", "")
+ PLATFORM_DIR:=$(TOPDIR)/target/linux/feeds/$(BOARD)
+ endif
SUBTARGET:=$(strip $(foreach subdir,$(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if $(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir))))
else
PLATFORM_DIR:=${CURDIR}
diff --git a/target/linux/Makefile b/target/linux/Makefile
index a939d42b..a6ea7886 100644
--- a/target/linux/Makefile
+++ b/target/linux/Makefile
@@ -8,4 +8,4 @@ include $(INCLUDE_DIR)/target.mk
export TARGET_BUILD=1
prereq clean download prepare compile install oldconfig menuconfig nconfig xconfig update refresh: FORCE
- @+$(NO_TRACE_MAKE) -C $(BOARD) $@
+ @+$(NO_TRACE_MAKE) -C $(PLATFORM_DIR) $@
--
2.17.1
More information about the openwrt-devel
mailing list