嵌入式爱好者

A40i-Linux5.10移植libgpiod库

2024-4-29 09:35| 发布者: yhj_nb| 查看: 16| 评论: 0

类目: 知识库  >  A40i/T3系列产品     文档编号: 1376

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



已解决

未解决

只是看看

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-5-22 04:07

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部