diff mbox series

mk: fix output directory name when compiling with custom kernel header dir

Message ID 20190718140330.43109-1-herakliusz.lipiec@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series mk: fix output directory name when compiling with custom kernel header dir | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Lipiec, Herakliusz July 18, 2019, 2:03 p.m. UTC
When building dpdk with differnt kernel headers by specifying
RTE_KERNELDIR igb_uio is compiled to directory with a name of the
version of kernel thats running on the system instead of the one that
dpdk is actually compiled against. Fixed by replacing hardcoded value
with value from RTE_KERNELDIR.

Cc: stable@dpdk.org
Cc: bruce.richardson@intel.com
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>

---
resending v1 with corrected cc address for stable and corrected
alignment.
---
 mk/rte.sdkinstall.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Monjalon July 18, 2019, 10:25 p.m. UTC | #1
18/07/2019 16:03, Herakliusz Lipiec:
> When building dpdk with differnt kernel headers by specifying
> RTE_KERNELDIR igb_uio is compiled to directory with a name of the
> version of kernel thats running on the system instead of the one that
> dpdk is actually compiled against. Fixed by replacing hardcoded value
> with value from RTE_KERNELDIR.

missing original commit reference:
Fixes: 3967af352aeb ("mk: install kernel modules")

> Cc: stable@dpdk.org
> Cc: bruce.richardson@intel.com
> Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
> 
> ---
> resending v1 with corrected cc address for stable and corrected
> alignment.

It should be marked v2,
and the alignment is still not correct.

> -kerneldir   ?= /lib/modules/$(shell uname -r)/extra/dpdk
> +kerneldir ?= $(subst /build,/extra/dpdk,$(RTE_KERNELDIR))

I would suggest another syntax, easier to read:

kerneldir   ?= $(RTE_KERNELDIR:/build=/extra/dpdk)
Lipiec, Herakliusz July 19, 2019, 11:09 a.m. UTC | #2
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday, July 18, 2019 11:25 PM
> 18/07/2019 16:03, Herakliusz Lipiec:
> > When building dpdk with differnt kernel headers by specifying
> > RTE_KERNELDIR igb_uio is compiled to directory with a name of the
> > version of kernel thats running on the system instead of the one that
> > dpdk is actually compiled against. Fixed by replacing hardcoded value
> > with value from RTE_KERNELDIR.
> 
> missing original commit reference:
> Fixes: 3967af352aeb ("mk: install kernel modules")
> 
> > Cc: stable@dpdk.org
> > Cc: bruce.richardson@intel.com
> > Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
> >
> > ---
> > resending v1 with corrected cc address for stable and corrected
> > alignment.
> 
> It should be marked v2,
> and the alignment is still not correct.
Sorry I forgot to add the change to commit, sending as v2.
> 
> > -kerneldir   ?= /lib/modules/$(shell uname -r)/extra/dpdk
> > +kerneldir ?= $(subst /build,/extra/dpdk,$(RTE_KERNELDIR))
> 
> I would suggest another syntax, easier to read:
> 
> kerneldir   ?= $(RTE_KERNELDIR:/build=/extra/dpdk)
> 
I have tried that before and it didn't seem to solve the issue.
Thomas Monjalon July 19, 2019, 11:36 a.m. UTC | #3
19/07/2019 13:09, Lipiec, Herakliusz:
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > 18/07/2019 16:03, Herakliusz Lipiec:
> > > -kerneldir   ?= /lib/modules/$(shell uname -r)/extra/dpdk
> > > +kerneldir ?= $(subst /build,/extra/dpdk,$(RTE_KERNELDIR))
> > 
> > I would suggest another syntax, easier to read:
> > 
> > kerneldir   ?= $(RTE_KERNELDIR:/build=/extra/dpdk)
> > 
> I have tried that before and it didn't seem to solve the issue.

Why? What is the output of $(info $(kerneldir)) ?
Lipiec, Herakliusz July 19, 2019, 5:01 p.m. UTC | #4
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Friday, July 19, 2019 12:37 PM
> To: Lipiec, Herakliusz <herakliusz.lipiec@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Richardson, Bruce
> <bruce.richardson@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] mk: fix output directory name when
> compiling with custom kernel header dir
> 
> 19/07/2019 13:09, Lipiec, Herakliusz:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > 18/07/2019 16:03, Herakliusz Lipiec:
> > > > -kerneldir   ?= /lib/modules/$(shell uname -r)/extra/dpdk
> > > > +kerneldir ?= $(subst /build,/extra/dpdk,$(RTE_KERNELDIR))
> > >
> > > I would suggest another syntax, easier to read:
> > >
> > > kerneldir   ?= $(RTE_KERNELDIR:/build=/extra/dpdk)
> > >
> > I have tried that before and it didn't seem to solve the issue.
> 
> Why? What is the output of $(info $(kerneldir)) ?
> 
I have tested your line again, and it worked, I compared against the one I was using at the beginning
And I found that I was missing slash. I will resend a v3.
diff mbox series

Patch

diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index 5c4215cd7..a602dd6cc 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -27,7 +27,7 @@  ifeq ($(RTE_EXEC_ENV),linuxapp)
 RTE_EXEC_ENV=linux
 endif
 ifeq ($(RTE_EXEC_ENV),linux)
-kerneldir   ?= /lib/modules/$(shell uname -r)/extra/dpdk
+kerneldir ?= $(subst /build,/extra/dpdk,$(RTE_KERNELDIR))
 else
 kerneldir   ?= /boot/modules
 endif