[dpdk-dev] librte_vhost: eventfd_link: Update the makefile to build against an arbitrary kernel

Message ID 1443038616-28141-1-git-send-email-aconole@redhat.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Aaron Conole Sept. 23, 2015, 8:03 p.m. UTC
  The vHost eventlink driver is a kernel module that requires a kernel
source/build directory to build the ko. Convert the fixed kernel build
directory specifier to one which may be user specified on the command-line.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_vhost/eventfd_link/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Thomas Monjalon Sept. 24, 2015, 8:05 p.m. UTC | #1
2015-09-23 16:03, Aaron Conole:
> The vHost eventlink driver is a kernel module that requires a kernel
> source/build directory to build the ko. Convert the fixed kernel build
> directory specifier to one which may be user specified on the command-line.
> 
> Signed-off-by: Aaron Conole <aconole@redhat.com>

Applied, thanks
  
Pavel Boldin Sept. 24, 2015, 10:05 p.m. UTC | #2
Thomas,

Can I please have your attention there as well:
http://dpdk.org/dev/patchwork/project/dpdk/list/?submitter=194

Pavel

On Thu, Sep 24, 2015 at 11:05 PM, Thomas Monjalon <thomas.monjalon@6wind.com
> wrote:

> 2015-09-23 16:03, Aaron Conole:
> > The vHost eventlink driver is a kernel module that requires a kernel
> > source/build directory to build the ko. Convert the fixed kernel build
> > directory specifier to one which may be user specified on the
> command-line.
> >
> > Signed-off-by: Aaron Conole <aconole@redhat.com>
>
> Applied, thanks
>
  

Patch

diff --git a/lib/librte_vhost/eventfd_link/Makefile b/lib/librte_vhost/eventfd_link/Makefile
index fc3927b..3140e8b 100644
--- a/lib/librte_vhost/eventfd_link/Makefile
+++ b/lib/librte_vhost/eventfd_link/Makefile
@@ -29,11 +29,13 @@ 
 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+RTE_KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+
 obj-m += eventfd_link.o
 
 
 all:
-	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+	make -C $(RTE_KERNELDIR) M=$(PWD) modules
 
 clean:
-	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
+	make -C $(RTE_KERNELDIR) M=$(PWD) clean