前言
在开发过程中,我们免不了需要单独去控制某些gpio引脚的高低,本文介绍如何在镜像中增加GPIO节点。
1.激活SDK环境变量
开始前请在Ubuntu中激活SDK的环境变量
source build/envsetup.sh
选中板级方案
ubuntu@ubuntu1804:~/work/tina-v853-open$ lunch
You're building on Linux
Lunch menu... pick a combo:
1 v853-100ask-tina
2 v853-vision-tina
Which would you like? [Default v853-100ask]: 1
Jump to longan autoconfig
/home/ubuntu/work/tina-v853-open/build.sh autoconfig -o openwrt -i v853 -b 100ask -n default
========ACTION List: mk_autoconfig -o openwrt -i v853 -b 100ask -n default;========
options :
INFO: Prepare toolchain ...
INFO: kernel defconfig: generate /home/ubuntu/work/tina-v853-open/kernel/linux-4.9/.config by /home/ubuntu/work/tina-v853-open/device/config/chips/v853/configs/100ask/linux-4.9/config-4.9
INFO: Prepare toolchain ...
make: Entering directory '/home/ubuntu/work/tina-v853-open/kernel/linux-4.9'
*** Default configuration is based on '../../../../../device/config/chips/v853/configs/100ask/linux-4.9/config-4.9'
#
# configuration written to .config
#
make: Leaving directory '/home/ubuntu/work/tina-v853-open/kernel/linux-4.9'
INFO: clean buildserver
INFO: prepare_buildserver
2.进入Tina 配置界面
make menuconfig
3.进入内核配置界面
make kernel_menuconfig
配置完成后需要执行
make
pack
重新编译并生成镜像
4.开发板查看gpio节点
root@TinaLinux:/# ls /sys/class/g
g2d/ gpadc/ gpio/ graphics/