A40i-Linux5.10移植libgpiod库 获取源码 wget https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-1.0.tar.gz 解压并配置生成configure文件和Makefile tar xvf libgpiod-1.0.tar.gz cd libgpiod-1.0 ##加载环境变量## export PATH=/opt/host/opt/ext-toolchain/bin:$PATH ##生成configure文件## ./autogen.sh ##生成Makefile## ./configure --host=arm-linux-gnueabihf --prefix=/home/forlinx/linux5.10/OKA40i-linux-sdk/out/a40i_h/OKA40i-C/buildroot/buildroot/host/arm-buildroot-linux-gnueabihf/sysroot #其中--prefix后的路径为make install的安装路径,我这里直接将其安装在了sysroot下 修改config.h.in 注释掉#undef malloc 编译 make make install cp include/gpiod.h /home/forlinx/linux5.10/OKA40i-linux-sdk/out/a40i_h/OKA40i-C/buildroot/buildroot/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include |
|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )
GMT+8, 2024-11-25 10:18
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.