[dpdk-stable] [dpdk-dev] [PATCH v3] kernel/linux: fix kernel dir for meson

Ye Xiaolong xiaolong.ye at intel.com
Sun Dec 8 02:26:57 CET 2019


On 12/04, Bruce Richardson wrote:
>On Wed, Dec 04, 2019 at 10:18:21PM +0800, Ye Xiaolong wrote:
>> On 12/04, Luca Boccassi wrote:
>> >On Tue, 2019-12-03 at 23:59 +0800, Xiaolong Ye wrote:
>> >> kernel_dir option in meson build is equivalent to RTE_KERNELDIR in
>> >> make
>> >> system, for cross-compilation case, users would specify it as local
>> >> kernel src dir like
>> >> 
>> >> /<user local dir>/target-arm_glibc/linux-arm/linux-4.19.81/
>> >> 
>> >> Current meson build would fail to compile kernel module if user
>> >> specify
>> >> kernel_dir as above, this patch fixes this issue.
>> >> 
>> >> After this change, for normal build case, user can specify
>> >> /lib/modules/<kernel_version> or /lib/modules/<kernel_version>/build
>> >> as
>> >> kernel_dir. For cross compilation case, user can specify any
>> >> directory
>> >> that contains kernel source code as the kernel_dir.
>> >> 
>> >> Fixes: 317832f97c16 ("kernel/linux: fix modules install path")
>> >> Cc: 
>> >> stable at dpdk.org
>> >> 
>> >> Cc: 
>> >> iryzhov at nfware.com
>> >> 
>> >> 
>> >> Signed-off-by: Xiaolong Ye <
>> >> xiaolong.ye at intel.com
>> >
>> >The convention used by upstream and all distros is that kernel headers
>> >are in <version>/build. Why can't the cross compilation case also
>> >follow this convention, rather than adding complications to the
>> 
>> Yes, cross-compilation can follow this convention, but one common case is that
>> users download and put kernel src (the same kernel that's running in the target machine)
>> to one arbitrary dir, he then use this dir as kernel_dir to build kernel modules,
>> it's extra burden for users to create extra build dir to hold the kernel headers.
>> 
>
>As part of the build of the kernel, do you not do a "modules_install" step,
>which should set up things correctly for later builds?

Yes, this cmd helps. But for make build, user could specify both
/lib/modules/<kernelversion>/build and any kernel src dir as RTE_KERNELDIR, I
think this patch can help give user consistent experience when they migrate from make 
to meson build.

Thanks,
Xiaolong

>
>/Bruce


More information about the stable mailing list