首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >内核/linux/igb_uio/meson.build:6:17: ERROR: lexer

内核/linux/igb_uio/meson.build:6:17: ERROR: lexer
EN

Stack Overflow用户
提问于 2022-07-27 13:45:17
回答 1查看 153关注 0票数 0

我试图使用介子构建来构建igb_uio内核模块。我使用下面的meson.build文件来构建驱动程序。

kernel/linux/igb_gio/meson.build文件:文件

代码语言:javascript
运行
复制
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation

mkfile = custom_target('igb_uio_makefile',
    output: 'Makefile',
    command: ['touch', '@OUTPUT@'])

custom_target('igb_uio',
    input: ['igb_uio.c', 'Kbuild'],
    output: 'igb_uio.ko',
    command: ['make', '-C', kernel_dir,
        'M=' + meson.current_build_dir(),
        'src=' + meson.current_source_dir(),
        'EXTRA_CFLAGS=-I' + meson.current_source_dir() +
            '/../../../lib/librte_eal/common/include',
        'modules'],
    depends: mkfile,
    install: true,
    install_dir: kernel_dir + '/../extra/dpdk',
    build_by_default: get_option('enable_kmods'))

我的构建失败了:内核/linux/igb_uio/meson.build:6:17: ERROR: lexer命令: touch,@OUTPUT@)

我尝试将文件名传递为igb_src = file (igb_uio.c‘,'Kbuild'),然后分配输入: igb_src,但没有结果。你能告诉我如何解决这个问题吗?我使用的是介子版本.49.2

EN

Stack Overflow用户

发布于 2022-07-28 12:09:21

根据DPDK版本的不同,IGB_UIO内核驱动程序代码可以在DPDK源代码中出现或不存在。直到dpdk版本19.11LTS,它是源文件夹的一部分。从DPDK版本20.02及更高版本开始,文件将被删除,并需要单独构建。,但在这两种情况下,这都是自成体系的构建环境,不需要外部干预。

当前的错误kernel/linux/igb_uio/meson.build:6:17: ERROR: lexer command: [touch, @OUTPUT@])不是DPDK构建(makefile或meson)问题的一部分,而是lexer无法找到touch。这似乎更多的是环境和设置问题。

在普通的Linux发行版(fedora、debian、rhel、centos或ubuntu)上,touch通常出现在/usr/bin/中。在自定义内核或坞环境中,确保共享或更新路径以反映touch。然后按以下方式执行

DPDK 20.02及以上:

代码语言:javascript
运行
复制
git clone http://dpdk.org/git/dpdk-kmods
dpdk-kmods/linux/igb_uio/
make
modprobe uio
insmod igb_uio.ko

注意:无论DPDK版本如何,都可以将此方法用于内核模块。

DPDK版本19.11 LTS及更低版本:

介子建造:

  1. meson_options.txt文件中确保enable_kmods的值为enable_kmods

Makefile构建:

使用make config T=[desired target] O=[output folder]

  • edit [output folder]/.config来确保设置y

  • set RTE_SDK和RTE_TARGET的
  1. 构建配置文件夹,并执行make -j
  2. use modprobe uio; insmod igb_uio.ko
票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73139094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档