简体   繁体   English

如何将GPIO添加到U-Boot SDK源?

[英]How to add GPIO to U-Boot SDK source?

I am tying to build u-boot but get this error: 我想建立u-boot,但出现此错误:

LDS     u-boot.lds
LD      u-boot
common/built-in.o: In function `do_gpio':
/media/saleh/NEWVOLUME/SDK/n-amlogic/uboot/build/../common/cmd_gpio.c:186: undefined reference to `gpio_request'
/media/saleh/NEWVOLUME/SDK/n-amlogic/uboot/build/../common/cmd_gpio.c:194: undefined reference to `gpio_direction_input'
/media/saleh/NEWVOLUME/SDK/n-amlogic/uboot/build/../common/cmd_gpio.c:195: undefined reference to `gpio_get_value'
/media/saleh/NEWVOLUME/SDK/n-amlogic/uboot/build/../common/cmd_gpio.c:200: undefined reference to `gpio_get_value'
/media/saleh/NEWVOLUME/SDK/n-amlogic/uboot/build/../common/cmd_gpio.c:203: undefined reference to `gpio_direction_output'
/media/saleh/NEWVOLUME/SDK/n-amlogic/uboot/build/../common/cmd_gpio.c:209: undefined reference to `gpio_free'
Segmentation fault (core dumped)
make[1]: *** [u-boot] Error 139
make: *** [sub-make] Error 2

I searched the issue and the guide was as : 我搜索了该问题, 该指南为:

GPIO is part of minimum configuration of your soc system, trying to add it in your system and rebuild. GPIO是soc系统最低配置的一部分,试图将其添加到系统中并进行重建。

But HOW I can add GPIO to the SDK? 但是如何将GPIO添加到SDK? I am using arm64 architecture with p212 reference board. 我将p64参考板与arm64架构配合使用。 Thanks. 谢谢。

This is all it takes me to compile U-Boot for the P212 board: 这就是我为P212板编译U-Boot的全部过程:

sudo apt-get install gcc-aarch64-linux-gnu
git clone http://git.denx.de/u-boot.git
cd u-boot
git checkout v2018.05
export CROSS_COMPILE=aarch64-linux-gnu-
make mrproper
make p212_defconfig
make

For verified boot you need a FIT image. 为了验证启动,您需要一个FIT映像。 Enable CONFIG_FIT using 使用启用CONFIG_FIT

make menuconfig

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM