Skip to content

Commit e368be0

Browse files
committed
Release 1.2.0.0
1 parent f8b95f3 commit e368be0

File tree

239 files changed

+33196
-2978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+33196
-2978
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ files.idx
1313
.project
1414
.cproject
1515
.vscode
16-
.buildnum
16+
.buildnum
17+
/doc

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0.0
1+
1.2.0.0

3rdparty

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../3rdparty

Makefile

Lines changed: 25 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
default: all
2+
13
include build/color.mk
24

35
# Default configuration
46
include build/default.mk
7+
include build/flags.mk
58

69
# Modify default configuration for external vendors
710
include build/vendor.mk
@@ -12,103 +15,48 @@ include build/target-arch.mk
1215
# Include vendor-specific configuration
1316
include build/vendor-arch.mk
1417

18+
# KConfig configuration
19+
include build/kconfig.mk
20+
1521
# Create CFG_DEFINES based on configuration options
1622
include build/cfg-defines.mk
1723

24+
# Vendor defines
25+
include build/vendor-defines.mk
26+
27+
ifneq ($(_OVERRIDE_MAIN_MAKEFILE),1)
28+
29+
.PHONY: all build_all clean distclean FORCE
30+
1831
all: build_all
1932

2033
world: build_all
2134
$(MAKE) openwrt_all
2235

23-
MAKEFLAGS := --no-print-directory
24-
25-
CP = cp
26-
MKDIR = mkdir -p
27-
DIRNAME = dirname
28-
CAT = cat
29-
SED = sed
30-
MV = mv -f
31-
RM = rm -f
32-
CHMOD = chmod
33-
INSTALL = install -D
34-
TAR = tar
35-
GREP = grep
36-
37-
SRCEXT = cpp
38-
SRCEXT.c = c
39-
DEPEXT = d
40-
OBJEXT = o
41-
42-
SRCDIR = src
43-
WORKDIR = work/$(TARGET)
44-
OBJDIR = $(WORKDIR)/obj
45-
BINDIR = $(WORKDIR)/bin
46-
LIBDIR = $(WORKDIR)/lib
47-
BUILD_ROOTFS_DIR = $(WORKDIR)/rootfs
48-
APP_ROOTFS ?= $(BUILD_ROOTFS_DIR)
49-
IMAGEDIR = images
50-
WORKDIRS = $(WORKDIR) $(OBJDIR) $(LIBDIR) $(BINDIR) $(BUILD_ROOTFS_DIR) $(IMAGEDIR)
51-
52-
CFLAGS := -Wall -Wextra -Wno-unused-parameter -Wno-unused-label -Werror
53-
CFLAGS += $(CFG_DEFINES)
54-
CFLAGS += -fasynchronous-unwind-tables -rdynamic
55-
56-
# Below are global settings that need to be used
57-
DEBUG := -g
58-
OPTIMIZE :=
59-
60-
LDFLAGS := -rdynamic
61-
6236
# Include architecture specific makefile
6337
include $(ARCH_MK)
6438

65-
# Controls whether complete compilation lines are printed or not
66-
ifeq ($(V),1)
67-
Q=
68-
NQ=@echo
69-
Q_NULL=
70-
else
71-
Q=@
72-
NQ=@echo
73-
Q_STDOUT = >/dev/null
74-
Q_STDERR = 2>/dev/null
75-
endif
76-
77-
CFLAGS := $(CFLAGS) $(OPTIMIZE) $(DEBUG) $(DEFINES) $(INCLUDES)
78-
LIBS := $(LIBS) -lpthread
79-
80-
TARGET_DEF := TARGET_$(shell echo -n "$(TARGET)" | tr -sc '[A-Za-z0-9]' _ | tr '[a-z]' '[A-Z]')
81-
CFLAGS += -D$(TARGET_DEF) -DTARGET_NAME="\"$(TARGET)\""
82-
83-
.PHONY: build_all workdirs clean distclean FORCE
84-
39+
include build/flags2.mk
40+
include build/dirs.mk
41+
include build/verbose.mk
8542
include build/version.mk
8643
include build/git.mk
8744
include build/unit-build.mk
8845
include build/tags.mk
8946
include build/app_install.mk
9047
include build/ovsdb.mk
9148
include build/rootfs.mk
49+
include build/schema.mk
50+
include build/devshell.mk
51+
include build/help.mk
52+
include build/doc.mk
9253

