rename vpp-dpdk-dev to vpp-ext-deps
We need to have new tenants in the development package. This is first of series of patches which will allow us to have multiple external libs and tools packaged for developer's convenience. Change-Id: I884bd75fba96005bbf8cea92774682b2228e0e22 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@ -21,10 +21,10 @@
|
|||||||
/build-root/vapi_test/
|
/build-root/vapi_test/
|
||||||
/build-root/vom_test/
|
/build-root/vom_test/
|
||||||
/build-config.mk
|
/build-config.mk
|
||||||
/dpdk/*.tar.gz
|
/build/external/*.tar.gz
|
||||||
/dpdk/*.tar.xz
|
/build/external/*.tar.xz
|
||||||
/dpdk/vpp-dpdk*.deb
|
/build/external/vpp-*.deb
|
||||||
/dpdk/vpp-dpdk*.changes
|
/build/external/vpp-*.changes
|
||||||
/path_setup
|
/path_setup
|
||||||
/tools/
|
/tools/
|
||||||
# start autotools ignore
|
# start autotools ignore
|
||||||
|
24
Makefile
24
Makefile
@ -173,6 +173,13 @@ endif
|
|||||||
.PHONY: test test-debug retest retest-debug test-doc test-wipe-doc test-help test-wipe
|
.PHONY: test test-debug retest retest-debug test-doc test-wipe-doc test-help test-wipe
|
||||||
.PHONY: test-cov test-wipe-cov
|
.PHONY: test-cov test-wipe-cov
|
||||||
|
|
||||||
|
define banner
|
||||||
|
@echo "========================================================================"
|
||||||
|
@echo " $(1)"
|
||||||
|
@echo "========================================================================"
|
||||||
|
@echo " "
|
||||||
|
endef
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Make Targets:"
|
@echo "Make Targets:"
|
||||||
@echo " install-dep - install software dependencies"
|
@echo " install-dep - install software dependencies"
|
||||||
@ -201,7 +208,7 @@ help:
|
|||||||
@echo " run-vat - run vpp-api-test tool"
|
@echo " run-vat - run vpp-api-test tool"
|
||||||
@echo " pkg-deb - build DEB packages"
|
@echo " pkg-deb - build DEB packages"
|
||||||
@echo " pkg-rpm - build RPM packages"
|
@echo " pkg-rpm - build RPM packages"
|
||||||
@echo " dpdk-install-dev - install DPDK development packages"
|
@echo " install-ext-deps - install external development dependencies"
|
||||||
@echo " ctags - (re)generate ctags database"
|
@echo " ctags - (re)generate ctags database"
|
||||||
@echo " gtags - (re)generate gtags database"
|
@echo " gtags - (re)generate gtags database"
|
||||||
@echo " cscope - (re)generate cscope database"
|
@echo " cscope - (re)generate cscope database"
|
||||||
@ -486,7 +493,11 @@ pkg-srpm: dist
|
|||||||
make -C extras/rpm srpm
|
make -C extras/rpm srpm
|
||||||
|
|
||||||
dpdk-install-dev:
|
dpdk-install-dev:
|
||||||
make -C dpdk install-$(PKG)
|
$(call banner,"This command is deprecated. Please use 'make install-ext-libs'")
|
||||||
|
make -C build/external install-$(PKG)
|
||||||
|
|
||||||
|
install-ext-deps:
|
||||||
|
make -C build/external install-$(PKG)
|
||||||
|
|
||||||
ctags: ctags.files
|
ctags: ctags.files
|
||||||
@ctags --totals --tag-relative -L $<
|
@ctags --totals --tag-relative -L $<
|
||||||
@ -526,14 +537,7 @@ doxygen:
|
|||||||
wipe-doxygen:
|
wipe-doxygen:
|
||||||
$(call make-doxy)
|
$(call make-doxy)
|
||||||
|
|
||||||
define banner
|
verify: install-dep $(BR)/.deps.ok install-ext-deps
|
||||||
@echo "========================================================================"
|
|
||||||
@echo " $(1)"
|
|
||||||
@echo "========================================================================"
|
|
||||||
@echo " "
|
|
||||||
endef
|
|
||||||
|
|
||||||
verify: install-dep $(BR)/.deps.ok dpdk-install-dev
|
|
||||||
$(call banner,"Building for PLATFORM=vpp using gcc")
|
$(call banner,"Building for PLATFORM=vpp using gcc")
|
||||||
@make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
|
@make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
|
||||||
$(call banner,"Building sample-plugin")
|
$(call banner,"Building sample-plugin")
|
||||||
|
12
build-data/packages/build.mk
Normal file
12
build-data/packages/build.mk
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# 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.
|
@ -11,6 +11,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
external_source = build
|
||||||
|
|
||||||
ifneq (,$(findstring debug,$(TAG)))
|
ifneq (,$(findstring debug,$(TAG)))
|
||||||
DPDK_DEBUG=y
|
DPDK_DEBUG=y
|
||||||
else
|
else
|
||||||
@ -42,8 +44,8 @@ ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
|
|||||||
DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
|
DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dpdk_configure = echo
|
external_configure = echo
|
||||||
|
|
||||||
dpdk_make_args = $(DPDK_MAKE_ARGS) ebuild-build
|
external_make_args = $(DPDK_MAKE_ARGS) -C external ebuild-build
|
||||||
|
|
||||||
dpdk_install = make $(DPDK_MAKE_ARGS) ebuild-install
|
external_install = make $(DPDK_MAKE_ARGS) -C external ebuild-install
|
@ -19,18 +19,22 @@ else
|
|||||||
CMAKE?=cmake
|
CMAKE?=cmake
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
vpp_cmake_prefix_path = /opt/vpp/external/$(shell uname -m)
|
||||||
|
vpp_cmake_prefix_path += $(PACKAGE_INSTALL_DIR)external
|
||||||
|
vpp_cmake_prefix_path := $(subst $() $(),;,$(vpp_cmake_prefix_path))
|
||||||
|
|
||||||
vpp_cmake_args ?=
|
vpp_cmake_args ?=
|
||||||
vpp_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
|
vpp_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
|
||||||
vpp_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
|
vpp_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
|
||||||
vpp_cmake_args += -DCMAKE_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
|
vpp_cmake_args += -DCMAKE_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
|
||||||
vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../dpdk"
|
vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)"
|
||||||
|
|
||||||
# Use devtoolset on centos 7
|
# Use devtoolset on centos 7
|
||||||
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
|
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
|
||||||
vpp_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
|
vpp_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
vpp_configure_depend += dpdk-install
|
vpp_configure_depend += external-install
|
||||||
vpp_configure = \
|
vpp_configure = \
|
||||||
cd $(PACKAGE_BUILD_DIR) && \
|
cd $(PACKAGE_BUILD_DIR) && \
|
||||||
$(CMAKE) -G Ninja $(vpp_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))
|
$(CMAKE) -G Ninja $(vpp_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))
|
||||||
|
59
dpdk/Makefile → build/external/Makefile
vendored
59
dpdk/Makefile → build/external/Makefile
vendored
@ -28,7 +28,8 @@ DPDK_FAILSAFE_PMD ?= n
|
|||||||
B := $(DPDK_BUILD_DIR)
|
B := $(DPDK_BUILD_DIR)
|
||||||
I := $(DPDK_INSTALL_DIR)
|
I := $(DPDK_INSTALL_DIR)
|
||||||
DPDK_VERSION ?= 18.08
|
DPDK_VERSION ?= 18.08
|
||||||
PKG_SUFFIX ?= vpp3
|
PKG_VERSION ?= $(shell git describe --abbrev=0 | cut -d- -f1 | cut -dv -f2)
|
||||||
|
PKG_SUFFIX ?= $(shell git log --oneline $$(git describe --abbrev=0).. . | wc -l)
|
||||||
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
|
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
|
||||||
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
|
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
|
||||||
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
|
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
|
||||||
@ -367,16 +368,17 @@ clean:
|
|||||||
# .deb packaging
|
# .deb packaging
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
DEB_VER := $(PKG_VERSION)
|
||||||
DEB_ARCH=$(shell dpkg --print-architecture 2> /dev/null)
|
DEB_ARCH=$(shell dpkg --print-architecture 2> /dev/null)
|
||||||
DEV_DEB=vpp-dpdk-dev_$(DPDK_VERSION)-$(PKG_SUFFIX)_$(DEB_ARCH).deb
|
DEV_DEB=vpp-ext-deps_$(DEB_VER)-$(PKG_SUFFIX)_$(DEB_ARCH).deb
|
||||||
INSTALLED_DEB_VER=$(shell dpkg-query --showformat='$${Version}' --show vpp-dpdk-dev 2> /dev/null)
|
INSTALLED_VER=$(shell dpkg-query --showformat='$${Version}' --show vpp-ext-deps 2> /dev/null)
|
||||||
|
|
||||||
.PHONY: build-deb install-deb check-deb
|
.PHONY: build-deb install-deb check-deb
|
||||||
|
|
||||||
deb/debian/changelog: Makefile
|
deb/debian/changelog: Makefile
|
||||||
@echo "vpp-dpdk ($(DPDK_VERSION)-$(PKG_SUFFIX)) unstable; urgency=low" > $@
|
@echo "vpp-ext-deps ($(DEB_VER)-$(PKG_SUFFIX)) unstable; urgency=low" > $@
|
||||||
@echo "" >> $@
|
@echo "" >> $@
|
||||||
@echo " * DPDK Release $(DPDK_VERSION)" >> $@
|
@echo " * Version $(DEB_VER)" >> $@
|
||||||
@echo "" >> $@
|
@echo "" >> $@
|
||||||
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R)" >> $@
|
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R)" >> $@
|
||||||
|
|
||||||
@ -387,28 +389,28 @@ $(DEV_DEB): deb/debian/changelog
|
|||||||
build-deb: $(DEV_DEB)
|
build-deb: $(DEV_DEB)
|
||||||
|
|
||||||
install-deb:
|
install-deb:
|
||||||
ifneq ($(INSTALLED_DEB_VER),$(DPDK_VERSION)-$(PKG_SUFFIX))
|
ifneq ($(INSTALLED_VER),$(DEB_VER)-$(PKG_SUFFIX))
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
@echo " Out of date DPDK package installed."
|
@echo " Out of date vpp-ext-deps package installed."
|
||||||
@echo " Installed: $(INSTALLED_DEB_VER)"
|
@echo " Installed: $(INSTALLED_VER)"
|
||||||
@echo " Needed: $(DPDK_VERSION)-$(PKG_SUFFIX)"
|
@echo " Needed: $(DEB_VER)-$(PKG_SUFFIX)"
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
@make $(DEV_DEB)
|
@make $(DEV_DEB)
|
||||||
@sudo dpkg -i $(DEV_DEB)
|
@sudo dpkg -i $(DEV_DEB)
|
||||||
else
|
else
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
@echo " Up-to-date DPDK package already installed"
|
@echo " Up-to-date vpp-ext-deps package already installed"
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
endif
|
endif
|
||||||
|
|
||||||
check-deb:
|
check-deb:
|
||||||
ifneq ($(INSTALLED_DEB_VER),$(DPDK_VERSION)-$(PKG_SUFFIX))
|
ifneq ($(INSTALLED_VER),$(DEB_VER)-$(PKG_SUFFIX))
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
@echo " Outdated DPDK package detected:"
|
@echo " Outdated DPDK package detected:"
|
||||||
@echo " Installed: vpp-dpdk-dev $(INSTALLED_DEB_VER)"
|
@echo " Installed: vpp-ext-deps $(INSTALLED_VER)"
|
||||||
@echo " Current: vpp-dpdk-dev $(DPDK_VERSION)-$(PKG_SUFFIX)"
|
@echo " Current: vpp-ext-deps $(DEB_VER)-$(PKG_SUFFIX)"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Please upgrade by invoking 'make dpdk-install-dev'"
|
@echo " Please upgrade by invoking 'make install-ext-deps'"
|
||||||
@echo " from the top level directory."
|
@echo " from the top level directory."
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
endif
|
endif
|
||||||
@ -417,25 +419,26 @@ endif
|
|||||||
# .rpm packaging
|
# .rpm packaging
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
RPM_VER := $(PKG_VERSION)
|
||||||
RPM_ARCH=$(shell rpm --eval "%{_arch}" 2> /dev/null)
|
RPM_ARCH=$(shell rpm --eval "%{_arch}" 2> /dev/null)
|
||||||
DEV_RPM=vpp-dpdk-devel-$(DPDK_VERSION)-$(PKG_SUFFIX).$(RPM_ARCH).rpm
|
DEV_RPM=vpp-ext-deps-$(RPM_VER)-$(PKG_SUFFIX).$(RPM_ARCH).rpm
|
||||||
INSTALLED_RPM_VER=$(shell rpm -q --queryformat '%{VERSION}-%{RELEASE}' vpp-dpdk-devel 2> /dev/null | grep -v "not inst")
|
INSTALLED_RPM_VER=$(shell rpm -q --queryformat '%{VERSION}-%{RELEASE}' vpp-ext-deps 2> /dev/null | grep -v "not inst")
|
||||||
|
|
||||||
.PHONY: build-rpm install-rpm check-rpm
|
.PHONY: build-rpm install-rpm check-rpm
|
||||||
|
|
||||||
$(DEV_RPM): Makefile rpm/vpp-dpdk.spec
|
$(DEV_RPM): Makefile rpm/vpp-ext-deps.spec
|
||||||
@rpmbuild -bb \
|
@rpmbuild -bb \
|
||||||
--define "_topdir $(CURDIR)/rpm" \
|
--define "_topdir $(CURDIR)/rpm" \
|
||||||
--define "_version $(DPDK_VERSION)" \
|
--define "_version $(RPM_VER)" \
|
||||||
--define "_release $(PKG_SUFFIX)" \
|
--define "_release $(PKG_SUFFIX)" \
|
||||||
$(CURDIR)/rpm/vpp-dpdk.spec
|
$(CURDIR)/rpm/vpp-ext-deps.spec
|
||||||
mv rpm/RPMS/$(RPM_ARCH)/*.rpm .
|
mv rpm/RPMS/$(RPM_ARCH)/*.rpm .
|
||||||
git clean -fdx rpm
|
git clean -fdx rpm
|
||||||
|
|
||||||
build-rpm: $(DEV_RPM)
|
build-rpm: $(DEV_RPM)
|
||||||
|
|
||||||
install-rpm:
|
install-rpm:
|
||||||
ifneq ($(INSTALLED_RPM_VER),$(DPDK_VERSION)-$(PKG_SUFFIX))
|
ifneq ($(INSTALLED_RPM_VER),$(PRM_VER)-$(PKG_SUFFIX))
|
||||||
@$(MAKE) $(DEV_RPM)
|
@$(MAKE) $(DEV_RPM)
|
||||||
sudo rpm -Uih $(DEV_RPM)
|
sudo rpm -Uih $(DEV_RPM)
|
||||||
else
|
else
|
||||||
@ -445,13 +448,13 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
check-rpm:
|
check-rpm:
|
||||||
ifneq ($(INSTALLED_RPM_VER),$(DPDK_VERSION)-$(PKG_SUFFIX))
|
ifneq ($(INSTALLED_RPM_VER),$(RPM_VER)-$(PKG_SUFFIX))
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
@echo " Outdated DPDK package detected:"
|
@echo " Outdated DPDK package detected:"
|
||||||
@echo " Installed: vpp-dpdk-devel $(INSTALLED_RPM_VER)"
|
@echo " Installed: vpp-ext-deps $(INSTALLED_RPM_VER)"
|
||||||
@echo " Current: vpp-dpdk-devel $(DPDK_VERSION)-$(PKG_SUFFIX)"
|
@echo " Current: vpp-ext-deps $(RPM_VER)-$(PKG_SUFFIX)"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " Please upgrade by invoking 'make dpdk-install-dev'"
|
@echo " Please upgrade by invoking 'make install-ext-deps'"
|
||||||
@echo " from the top level directory."
|
@echo " from the top level directory."
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
endif
|
endif
|
||||||
@ -463,15 +466,15 @@ endif
|
|||||||
.PHONY: ebuild-build ebuild-install
|
.PHONY: ebuild-build ebuild-install
|
||||||
|
|
||||||
ebuild-build:
|
ebuild-build:
|
||||||
ifeq ($(INSTALLED_DEB_VER)$(INSTALLED_RPM_VER),)
|
ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
@echo "Building DPDK from source. Consider installing development"
|
@echo "Building DPDK from source. Consider installing development"
|
||||||
@echo "package by invoking 'make dpdk-install-dev' from the"
|
@echo "package by invoking 'make install-ext-deps' from the"
|
||||||
@echo "top level directory"
|
@echo "top level directory"
|
||||||
@echo "=========================================================="
|
@echo "=========================================================="
|
||||||
make config
|
make config
|
||||||
else
|
else
|
||||||
ifneq ($(INSTALLED_DEB_VER),)
|
ifneq ($(INSTALLED_VER),)
|
||||||
make check-deb
|
make check-deb
|
||||||
endif
|
endif
|
||||||
ifneq ($(INSTALLED_RPM_VER),)
|
ifneq ($(INSTALLED_RPM_VER),)
|
||||||
@ -480,6 +483,6 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ebuild-install:
|
ebuild-install:
|
||||||
ifeq ($(INSTALLED_DEB_VER)$(INSTALLED_RPM_VER),)
|
ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
|
||||||
make install
|
make install
|
||||||
endif
|
endif
|
0
dpdk/README → build/external/README
vendored
0
dpdk/README → build/external/README
vendored
13
build/external/deb/debian/control
vendored
Normal file
13
build/external/deb/debian/control
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Source: vpp-ext-deps
|
||||||
|
Section: net
|
||||||
|
Priority: extra
|
||||||
|
Maintainer: vpp-dev@lists.fd.io
|
||||||
|
Build-Depends: debhelper (>= 9), dkms
|
||||||
|
Standards-Version: 3.9.4
|
||||||
|
|
||||||
|
Package: vpp-ext-deps
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}
|
||||||
|
Description: VPP developer package containing dependencies
|
||||||
|
Replaces: vpp-dpdk-dev
|
||||||
|
Conflicts: vpp-dpdk-dev
|
27
build/external/deb/debian/rules
vendored
Executable file
27
build/external/deb/debian/rules
vendored
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
DH_VERBOSE = 1
|
||||||
|
PKG=vpp-ext-deps
|
||||||
|
|
||||||
|
VERSION = $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: //p')
|
||||||
|
BASE_VER = $(word 1, $(subst -, ,$(VERSION)))
|
||||||
|
|
||||||
|
export DPDK_BUILD_DIR=$(CURDIR)/_build
|
||||||
|
export DPDK_INSTALL_DIR=$(CURDIR)/debian/tmp/opt/vpp/external/$(shell uname -m)/
|
||||||
|
|
||||||
|
MAKE_ARGS=-C ..
|
||||||
|
|
||||||
|
include /usr/share/dpkg/default.mk
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_clean:
|
||||||
|
make $(MAKE_ARGS) clean
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
make $(MAKE_ARGS) config
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
make $(MAKE_ARGS) install
|
||||||
|
dh_install -p$(PKG) --autodest /opt
|
||||||
|
|
18
build/external/rpm/vpp-ext-deps.spec
vendored
Normal file
18
build/external/rpm/vpp-ext-deps.spec
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
%define _install_dir /opt/vpp/external/%(uname -m)
|
||||||
|
%define _make_args -C ../.. DPDK_BUILD_DIR=%{_topdir}/tmp DPDK_INSTALL_DIR=%{buildroot}/%{_install_dir}
|
||||||
|
|
||||||
|
Name: vpp-ext-deps
|
||||||
|
Version: %{_version}
|
||||||
|
Release: %{_release}
|
||||||
|
Summary: VPP development package with external dependencies
|
||||||
|
License: BSD
|
||||||
|
|
||||||
|
%description
|
||||||
|
VPP development package with external dependencies
|
||||||
|
|
||||||
|
%install
|
||||||
|
make %{_make_args} config
|
||||||
|
make %{_make_args} install
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_install_dir}
|
@ -1,18 +0,0 @@
|
|||||||
Source: vpp-dpdk
|
|
||||||
Section: net
|
|
||||||
Priority: extra
|
|
||||||
Maintainer: vpp-dev@lists.fd.io
|
|
||||||
Build-Depends: debhelper (>= 9), dkms
|
|
||||||
Standards-Version: 3.9.4
|
|
||||||
|
|
||||||
Package: vpp-dpdk-dev
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}
|
|
||||||
Description: DPDK Development Package for VPP
|
|
||||||
Conflicts: dpdk, dpdk-dev, libdpdk-dev
|
|
||||||
|
|
||||||
Package: vpp-dpdk-dkms
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${misc:Depends}
|
|
||||||
Description: DPDK Development Package for VPP - Kernel Modules
|
|
||||||
Conflicts: dpdk-igb-uio-dkms
|
|
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
DH_VERBOSE = 1
|
|
||||||
PKG=vpp-dpdk
|
|
||||||
|
|
||||||
VERSION = $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: //p')
|
|
||||||
BASE_VER = $(word 1, $(subst -, ,$(VERSION)))
|
|
||||||
|
|
||||||
export DPDK_BUILD_DIR=$(CURDIR)/_build
|
|
||||||
export DPDK_INSTALL_DIR=$(CURDIR)/debian/tmp/usr
|
|
||||||
|
|
||||||
SRC=$(wildcard _build/dpdk*$(BASE_VER))
|
|
||||||
|
|
||||||
MAKE_ARGS=-C ..
|
|
||||||
|
|
||||||
include /usr/share/dpkg/default.mk
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@ --with dkms
|
|
||||||
|
|
||||||
override_dh_clean:
|
|
||||||
make $(MAKE_ARGS) clean
|
|
||||||
|
|
||||||
override_dh_auto_configure:
|
|
||||||
make $(MAKE_ARGS) config
|
|
||||||
|
|
||||||
override_dh_install:
|
|
||||||
make $(MAKE_ARGS) install
|
|
||||||
dh_install -p$(PKG)-dkms \
|
|
||||||
$(SRC)/lib/librte_eal/common/include/rte_pci_dev_feature_defs.h \
|
|
||||||
$(SRC)/lib/librte_eal/common/include/rte_pci_dev_features.h \
|
|
||||||
$(wildcard $(SRC)/*/*/*/igb_uio/igb_uio.c) \
|
|
||||||
$(wildcard $(SRC)/*/*/*/igb_uio/compat.h) \
|
|
||||||
$(wildcard $(SRC)/*/*/igb_uio/igb_uio.c) \
|
|
||||||
$(wildcard $(SRC)/*/*/igb_uio/compat.h) \
|
|
||||||
debian/dkms/Makefile \
|
|
||||||
/usr/src/$(PKG)-dkms-$(VERSION)
|
|
||||||
dh_install -p$(PKG)-dev --autodest /usr
|
|
||||||
|
|
||||||
override_dh_dkms:
|
|
||||||
dh_dkms -p$(PKG)-dkms -V $(VERSION)
|
|
@ -1,8 +0,0 @@
|
|||||||
PACKAGE_VERSION=#MODULE_VERSION#
|
|
||||||
PACKAGE_NAME="vpp-dpdk-dkms"
|
|
||||||
CLEAN="make clean"
|
|
||||||
BUILT_MODULE_NAME[0]="igb_uio"
|
|
||||||
BUILT_MODULE_LOCATION[0]="./"
|
|
||||||
DEST_MODULE_LOCATION[0]="/kernel/net"
|
|
||||||
MAKE[1]="make"
|
|
||||||
AUTOINSTALL="yes"
|
|
@ -1,26 +0,0 @@
|
|||||||
%define _make_args -C ../.. DPDK_BUILD_DIR=%{_topdir}/tmp DPDK_INSTALL_DIR=%{buildroot}/usr
|
|
||||||
|
|
||||||
Name: vpp-dpdk
|
|
||||||
Version: %{_version}
|
|
||||||
Release: %{_release}
|
|
||||||
Summary: DPDK development packages for VPP
|
|
||||||
License: BSD
|
|
||||||
|
|
||||||
%description
|
|
||||||
|
|
||||||
%package devel
|
|
||||||
Summary: DPDK development package for VPP
|
|
||||||
Group: Development/Libraries
|
|
||||||
|
|
||||||
%description devel
|
|
||||||
|
|
||||||
%install
|
|
||||||
make %{_make_args} config
|
|
||||||
make %{_make_args} install
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
/usr/bin/*
|
|
||||||
/usr/include/dpdk/*
|
|
||||||
/usr/lib/*
|
|
||||||
/usr/sbin/*
|
|
||||||
/usr/share/dpdk
|
|
@ -13,7 +13,7 @@ fi
|
|||||||
echo 'Building VCL test apps'
|
echo 'Building VCL test apps'
|
||||||
cd $VPP_DIR
|
cd $VPP_DIR
|
||||||
$SUDOCMD perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/vcl.am
|
$SUDOCMD perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/vcl.am
|
||||||
$SUDOCMD make dpdk-install-dev build-release
|
$SUDOCMD make install-ext-deps build-release
|
||||||
sudo sysctl -p$VPP_DIR/src/vpp/conf/80-vpp.conf
|
sudo sysctl -p$VPP_DIR/src/vpp/conf/80-vpp.conf
|
||||||
sudo modprobe uio_pci_generic
|
sudo modprobe uio_pci_generic
|
||||||
|
|
||||||
|
@ -125,5 +125,6 @@ pr("C flags" "${CMAKE_C_FLAGS}")
|
|||||||
pr("Linker flags" "${CMAKE_LINKER_FLAGS}")
|
pr("Linker flags" "${CMAKE_LINKER_FLAGS}")
|
||||||
pr("Target processor" "${CMAKE_SYSTEM_PROCESSOR}")
|
pr("Target processor" "${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
pr("Build type" "${CMAKE_BUILD_TYPE}")
|
pr("Build type" "${CMAKE_BUILD_TYPE}")
|
||||||
|
pr("Prefix path" "${CMAKE_PREFIX_PATH}")
|
||||||
pr("Install prefix" "${CMAKE_INSTALL_PREFIX}")
|
pr("Install prefix" "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ fi
|
|||||||
|
|
||||||
if [ -n "$multi_host"] && [ ! -f "$dpdk_devbind" ] ; then
|
if [ -n "$multi_host"] && [ ! -f "$dpdk_devbind" ] ; then
|
||||||
echo "ERROR: Can't find dpdk-devbind.py!"
|
echo "ERROR: Can't find dpdk-devbind.py!"
|
||||||
echo " Run \"cd \$WS_ROOT; make dpdk-install-dev\" to install it."
|
echo " Run \"cd \$WS_ROOT; make install-ext-deps\" to install it."
|
||||||
echo
|
echo
|
||||||
env_test_failed="true"
|
env_test_failed="true"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user