Firefly开源社区

打印 上一主题 下一主题

[技术讨论] 编译kernel出现错误,请问如何处理

34

积分

0

威望

0

贡献

技术小白

积分
34

编译kernel出现错误,请问如何处理

发表于 2020-10-30 16:17:25      浏览:6159 | 回复:1        打印      只看该作者   [复制链接] 楼主
python 版本设置成2.7 和3.6 都不行

pzw@haitu-PowerEdge-R720:~/share/RK3308$ python --version  
Python 3.6.1
pzw@haitu-PowerEdge-R720:~/share/RK3308$ ./build.sh  kernel
============Start build kernel============
TARGET_ARCH          =arm64
TARGET_KERNEL_CONFIG =firefly-rk3308b_linux_defconfig
TARGET_KERNEL_DTS    =rk3308b-roc-cc-plus-amic_emmc
==========================================
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/utsrelease.h
make[1]: 'arch/arm64/boot/dts/rockchip/rk3308b-roc-cc-plus-amic_emmc.dtb' is up to date.
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
make[1]: 'include/generated/vdso-offsets.h' is up to date.
  CHK     include/generated/compile.h
make[1]: 'arch/arm64/boot/Image.lz4' is up to date.
  Image:  kernel.img is ready
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
make[2]: 'include/generated/vdso-offsets.h' is up to date.
  Building modules, stage 2.
  MODPOST 4 modules
Pack to resource.img successed!
  Image:  resource.img (with rk3308b-roc-cc-plus-amic_emmc.dtb logo.bmp logo_kernel.bmp) is ready
Traceback (most recent call last):
  File "./scripts/mkbootimg", line 18, in <module>
    from argparse import ArgumentParser, FileType, Action
  File "/opt/rk-linux/aarch64-buildroot-linux-gnu/lib/python2.7/argparse.py", line 86, in <module>
    import copy as _copy
  File "/opt/rk-linux/aarch64-buildroot-linux-gnu/lib/python2.7/copy.py", line 52, in <module>
    import weakref
  File "/opt/rk-linux/aarch64-buildroot-linux-gnu/lib/python2.7/weakref.py", line 14, in <module>
    from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Traceback (most recent call last):
  File "./scripts/mkbootimg", line 18, in <module>
    from argparse import ArgumentParser, FileType, Action
  File "/opt/rk-linux/aarch64-buildroot-linux-gnu/lib/python2.7/argparse.py", line 86, in <module>
    import copy as _copy
  File "/opt/rk-linux/aarch64-buildroot-linux-gnu/lib/python2.7/copy.py", line 52, in <module>
    import weakref
  File "/opt/rk-linux/aarch64-buildroot-linux-gnu/lib/python2.7/weakref.py", line 14, in <module>
    from _weakref import (
ImportError: cannot import name _remove_dead_weakref
arch/arm64/Makefile:176: recipe for target 'rk3308b-roc-cc-plus-amic_emmc.img' failed
make: *** [rk3308b-roc-cc-plus-amic_emmc.img] Error 1
====Build kernel failed!====
pzw@haitu-PowerEdge-R720:~/share/RK3308$
回复

使用道具 举报

1万

积分

18

威望

20

贡献

神级创客

Rank: 8Rank: 8

积分
10851

突出贡献

发表于 2020-10-30 20:05:53        只看该作者  沙发
参考https://blog.csdn.net/u013992330/article/details/89509041试一下,我这边安装的是Python 2.7.17没问题
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表