交叉编译 udev 库

1. 下载地址

    https://www.kernel.org/pub/linux/utils/kernel/hotplug/

 

2. 遇到的问题

    configure 配置问题:

        1> configure: error: Package requirements (libkmod >= 5) were not met:No package 'libkmod' found  

   

        2> configure: error: Package requirements (blkid >= 2.20) were not met:No package 'blkid' found      

 

        3> configure: error: Package requirements (glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0) were not met: No package 'glib-2.0' found No package 'gobject-2.0' found

 

    等等这类问题只需要安装这些库即可:sudo apt-get install libkmod-dev libblkid-dev libglib2.0-dev

 

        4> configure: error: Package requirements (gobject-introspection-1.0 >= 0.6.2) were not met:No package 'gobject-introspection-1.0' found

    查到对应安装:

            Fedora, CentOS, RHEL, etc.: gobject-introspection-devel

            Debian, Ubuntu, Mint, etc.: libgirepository1.0-dev

            Arch: gobject-introspection   

            FreeBSD: gobject-introspection   

            Cygwin: libgirepository1.0-devel   

            msys2: mingw-w64-x86_64-gobject-introspection and/or mingw-w64-i686-gobject-introspection

 

        5> configure: error: pci.ids not found, try --with-pci-ids-path=

    解决该问题需要找到系统中的 pci.ids 然后指定

        whereis pci.ids    --------------->    我们选定这个: /usr/share/misc/pci.ids

    即为:CC=arm-linux-gnueabihf-gcc ./configure --prefix=/opt/embedded/platform/usr/ --host=arm-linux --with-pci-ids-path=/usr/share/misc/pci.ids

   

    编译时出错:

 

        6>   GEN    src/extras/keymap/keys-from-name.h        (standard input): No keywords in input file!   

    添加:--disable-keymap
    即为:CC=arm-linux-gnueabihf-gcc ./configure --prefix=/opt/embedded/platform/usr/ --host=arm-linux-gnu --with-pci-ids-path=/usr/share/misc/pci.ids --disable-keymap

 

注意:

    这 udev 太多坑,太难搞,可以看到这个库在2012到2013年就停止更新了,主要原因是内核更改了设备插拔方式接口,用sysfs方式。最好使用 eudev 替代

 

    eudev 下载地址:

                https://github.com/gentoo/eudev

    configure选项,我 --disable-blkid --disable-kmod 编译通过

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值