> -----Original Message----- > From: Bruce Richardson <bruce.richard...@intel.com> > Sent: Friday, January 29, 2021 4:40 PM > To: Juraj Linkeš <juraj.lin...@pantheon.tech> > Cc: tho...@monjalon.net; ruifeng.w...@arm.com; jerinjac...@gmail.com; > hemant.agra...@nxp.com; ferruh.yi...@intel.com; abo...@pensando.io; > dev@dpdk.org > Subject: Re: [RFC PATCH v1] build: kni gcc cross-compilation support > > On Fri, Jan 29, 2021 at 03:17:02PM +0000, Juraj Linkeš wrote: > > > > > > > -----Original Message----- > > > From: Bruce Richardson <bruce.richard...@intel.com> > > > Sent: Friday, January 29, 2021 4:01 PM > > > To: Juraj Linkeš <juraj.lin...@pantheon.tech> > > > Cc: tho...@monjalon.net; ruifeng.w...@arm.com; > > > jerinjac...@gmail.com; hemant.agra...@nxp.com; > > > ferruh.yi...@intel.com; abo...@pensando.io; dev@dpdk.org > > > Subject: Re: [RFC PATCH v1] build: kni gcc cross-compilation support > > > > > > On Fri, Jan 29, 2021 at 02:47:57PM +0000, Juraj Linkeš wrote: > > > > > > > > > > > > > -----Original Message----- > > > > > From: Bruce Richardson <bruce.richard...@intel.com> > > > > > Sent: Friday, January 29, 2021 3:42 PM > > > > > To: Juraj Linkeš <juraj.lin...@pantheon.tech> > > > > > Cc: tho...@monjalon.net; ruifeng.w...@arm.com; > > > > > jerinjac...@gmail.com; hemant.agra...@nxp.com; > > > > > ferruh.yi...@intel.com; abo...@pensando.io; dev@dpdk.org > > > > > Subject: Re: [RFC PATCH v1] build: kni gcc cross-compilation > > > > > support > > > > > > > > <snip> > > > > > > > Can we find some way of getting it working for both cases. > > > > > > > For native builds we want: > > > > > > > > > > > > > > * build kernel-dir = /lib/modules/<ver>/build > > > > > > > * install dir = /lib/modules/<ver>/extra/dpdk > > > > > > > > > > > > > > What are the expected equivalent paths for cross building? > > > > > > > > > > > > > > > > > > > The ubuntu1804 packages are installing aarch64 cross files to > > > > > > /usr/aarch64- > > > > > linux-gnu, so we could install it to /usr/aarch64-linux- > > > > > gnu/lib/modules/<ver>/extra/dpdk, or > > > > > /usr/<cross_triple>/lib/modules/<ver>/extra/dpdk in general. I > > > > > think we can get <ver> from 'make kernelversion', so that would > > > > > work, although I'm not sure this is the right place. > > > > > > > > > > > So what do you specify as the "kernel_dir" for the cross compile? > > > > > > > > > > > > > The place where I cloned (and cross-compiled) linux sources: > > > > $HOME/linux. > > > > > > > So I think the key problem is that for cross-compilation you need > > > two completely independent paths, while for native builds the two can be > linked. Is that correct? > > > > Assuming that we want to install cross modules, then yes, although > > it's incomplete. There's also the scenario when a user would use > > different kernel_dir than the default for native builds. I don't know > > why anyone would do that, but it is a theoretical possibility :-) > > In the cross-compile install case, is the prefix /usr/aarch64-linux-gnu/ > coming > from a DESTDIR environment variable? If it is, then we could just use the > kernel_dir option for the build path, and always install to > /lib/modules/<ver>/... > allowing any cross-compiler relocation to take care of the rest.
It's not coming from anywhere. What I meant is that an ubuntu package such as 'libatomic1-arm64-cross' installs its headers/libs under /usr/aarch64-linux-gnu/.