package/xilinx_axidma: new package
PATCH 1/1 package/xilinx_axidma: new package
--- package/Config.in | 1 + package/xilinx_axidma/Config.in | 8 +++++ package/xilinx_axidma/xilinx_axidma.hash | 2 ++ package/xilinx_axidma/xilinx_axidma.mk | 38 ++++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 package/xilinx_axidma/Config.in create mode 100644 package/xilinx_axidma/xilinx_axidma.hash create mode 100644 package/xilinx_axidma/xilinx_axidma.mk
package/Config.in +1 -0
@@ -554,6 +554,7 @@ endmenu source "package/w_scan/Config.in" source "package/wf111/Config.in" source "package/wipe/Config.in" + source "package/xilinx_axidma/Config.in" source "package/xorriso/Config.in" source "package/xr819-xradio/Config.in" endmenu
package/xilinx_axidma/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_XILINX_AXIDMA + bool "xilinx_axidma" + depends on BR2_LINUX_KERNEL + help + xilinx_axidma driver. + +comment "xilinx_axidma needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL
package/xilinx_axidma/xilinx_axidma.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 961ad2eab6f078f441e8855697dcd6c364f0781b1dffcb9f95c4686c9825c585 xilinx_axidma-42ed91e83bc4da1e29149b2be0c6a6b8f4549222.tar.gz
package/xilinx_axidma/xilinx_axidma.mk new file +38 -0
@@ -0,0 +1,38 @@ +################################################################################ +# +# xilinx_axidma +# +################################################################################ + +XILINX_AXIDMA_VERSION = 42ed91e83bc4da1e29149b2be0c6a6b8f4549222 +XILINX_AXIDMA_SITE = $(call github,bperez77,xilinx_axidma,$(XILINX_AXIDMA_VERSION)) +XILINX_AXIDMA_INSTALL_STAGING = YES +XILINX_AXIDMA_LICENSE = GPL-2.0 + +XILINX_AXIDMA_MODULE_MAKE_OPTS = \ + AXIDMA_MODULE_NAME=axidma \ + AXIDMA_FILES="axi_dma.c axidma_chrdev.c axidma_dma.c axidma_of.c" \ + AXIDMA_INC_DIRS=$(@D)/include + +XILINX_AXIDMA_MODULE_SUBDIRS = driver + +define XILINX_AXIDMA_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) library examples +endef + +define XILINX_AXIDMA_INSTALL_SHARED_LIB + $(INSTALL) -D -m 0644 $(@D)/library/libaxidma.so $(1)/usr/lib/libaxidma.so +endef + +define XILINX_AXIDMA_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0644 $(@D)/include/{libaxidma,axidma_ioctl}.h $(STAGING_DIR)/usr/include/ + $(call XILINX_AXIDMA_INSTALL_SHARED_LIB,$(STAGING_DIR)) +endef + +define XILINX_AXIDMA_INSTALL_TARGET_CMDS + $(call XILINX_AXIDMA_INSTALL_SHARED_LIB,$(TARGET_DIR)) + $(INSTALL) -D -m 0755 $(@D)/examples/axidma_{benchmark,display_image,transfer} $(TARGET_DIR)/usr/bin/ +endef + +$(eval $(kernel-module)) +$(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 1/1 package/xilinx_axidma: new package
Hello Viktar,
Thanks for your contribution, and sorry for the very slow feedback. I finally looked at your patch, and the main question is: is this kernel module + library still really maintained? There has been no commits upstream since November 2018. Does it still work with recent versions of the Xilinx Linux kernel ?
See below for a few comments.
Quoted 7 lines · On Tue, 1 Oct 2019 15:42:20 +0300 Viktar Palstsiuk…
Signed-off-by Viktar Palstsiuk <[email protected]>--- package/Config.in | 1 + package/xilinx_axidma/Config.in | 8 +++++ package/xilinx_axidma/xilinx_axidma.hash | 2 ++ package/xilinx_axidma/xilinx_axidma.mk | 38 ++++++++++++++++++++++++ 4 files changed, 49 insertions(+)
We need the DEVELOPERS file to be updated.
Quoted 3 lines
create mode 100644 package/xilinx_axidma/Config.in create mode 100644 package/xilinx_axidma/xilinx_axidma.hash create mode 100644 package/xilinx_axidma/xilinx_axidma.mk
I'd prefer the package to be named xilinx-axidma (with a dash) rather than xilinx_axidma.
package/xilinx_axidma/Config.in line 3
Quoted 9 lines
package/xilinx_axidma/Config.in new file +3
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_XILINX_AXIDMA + bool "xilinx_axidma" + depends on BR2_LINUX_KERNEL
You also need:
depends on !BR2_STATIC_LIBS
since the makefile unconditionally builds a shared library.
package/xilinx_axidma/Config.in line 5
Quoted 2 lines
package/xilinx_axidma/Config.in new file +2
-0+ help + xilinx_axidma driver.
This should be extended with more details, like:
A zero-copy, high-bandwidth Linux driver and userspace interface library for Xilinx's AXI DMA and VDMA IP blocks.
It needs a vendor-specific Xilinx kernel, built with the following options:
... here list of options ...
package/xilinx_axidma/Config.in line 8
Quoted 2 lines
package/xilinx_axidma/Config.in new file +2
-0+comment "xilinx_axidma needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL
This needs to be updated to take into account the !BR2_STATIC_LIBS dependency.
package/xilinx_axidma/Config.in
Quoted 6 lines
package/xilinx_axidma/Config.in new file +6
-0+define XILINX_AXIDMA_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) library examples +endef + +define XILINX_AXIDMA_INSTALL_SHARED_LIB + $(INSTALL) -D -m 0644 $(@D)/library/libaxidma.so $(1)/usr/lib/libaxidma.so
Is this macro really useful? It's online of code, and calling it takes one line :-)
package/xilinx_axidma/Config.in
Quoted 4 lines
package/xilinx_axidma/Config.in new file +4
-0+endef + +define XILINX_AXIDMA_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0644 $(@D)/include/{libaxidma,axidma_ioctl}.h $(STAGING_DIR)/usr/include/
Doing this doesn't work well if $(STAGING_DIR)/usr/include doesn't exist, as it will be created as a file with the contents of libaxidma.h.
$(foreach f,libaxidma axidma_ioctl, \ $(INSTALL) -D -m0644 $(@D)/include/$(f).h $(STAGING_DIR)/usr/include/$(f).h \ )
package/xilinx_axidma/Config.in
Quoted 6 lines
package/xilinx_axidma/Config.in new file +6
-0+ $(call XILINX_AXIDMA_INSTALL_SHARED_LIB,$(STAGING_DIR)) +endef + +define XILINX_AXIDMA_INSTALL_TARGET_CMDS + $(call XILINX_AXIDMA_INSTALL_SHARED_LIB,$(TARGET_DIR)) + $(INSTALL) -D -m 0755 $(@D)/examples/axidma_{benchmark,display_image,transfer} $(TARGET_DIR)/usr/bin/
Same comment here.
So if you're still interested in this, and can confirm that this is still maintained, do not hesitate to send a new iteration of this patch.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com