93-
$(WORKDIRS):
94-
$(Q)mkdir -p $@
95-
96-
workdirs: $(WORKDIRS)
97-
98-
build_all: workdirs schema-check unit-install # rootfs
54+
build_all: workdirs schema-check unit-install
9955

10056
clean: unit-clean
10157
$(NQ) " $(call color_clean,clean) [$(call COLOR_BOLD,workdir)] $(WORKDIR)"
10258
$(Q)$(RM) -r $(WORKDIR)
10359

104-
.PHONY: schema-check
105-
schema-check:
106-
$(Q)build/schema.sh check || { echo "The OVS schema was changed but the version was not updated. Please run make schema-update"; exit 1; }
107-
108-
.PHONY: schema-update
109-
schema-update:
110-
@build/schema.sh update
111-
11260
DISTCLEAN_TARGETS := clean
11361

11462
distclean: $(DISTCLEAN_TARGETS)
@@ -120,8 +68,9 @@ $(error Unsupported TARGET ($(TARGET)). Supported targets are: \
12068
$(COL_CFG_GREEN)$(OS_TARGETS)$(COL_CFG_NONE))
12169
endif
12270

123-
# Include makefile for vendor-specific rules, if it exists
124-
-include $(VENDOR_DIR)/Makefile
71+
# Include makefile for target-specific rules, if it exists
72+
TARGET_MAKEFILE ?= $(VENDOR_DIR)/Makefile
73+
-include $(TARGET_MAKEFILE)
12574

12675
# backward compatibility
12776
SDK_DIR ?= $(OWRT_ROOT)
@@ -131,47 +80,5 @@ ifeq ($(INSTALL_ROOTFS_DIR),)
13180
INSTALL_ROOTFS_DIR = $(WORKDIR)/rootfs-install
13281
endif
13382

134-
DEVSHELL ?= $(SHELL)
135-
devshell:
136-
$(NQ) "make: running devshell TARGET=$(TARGET) DEVSHELL=$(DEVSHELL)"
137-
@PS1='TARGET=$(TARGET) $$PWD $$ ' $(DEVSHELL)
138-
$(NQ) "make: exit devshell TARGET=$(TARGET)"
139-
140-
141-
help:
142-
$(NQ) "Makefile help"
143-
$(NQ) ""
144-
$(NQ) "Makefile commands:"
145-
$(NQ) " all builds all enabled units"
146-
$(NQ) " os builds device image based on specified SDK"
147-
$(NQ) " tags Creates CTAGS for src directories"
148-
$(NQ) " cscope Creates CSCOPE for the same directories as ctags"
149-
$(NQ) " clean Removes generated, compiled objects"
150-
$(NQ) " distclean Invokes clean and also cleans the ctags and cscope files"
151-
$(NQ) " devshell Run shell with all environment variables set for TARGET"
152-
$(NQ) ""
153-
$(NQ) "Build Unit commands:"
154-
$(NQ) " unit-all Build ALL active units"
155-
$(NQ) " unit-install Build and install ALL active units"
156-
$(NQ) " unit-clean Clean ALL active units"
157-
$(NQ) " unit-list List ALL active units"
158-
$(NQ) ""
159-
$(NQ) " UNIT_PATH/clean Clean a single UNIT"
160-
$(NQ) " UNIT_PATH/rclean Clean a single UNIT and its dependencies"
161-
$(NQ) " UNIT_PATH/compile Compile a single UNIT and its dependencies"
162-
$(NQ) " UNIT_PATH/install Install UNIT products to target rootfs"
163-
$(NQ) ""
164-
$(NQ) "Control variables:"
165-
$(NQ) " V make verbose level. (values: 0, 1)"
166-
$(NQ) " default = 0"
167-
$(NQ) " TARGET Target identifier. See Supported targets."
168-
$(NQ) " default: $(DEFAULT_TARGET)"
169-
$(NQ) " current: $(TARGET)"
170-
$(NQ) " Supported targets:"
171-
@for x in $(OS_TARGETS); do echo " "$$x; done
172-
$(NQ) " IMAGE_TYPE squashfs (FLASH) or initramfs(BOOTP),"
173-
$(NQ) " default: $(DEFAULT_IMAGE_TYPE)"
174-
$(NQ) " IMAGE_DEPLOYMENT_PROFILE Supported deployment profiles:"
175-
@for x in $(VALID_IMAGE_DEPLOYMENT_PROFILES); do echo " "$$x; done
176-
$(NQ) ""
83+
endif # _OVERRIDE_MAIN_MAKEFILE
17784

