交叉编译libudev

一、交叉编译libudev
下载udev-182.tar.xz
下载网址:https://mirrors.edge.kernel.org/pub/linux/utils/kernel/hotplug/
#tar -xvf udev-182.tar.xz

# cd udev-182
# mkdir build
# export PATH=/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin:$PATH
# vim udev-182/build-aux/config.sub
245 case $basic_machine in
246 # Recognize the basic CPU types without company name.
247 # Some are omitted here because they have special meanings below.
248 1750a | 580 \
249 | a29k \
250 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
251 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
252 | am33_2.0 \
253 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 |aarch64 \
254 | be32 | be64 \
255 | bfin \ # ./configure --host=aarch64-linux-gnu --prefix=/udev-182/build CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-ar
 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
等等这类问题只需要安装这些库即可:
# apt-get install libkmod-dev libblkid-dev libglib2.0-dev 4> configure: error: pci.ids not found, try --with-pci-ids-path=
解决该问题需要找到系统中的 pci.ids 然后指定
# ./configure --host=aarch64-linux-gnu --prefix=/udev-182/build CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-ar --with-pci-ids-path=/usr/share/misc/pci.ids
5> configure: error: Package requirements (gobject-introspection-1.0 >= 0.6.2) were not met:No package 'gobject-introspection-1.0' found libudev编译出错太多,没有完全编译成功,后改为编译eudev,获取libudev.so 二、交叉编译eudev
eudev下载路径:https://dev.gentoo.org/~blueness/eudev/
# tar -xvf eudev-3.2.5.tar.gz
# cd eudev-3.2.5
# mkdir build
# export PATH=/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin:$PATH
# ./configure --host=aarch64-linux-gnu --prefix=/eudev-3.2.5/build/ CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-ar --disable-blkid --disable-kmod
# make
# make install
# ls /eudev-3.2.5/build/
  bin etc include lib sbin share

  


上一篇:JavaScript 高级程序设计第二版


下一篇:Bootstrap3.0学习第二十四轮(JavaScript插件——按钮)