ladiossopp 发表于 2024-10-21 11:00:06

Ubuntu18.04编译ROC-RK3588-RT的sdk时报错

在Ubuntu-18.04的虚拟机上按照https://wiki.t-firefly.com/zh_CN/ROC-RK3588-RT/linux_compile.html 进行下载编译,用的普通用户,英文环境,下载同步都完成后,开始编译,第一步编译 u-boot可以通过,第二步在编译 kernel出现下面报错
#
# configuration written to .config
#
SYNC    include/config/auto.conf.cmd
HOSTCCscripts/dtc/dtc.o
HOSTCCscripts/dtc/flattree.o
HOSTCCscripts/dtc/fstree.o
HOSTCCscripts/dtc/data.o
HOSTCCscripts/dtc/livetree.o
HOSTCCscripts/dtc/treesource.o
HOSTCCscripts/dtc/srcpos.o
HOSTCCscripts/dtc/checks.o
HOSTCCscripts/dtc/util.o
LEX   scripts/dtc/dtc-lexer.lex.c
YACC    scripts/dtc/dtc-parser.tab.
HOSTCCscripts/dtc/dtc-lexer.lex.o
HOSTCCscripts/dtc/dtc-parser.tab.o
HOSTLDscripts/dtc/dtc
UPD   include/config/kernel.release
DTC   arch/arm64/boot/dts/rockchip/roc-rk3588-rt-ext.dtb
CC      scripts/mod/empty.o
HOSTCCscripts/mod/mk_elfconfig
MKELF   scripts/mod/elfconfig.h
HOSTCCscripts/mod/modpost.o
CC      scripts/mod/devicetable-offsets.s
In file included from ./include/linux/types.h:6,
               from ./include/linux/mod_devicetable.h:12,
               from scripts/mod/devicetable-offsets.c:3:
./include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
    5 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:117: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make: *** Error 1
Makefile:1505: recipe for target 'scripts_mod' failed
make: *** Error 2
arch/arm64/Makefile:214: recipe for target 'roc-rk3588-rt-ext.img' failed
make: *** Error 2
ERROR: Running build_extboot failed!
ERROR: exit code 2 from line 785:
    make ARCH=$RK_ARCH $RK_KERNEL_DTS.img -j$RK_JOBS
无论创建仓库使用方法一还是方法二都在这里报错,网上查可能是交叉编译环境变量配置有问题,请教怎么能够解决?

ladiossopp 发表于 2024-10-23 15:29:54

已解决,将kernel/include/uapi目录下的asm-generic目录备份,拷贝一份改名为asm,再编译就可以了
页: [1]
查看完整版本: Ubuntu18.04编译ROC-RK3588-RT的sdk时报错