build/cfg-defines.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,8 @@ endif # BUILD_CLIENT_NICKNAME
5353
ifeq ($(BUILD_CLIENT_FREEZE),y)
5454
CFG_DEFINES += -DUSE_CLIENT_FREEZE
5555
endif # BUILD_CLIENT_FREEZE
56+
57+
ifeq ($(BUILD_REMOTE_LOG),y)
58+
CFG_DEFINES += -DBUILD_REMOTE_LOG
59+
endif
60+

build/default.mk

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ TOP_SDK := ../sdk
2727
DEFAULT_IMAGE_TYPE := squashfs
2828
DEFAULT_TARGET := native
2929
INSTALL_PREFIX ?= /usr/plume
30+
ROOTFS_COMPONENTS ?= common target/$(TARGET) $(ROOTFS_PROFILE_COMPONENTS)
3031

3132
# Build features
3233
CFG_DEFINES :=
@@ -51,3 +52,30 @@ BUILD_CAPACITY_QUEUE_STATS ?= n
5152
BUILD_CLIENT_NICKNAME ?= n
5253
# specifies whether client freeze support is built or not
5354
BUILD_CLIENT_FREEZE ?= n
55+
# remote mqtt logging
56+
BUILD_REMOTE_LOG ?= y
57+
# backtrace based on libgcc_s
58+
BUILD_WITH_LIBGCC_BACKTRACE ?= y
59+
60+
61+
# Default shell commands and flags
62+
63+
MAKEFLAGS := --no-print-directory
64+
65+
CP = cp
66+
MKDIR = mkdir -p
67+
DIRNAME = dirname
68+
CAT = cat
69+
SED = sed
70+
MV = mv -f
71+
RM = rm -f
72+
CHMOD = chmod
73+
INSTALL = install -D
74+
TAR = tar
75+
GREP = grep
76+
77+
SRCEXT = cpp
78+
SRCEXT.c = c
79+
DEPEXT = d
80+
OBJEXT = o
81+

build/devshell.mk

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (c) 2015, Plume Design Inc. All rights reserved.
2+
#
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
5+
# 1. Redistributions of source code must retain the above copyright
6+
# notice, this list of conditions and the following disclaimer.
7+
# 2. Redistributions in binary form must reproduce the above copyright
8+
# notice, this list of conditions and the following disclaimer in the
9+
# documentation and/or other materials provided with the distribution.
10+
# 3. Neither the name of the Plume Design Inc. nor the
11+
# names of its contributors may be used to endorse or promote products
12+
# derived from this software without specific prior written permission.
13+
#
14+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17+
# DISCLAIMED. IN NO EVENT SHALL Plume Design Inc. BE LIABLE FOR ANY
18+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24+
25+
.PHONY: devshell
26+
DEVSHELL ?= $(SHELL)
27+
devshell:
28+
$(NQ) "make: running devshell TARGET=$(TARGET) DEVSHELL=$(DEVSHELL)"
29+
@PS1='TARGET=$(TARGET) $$PWD $$ ' $(DEVSHELL)
30+
$(NQ) "make: exit devshell TARGET=$(TARGET)"

