在编译uboot代码时, make -f rockpi4.mk u-boot -j4
报了以下错误。
HOSTCC scripts/dtc/dtc.oSHIPPED scripts/dtc/pylibfdt/libfdt.iENVT include/generated/environment.hPYMOD rebuildHOSTCC scripts/dtc/flattree.oUPD 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.sCC arch/arm/lib/asm-offsets.sOFCHK .configUPD include/generated/asm-offsets.hUPD include/generated/generic-asm-offsets.hLDS 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