[OpenWrt-Devel] [PATCH RFC 3/5] target: Add board notion support
Maxime Ripard
maxime.ripard at free-electrons.com
Fri Dec 12 10:21:03 EST 2014
Even though we always build all the board images for a given target, some
options widely differ from one board to another when it comes to hardware
configuration.
Such an option for example is the NAND setup, which depends on the NAND chip
itself, that obviously varies from one board to another.
This kind of options used to be declared either globally for one platform,
which would enforce a fragile default, or through alternate profiles, that
would result in an unusable image that would still be compiled if we chose the
wrong one.
Introduce a new notion of boards, that would be defined in the
$(PLATFORM_DIR)/boards directory, to set up this kind of board specific
options, that we always want to be in-use, no matter what profile is used.
Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
include/target.mk | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/target.mk b/include/target.mk
index db501e06c760..b6d1c9fde9bf 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -87,6 +87,12 @@ define Profile
endef
endif
+ifndef Board
+define Board
+ TARGET_BOARDS += $(1)
+endef
+endif
+
ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
define IncludeProfiles
-include $(sort $(wildcard $(PLATFORM_DIR)/profiles/*.mk))
@@ -98,11 +104,17 @@ else
endef
endif
+define IncludeBoards
+ -include $(sort $(wildcard $(PLATFORM_DIR)/boards/*.mk))
+endef
+
ifeq ($(TARGET_BUILD),1)
$(eval $(call IncludeProfiles))
+ $(eval $(call IncludeBoards))
else
ifeq ($(DUMP),)
$(eval $(call IncludeProfiles))
+ $(eval $(call IncludeBoards))
endif
endif
--
2.2.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list