build/dirs.mk

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) 2015, Plume Design Inc. All rights reserved.
2+
#
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
5+
# 1. Redistributions of source code must retain the above copyright
6+
# notice, this list of conditions and the following disclaimer.
7+
# 2. Redistributions in binary form must reproduce the above copyright
8+
# notice, this list of conditions and the following disclaimer in the
9+
# documentation and/or other materials provided with the distribution.
10+
# 3. Neither the name of the Plume Design Inc. nor the
11+
# names of its contributors may be used to endorse or promote products
12+
# derived from this software without specific prior written permission.
13+
#
14+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17+
# DISCLAIMED. IN NO EVENT SHALL Plume Design Inc. BE LIABLE FOR ANY
18+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24+
25+
SRCDIR = src
26+
WORKDIR ?= work/$(TARGET)
27+
OBJDIR = $(WORKDIR)/obj
28+
BINDIR = $(WORKDIR)/bin
29+
LIBDIR = $(WORKDIR)/lib
30+
BUILD_ROOTFS_DIR ?= $(WORKDIR)/rootfs
31+
APP_ROOTFS ?= $(BUILD_ROOTFS_DIR)
32+
IMAGEDIR = images
33+
WORKDIRS = $(WORKDIR) $(OBJDIR) $(LIBDIR) $(BINDIR) $(BUILD_ROOTFS_DIR) $(IMAGEDIR)
34+
35+
$(WORKDIRS):
36+
$(Q)mkdir -p $@
37+
38+
.PHONY: workdirs
39+
workdirs: $(WORKDIRS)

build/doc.mk

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright (c) 2015, Plume Design Inc. All rights reserved.
2+
#
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
5+
# 1. Redistributions of source code must retain the above copyright
6+
# notice, this list of conditions and the following disclaimer.
7+
# 2. Redistributions in binary form must reproduce the above copyright
8+
# notice, this list of conditions and the following disclaimer in the
9+
# documentation and/or other materials provided with the distribution.
10+
# 3. Neither the name of the Plume Design Inc. nor the
11+
# names of its contributors may be used to endorse or promote products
12+
# derived from this software without specific prior written permission.
13+
#
14+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17+
# DISCLAIMED. IN NO EVENT SHALL Plume Design Inc. BE LIABLE FOR ANY
18+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24+
25+
.PHONY: doc
26+
doc:
27+
$(NQ) " $(call color_generate,doc) $(call color_target,[HTML])"
28+
$(Q)cd doc; doxygen doxygen.conf > doxygen.log 2>&1
29+
$(Q)echo -n " "; ls -l doc/html/index.html
30+
$(NQ) " $(call color_generate,doc) $(call color_target,[PDF])"
31+
$(Q)-cd doc/latex; make > make.log 2>&1
32+
$(Q)echo -n " "; ls -l doc/latex/*.pdf

build/flags.mk

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Copyright (c) 2015, Plume Design Inc. All rights reserved.
2+
#
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
5+
# 1. Redistributions of source code must retain the above copyright
6+
# notice, this list of conditions and the following disclaimer.
7+
# 2. Redistributions in binary form must reproduce the above copyright
8+
# notice, this list of conditions and the following disclaimer in the
9+
# documentation and/or other materials provided with the distribution.
10+
# 3. Neither the name of the Plume Design Inc. nor the
11+
# names of its contributors may be used to endorse or promote products
12+
# derived from this software without specific prior written permission.
13+
#
14+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17+
# DISCLAIMED. IN NO EVENT SHALL Plume Design Inc. BE LIABLE FOR ANY
18+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24+
25+
# C FLAGS
26+
CFLAGS := -Wall -Wextra -Werror
27+
CFLAGS += -Wno-unused-parameter
28+
CFLAGS += -Wno-unused-label
29+
CFLAGS += -Wno-strict-aliasing
30+
CFLAGS += -fasynchronous-unwind-tables -rdynamic
31+
32+
DEBUGFLAGS := -g
33+
OPTIMIZE :=
34+
35+
# LD FLAGS
36+
LDFLAGS := -rdynamic
37+
LIBS += -lpthread
38+

0 commit comments

Comments
 (0)