[v3] meson: update meson build for armada drivers
Checks
Commit Message
From: Liron Himi <lironh@marvell.com>
With pkg-config support available within musdk library
(from musdk-release-SDK-10.3.5.0-PR2 version),
meson option 'lib_musdk_dir' can be removed.
PKG_CONFIG_PATH environment variable should be set appropriately
to use the musdk library.
docs are updated with new musdk version and meson instructions.
Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
v3:
* fix sphinx warnings
* remove mvneta_ethdev.h
v2:
* include updated docs in this patch
* add musdk version in commit message
---
doc/guides/nics/mvneta.rst | 16 ++++++++++------
doc/guides/nics/mvpp2.rst | 18 +++++++++++-------
drivers/common/mvep/meson.build | 14 +++++---------
drivers/crypto/mvsam/meson.build | 15 +++++----------
drivers/net/mvneta/meson.build | 19 +++++--------------
drivers/net/mvpp2/meson.build | 15 +++++----------
meson_options.txt | 2 --
7 files changed, 41 insertions(+), 58 deletions(-)
Comments
On 12/16/2020 9:36 PM, lironh@marvell.com wrote:
> From: Liron Himi <lironh@marvell.com>
>
> With pkg-config support available within musdk library
> (from musdk-release-SDK-10.3.5.0-PR2 version),
> meson option 'lib_musdk_dir' can be removed.
> PKG_CONFIG_PATH environment variable should be set appropriately
> to use the musdk library.
>
> docs are updated with new musdk version and meson instructions.
>
> Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/main, thanks.
16/12/2020 22:36, lironh@marvell.com:
> From: Liron Himi <lironh@marvell.com>
>
> With pkg-config support available within musdk library
> (from musdk-release-SDK-10.3.5.0-PR2 version),
> meson option 'lib_musdk_dir' can be removed.
> PKG_CONFIG_PATH environment variable should be set appropriately
> to use the musdk library.
Sorry, it does not work.
First, when installing MUSDK, the .pc file is not updated
with the correct prefix path:
make install DESTDIR=$(readlink -f install)
In install/mv/lib/pkgconfig/libmusdk.pc:
prefix=/mv
instead of:
prefix=/musdk_path/install/mv
Second, after manually fixing the prefix path and compiling DPDK:
In file included from musdk/install/mv/include/mv_std.h:101,
from musdk/install/mv/include/drivers/mv_neta.h:100,
from dpdk/drivers/net/mvneta/mvneta_ethdev.h:24,
from dpdk/drivers/net/mvneta/mvneta_rxtx.h:10,
from dpdk/drivers/net/mvneta/mvneta_rxtx.c:7:
musdk/install/mv/include/env/mv_autogen_build_assert.h:43:5: error:
"MVCONF_DMA_PHYS_ADDR_T_SIZE" is not defined, evaluates to 0 [-Werror=undef]
musdk/install/mv/include/env/mv_autogen_build_assert.h:44:2: error:
#error "MVCONF_DMA_PHYS_ADDR_T_SIZE must match size used during musdk_lib compilation."
The CFLAGS may be incomplete:
Cflags: -I${includedir} -DMVCONF_TYPES_PUBLIC -DMVCONF_DMA_PHYS_ADDR_T_PUBLIC
I fixed it by adding:
-DMVCONF_DMA_PHYS_ADDR_T_SIZE=64
Please could you fix MUSDK quickly?
I think I will pull next-net as is, but I consider it is broken.
Hi Thomas,
When did you take this MUSDK version?
Is this your head "pkg-config: expose dma-add-size"?
If not, this explain the mvneta issue. I already noticed that and pushed a fixed to the github.
As for the prefix issue,
The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
Liron Himi
-----Original Message-----
From: Thomas Monjalon <thomas@monjalon.net>
Sent: Monday, 11 January 2021 13:28
To: Liron Himi <lironh@marvell.com>
Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Subject: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for armada drivers
External Email
----------------------------------------------------------------------
16/12/2020 22:36, lironh@marvell.com:
> From: Liron Himi <lironh@marvell.com>
>
> With pkg-config support available within musdk library (from
> musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
> can be removed.
> PKG_CONFIG_PATH environment variable should be set appropriately to
> use the musdk library.
Sorry, it does not work.
First, when installing MUSDK, the .pc file is not updated with the correct prefix path:
make install DESTDIR=$(readlink -f install) In install/mv/lib/pkgconfig/libmusdk.pc:
prefix=/mv
instead of:
prefix=/musdk_path/install/mv
Second, after manually fixing the prefix path and compiling DPDK:
In file included from musdk/install/mv/include/mv_std.h:101,
from musdk/install/mv/include/drivers/mv_neta.h:100,
from dpdk/drivers/net/mvneta/mvneta_ethdev.h:24,
from dpdk/drivers/net/mvneta/mvneta_rxtx.h:10,
from dpdk/drivers/net/mvneta/mvneta_rxtx.c:7:
musdk/install/mv/include/env/mv_autogen_build_assert.h:43:5: error:
"MVCONF_DMA_PHYS_ADDR_T_SIZE" is not defined, evaluates to 0 [-Werror=undef]
musdk/install/mv/include/env/mv_autogen_build_assert.h:44:2: error:
#error "MVCONF_DMA_PHYS_ADDR_T_SIZE must match size used during musdk_lib compilation."
The CFLAGS may be incomplete:
Cflags: -I${includedir} -DMVCONF_TYPES_PUBLIC -DMVCONF_DMA_PHYS_ADDR_T_PUBLIC I fixed it by adding:
-DMVCONF_DMA_PHYS_ADDR_T_SIZE=64
Please could you fix MUSDK quickly?
I think I will pull next-net as is, but I consider it is broken.
11/01/2021 16:29, Liron Himi:
> Hi Thomas,
>
> When did you take this MUSDK version?
> Is this your head "pkg-config: expose dma-add-size"?
I'm using musdk-SDK-10.3.5.0-PR2 as recommended in the doc.
> If not, this explain the mvneta issue.
> I already noticed that and pushed a fixed to the github.
I see. So it may need a doc update.
> As for the prefix issue,
> The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
No I didn't try that, and I'm using DESTDIR variable when installing.
Whould it be possible to update the prefix with DESTDIR when installing?
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, 11 January 2021 13:28
> To: Liron Himi <lironh@marvell.com>
> Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Subject: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for armada drivers
>
> External Email
>
> ----------------------------------------------------------------------
> 16/12/2020 22:36, lironh@marvell.com:
> > From: Liron Himi <lironh@marvell.com>
> >
> > With pkg-config support available within musdk library (from
> > musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
> > can be removed.
> > PKG_CONFIG_PATH environment variable should be set appropriately to
> > use the musdk library.
>
> Sorry, it does not work.
>
> First, when installing MUSDK, the .pc file is not updated with the correct prefix path:
> make install DESTDIR=$(readlink -f install) In install/mv/lib/pkgconfig/libmusdk.pc:
> prefix=/mv
> instead of:
> prefix=/musdk_path/install/mv
>
> Second, after manually fixing the prefix path and compiling DPDK:
>
> In file included from musdk/install/mv/include/mv_std.h:101,
> from musdk/install/mv/include/drivers/mv_neta.h:100,
> from dpdk/drivers/net/mvneta/mvneta_ethdev.h:24,
> from dpdk/drivers/net/mvneta/mvneta_rxtx.h:10,
> from dpdk/drivers/net/mvneta/mvneta_rxtx.c:7:
> musdk/install/mv/include/env/mv_autogen_build_assert.h:43:5: error:
> "MVCONF_DMA_PHYS_ADDR_T_SIZE" is not defined, evaluates to 0 [-Werror=undef]
> musdk/install/mv/include/env/mv_autogen_build_assert.h:44:2: error:
> #error "MVCONF_DMA_PHYS_ADDR_T_SIZE must match size used during musdk_lib compilation."
>
> The CFLAGS may be incomplete:
> Cflags: -I${includedir} -DMVCONF_TYPES_PUBLIC -DMVCONF_DMA_PHYS_ADDR_T_PUBLIC I fixed it by adding:
> -DMVCONF_DMA_PHYS_ADDR_T_SIZE=64
>
> Please could you fix MUSDK quickly?
>
> I think I will pull next-net as is, but I consider it is broken.
>
>
>
-----Original Message-----
From: Thomas Monjalon <thomas@monjalon.net>
Sent: Monday, 11 January 2021 18:05
To: Liron Himi <lironh@marvell.com>
Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Liron Himi <lironh@marvell.com>
Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for armada drivers
11/01/2021 16:29, Liron Himi:
> Hi Thomas,
>
> When did you take this MUSDK version?
> Is this your head "pkg-config: expose dma-add-size"?
I'm using musdk-SDK-10.3.5.0-PR2 as recommended in the doc.
> If not, this explain the mvneta issue.
> I already noticed that and pushed a fixed to the github.
I see. So it may need a doc update.
[L.H.] why need to update the doc? It is still the same release branch, I just added a fix patch to it.
> As for the prefix issue,
> The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
No I didn't try that, and I'm using DESTDIR variable when installing.
Whould it be possible to update the prefix with DESTDIR when installing?
[L.H.] need to explore this option. But for now use 'prefix', as this is what supported by MUSDK
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, 11 January 2021 13:28
> To: Liron Himi <lironh@marvell.com>
> Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>
> Subject: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for
> armada drivers
>
> External Email
>
> ----------------------------------------------------------------------
> 16/12/2020 22:36, lironh@marvell.com:
> > From: Liron Himi <lironh@marvell.com>
> >
> > With pkg-config support available within musdk library (from
> > musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
> > can be removed.
> > PKG_CONFIG_PATH environment variable should be set appropriately to
> > use the musdk library.
>
> Sorry, it does not work.
>
> First, when installing MUSDK, the .pc file is not updated with the correct prefix path:
> make install DESTDIR=$(readlink -f install) In install/mv/lib/pkgconfig/libmusdk.pc:
> prefix=/mv
> instead of:
> prefix=/musdk_path/install/mv
>
> Second, after manually fixing the prefix path and compiling DPDK:
>
> In file included from musdk/install/mv/include/mv_std.h:101,
> from musdk/install/mv/include/drivers/mv_neta.h:100,
> from dpdk/drivers/net/mvneta/mvneta_ethdev.h:24,
> from dpdk/drivers/net/mvneta/mvneta_rxtx.h:10,
> from dpdk/drivers/net/mvneta/mvneta_rxtx.c:7:
> musdk/install/mv/include/env/mv_autogen_build_assert.h:43:5: error:
> "MVCONF_DMA_PHYS_ADDR_T_SIZE" is not defined, evaluates to 0
> [-Werror=undef]
> musdk/install/mv/include/env/mv_autogen_build_assert.h:44:2: error:
> #error "MVCONF_DMA_PHYS_ADDR_T_SIZE must match size used during musdk_lib compilation."
>
> The CFLAGS may be incomplete:
> Cflags: -I${includedir} -DMVCONF_TYPES_PUBLIC -DMVCONF_DMA_PHYS_ADDR_T_PUBLIC I fixed it by adding:
> -DMVCONF_DMA_PHYS_ADDR_T_SIZE=64
>
> Please could you fix MUSDK quickly?
>
> I think I will pull next-net as is, but I consider it is broken.
>
>
>
11/01/2021 17:08, Liron Himi:
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, 11 January 2021 18:05
> To: Liron Himi <lironh@marvell.com>
> Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Liron Himi <lironh@marvell.com>
> Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for armada drivers
>
> 11/01/2021 16:29, Liron Himi:
> > Hi Thomas,
> >
> > When did you take this MUSDK version?
> > Is this your head "pkg-config: expose dma-add-size"?
>
> I'm using musdk-SDK-10.3.5.0-PR2 as recommended in the doc.
>
> > If not, this explain the mvneta issue.
> > I already noticed that and pushed a fixed to the github.
>
> I see. So it may need a doc update.
> [L.H.] why need to update the doc? It is still the same release branch, I just added a fix patch to it.
Yes, my bad: I used the tag musdk-SDK-10.3.5.0-PR2
instead of the branch musdk-release-SDK-10.3.5.0-PR2.
> > As for the prefix issue,
> > The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
>
> No I didn't try that, and I'm using DESTDIR variable when installing.
> Whould it be possible to update the prefix with DESTDIR when installing?
> [L.H.] need to explore this option. But for now use 'prefix', as this is what supported by MUSDK
OK
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Monday, 11 January 2021 13:28
> > To: Liron Himi <lironh@marvell.com>
> > Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran
> > <jerinj@marvell.com>
> > Subject: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for
> > armada drivers
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > 16/12/2020 22:36, lironh@marvell.com:
> > > From: Liron Himi <lironh@marvell.com>
> > >
> > > With pkg-config support available within musdk library (from
> > > musdk-release-SDK-10.3.5.0-PR2 version), meson option 'lib_musdk_dir'
> > > can be removed.
> > > PKG_CONFIG_PATH environment variable should be set appropriately to
> > > use the musdk library.
> >
> > Sorry, it does not work.
> >
> > First, when installing MUSDK, the .pc file is not updated with the correct prefix path:
> > make install DESTDIR=$(readlink -f install) In install/mv/lib/pkgconfig/libmusdk.pc:
> > prefix=/mv
> > instead of:
> > prefix=/musdk_path/install/mv
> >
> > Second, after manually fixing the prefix path and compiling DPDK:
> >
> > In file included from musdk/install/mv/include/mv_std.h:101,
> > from musdk/install/mv/include/drivers/mv_neta.h:100,
> > from dpdk/drivers/net/mvneta/mvneta_ethdev.h:24,
> > from dpdk/drivers/net/mvneta/mvneta_rxtx.h:10,
> > from dpdk/drivers/net/mvneta/mvneta_rxtx.c:7:
> > musdk/install/mv/include/env/mv_autogen_build_assert.h:43:5: error:
> > "MVCONF_DMA_PHYS_ADDR_T_SIZE" is not defined, evaluates to 0
> > [-Werror=undef]
> > musdk/install/mv/include/env/mv_autogen_build_assert.h:44:2: error:
> > #error "MVCONF_DMA_PHYS_ADDR_T_SIZE must match size used during musdk_lib compilation."
> >
> > The CFLAGS may be incomplete:
> > Cflags: -I${includedir} -DMVCONF_TYPES_PUBLIC -DMVCONF_DMA_PHYS_ADDR_T_PUBLIC I fixed it by adding:
> > -DMVCONF_DMA_PHYS_ADDR_T_SIZE=64
> >
> > Please could you fix MUSDK quickly?
> >
> > I think I will pull next-net as is, but I consider it is broken.
> >
> >
> >
>
>
>
>
>
>
On Mon, Jan 11, 2021 at 05:05:27PM +0100, Thomas Monjalon wrote:
> 11/01/2021 16:29, Liron Himi:
> > Hi Thomas,
> >
> > When did you take this MUSDK version?
> > Is this your head "pkg-config: expose dma-add-size"?
>
> I'm using musdk-SDK-10.3.5.0-PR2 as recommended in the doc.
>
> > If not, this explain the mvneta issue.
> > I already noticed that and pushed a fixed to the github.
>
> I see. So it may need a doc update.
>
> > As for the prefix issue,
> > The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
>
> No I didn't try that, and I'm using DESTDIR variable when installing.
> Whould it be possible to update the prefix with DESTDIR when installing?
>
DESTDIR won't affect the .pc for any package installation AFAIK, prefix is
the method to use. If you use DESTDIR you need to call pkg-config with
"--define-prefix" argument to get the relocation.
/Bruce
11/01/2021 18:04, Bruce Richardson:
> On Mon, Jan 11, 2021 at 05:05:27PM +0100, Thomas Monjalon wrote:
> > 11/01/2021 16:29, Liron Himi:
> > > Hi Thomas,
> > >
> > > When did you take this MUSDK version?
> > > Is this your head "pkg-config: expose dma-add-size"?
> >
> > I'm using musdk-SDK-10.3.5.0-PR2 as recommended in the doc.
> >
> > > If not, this explain the mvneta issue.
> > > I already noticed that and pushed a fixed to the github.
> >
> > I see. So it may need a doc update.
> >
> > > As for the prefix issue,
> > > The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
> >
> > No I didn't try that, and I'm using DESTDIR variable when installing.
> > Whould it be possible to update the prefix with DESTDIR when installing?
> >
> DESTDIR won't affect the .pc for any package installation AFAIK, prefix is
> the method to use. If you use DESTDIR you need to call pkg-config with
> "--define-prefix" argument to get the relocation.
OK thanks for the info.
On Mon, Jan 11, 2021 at 05:17:01PM +0100, Thomas Monjalon wrote:
> 11/01/2021 17:08, Liron Himi:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Monday, 11 January 2021 18:05
> > To: Liron Himi <lironh@marvell.com>
> > Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Liron Himi <lironh@marvell.com>
> > Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for armada drivers
> >
> > 11/01/2021 16:29, Liron Himi:
> > > Hi Thomas,
> > >
> > > When did you take this MUSDK version?
> > > Is this your head "pkg-config: expose dma-add-size"?
> >
> > I'm using musdk-SDK-10.3.5.0-PR2 as recommended in the doc.
> >
> > > If not, this explain the mvneta issue.
> > > I already noticed that and pushed a fixed to the github.
> >
> > I see. So it may need a doc update.
> > [L.H.] why need to update the doc? It is still the same release branch, I just added a fix patch to it.
>
> Yes, my bad: I used the tag musdk-SDK-10.3.5.0-PR2
> instead of the branch musdk-release-SDK-10.3.5.0-PR2.
>
> > > As for the prefix issue,
> > > The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
> >
> > No I didn't try that, and I'm using DESTDIR variable when installing.
> > Whould it be possible to update the prefix with DESTDIR when installing?
> > [L.H.] need to explore this option. But for now use 'prefix', as this is what supported by MUSDK
>
> OK
>
[+Luca]
I think it would be wrong to update the .pc file based on DESTDIR, as I
believe DESTDIR is used by packaging to produce the actual package layout
in a non-root path. To change the default installation path for a package
on the current system, "--prefix" is the correct parameter to use.
/Bruce
11/01/2021 18:07, Bruce Richardson:
> On Mon, Jan 11, 2021 at 05:17:01PM +0100, Thomas Monjalon wrote:
> > 11/01/2021 17:08, Liron Himi:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > Sent: Monday, 11 January 2021 18:05
> > > To: Liron Himi <lironh@marvell.com>
> > > Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Liron Himi <lironh@marvell.com>
> > > Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for armada drivers
> > >
> > > 11/01/2021 16:29, Liron Himi:
> > > > Hi Thomas,
> > > >
> > > > When did you take this MUSDK version?
> > > > Is this your head "pkg-config: expose dma-add-size"?
> > >
> > > I'm using musdk-SDK-10.3.5.0-PR2 as recommended in the doc.
> > >
> > > > If not, this explain the mvneta issue.
> > > > I already noticed that and pushed a fixed to the github.
> > >
> > > I see. So it may need a doc update.
> > > [L.H.] why need to update the doc? It is still the same release branch, I just added a fix patch to it.
> >
> > Yes, my bad: I used the tag musdk-SDK-10.3.5.0-PR2
> > instead of the branch musdk-release-SDK-10.3.5.0-PR2.
> >
> > > > As for the prefix issue,
> > > > The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
> > >
> > > No I didn't try that, and I'm using DESTDIR variable when installing.
> > > Whould it be possible to update the prefix with DESTDIR when installing?
> > > [L.H.] need to explore this option. But for now use 'prefix', as this is what supported by MUSDK
> >
> > OK
> >
> [+Luca]
>
> I think it would be wrong to update the .pc file based on DESTDIR, as I
> believe DESTDIR is used by packaging to produce the actual package layout
> in a non-root path. To change the default installation path for a package
> on the current system, "--prefix" is the correct parameter to use.
Yes you're right, it makes sense.
On Mon, 2021-01-11 at 17:07 +0000, Bruce Richardson wrote:
> On Mon, Jan 11, 2021 at 05:17:01PM +0100, Thomas Monjalon wrote:
> > 11/01/2021 17:08, Liron Himi:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > Sent: Monday, 11 January 2021 18:05
> > > To: Liron Himi <lironh@marvell.com>
> > > Cc: ferruh.yigit@intel.com; dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Liron Himi <lironh@marvell.com>
> > > Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v3] meson: update meson build for armada drivers
> > >
> > > 11/01/2021 16:29, Liron Himi:
> > > > Hi Thomas,
> > > >
> > > > When did you take this MUSDK version?
> > > > Is this your head "pkg-config: expose dma-add-size"?
> > >
> > > I'm using musdk-SDK-10.3.5.0-PR2 as recommended in the doc.
> > >
> > > > If not, this explain the mvneta issue.
> > > > I already noticed that and pushed a fixed to the github.
> > >
> > > I see. So it may need a doc update.
> > > [L.H.] why need to update the doc? It is still the same release branch, I just added a fix patch to it.
> >
> > Yes, my bad: I used the tag musdk-SDK-10.3.5.0-PR2
> > instead of the branch musdk-release-SDK-10.3.5.0-PR2.
> >
> > > > As for the prefix issue,
> > > > The prefix is being set in the 'configure' phase by using the '--prefix' variable. Have you tried that?
> > >
> > > No I didn't try that, and I'm using DESTDIR variable when installing.
> > > Whould it be possible to update the prefix with DESTDIR when installing?
> > > [L.H.] need to explore this option. But for now use 'prefix', as this is what supported by MUSDK
> >
> > OK
> >
> [+Luca]
>
> I think it would be wrong to update the .pc file based on DESTDIR, as I
> believe DESTDIR is used by packaging to produce the actual package layout
> in a non-root path. To change the default installation path for a package
> on the current system, "--prefix" is the correct parameter to use.
>
> /Bruce
+1
@@ -56,7 +56,7 @@ Prerequisites
.. code-block:: console
- git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-armada-18.09
+ git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2
MUSDK is a light-weight library that provides direct access to Marvell's
NETA. Alternatively prebuilt MUSDK library can be
@@ -94,8 +94,8 @@ be passed as part of EAL arguments.
-c 3 -- -i --p 3 -a
-Building DPDK
--------------
+Building MUSDK
+--------------
Driver needs precompiled MUSDK library during compilation.
@@ -109,12 +109,16 @@ Driver needs precompiled MUSDK library during compilation.
MUSDK will be installed to `usr/local` under current directory.
For the detailed build instructions please consult ``doc/musdk_get_started.txt``.
-The path to the MUSDK installation directory needs to set in meson, shown in the
-following command:
+Building DPDK
+-------------
+
+Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable.
.. code-block:: console
- meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build
+ export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH
+ meson build --cross-file config/arm/arm64_armada_linux_gcc
+ ninja -C build
Usage Example
@@ -91,7 +91,7 @@ Prerequisites
.. code-block:: console
- git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-armada-18.09
+ git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2
MUSDK is a light-weight library that provides direct access to Marvell's
PPv2 (Packet Processor v2). Alternatively prebuilt MUSDK library can be
@@ -108,8 +108,8 @@ Prerequisites
DPDK environment.
-Building DPDK
--------------
+Building MUSDK
+--------------
Driver needs precompiled MUSDK library during compilation.
@@ -123,14 +123,18 @@ Driver needs precompiled MUSDK library during compilation.
MUSDK will be installed to `usr/local` under current directory.
For the detailed build instructions please consult ``doc/musdk_get_started.txt``.
-The path to the MUSDK installation directory needs to set in meson, shown in the
-command below.
-For additional instructions regarding DPDK cross compilation please refer to :doc:`Cross compile DPDK for ARM64 <../linux_gsg/cross_build_dpdk_for_arm64>`.
+Building DPDK
+-------------
+
+Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable.
.. code-block:: console
- meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build
+ export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH
+
+ meson build --cross-file config/arm/arm64_armada_linux_gcc
+ ninja -C build
Usage Example
@@ -3,18 +3,14 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
#
-path = get_option('lib_musdk_dir')
-lib_dir = path + '/lib'
-inc_dir = path + '/include'
-lib = cc.find_library('libmusdk', dirs: [lib_dir], required: false)
-if not lib.found()
+dep = dependency('libmusdk', required: false)
+if not dep.found()
build = false
reason = 'missing dependency, "libmusdk"'
-else
- ext_deps += lib
- includes += include_directories(inc_dir)
- cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC']
+ subdir_done()
endif
+ext_deps += dep
+
sources = files('mvep_common.c')
@@ -3,20 +3,15 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
-path = get_option('lib_musdk_dir')
-lib_dir = path + '/lib'
-inc_dir = path + '/include'
-
-lib = cc.find_library('libmusdk', dirs: [lib_dir], required: false)
-if not lib.found()
+dep = dependency('libmusdk', required: false)
+if not dep.found()
build = false
reason = 'missing dependency, "libmusdk"'
-else
- ext_deps += lib
- includes += include_directories(inc_dir)
- cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC']
+ subdir_done()
endif
+ext_deps += dep
+
sources = files('rte_mrvl_pmd.c', 'rte_mrvl_pmd_ops.c')
deps += ['bus_vdev', 'common_mvep']
@@ -3,24 +3,15 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
-path = get_option('lib_musdk_dir')
-lib_dir = path + '/lib'
-inc_dir = path + '/include'
-
-lib = cc.find_library('libmusdk', dirs : [lib_dir], required: false)
-if not lib.found()
+dep = dependency('libmusdk', required: false)
+if not dep.found()
build = false
reason = 'missing dependency, "libmusdk"'
-else
- ext_deps += lib
- includes += include_directories(inc_dir)
- cflags += [
- '-DMVCONF_TYPES_PUBLIC',
- '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC',
- '-DMVCONF_DMA_PHYS_ADDR_T_SIZE=64'
- ]
+ subdir_done()
endif
+ext_deps += dep
+
sources = files(
'mvneta_ethdev.c',
'mvneta_rxtx.c'
@@ -3,20 +3,15 @@
# Copyright(c) 2018 Semihalf.
# All rights reserved.
-path = get_option('lib_musdk_dir')
-lib_dir = path + '/lib'
-inc_dir = path + '/include'
-
-lib = cc.find_library('libmusdk', dirs : [lib_dir], required: false)
-if not lib.found()
+dep = dependency('libmusdk', required: false)
+if not dep.found()
build = false
reason = 'missing dependency, "libmusdk"'
-else
- ext_deps += lib
- includes += include_directories(inc_dir)
- cflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC']
+ subdir_done()
endif
+ext_deps += dep
+
sources = files(
'mrvl_ethdev.c',
'mrvl_flow.c',
@@ -20,8 +20,6 @@ option('include_subdir_arch', type: 'string', value: '',
description: 'subdirectory where to install arch-dependent headers')
option('kernel_dir', type: 'string', value: '',
description: 'Path to the kernel for building kernel modules. Headers must be in $kernel_dir/build. Modules will be installed in $DEST_DIR/$kernel_dir/extra/dpdk.')
-option('lib_musdk_dir', type: 'string', value: '',
- description: 'path to the MUSDK library installation directory')
option('machine', type: 'string', value: 'native',
description: 'set the target machine type')
option('max_ethports', type: 'integer', value: 32,