在编译uboot代码时, make -f rockpi4.mk u-boot -j4
报了以下错误。
HOSTCC scripts/dtc/dtc.o
SHIPPED scripts/dtc/pylibfdt/libfdt.i
ENVT include/generated/environment.h
PYMOD rebuild
HOSTCC scripts/dtc/flattree.o
UPD include/generated/version_autogenerated.h
===================== WARNING ======================
This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate
to binman instead, to avoid the proliferation of
arch-specific scripts with no tests.
====================================================
CFGCHK u-boot.cfg
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
make[3]: *** [scripts/dtc/pylibfdt/Makefile:30: rebuild] Error 1
make[2]: *** [scripts/Makefile.build:398: scripts/dtc/pylibfdt] Error 2
make[2]: *** Waiting for unfinished jobs....
CC lib/asm-offsets.s
CC arch/arm/lib/asm-offsets.s
OFCHK .config
UPD include/generated/asm-offsets.h
UPD include/generated/generic-asm-offsets.h
LDS u-boot.lds
make[1]: *** [Makefile:2035: scripts_dtc] Error 2
make[1]: Leaving directory '/home/test/workspace/code/optee_rk/u-boot'
make: *** [rockpi4.mk:109: u-boot] Error 2
test@test-21:~/workspace/code/optee_rk/build$ cd .
解决方法:
sudo apt install swig