On 12/02, Bruce Richardson wrote: >On Mon, Dec 02, 2019 at 07:34:54PM +0800, Ye Xiaolong wrote: >> On 12/02, Igor Ryzhov wrote: >> >We should at least install it into /lib/modules/kernel-version. For >> >convenience, dpdk modules are installed into >> >/lib/modules/kernel-version/extra/dpdk. >> >In the cross-compilation case, you can use DEST_DIR to set some prefix. >> > >> >I don't really see the issue here. The description clearly says that >> >headers must be in $kernel_dir/build which is usually a symlink >> >to /usr/src/linux-headers-kernel-version. >> >Just set kernel_dir correctly and there won't be compilation failure. >> >> I think for cross-compilation case, user should be allowed to specify any >> kernel >> src dir (it doesn't have to be /lib/modules/kernel-version) in his local >> system >> as kernel_dir that doesn't contain the build dir, in this case, current meson >> build will skip kernel module compilation. >> > >I don't think we can take this change as the default, since the previous >fix was put in for good reason. > >However, perhaps we can attempt to support both, using the checks below for >"make kernelversion" in kernel/linux/meson.build. We can attempt using the >directory with /build (as now) and then if that fails attempt without it (or >vice versa).
After a second thought, I think it'd be better that we unify the meaning of kernel_dir for both cases, it should be aligned with make's RTE_KERNELDIR variable that specify the directory contains kernel src code (or header), then we don't need to distinguish these 2 cases in check (make kernelversion) phase, we just need to assign different install dirs, For normal case: kernel_dir=/lib/modules/<kernel_version>/build install_dir=/lib/modules/<kernel_version>/extra/dpdk For cross compilation case: kernel_dir=<Any kernel src dir specified by user> install_dir=<Any kernel src dir specified by user>/extra/dpdk What do you think (I've sent v2 according to above description)? Thanks, Xiaolong > >/Bruce