dpdk: pktgen: odp-dpdk: upgrades (#16585)
* dpdk: fix a typo * dpdk: separate configure phase * odp-dpdk: 1.8.0.0 -> 1.10.1.0 * pktgen: 3.0.00 -> 3.0.04 * pktgen: add withGtk build option
This commit is contained in:
parent
3afa246038
commit
d515d72aba
@ -16,14 +16,17 @@ stdenv.mkDerivation rec {
|
|||||||
RTE_KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
RTE_KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
||||||
RTE_TARGET = "x86_64-native-linuxapp-gcc";
|
RTE_TARGET = "x86_64-native-linuxapp-gcc";
|
||||||
|
|
||||||
# we need ssse3 instructions to build
|
# we need sse3 instructions to build
|
||||||
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
|
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
outputs = [ "out" "kmod" "examples" ];
|
outputs = [ "out" "kmod" "examples" ];
|
||||||
|
|
||||||
buildPhase = ''
|
configurePhase = ''
|
||||||
make T=x86_64-native-linuxapp-gcc config
|
make T=x86_64-native-linuxapp-gcc config
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
make T=x86_64-native-linuxapp-gcc install
|
make T=x86_64-native-linuxapp-gcc install
|
||||||
make T=x86_64-native-linuxapp-gcc examples
|
make T=x86_64-native-linuxapp-gcc examples
|
||||||
'';
|
'';
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "odp-dpdk-${version}";
|
name = "odp-dpdk-${version}";
|
||||||
version = "1.8.0.0";
|
version = "1.10.1.0";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://git.linaro.org/lng/odp-dpdk.git";
|
url = "https://git.linaro.org/lng/odp-dpdk.git";
|
||||||
rev = "438a207a39bad213cdc03929452a8199caef5d8c";
|
rev = "0ed1ced007d98980f90604675083bf30c354e867";
|
||||||
sha256 = "0k4g5zbirbfdcgqz0nbn9san66y178qnigyvrr2apj3apzjjy7zv";
|
sha256 = "1kf090bizr0p0cxn525qpmypb5j86imvxrfpmwbl7vqqfh74j5ax";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook bash ];
|
nativeBuildInputs = [ autoreconfHook bash ];
|
||||||
@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace scripts/git_hash.sh --replace /bin/bash /bin/sh
|
substituteInPlace scripts/git_hash.sh --replace /bin/bash /bin/sh
|
||||||
|
substituteInPlace scripts/get_impl_str.sh --replace /bin/bash /bin/sh
|
||||||
echo -n ${version} > .scmversion
|
echo -n ${version} > .scmversion
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -26,7 +27,6 @@ stdenv.mkDerivation rec {
|
|||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-platform=linux-dpdk"
|
"--with-platform=linux-dpdk"
|
||||||
"--disable-shared"
|
"--disable-shared"
|
||||||
"--disable-shared-dpdk"
|
|
||||||
"--with-sdk-install-path=${dpdk}/${RTE_TARGET}"
|
"--with-sdk-install-path=${dpdk}/${RTE_TARGET}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,26 +1,34 @@
|
|||||||
{ stdenv, fetchurl, dpdk, libpcap, utillinux }:
|
{ stdenv, fetchurl, dpdk, libpcap, utillinux
|
||||||
|
, pkgconfig
|
||||||
|
, gtk, withGtk ? false
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "pktgen-${version}";
|
name = "pktgen-${version}";
|
||||||
version = "3.0.00";
|
version = "3.0.04";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-${version}.tar.gz";
|
url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-${version}.tar.gz";
|
||||||
sha256 = "703f8bd615aa4ae3a3085055483f9889dda09d082abb58afd33c1ba7c766ea65";
|
sha256 = "0vrmbpl8zaal5zjwyzlx0y3d6jydfxdmf0psdj7ic37h5yh2iv2q";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ dpdk libpcap ];
|
nativeBuildInputs = stdenv.lib.optionals withGtk [ pkgconfig ];
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
[ dpdk libpcap ]
|
||||||
|
++ stdenv.lib.optionals withGtk [gtk];
|
||||||
|
|
||||||
RTE_SDK = "${dpdk}";
|
RTE_SDK = "${dpdk}";
|
||||||
RTE_TARGET = "x86_64-native-linuxapp-gcc";
|
RTE_TARGET = "x86_64-native-linuxapp-gcc";
|
||||||
|
GUI = stdenv.lib.optionalString withGtk "true";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
|
NIX_CFLAGS_COMPILE = [ "-march=core2" ];
|
||||||
|
|
||||||
patchPhase = ''
|
postPatch = ''
|
||||||
sed -i -e s:/usr/local:$out:g lib/lua/src/luaconf.h
|
substituteInPlace lib/lua/src/luaconf.h --replace /usr/local $out
|
||||||
sed -i -e s:/usr/bin/lscpu:${utillinux}/bin/lscpu:g lib/common/wr_lscpu.h
|
substituteInPlace lib/common/wr_lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user