xdma

xilinx xdma Linux 驱动 使用

xilinx 官网下载的linux xdma 驱动,在按照他们给的提示编译的时候会出现,一些问题

  1. 编译的时候,会出现证书的问题,官方说不用管,
  2. 插入内核的时候也会有一些错误。

会出现插入不了内核在这里插入图片描述

int xdma_cdev_init(void)
{
	g_xdma_class = class_create(THIS_MODULE, XDMA_NODE_NAME);
	if (IS_ERR(g_xdma_class)) {
		dbg_init(XDMA_NODE_NAME ": failed to create class");
		return -1;
	}

    /* using kmem_cache_create to enable sequential cleanup */
    cdev_cache = kmem_cache_create("cdev_cache",
                                   sizeof(struct cdev_async_io),
                                   0,
                                   SLAB_HWCACHE_ALIGN,
                                   NULL);
    if (!cdev_cache) {
    	pr_info("memory allocation for cdev_cache failed. OOM\n");
    	return -ENOMEM;
    }

   	xdma_threads_create(8);

	return 0;
}

修改

  	xdma_threads_create(4);

还有脚本问题,会出现错误
只能看他们的测试代码,然后在执行,
由于电脑性能的原因,我把线程减少4个,然后再插入内核,能成功解决问题。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值