Initial commit of vpp code.
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
|
||||
DPDK_MARCH = $(strip $($(PLATFORM)_dpdk_arch))
|
||||
ifeq ($(DPDK_MARCH),)
|
||||
DPDK_MARCH="native"
|
||||
endif
|
||||
|
||||
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_MARCH=$(DPDK_MARCH) \
|
||||
DPDK_DEBUG=$(DPDK_DEBUG)
|
||||
|
||||
|
||||
dpdk_configure = echo
|
||||
|
||||
dpdk_make_args = $(DPDK_MAKE_ARGS) config
|
||||
|
||||
dpdk_install = make $(DPDK_MAKE_ARGS) build
|
||||
@@ -0,0 +1,41 @@
|
||||
sample-plugin_configure_depend = \
|
||||
vppinfra-install \
|
||||
dpdk-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install \
|
||||
vnet-install \
|
||||
vpp-install \
|
||||
vpp-api-test-install
|
||||
|
||||
#
|
||||
sample-plugin_configure_args = --with-q-platform=$(PLATFORM) --with-dpdk
|
||||
|
||||
sample-plugin_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
sample-plugin_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp \
|
||||
vpp-api-test)
|
||||
|
||||
sample-plugin_post_install = \
|
||||
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins ; \
|
||||
cp $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/*.so \
|
||||
$(PACKAGE_INSTALL_DIR)/$(arch_lib_dir)/vlib_plugins
|
||||
|
||||
sample-plugin_image_include = echo $(arch_lib_dir)/vlib_plugins
|
||||
@@ -0,0 +1,5 @@
|
||||
svm_top_srcdir = $(call find_source_fn,svm)
|
||||
svm_configure_depend = vppinfra-install
|
||||
|
||||
svm_CPPFLAGS = $(call installed_includes_fn, vppinfra)
|
||||
svm_LDFLAGS = $(call installed_libs_fn, vppinfra)
|
||||
@@ -0,0 +1,6 @@
|
||||
vlib-api_configure_depend = vppinfra-install svm-install vlib-install
|
||||
|
||||
vlib-api_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib)
|
||||
vlib-api_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib)
|
||||
|
||||
vlib-api_top_srcdir = $(call find_source_fn,vlib-api)
|
||||
@@ -0,0 +1,6 @@
|
||||
vlib_configure_depend = vppinfra-install dpdk-install
|
||||
|
||||
vlib_configure_args += --with-dpdk
|
||||
|
||||
vlib_CPPFLAGS = $(call installed_includes_fn, vppinfra dpdk)
|
||||
vlib_LDFLAGS = $(call installed_libs_fn, vppinfra dpdk)
|
||||
@@ -0,0 +1,26 @@
|
||||
vnet_configure_depend = \
|
||||
vppinfra-install \
|
||||
dpdk-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install
|
||||
|
||||
vnet_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api)
|
||||
|
||||
vnet_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api)
|
||||
|
||||
# Platform dependent configure flags
|
||||
vnet_configure_args += $(vnet_configure_args_$(PLATFORM))
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
vpp-api-test_configure_depend = \
|
||||
vppinfra-install \
|
||||
dpdk-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install \
|
||||
vnet-install \
|
||||
vpp-install
|
||||
|
||||
#
|
||||
vpp-api-test_configure_args = --with-q-platform=$(PLATFORM) --with-dpdk \
|
||||
--with-q-plugin-prefix=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM)
|
||||
|
||||
vpp-api-test_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp)
|
||||
|
||||
vpp-api-test_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp)
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
vpp-japi_configure_depend = \
|
||||
vppinfra-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install \
|
||||
vnet-install \
|
||||
vpp-install
|
||||
|
||||
vpp-japi_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp)
|
||||
|
||||
vpp-japi_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api)
|
||||
|
||||
vpp-japi_CPPFLAGS += -I/usr/lib/jvm/java-7-openjdk-amd64/include
|
||||
@@ -0,0 +1 @@
|
||||
#
|
||||
@@ -0,0 +1,33 @@
|
||||
vpp_configure_depend = \
|
||||
vppinfra-install \
|
||||
dpdk-install \
|
||||
svm-install \
|
||||
vlib-api-install \
|
||||
vlib-install \
|
||||
vnet-install \
|
||||
|
||||
#
|
||||
vpp_configure_args = --with-q-platform=$(PLATFORM) \
|
||||
--with-q-plugin-prefix=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM)
|
||||
|
||||
# Platform dependent configure flags
|
||||
vpp_configure_args += $(vpp_configure_args_$(PLATFORM))
|
||||
|
||||
|
||||
vpp_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet)
|
||||
|
||||
vpp_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet)
|
||||
@@ -0,0 +1,2 @@
|
||||
# nothing
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
# 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:' \
|
||||
> deb/debian/vpp.install ; \
|
||||
find $(INSTALL_PREFIX)$(ARCH)/*/lib* -type f -print \
|
||||
| egrep -e '*\.so\.*\.*\.*' \
|
||||
| sed -e 's:.*:../& /usr/lib/x86_64-linux-gnu:' \
|
||||
> deb/debian/vpp-lib.install ; \
|
||||
\
|
||||
: dev package ; \
|
||||
./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH) \
|
||||
deb/debian/vpp-dev.install ; \
|
||||
\
|
||||
: bin package needs startup config ; \
|
||||
echo ../../vpp/conf/startup.conf /etc/vpp \
|
||||
>> deb/debian/vpp.install ; \
|
||||
\
|
||||
: and sysctl config ; \
|
||||
echo ../../vpp/conf/80-vpp.conf /etc/sysctl.d \
|
||||
>> deb/debian/vpp.install ; \
|
||||
\
|
||||
: dev package needs a couple of additions ; \
|
||||
echo ../build-tool-native/vppapigen/vppapigen /usr/bin \
|
||||
>> deb/debian/vpp-dev.install ; \
|
||||
\
|
||||
: generate changelog; \
|
||||
./scripts/generate-deb-changelog \
|
||||
\
|
||||
: Go fabricate the actual Debian packages ; \
|
||||
( \
|
||||
cd deb && \
|
||||
dpkg-buildpackage -us -uc -b \
|
||||
)
|
||||
|
||||
.PHONY: install-rpm
|
||||
install-rpm: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
|
||||
@$(BUILD_ENV) ; \
|
||||
set -eu$(BUILD_DEBUG) ; \
|
||||
$(MAKE) -C $(MU_BUILD_ROOT_DIR) \
|
||||
$(patsubst %,%-install, \
|
||||
$(ROOT_PACKAGES)) || exit 1; \
|
||||
\
|
||||
cd rpm ; \
|
||||
rpmbuild -bb --define "_topdir $$PWD" vpp.spec ; \
|
||||
mv $$(find RPMS -name \*.rpm -type f) ..
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# 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
|
||||
virl_arch = native
|
||||
virl_native_tools = vppapigen vppversion
|
||||
|
||||
virl_root_packages = vpp vlib vlib-api vnet svm dpdk vpp-api-test \
|
||||
vpp-japi
|
||||
|
||||
vpp_configure_args_virl = --with-dpdk
|
||||
vnet_configure_args_virl = --with-dpdk --with-virl
|
||||
|
||||
# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
|
||||
# dpdk_headroom = uiotarball_headroom = vlib_pre_data + 128
|
||||
dpdk_configure_args_virl = --with-headroom=256
|
||||
vlib_configure_args_virl = --with-pre-data=128
|
||||
|
||||
# Override default -march and CONFIG_RTE_MACHINE settings
|
||||
# Otherwise, illgal instructions will result
|
||||
virl_march=corei7
|
||||
virl_dpdk_arch=corei7
|
||||
|
||||
virl_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
|
||||
-fstack-protector-all -fPIC
|
||||
virl_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
|
||||
-fstack-protector-all -fPIC
|
||||
|
||||
virl_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
|
||||
-fstack-protector -fPIC
|
||||
virl_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
|
||||
-fstack-protector -fPIC
|
||||
@@ -0,0 +1,38 @@
|
||||
# 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
|
||||
vpp_arch = native
|
||||
vpp_native_tools = vppapigen vppversion
|
||||
|
||||
vpp_root_packages = vpp vlib vlib-api vnet svm dpdk vpp-api-test \
|
||||
vpp-japi
|
||||
|
||||
vpp_configure_args_vpp = --with-dpdk
|
||||
vnet_configure_args_vpp = --with-dpdk
|
||||
|
||||
# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
|
||||
# dpdk_headroom = uiotarball_headroom = vlib_pre_data + 128
|
||||
dpdk_configure_args_vpp = --with-headroom=256
|
||||
vlib_configure_args_vpp = --with-pre-data=128
|
||||
|
||||
|
||||
vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
|
||||
-fstack-protector-all -fPIC
|
||||
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
|
||||
-fstack-protector-all -fPIC
|
||||
|
||||
vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
|
||||
-fstack-protector -fPIC
|
||||
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) \
|
||||
-fstack-protector -fPIC
|
||||
Reference in New Issue
Block a user