On Thu, Oct 12, 2017 at 04:37:45AM +0200, Thomas Monjalon wrote: > Show how to compile MUSDK and enable compilation of the mrvl PMD. > > The build test tool is also updated to support this new PMD. > > Signed-off-by: Thomas Monjalon <tho...@monjalon.net> > --- > devtools/test-build.sh | 4 ++++ > doc/guides/nics/mrvl.rst | 15 +++++++++++++++ > 2 files changed, 19 insertions(+) > > diff --git a/devtools/test-build.sh b/devtools/test-build.sh > index c6dfaf0a8..4d7eaa499 100755 > --- a/devtools/test-build.sh > +++ b/devtools/test-build.sh > @@ -47,6 +47,7 @@ default_path=$PATH > # - DPDK_DEP_ZLIB (y/[n]) > # - DPDK_MAKE_JOBS (int) > # - DPDK_NOTIFY (notify-send) > +# - LIBMUSDK_PATH > # - LIBSSO_SNOW3G_PATH > # - LIBSSO_KASUMI_PATH > # - LIBSSO_ZUC_PATH > @@ -129,6 +130,7 @@ reset_env () > unset DPDK_DEP_ZLIB > unset AESNI_MULTI_BUFFER_LIB_PATH > unset ARMV8_CRYPTO_LIB_PATH > + unset LIBMUSDK_PATH > unset LIBSSO_SNOW3G_PATH > unset LIBSSO_KASUMI_PATH > unset LIBSSO_ZUC_PATH > @@ -169,6 +171,8 @@ config () # <directory> <target> <options> > sed -ri 's,(RESOURCE_TAR=)n,\1y,' $1/.config > test "$DPDK_DEP_MOFED" != y || \ > sed -ri 's,(MLX._PMD=)n,\1y,' $1/.config > + test -z "$LIBMUSDK_PATH" || \ > + sed -ri 's,(MRVL_PMD=)n,\1y,' $1/.config
test-build.sh modifications come with crypto-mrvl patches. The only difference is that PMD_MRVL_CRYPTO is enabled instead of MRVL_PMD. Thus I don't think it will apply after applying crypto patches. > test "$DPDK_DEP_SZE" != y || \ > sed -ri 's,(PMD_SZEDATA2=)n,\1y,' $1/.config > test "$DPDK_DEP_ZLIB" != y || \ > diff --git a/doc/guides/nics/mrvl.rst b/doc/guides/nics/mrvl.rst > index 462bc0e9d..df0032bda 100644 > --- a/doc/guides/nics/mrvl.rst > +++ b/doc/guides/nics/mrvl.rst > @@ -221,9 +221,24 @@ Building DPDK > Driver needs precompiled MUSDK library during compilation. Please consult > ``doc/musdk_get_started.txt`` for the detailed build instructions. > > +.. code-block:: console > + > + export CROSS_COMPILE=<toolchain>/bin/aarch64-linux-gnu- > + ./bootstrap > + ./configure --enable-bpool-dma=64 > + make install I personally build MUSDK as follows: export CROSS_COMPILE=/home/tdu/workspace/gcc-linaro-5.4.1-2017.01-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- make clean ./configure \ --prefix=$(pwd)/musdk-install-dir \ --enable-bpool-dma=64 \ --enable-sam \ --disable-shared make install '--enable-sam' is of course optional if you're not going to use crypto engine. MUSDK ends up in musdk-install-dir then. Otherwise you'll need extra permissions to install to /usr/local. Of course its up to you where would you like to have it installed. The reason I tend to add '--disable-shared' is that during build DPDK will suck in static libraries and then later on I don't have to install MUSDK library on the development board. > + > Before the DPDK build process the environmental variable ``LIBMUSDK_PATH`` > with > the path to the MUSDK installation directory needs to be exported. > > +.. code-block:: console > + > + export LIBMUSDK_PATH=<musdk>/usr/local > + export CROSS=aarch64-linux-gnu- > + make config T=arm64-armv8a-linuxapp-gcc > + sed -ri 's,(MRVL_PMD=)n,\1y,' build/.config > + make > + > > Usage Example > ------------- > -- > 2.14.1 > Anyway patch looks good. Thanks. Acked-by: Tomasz Duszynski <t...@semihalf.com> -- - Tomasz DuszyĆski