linux-xlnx | The official Linux kernel from Xilinx
kandi X-RAY | linux-xlnx Summary
kandi X-RAY | linux-xlnx Summary
There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of linux-xlnx
linux-xlnx Key Features
linux-xlnx Examples and Code Snippets
Community Discussions
Trending Discussions on linux-xlnx
QUESTION
I'm a software developer but I'm a newbie to embedded software development. I have a Zynq Ultrascale board that has an Axi DMA in its Hardware and I want to access this DMA from Linux. I know I should use DMA-Engine to Access DMA in Linux and I found the following link which is the Xilinx DMA driver, but I can't add these files to my qt project without any errors and I received file(header file) not found errors. drivers/dma/xilinx/xilinx_dma.c
I have a piece of scattered information about the DMA driver, Device tree, and DMA-Engine but I know nothing about how to utilize these to access hardware DMA.
I built a Petalinux project and add DMA-Engine and DMA Test client to its kernel.
I don't know adding DMAEngine to the Petalinux project is enough or I should have a driver as well.
I don't know adding hardware specification (by .xsa file and .bit file) to the Petalinux project is enough or I should add a device tree to my Linux for detecting DMA as well
I lookup a step-by-step tutorial on how to set up Linux and qt creator for accessing DMA, or at least a clear roadmap to my target.
thank you in advance.
...ANSWER
Answered 2021-Dec-09 at 22:15First of all, you are facing errors when adding xilinx_dma.c to the Qt project because this file is meant to be compiled as part of kernel or as a kernel module.
Adding DMA Engine to Petalinux is not enough to work with DMA from user space. DMA Engine only provides a standardized API to let different DMAs be integrated into kernel. You need to add a client driver as well. Xilinx, as far as I know, has provided a simple client driver called DMA Proxy Driver. It also includes some simple examples that show how you can access DMA from the user space. However, if your application needs high bandwidth, you probably need to consider other options.
There is also an open source client driver for Axi DMA which achieves higher bandwidths compared to Proxy DMA Driver. It's user space API also allows you to register a callback function to be called whenever a transaction is finished.
The third option is to implement the driver in the user space. This can be done by defining the DMA as a UIO device in the device tree and access its register map directly from the user space. In this case, you need to allocate some contiguous memory blocks in the kernel space to avoid complications with MMU, which cannot be dealt with from the user space.
QUESTION
I built the yocto image for my board . Now I need to apply this patch
First, how do I figure out which recipe the patch goes to? Second, how do I apply this patch?
(I checked similar question but its patching yocto system itself, I don't want that)
I can list all my recipes with this command I found
...ANSWER
Answered 2021-Oct-06 at 15:03So I haven't done the build myself but here is what I could gather (this is a bit of a long shot on certain points... hope everything works, I'm open to discussion if that's not the case).
Finding the recipe to patch: In my opinion this might be often tricky to find what recipe does what in Yocto. If I'm not mistaken (which is very much a possibility) you should have a layer called meta-xilinx-bsp
. Wihtin this layer there should be recipes-kernel/linux/linux_xlnx_[version].bb
. This should be the recipe the patch should go to.
Applying the patch: To apply the patch the simplest way is to append the recipe.
- Create the folder structure: In your own layer you need to reproduce the structure where the recipe is in the original layer. Here:
meta-myLayer/recipes-kernel/linux/
. In this folder createlinux-xlnx_%.bbappend
. - Create a .bbappend file: With this structure and name yocto will know this is an append to the original
linux-xlnx_[verion_number].bb
recipe. The%
is put here instead of a version number. This is a wildcard and will append any version of thelinux-xlnx
recipe. Should you want to append only a specific version you can replace%
by a version number. - Add the patch file to your directory: To do so create a folder called
linux-xlnx
next to you recipe. And within this folder create your patch file by copying the content you have in something likemy-xlnx-patch.patch
- Reference the patch file in the .bbappend: Indicate the file path in your
linux-xlnx_%.bbappend
as follow:
QUESTION
I have a Makefile made by following this example: cross compile kernel module
I built a 4.14 Linux kernel from an older Xilinx source, and then built a out-of-kernel module with that script, pointing it to the said 4.14 kernel sources, and filling in the blanks for my particular platform architecture. That worked. (It's based on this code, if that matters: dma-proxy.c)
Now I need a newer version, and got Xilinx sources with a kernel named 5.6.0-rc1. (--branch "zynqmp-soc-for-v5.7" from here) Building that kernel also worked fine. If I now use a scrubbed clean directory (incl. hidden files) with my module source code and that Makefile again, pointing to the newer kernel sources, it does neither produce a .ko file nor an error message. All I get is:
...ANSWER
Answered 2020-May-05 at 12:25Mkay, here is the suggested makefile template by the tutorial I referenced in the question:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install linux-xlnx
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page