From 19e4b413687083e2c3862c3fd6aa5137e4146046 Mon Sep 17 00:00:00 2001 From: Jakob Olsson Date: Wed, 8 Oct 2025 08:56:25 +0200 Subject: [PATCH] map-plugins: add zerotouch options --- map-plugins/Makefile | 8 +++++++- map-plugins/plugins/zero-touch.mk | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 map-plugins/plugins/zero-touch.mk diff --git a/map-plugins/Makefile b/map-plugins/Makefile index e7d09e4e7..ebbcf1051 100644 --- a/map-plugins/Makefile +++ b/map-plugins/Makefile @@ -27,12 +27,18 @@ include $(INCLUDE_DIR)/package.mk include $(wildcard plugins/*.mk) +TARGET_CFLAGS += \ + -I$(STAGING_DIR)/usr/include \ + -I$(STAGING_DIR)/usr/include/libnl3 \ + -D_GNU_SOURCE + MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS) -Wall" plugins := \ $(if $(CONFIG_PACKAGE_map-plugins-steer-rate),steer-rate) \ - $(if $(CONFIG_PACKAGE_map-plugins-bsteer),bsteer) + $(if $(CONFIG_PACKAGE_map-plugins-bsteer),bsteer) \ + $(if $(CONFIG_PACKAGE_map-plugins-zero-touch),zero-touch) ppkg:=$(patsubst plugins/%.mk,map-plugins-%,$(wildcard plugins/*.mk)) diff --git a/map-plugins/plugins/zero-touch.mk b/map-plugins/plugins/zero-touch.mk new file mode 100644 index 000000000..ddf1c8cda --- /dev/null +++ b/map-plugins/plugins/zero-touch.mk @@ -0,0 +1,22 @@ +define Package/map-plugins-zero-touch + $(call Package/map-plugins/Default) + TITLE:=Full Zero-touch bootstrapping of Wi-Fi Repeater device(s) + DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \ + +libjson-c +libblobmsg-json +map-controller \ + +map-plugins +endef + +define Package/map-plugins-zero-touch/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/mapcontroller + $(CP) $(PKG_BUILD_DIR)/zero-touch/zerotouch.so $(1)/usr/lib/mapcontroller/zerotouch.so + $(CP) $(PKG_BUILD_DIR)/zero-touch/libztdpp.so $(1)/usr/lib/libztdpp.so + +endef + +define Build/Compile/map-plugins-zero-touch + $(MAKE) -C $(PKG_BUILD_DIR)/zero-touch \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)"; +endef