您尚未登录。

楼主 #1 2020-03-29 09:39:00

jim_ren
会员
注册时间: 2020-03-28
已发帖子: 4
积分: 4

荔枝派nano使用 gcc-linaro-7.2.1-2017.11编译u-boot出错

各位大佬,最近在使用荔枝派nano,使用 gcc-linaro-7.2.1-2017.11编译u-boot出错,如下:

  MKIMAGE u-boot.img
  COPY    u-boot.dtb
  BINMAN  u-boot-sunxi-with-spl.bin
Traceback (most recent call last):
  File "./tools/binman/binman", line 32, in <module>
    import control
  File "/home/jim/u-boot/tools/binman/control.py", line 16, in <module>
    import fdt
  File "/home/jim/u-boot/tools/binman/../dtoc/fdt.py", line 13, in <module>
    import libfdt
  File "scripts/dtc/pylibfdt/libfdt.py", line 28, in <module>
    _libfdt = swig_import_helper()
  File "scripts/dtc/pylibfdt/libfdt.py", line 20, in swig_import_helper
    import _libfdt
ImportError: No module named _libfdt
Makefile:1148: recipe for target 'u-boot-sunxi-with-spl.bin' failed
make: *** [u-boot-sunxi-with-spl.bin] Error 1
jim@jim-VirtualBox:~/u-boot$

从log看应该跟设备树有关系,但是模块我都安装了
apt-get install swig
apt-get install python-dev python3-dev
apt-get install device-tree-compiler

搞了好几天还是没有搞定,请各位大佬帮看看,谢谢

离线

#2 2020-03-29 09:48:14

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 荔枝派nano使用 gcc-linaro-7.2.1-2017.11编译u-boot出错

这个问题我遇到过, 删掉重新克隆再编译才解决问题.





离线

楼主 #3 2020-03-29 10:22:12

jim_ren
会员
注册时间: 2020-03-28
已发帖子: 4
积分: 4

Re: 荔枝派nano使用 gcc-linaro-7.2.1-2017.11编译u-boot出错

谢谢晕哥的回复,我删除了,重新克隆还是这样,我还尝试过在windows下载这个zip包下来,然后到ubuntu上编译,还是这个错

离线

#4 2020-03-29 12:41:03

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 荔枝派nano使用 gcc-linaro-7.2.1-2017.11编译u-boot出错

那看起来有可能可能缺 python 的 libfdt 库。





离线

楼主 #5 2020-03-29 13:13:22

jim_ren
会员
注册时间: 2020-03-28
已发帖子: 4
积分: 4

Re: 荔枝派nano使用 gcc-linaro-7.2.1-2017.11编译u-boot出错

但是我已经apt install device-tree-compiler了,这个libfdt是在其他开发包里面吗?在网上也没有找到

离线

#6 2020-03-29 13:23:16

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 荔枝派nano使用 gcc-linaro-7.2.1-2017.11编译u-boot出错

https://pypi.org/project/fdt/0.1.1/


试一试 pip install fdt





离线

楼主 #7 2020-03-30 09:32:41

jim_ren
会员
注册时间: 2020-03-28
已发帖子: 4
积分: 4

Re: 荔枝派nano使用 gcc-linaro-7.2.1-2017.11编译u-boot出错

谢谢晕哥指导,貌似还是不行,我再查查看看

离线

#8 2020-06-20 16:11:20

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: 荔枝派nano使用 gcc-linaro-7.2.1-2017.11编译u-boot出错

终于解决了:

sudo apt-get install python3-distutils libpython3-dev -y

参考: https://stackoverflow.com/questions/55749206/modulenotfounderror-no-module-named-distutils-core

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn