aboutsummaryrefslogtreecommitdiffstats
path: root/build-data
diff options
context:
space:
mode:
Diffstat (limited to 'build-data')
-rw-r--r--build-data/packages/dpdk.mk32
-rw-r--r--build-data/packages/g2.mk3
-rw-r--r--build-data/packages/gmod.mk9
-rw-r--r--build-data/packages/perftool.mk4
-rw-r--r--build-data/packages/sample-plugin.mk5
-rw-r--r--build-data/packages/src.mk0
-rw-r--r--build-data/packages/vpp-platform-scripts.mk1
-rw-r--r--build-data/packages/vpp.mk35
-rw-r--r--build-data/platforms.mk96
-rw-r--r--build-data/platforms/arm32.mk45
-rw-r--r--build-data/platforms/dpaa2.mk66
-rw-r--r--build-data/platforms/qppc.mk34
-rw-r--r--build-data/platforms/vpp.mk77
13 files changed, 407 insertions, 0 deletions
diff --git a/build-data/packages/dpdk.mk b/build-data/packages/dpdk.mk
new file mode 100644
index 00000000..ddfb8fd1
--- /dev/null
+++ b/build-data/packages/dpdk.mk
@@ -0,0 +1,32 @@
+
+ifneq (,$(findstring debug,$(TAG)))
+ DPDK_DEBUG=y
+else
+ DPDK_DEBUG=n
+endif
+
+DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
+ DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \
+ DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
+ DPDK_DEBUG=$(DPDK_DEBUG)
+
+DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))
+ifneq ($(DPDK_MLX5_PMD),)
+DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
+endif
+
+DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target))
+ifneq ($(DPDK_PLATFORM_TARGET),)
+DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET)
+endif
+
+DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args))
+ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
+DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
+endif
+
+dpdk_configure = echo
+
+dpdk_make_args = $(DPDK_MAKE_ARGS) ebuild-build
+
+dpdk_install = make $(DPDK_MAKE_ARGS) ebuild-install
diff --git a/build-data/packages/g2.mk b/build-data/packages/g2.mk
new file mode 100644
index 00000000..9b760e63
--- /dev/null
+++ b/build-data/packages/g2.mk
@@ -0,0 +1,3 @@
+g2_source = src
+
+g2_configure_args = --disable-vlib --disable-svm --enable-g2
diff --git a/build-data/packages/gmod.mk b/build-data/packages/gmod.mk
new file mode 100644
index 00000000..6fa7e0f1
--- /dev/null
+++ b/build-data/packages/gmod.mk
@@ -0,0 +1,9 @@
+gmod_configure_depend = vpp-install
+
+gmod_configure_args = --libdir=$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/ganglia
+
+gmod_CPPFLAGS = $(call installed_includes_fn, vpp)
+gmod_CPPFLAGS += -I/usr/include/apr-1.0 -I/usr/include/apr-1 -I/usr/include
+gmod_LDFLAGS = $(call installed_libs_fn, vpp)
+
+gmod_image_include = echo $(arch_lib_dir)/ganglia/libgmodvpp.so etc
diff --git a/build-data/packages/perftool.mk b/build-data/packages/perftool.mk
new file mode 100644
index 00000000..e582c316
--- /dev/null
+++ b/build-data/packages/perftool.mk
@@ -0,0 +1,4 @@
+perftool_source = src
+
+perftool_configure_args = --disable-vlib --disable-svm --enable-perftool
+
diff --git a/build-data/packages/sample-plugin.mk b/build-data/packages/sample-plugin.mk
new file mode 100644
index 00000000..fd1ee321
--- /dev/null
+++ b/build-data/packages/sample-plugin.mk
@@ -0,0 +1,5 @@
+sample-plugin_source = src
+sample-plugin_configure_subdir = examples/sample-plugin
+sample-plugin_configure_depend = vpp-install
+sample-plugin_CPPFLAGS = $(call installed_includes_fn, vpp)
+sample-plugin_LDFLAGS = $(call installed_libs_fn, vpp)
diff --git a/build-data/packages/src.mk b/build-data/packages/src.mk
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/build-data/packages/src.mk
diff --git a/build-data/packages/vpp-platform-scripts.mk b/build-data/packages/vpp-platform-scripts.mk
new file mode 100644
index 00000000..792d6005
--- /dev/null
+++ b/build-data/packages/vpp-platform-scripts.mk
@@ -0,0 +1 @@
+#
diff --git a/build-data/packages/vpp.mk b/build-data/packages/vpp.mk
new file mode 100644
index 00000000..a31ae7fe
--- /dev/null
+++ b/build-data/packages/vpp.mk
@@ -0,0 +1,35 @@
+vpp_source = src
+
+ifeq ($($(PLATFORM)_dpdk_shared_lib),yes)
+vpp_configure_args = --enable-dpdk-shared
+else
+vpp_configure_args =
+endif
+
+# Platform dependent configure flags
+vpp_configure_args += $(vpp_configure_args_$(PLATFORM))
+
+
+vpp_CPPFLAGS =
+vpp_LDFLAGS =
+
+ifneq ($($(PLATFORM)_uses_dpdk),no)
+ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
+vpp_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
+vpp_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
+else
+vpp_configure_depend += dpdk-install
+vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)/dpdk
+vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
+vpp_CPPFLAGS += -I/usr/include/dpdk
+endif
+ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes)
+vpp_configure_args += --with-dpdk-mlx5-pmd
+endif
+else
+vpp_configure_args += --disable-dpdk-plugin
+endif
+
+ifeq ($($(PLATFORM)_enable_tests),yes)
+vpp_configure_args += --enable-tests
+endif
diff --git a/build-data/platforms.mk b/build-data/platforms.mk
new file mode 100644
index 00000000..7904cc40
--- /dev/null
+++ b/build-data/platforms.mk
@@ -0,0 +1,96 @@
+# Copyright (c) 2015 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Pick up per-platform makefile fragments
+$(foreach d,$(SOURCE_PATH_BUILD_DATA_DIRS), \
+ $(eval -include $(d)/platforms/*.mk))
+
+.PHONY: install-deb
+install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
+ @$(BUILD_ENV) ; \
+ set -eu$(BUILD_DEBUG) ; \
+ $(MAKE) -C $(MU_BUILD_ROOT_DIR) \
+ $(patsubst %,%-install, \
+ $(ROOT_PACKAGES)) || exit 1; \
+ \
+ : generate file manifests ; \
+ find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print \
+ | sed -e 's:.*:../& /usr/bin:' | grep -v vppapigen \
+ > deb/debian/vpp.install ; \
+ \
+ : core api definitions ; \
+ ./scripts/find-api-core-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp.install ; \
+ \
+ : need symbolic links in the lib pkg ; \
+ find $(INSTALL_PREFIX)$(ARCH)/*/lib* \( -type f -o -type l \) \
+ -print | egrep -e '*\.so\.*\.*\.*' \
+ | grep -v plugins\/ \
+ | sed -e 's:.*:../& /usr/lib/x86_64-linux-gnu:' \
+ > deb/debian/vpp-lib.install ; \
+ \
+ : vnet api definitions ; \
+ ./scripts/find-api-lib-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp-lib.install ; \
+ \
+ : dev package ; \
+ ./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp-dev.install ; \
+ \
+ : plugins package ; \
+ ./scripts/find-plugins-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp-plugins.install ; \
+ \
+ : vpp-api-lua package ; \
+ ./scripts/find-vpp-api-lua-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp-api-lua.install ; \
+ \
+ : vpp-api-java package ; \
+ ./scripts/find-vpp-api-java-contents $(INSTALL_PREFIX)$(ARCH) \
+ deb/debian/vpp-api-java.install ; \
+ \
+ : bin package needs startup config ; \
+ echo ../../src/vpp/conf/startup.conf /etc/vpp \
+ >> deb/debian/vpp.install ; \
+ \
+ : and sysctl config ; \
+ echo ../../src/vpp/conf/80-vpp.conf /etc/sysctl.d \
+ >> deb/debian/vpp.install ; \
+ \
+ : bash completion for vppctl ; \
+ echo ../../src/scripts/vppctl_completion /etc/bash_completion.d \
+ >> deb/debian/vpp.install ; \
+ \
+ : move dictionary of vppctl commands ; \
+ echo ../../src/scripts/vppctl-cmd-list /usr/share/vpp \
+ >> deb/debian/vpp.install ; \
+ \
+ : dev package needs a couple of additions ; \
+ echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/bin/vppapigen /usr/bin \
+ >> deb/debian/vpp-dev.install ; \
+ echo ../../src/vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
+ >> deb/debian/vpp-dev.install ; \
+ for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \
+ echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \
+ >> deb/debian/vpp-dev.install; \
+ done; \
+ \
+ : generate changelog; \
+ ./scripts/generate-deb-changelog \
+ \
+ : Go fabricate the actual Debian packages ; \
+ ( \
+ cd deb && \
+ dpkg-buildpackage -us -uc -b \
+ )
+
diff --git a/build-data/platforms/arm32.mk b/build-data/platforms/arm32.mk
new file mode 100644
index 00000000..47d4ad5a
--- /dev/null
+++ b/build-data/platforms/arm32.mk
@@ -0,0 +1,45 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# vector packet processor
+arm32_arch = native
+arm32_native_tools = vppapigen
+
+arm32_uses_dpdk = yes
+arm32_uses_openssl = no
+
+arm32_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
+ jvpp gmod
+
+vlib_configure_args_arm32 = --with-pre-data=128
+vnet_configure_args_arm32 = --with-dpdk --without-libssl
+vpp_configure_args_arm32 = --with-dpdk --without-libssl
+
+arm32_dpdk_arch = "armv7a"
+arm32_dpdk_target = "arm-armv7a-linuxapp-gcc"
+arm32_dpdk_make_extra_args = "CPU_CFLAGS='-mfloat-abi=hard' \
+ CONFIG_RTE_EAL_IGB_UIO=y \
+ CONFIG_RTE_LIBRTE_E1000_PMD=y \
+ CONFIG_RTE_MAX_LCORE=4 \
+ CONFIG_RTE_MAX_NUMA_NODES=1"
+
+
+arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
+ -fstack-protector-all -fPIC -Werror
+arm32_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
+ -fstack-protector-all -fPIC -Werror
+
+arm32_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
+ -fstack-protector -fPIC -Werror
+arm32_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
+ -fstack-protector -fPIC -Werror
diff --git a/build-data/platforms/dpaa2.mk b/build-data/platforms/dpaa2.mk
new file mode 100644
index 00000000..2d4745ac
--- /dev/null
+++ b/build-data/platforms/dpaa2.mk
@@ -0,0 +1,66 @@
+# Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Configuration for NXP DPAA2 ARM64 based platform
+dpaa2_arch = aarch64
+dpaa2_os = linux-gnu
+dpaa2_target = aarch64-linux-gnu
+dpaa2_mtune = cortex-A57
+dpaa2_march = "armv8-a+fp+simd+crc+crypto"
+dpaa2_cross_ldflags = \
+ -Wl,--dynamic-linker=/lib/ld-linux-aarch64.so.1 \
+ -Wl,-rpath=/usr/lib64
+
+dpaa2_native_tools = vppapigen
+dpaa2_root_packages = vpp vlib vlib-api vnet svm vpp-api-test
+
+# DPDK configuration parameters
+dpaa2_uses_dpdk = yes
+# Compile with external DPDK only if "DPDK_PATH" variable is defined where we have
+# installed DPDK libraries and headers.
+ifeq ($(PLATFORM),dpaa2)
+ifneq ($(DPDK_PATH),)
+dpaa2_uses_dpdk = yes
+dpaa2_uses_external_dpdk = yes
+dpaa2_dpdk_inc_dir = $(DPDK_PATH)/include/dpdk
+dpaa2_dpdk_lib_dir = $(DPDK_PATH)/lib
+else
+# compile using internal DPDK + NXP DPAA2 Driver patch
+dpaa2_dpdk_arch = "armv8a"
+dpaa2_dpdk_target = "arm64-dpaa2-linuxapp-gcc"
+dpaa2_dpdk_make_extra_args = "CROSS=$(dpaa2_target)- DPDK_PKTMBUF_HEADROOM=256"
+endif
+endif
+
+vpp_configure_args_dpaa2 = --with-dpdk --without-libssl \
+ --with-sysroot=$(SYSROOT)
+vnet_configure_args_dpaa2 = --with-dpdk --without-libssl \
+ --with-sysroot=$(SYSROOT)
+
+# Set these parameters carefully. The vlib_buffer_t is 256 bytes, i.e.
+vlib_configure_args_dpaa2 = --with-pre-data=256
+
+
+dpaa2_debug_TAG_CFLAGS = -g -O2 -DCLIB_DEBUG -fPIC -fstack-protector-all \
+ -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
+dpaa2_debug_TAG_LDFLAGS = -g -O2 -DCLIB_DEBUG -fstack-protector-all \
+ -march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
+
+# Use -rdynamic is for stack tracing, O0 for debugging....default is O2
+# Use -DCLIB_LOG2_CACHE_LINE_BYTES to change cache line size
+dpaa2_TAG_CFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
+ -mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
+dpaa2_TAG_LDFLAGS = -g -O2 -fPIC -march=$(MARCH) -mcpu=$(dpaa2_mtune) \
+ -mtune=$(dpaa2_mtune) -funroll-all-loops -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6
+
+
diff --git a/build-data/platforms/qppc.mk b/build-data/platforms/qppc.mk
new file mode 100644
index 00000000..983684fc
--- /dev/null
+++ b/build-data/platforms/qppc.mk
@@ -0,0 +1,34 @@
+# Qemu "p-series" powerpc64
+
+qppc_os = linux-gnu
+
+qppc_cross_ldflags = \
+ -Wl,--dynamic-linker=/lib64/ld64.so.1
+
+qppc_arch = powerpc
+
+qppc_root_packages = vppinfra vlib vlib-api vnet svm \
+ vpp vpp-api-test
+
+vnet_configure_args_qppc = \
+ --without-libssl
+
+vpp_configure_args_qppc = \
+ --without-libssl
+
+vlib_configure_args_qppc = --with-pre-data=128
+
+qppc_march=powerpc64
+
+# native tool chain additions for this platform
+qppc_native_tools = vppapigen
+
+qppc_uses_dpdk = no
+
+qppc_debug_TAG_CFLAGS = -m64 -g -O0 -DCLIB_DEBUG -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
+qppc_debug_TAG_LDFLAGS = -m64 -g -O0 -DCLIB_DEBUG -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
+
+qppc_TAG_CFLAGS = -m64 -g -O2 -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
+qppc_TAG_LDFLAGS = -m64 -g -O2 -DCLIB_LOG2_CACHE_LINE_BYTES=6 -maltivec
+
+
diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk
new file mode 100644
index 00000000..77457174
--- /dev/null
+++ b/build-data/platforms/vpp.mk
@@ -0,0 +1,77 @@
+# Copyright (c) 2015 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# vector packet processor
+
+MACHINE=$(shell uname -m)
+
+vpp_arch = native
+ifeq ($(MACHINE),$(filter $(MACHINE),x86_64 i686))
+vpp_march = corei7 # Nehalem Instruction set
+vpp_mtune = corei7-avx # Optimize for Sandy Bridge
+else ifeq ($(MACHINE),aarch64)
+ifeq ($(TARGET_PLATFORM),thunderx)
+vpp_march = armv8-a+crc
+vpp_mtune = thunderx
+vpp_dpdk_target = arm64-thunderx-linuxapp-gcc
+else
+vpp_march = native
+vpp_mtune = generic
+endif
+endif
+vpp_native_tools = vppapigen
+
+vpp_uses_dpdk = yes
+
+# Uncoment to enable building unit tests
+# vpp_enable_tests = yes
+
+vpp_root_packages = vpp
+
+# DPDK configuration parameters
+# vpp_uses_dpdk_mlx5_pmd = yes
+# vpp_uses_external_dpdk = yes
+# vpp_dpdk_inc_dir = /usr/include/dpdk
+# vpp_dpdk_lib_dir = /usr/lib
+# vpp_dpdk_shared_lib = yes
+
+# load balancer plugin is not portable on 32 bit platform
+ifeq ($(MACHINE),i686)
+vpp_configure_args_vpp = --disable-lb-plugin
+endif
+
+vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
+ -fstack-protector-all -fPIC -Werror
+vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
+ -fstack-protector-all -fPIC -Werror
+
+vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
+ -fstack-protector -fPIC -Werror
+vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
+ -fstack-protector -fPIC -Werror
+
+vpp_clang_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
+ -fstack-protector -fPIC -Werror
+vpp_clang_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
+ -fstack-protector -fPIC -Werror
+
+vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
+ -fPIC -Werror -fprofile-arcs -ftest-coverage
+vpp_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
+ -fPIC -Werror -coverage
+
+vpp_coverity_TAG_CFLAGS = -g -O2 -march=$(MARCH) -mtune=$(MTUNE) \
+ -fPIC -Werror -D__COVERITY__
+vpp_coverity_TAG_LDFLAGS = -g -O2 -march=$(MARCH) -mtune=$(MTUNE) \
+ -fPIC -Werror -D__COVERITY__
+