diff options
author | Ed Warnicke <eaw@cisco.com> | 2015-12-08 15:45:58 -0700 |
---|---|---|
committer | Ed Warnicke <eaw@cisco.com> | 2015-12-08 15:47:27 -0700 |
commit | cb9cadad578297ffd78fa8a33670bdf1ab669e7e (patch) | |
tree | 6ac2be912482cc7849a26f0ab845561c3d7f4e26 /build-data | |
parent | fb0815d4ae4bb0fe27bd9313f34b45c8593b907e (diff) |
Initial commit of vpp code.v1.0.0
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Diffstat (limited to 'build-data')
-rw-r--r-- | build-data/packages/dpdk.mk | 24 | ||||
-rw-r--r-- | build-data/packages/sample-plugin.mk | 41 | ||||
-rw-r--r-- | build-data/packages/svm.mk | 5 | ||||
-rw-r--r-- | build-data/packages/vlib-api.mk | 6 | ||||
-rw-r--r-- | build-data/packages/vlib.mk | 6 | ||||
-rw-r--r-- | build-data/packages/vnet.mk | 26 | ||||
-rw-r--r-- | build-data/packages/vpp-api-test.mk | 31 | ||||
-rw-r--r-- | build-data/packages/vpp-japi.mk | 23 | ||||
-rw-r--r-- | build-data/packages/vpp-platform-scripts.mk | 1 | ||||
-rw-r--r-- | build-data/packages/vpp.mk | 33 | ||||
-rw-r--r-- | build-data/packages/vppinfra.mk | 2 | ||||
-rw-r--r-- | build-data/platforms.mk | 71 | ||||
-rw-r--r-- | build-data/platforms/virl.mk | 42 | ||||
-rw-r--r-- | build-data/platforms/vpp.mk | 38 |
14 files changed, 349 insertions, 0 deletions
diff --git a/build-data/packages/dpdk.mk b/build-data/packages/dpdk.mk new file mode 100644 index 00000000000..c7f04346ab6 --- /dev/null +++ b/build-data/packages/dpdk.mk @@ -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 diff --git a/build-data/packages/sample-plugin.mk b/build-data/packages/sample-plugin.mk new file mode 100644 index 00000000000..4532817c766 --- /dev/null +++ b/build-data/packages/sample-plugin.mk @@ -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 diff --git a/build-data/packages/svm.mk b/build-data/packages/svm.mk new file mode 100644 index 00000000000..3971fe82335 --- /dev/null +++ b/build-data/packages/svm.mk @@ -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) diff --git a/build-data/packages/vlib-api.mk b/build-data/packages/vlib-api.mk new file mode 100644 index 00000000000..f4bd67d9c15 --- /dev/null +++ b/build-data/packages/vlib-api.mk @@ -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) diff --git a/build-data/packages/vlib.mk b/build-data/packages/vlib.mk new file mode 100644 index 00000000000..11bb1c7a508 --- /dev/null +++ b/build-data/packages/vlib.mk @@ -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) diff --git a/build-data/packages/vnet.mk b/build-data/packages/vnet.mk new file mode 100644 index 00000000000..4aa29613f7f --- /dev/null +++ b/build-data/packages/vnet.mk @@ -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)) + diff --git a/build-data/packages/vpp-api-test.mk b/build-data/packages/vpp-api-test.mk new file mode 100644 index 00000000000..eb7f466a24a --- /dev/null +++ b/build-data/packages/vpp-api-test.mk @@ -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) + diff --git a/build-data/packages/vpp-japi.mk b/build-data/packages/vpp-japi.mk new file mode 100644 index 00000000000..6f69baa0af7 --- /dev/null +++ b/build-data/packages/vpp-japi.mk @@ -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 diff --git a/build-data/packages/vpp-platform-scripts.mk b/build-data/packages/vpp-platform-scripts.mk new file mode 100644 index 00000000000..792d6005489 --- /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 00000000000..ff2c551965a --- /dev/null +++ b/build-data/packages/vpp.mk @@ -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) diff --git a/build-data/packages/vppinfra.mk b/build-data/packages/vppinfra.mk new file mode 100644 index 00000000000..92059877430 --- /dev/null +++ b/build-data/packages/vppinfra.mk @@ -0,0 +1,2 @@ +# nothing + diff --git a/build-data/platforms.mk b/build-data/platforms.mk new file mode 100644 index 00000000000..38f840e1d87 --- /dev/null +++ b/build-data/platforms.mk @@ -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) .. + diff --git a/build-data/platforms/virl.mk b/build-data/platforms/virl.mk new file mode 100644 index 00000000000..b65318c101b --- /dev/null +++ b/build-data/platforms/virl.mk @@ -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 diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk new file mode 100644 index 00000000000..1975a868b4a --- /dev/null +++ b/build-data/platforms/vpp.mk @@ -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 |