Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译uboot时报错:undefined reference to 'i2c_read' #11

Open
Any012 opened this issue Oct 13, 2016 · 2 comments
Open

编译uboot时报错:undefined reference to 'i2c_read' #11

Any012 opened this issue Oct 13, 2016 · 2 comments

Comments

@Any012
Copy link

Any012 commented Oct 13, 2016

环境:VMware虚拟机,Ubuntu14.04,64位,GCC4.8(后改为4.7,问题依旧)。

问题:执行
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- A13-Lichee_config
time make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 2>&1 | tee build.log

报错 error:
arch/arm/mach-sunxi/built-in.o: In function pmic_bus_read:
/home/any/ilichee/u-boot-sunxi/arch/arm/mach-sunxi/pmic_bus.c:64:undefined reference to i2c_read'
arch/arm/mach-sunxi/built-in.o: In function pmic_bus_read:
/home/any/ilichee/u-boot-sunxi/arch/arm/mach-sunxi/pmic_bus.c:64:undefined reference to 'i2c_write'
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2

@Any012
Copy link
Author

Any012 commented Oct 14, 2016

貌似是git上u-boot-sunxi更新的原因。
昨天试了群主传过来的u-boot-sunxi,编译时也遇到了问题,最后咨询群主解决了。
但git上最新的u-boot-sunxi编译出错的问题还没解决。

----------------以下是群主传的u-boot-sunxi编译遇到的问题的解决过程-----------
遇到的问题是:
错误提示:arch/arm/dtc/include/dt-bindings (中间忘记了) dt-bindings/clock4i-a10-pll2.h: No such file or directory
arch/arm/dtc/include/dt-bindings这里应该是个软连接,可能从git上下载时出错了,成了个类似于文本的内容。打开后可以看到是:../../../../include/dt-bindings.
将这个文件删掉,重新将include/dt-bindings文件夹软链接至此位置。
然后,编译,可通过。

@Any012
Copy link
Author

Any012 commented Oct 15, 2016

今天在群里看到有其他朋友提到这个问题,就是编译uboot时提示找不到i2c_read()函数。
有群友提供解决办法。在uboot配置界面,在SPL/TPL页面上,选中,support i2c这个选型,再编译即可通过。
试了下,确实看可以。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant