From 8ac714645d35e70f710e98ce3d1eeb7ba656558b Mon Sep 17 00:00:00 2001 From: NADAL Jean-Baptiste Date: Mon, 12 Dec 2016 21:45:50 +0100 Subject: [PATCH] Fix compilation of netifd and uci. --- bsp/buildroot_external/Config.in | 6 ++++++ bsp/buildroot_external/package/netifd/Config.in | 2 +- bsp/buildroot_external/package/netifd/netifd.mk | 2 +- bsp/buildroot_external/package/uci/uci.mk | 2 +- projects/pi_domo/configs/buildroot.config | 7 +++++-- projects/sun8i-h2_domo/configs/buildroot.config | 4 +++- src/3P/netifd/builders/cmake/CMakeLists.txt | 4 +++- src/3P/netifd/config.c | 2 +- src/3P/netifd/config.h | 2 +- src/3P/netifd/netifd.h | 2 +- src/3P/netifd/utils.h | 2 +- 11 files changed, 24 insertions(+), 11 deletions(-) diff --git a/bsp/buildroot_external/Config.in b/bsp/buildroot_external/Config.in index 0ce6faff..4c041b32 100644 --- a/bsp/buildroot_external/Config.in +++ b/bsp/buildroot_external/Config.in @@ -12,6 +12,12 @@ source "$BR2_EXTERNAL/package/ubox/Config.in" # UBUS source "$BR2_EXTERNAL/package/ubus/Config.in" +# UCI +source "$BR2_EXTERNAL/package/uci/Config.in" + +# NETIFD +source "$BR2_EXTERNAL/package/netifd/Config.in" + endmenu # Third parties menu "Domo" diff --git a/bsp/buildroot_external/package/netifd/Config.in b/bsp/buildroot_external/package/netifd/Config.in index 6512910d..f7a5bb8b 100644 --- a/bsp/buildroot_external/package/netifd/Config.in +++ b/bsp/buildroot_external/package/netifd/Config.in @@ -1,5 +1,5 @@ config BR2_PACKAGE_NETIFD - bool "procd" + bool "netifd" select BR2_PACKAGE_LIBUBOX select BR2_PACKAGE_UBUS select BR2_PACKAGE_UCI diff --git a/bsp/buildroot_external/package/netifd/netifd.mk b/bsp/buildroot_external/package/netifd/netifd.mk index eeea2373..6d42faaf 100644 --- a/bsp/buildroot_external/package/netifd/netifd.mk +++ b/bsp/buildroot_external/package/netifd/netifd.mk @@ -12,7 +12,7 @@ NETIFD_INSTALL_STAGING = YES NETIFD_DEPENDENCIES = libubox json-c ubus uci -NETIFD_CONF = SRC_DIR=$(TOPDIR)/../.. +NETIFD_CONF = SRC_DIR=$(TOPDIR)/../.. INC_DIR=$(WORKSPACE_DIR)buildroot/target/usr/include NETIFD_CONF_ENV = $(NETIFD_CONF) NETIFD_MAKE_ENV = $(NETIFD_CONF) diff --git a/bsp/buildroot_external/package/uci/uci.mk b/bsp/buildroot_external/package/uci/uci.mk index 758ee43d..9d8e6b0b 100644 --- a/bsp/buildroot_external/package/uci/uci.mk +++ b/bsp/buildroot_external/package/uci/uci.mk @@ -1,6 +1,6 @@ ################################################################################ # -# UBOX TOOLS +# UCI # ################################################################################ diff --git a/projects/pi_domo/configs/buildroot.config b/projects/pi_domo/configs/buildroot.config index 966d7b87..ceb2b5b0 100644 --- a/projects/pi_domo/configs/buildroot.config +++ b/projects/pi_domo/configs/buildroot.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Buildroot 2016.08.1-g94ec12e-dirty Configuration +# Buildroot 2016.08.1-gc269a1c-dirty Configuration # BR2_HAVE_DOT_CONFIG=y BR2_HOST_GCC_AT_LEAST_4_6=y @@ -1351,7 +1351,8 @@ BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS=y # BR2_PACKAGE_LIBNFNETLINK is not set # BR2_PACKAGE_LIBNFTNL is not set # BR2_PACKAGE_LIBNICE is not set -# BR2_PACKAGE_LIBNL is not set +BR2_PACKAGE_LIBNL=y +# BR2_PACKAGE_LIBNL_TOOLS is not set # BR2_PACKAGE_LIBOAUTH is not set # BR2_PACKAGE_LIBOPING is not set # BR2_PACKAGE_LIBOSIP2 is not set @@ -2431,6 +2432,8 @@ BR2_PACKAGE_PROCD=y # BR2_PACKAGE_PROCD_DISABLE_INIT is not set BR2_PACKAGE_UBOX=y BR2_PACKAGE_UBUS=y +BR2_PACKAGE_UCI=y +BR2_PACKAGE_NETIFD=y # # Domo diff --git a/projects/sun8i-h2_domo/configs/buildroot.config b/projects/sun8i-h2_domo/configs/buildroot.config index 43ab7b1b..58385de5 100644 --- a/projects/sun8i-h2_domo/configs/buildroot.config +++ b/projects/sun8i-h2_domo/configs/buildroot.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Buildroot 2016.08.1-ge0c4c18 Configuration +# Buildroot 2016.08.1-gc269a1c-dirty Configuration # BR2_HAVE_DOT_CONFIG=y BR2_HOST_GCC_AT_LEAST_4_6=y @@ -2442,6 +2442,8 @@ BR2_PACKAGE_PROCD=y # BR2_PACKAGE_PROCD_DISABLE_INIT is not set BR2_PACKAGE_UBOX=y BR2_PACKAGE_UBUS=y +BR2_PACKAGE_UCI=y +BR2_PACKAGE_NETIFD=y # # Domo diff --git a/src/3P/netifd/builders/cmake/CMakeLists.txt b/src/3P/netifd/builders/cmake/CMakeLists.txt index 30779230..a2617f3c 100644 --- a/src/3P/netifd/builders/cmake/CMakeLists.txt +++ b/src/3P/netifd/builders/cmake/CMakeLists.txt @@ -4,6 +4,8 @@ project (netifd) ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations) +include_directories ($ENV{INC_DIR}/libnl3) + set (CMAKE_MODULE_PATH "${MODULE_PATH}") set(DISABLE_TARGET_OPTIMIZATION ON) @@ -41,6 +43,6 @@ file ( add_executable (netifd ${source_files}) -target_link_libraries (netifd ubox ubus json-c blobmsg_json) +target_link_libraries (netifd ubox ubus json-c blobmsg_json uci nl-3) install (TARGETS netifd RUNTIME DESTINATION ../sbin) diff --git a/src/3P/netifd/config.c b/src/3P/netifd/config.c index 5d3db9f0..be2fa150 100644 --- a/src/3P/netifd/config.c +++ b/src/3P/netifd/config.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include "netifd.h" #include "interface.h" diff --git a/src/3P/netifd/config.h b/src/3P/netifd/config.h index 5adaca6d..b29e94a5 100644 --- a/src/3P/netifd/config.h +++ b/src/3P/netifd/config.h @@ -15,7 +15,7 @@ #define __NETIFD_CONFIG_H #include -#include +#include extern bool config_init; diff --git a/src/3P/netifd/netifd.h b/src/3P/netifd/netifd.h index 5a908587..d4e3fc8f 100644 --- a/src/3P/netifd/netifd.h +++ b/src/3P/netifd/netifd.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include "utils.h" diff --git a/src/3P/netifd/utils.h b/src/3P/netifd/utils.h index 4e14bcf5..12cfda1f 100644 --- a/src/3P/netifd/utils.h +++ b/src/3P/netifd/utils.h @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include