[X]关闭

请教CH19 9V034视频采集 insmod axi_vdma错误

文档创建者:船长
浏览次数:7085
最后更新:2019-10-07
本帖最后由 船长 于 2019-10-7 07:48 编辑

我学习zynq的修炼秘籍linux篇的第19章时,根据教程的步骤操作完成后,加载驱动时发现如下问题,请问是什么原因:

root@stretch-armhf:/home/osrc/CH07_VDMA# insmod axi_vdma.ko
axi_vdma: loading out-of-tree module taints kernel.
axi vdma s2mm valid
axivdma 43010000.dma: registered.
axivdma 43010000.dma: axi vdma  buffer memory allocation failed
axivdma: probe of 43010000.dma failed with error -12


我使用modprobe ,提示的信息如下:
modprobe: FATAL: Module axi_vdma.ko not found in directory /lib/modules/4.14.0-xilinx


我修改了SD 里面uEnv.txt文件,optargs=cam=128M.
CH18 framebuffer的教程我按照步骤操作没有问题,结果与教程一致。
我的开发vivado的版本是vivado 2019.1

根据上面的错误的信息“ buffer memory allocation failed”,我修改了axi_vdma.c申请的内存大小,由64M 修改为8M ,之后就没有问题了。
root@stretch-armhf:/home/osrc/CH07_VDMA# insmod axi_vdma.ko
axi_vdma: loading out-of-tree module taints kernel.
axi vdma s2mm valid
axivdma 43010000.dma: registered.
axivdma 43010000.dma: AXI VDMA Engine Driver Probed!!


我的boot里面的uENV.txt的内容为:
optargs=console=tty0 consoleblank=0 vt.global_cursor_default=0 cma=128M(我只添加cma也不行)

但是我看内核的启动信息的时候发现cma的参数好像没有传到kernel
Kernel command line: console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait

请问这个问题该如何解决?






发表评论已发布 4

uisrc

发表于 2019-10-7 10:57:28 | 显示全部楼层

把uboot的设备树,和kernel的设备树关于 内存部分的都贴上来
越努力越幸运!加油!

船长

发表于 2019-10-7 11:15:12 | 显示全部楼层

u-boot的设备数:
路径:osrc-lab/sources/u-boot/arch/arm/dts  ,文件zynq-mz7x.dts

21         memory@0 {
22                 device_type = "memory";
23                 reg = <0x0 0x20000000>;
24         };

======================================

内核:
路径:osrc-lab/boards/MZ7X/debian/dts  system-top.dts
29         memory@0 {
30                 device_type = "memory";
31                 reg = <0x0 0x40000000>;
32         };

zynq-7000.dts
161                 mc: memory-controller@f8006000 {
162                         compatible = "xlnx,zynq-ddrc-a05";
163                         reg = <0xf8006000 0x1000>;
164                 };

227                 smcc: memory-controller@e000e000 {
228                         #address-cells = <1>;
229                         #size-cells = <1>;
230                         status = "disabled";
231                         clock-names = "memclk", "aclk";
232                         clocks = <&clkc 11>, <&clkc 44>;
233                         compatible = "arm,pl353-smc-r2p1";
234                         interrupt-parent = <&intc>;
235                         interrupts = <0 18 4>;
236                         ranges ;
237                         reg = <0xe000e000 0x1000>;
238                         nand0: flash@e1000000 {
239                                 status = "disabled";
240                                 compatible = "arm,pl353-nand-r2p1";
241                                 reg = <0xe1000000 0x1000000>;
242                                 #address-cells = <0x1>;
243                                 #size-cells = <0x1>;
244                         };
245                         nor0: flash@e2000000 {
246                                 status = "disabled";
247                                 compatible = "cfi-flash";
248                                 reg = <0xe2000000 0x2000000>;
249                                 #address-cells = <1>;
250                                 #size-cells = <1>;
251                         };
252                 };

uisrc

发表于 2019-10-7 11:26:50 | 显示全部楼层

21         memory@0 {
22                 device_type = "memory";
23                 reg = <0x0 0x20000000>;
24         };

这个地方内存大小是512MB 改成 reg = <0x0 0x40000000>;
越努力越幸运!加油!

船长

发表于 2019-10-7 12:22:55 | 显示全部楼层

修改了之后,Starting kernel 就在一直等待,启动信息如下:


U-Boot 2018.01 (Oct 07 2019 - 11:58:22 +0800)

Model: Zynq mz7x Development Board
Board: Xilinx Zynq
Silicon: v3.1
DRAM:  ECC disabled 1 GiB
MMC:   sdhci_transfer_data: Error detected in status(0x208000)!
sdhci@e0100000: 0 (SD), sdhci@e0101000: 1 (eMMC)
SF: Detected n25q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
Net:   ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet@e000b000
Hit any key to stop autoboot:  0
SDCARD Boot Mode
[INFO] Scanning mmc 0...
switch to partitions #0, OK
mmc0 is current device
reading uEnv.txt
63 bytes read in 12 ms (4.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc 0...
[INFO] Trying to boot from mmc 0
reading uImage
4052264 bytes read in 263 ms (14.7 MiB/s)
reading devicetree.dtb
11389 bytes read in 18 ms (617.2 KiB/s)
** Unable to read file uramdisk.image.gz **
## Booting kernel from Legacy Image at 02080000 ...
   Image Name:   Linux-4.14.0-xilinx
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4052200 Bytes = 3.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
   Booting using the fdt blob at 0x2000000
   Loading Kernel Image ... OK
   Loading Device Tree to 3eb14000, end 3eb19c7c ... OK

Starting kernel ...

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则