Add receipe and makefile fro netifd and uci.
This commit is contained in:
9
bsp/buildroot_external/package/netifd/Config.in
Normal file
9
bsp/buildroot_external/package/netifd/Config.in
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
config BR2_PACKAGE_NETIFD
|
||||||
|
bool "procd"
|
||||||
|
select BR2_PACKAGE_LIBUBOX
|
||||||
|
select BR2_PACKAGE_UBUS
|
||||||
|
select BR2_PACKAGE_UCI
|
||||||
|
select BR2_PACKAGE_JSON_C
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
This program manage network interfaces.
|
||||||
21
bsp/buildroot_external/package/netifd/netifd.mk
Normal file
21
bsp/buildroot_external/package/netifd/netifd.mk
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# NETIFD
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
NETIFD_VERSION:= 2016.06.06
|
||||||
|
|
||||||
|
NETIFD_SITE = $(TOPDIR)/../../src/3P/netifd/builders/cmake
|
||||||
|
NETIFD_SITE_METHOD = local
|
||||||
|
NETIFD_INSTALL_STAGING = YES
|
||||||
|
|
||||||
|
NETIFD_DEPENDENCIES = libubox json-c ubus uci
|
||||||
|
|
||||||
|
NETIFD_CONF = SRC_DIR=$(TOPDIR)/../..
|
||||||
|
|
||||||
|
NETIFD_CONF_ENV = $(NETIFD_CONF)
|
||||||
|
NETIFD_MAKE_ENV = $(NETIFD_CONF)
|
||||||
|
NETIFD_CONF_OPTS += -DMODULE_PATH=$(TOPDIR)/../../bsp/cmake-modules -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
|
||||||
|
|
||||||
|
$(eval $(cmake-package))
|
||||||
7
bsp/buildroot_external/package/uci/Config.in
Normal file
7
bsp/buildroot_external/package/uci/Config.in
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
config BR2_PACKAGE_UCI
|
||||||
|
bool "uci tools"
|
||||||
|
default n
|
||||||
|
select BR2_PACKAGE_LIBUBOX
|
||||||
|
select BR2_PACKAGE_LIBNL
|
||||||
|
help
|
||||||
|
Ubox tools.
|
||||||
21
bsp/buildroot_external/package/uci/uci.mk
Normal file
21
bsp/buildroot_external/package/uci/uci.mk
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# UBOX TOOLS
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
UCI_VERSION:= 2016.07.04
|
||||||
|
|
||||||
|
UCI_SITE = $(TOPDIR)/../../src/3P/uci/builders/cmake
|
||||||
|
UCI_SITE_METHOD = local
|
||||||
|
UCI_INSTALL_STAGING = YES
|
||||||
|
|
||||||
|
UCI_DEPENDENCIES = libnl libubox ubus
|
||||||
|
|
||||||
|
UCI_CONF = SRC_DIR=$(TOPDIR)/../..
|
||||||
|
|
||||||
|
UCI_CONF_ENV = $(UCI_CONF)
|
||||||
|
UCI_MAKE_ENV = $(UCI_CONF)
|
||||||
|
UCI_CONF_OPTS += -DMODULE_PATH=$(TOPDIR)/../../bsp/cmake-modules -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
|
||||||
|
|
||||||
|
$(eval $(cmake-package))
|
||||||
46
src/3P/netifd/builders/cmake/CMakeLists.txt
Normal file
46
src/3P/netifd/builders/cmake/CMakeLists.txt
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
cmake_minimum_required (VERSION 3.0)
|
||||||
|
|
||||||
|
project (netifd)
|
||||||
|
|
||||||
|
ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations)
|
||||||
|
|
||||||
|
set (CMAKE_MODULE_PATH "${MODULE_PATH}")
|
||||||
|
|
||||||
|
set(DISABLE_TARGET_OPTIMIZATION ON)
|
||||||
|
|
||||||
|
include (br)
|
||||||
|
|
||||||
|
file (
|
||||||
|
GLOB_RECURSE
|
||||||
|
source_files
|
||||||
|
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/main.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/utils.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/system.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/tunnel.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/handler.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/interface.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/interface-ip.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/interface-event.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/iprule.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/proto.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/proto-static.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/proto-shell.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/config.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/device.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/bridge.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/vlan.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/alias.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/macvlan.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/ubus.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/vlandev.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/wireless.c
|
||||||
|
|
||||||
|
$ENV{SRC_DIR}/src/3P/netifd/system-linux.c
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
add_executable (netifd ${source_files})
|
||||||
|
target_link_libraries (netifd ubox ubus json-c blobmsg_json)
|
||||||
|
|
||||||
|
install (TARGETS netifd RUNTIME DESTINATION ../sbin)
|
||||||
47
src/3P/uci/builders/cmake/CMakeLists.txt
Normal file
47
src/3P/uci/builders/cmake/CMakeLists.txt
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
|
project (uci)
|
||||||
|
|
||||||
|
set (CMAKE_MODULE_PATH "${MODULE_PATH}")
|
||||||
|
|
||||||
|
set(DISABLE_TARGET_OPTIMIZATION ON)
|
||||||
|
|
||||||
|
include (br)
|
||||||
|
|
||||||
|
include_directories ($ENV{SRC_DIR}/src/3P/uci)
|
||||||
|
|
||||||
|
ADD_DEFINITIONS (-Werror --std=gnu99 -Wmissing-declarations)
|
||||||
|
|
||||||
|
CONFIGURE_FILE ($ENV{SRC_DIR}/src/3P/uci/uci_config.h.in $ENV{SRC_DIR}/src/3P/uci/uci_config.h )
|
||||||
|
|
||||||
|
# uci library
|
||||||
|
file (
|
||||||
|
GLOB_RECURSE
|
||||||
|
lib_source_files
|
||||||
|
|
||||||
|
$ENV{SRC_DIR}/src/3P/uci/libuci.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/uci/file.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/uci/util.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/uci/delta.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/uci/parse.c
|
||||||
|
$ENV{SRC_DIR}/src/3P/uci/blob.c
|
||||||
|
)
|
||||||
|
|
||||||
|
# Library
|
||||||
|
add_library (uci SHARED ${lib_source_files})
|
||||||
|
target_link_libraries (uci LINK_PUBLIC ubox)
|
||||||
|
|
||||||
|
target_include_directories (uci PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
install (TARGETS uci LIBRARY DESTINATION local/lib)
|
||||||
|
|
||||||
|
file (GLOB uci_headers $ENV{SRC_DIR}/src/3P/uci/*.h)
|
||||||
|
install (FILES ${uci_headers} DESTINATION include/uci)
|
||||||
|
|
||||||
|
|
||||||
|
# cmd line tool.
|
||||||
|
add_executable (uci_cli $ENV{SRC_DIR}/src/3P/uci/cli.c)
|
||||||
|
set_target_properties (uci_cli PROPERTIES OUTPUT_NAME uci)
|
||||||
|
target_link_libraries (uci_cli LINK_PUBLIC uci ubox blobmsg_json)
|
||||||
|
|
||||||
|
install (TARGETS uci_cli RUNTIME DESTINATION bin)
|
||||||
Reference in New Issue
Block a user