You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

基于Yocto的ARM目标板内核模块编译:汇编器问题求助

ARM目标板内核树内模块编译指令集错误问题
  • 环境:基于Yocto构建的ARM目标板镜像
  • 已验证操作:在目标板执行make scripts prepare modules_prepare后,树外(out of tree)模块可正常编译,执行modules_install能将其安装至extra目录并更新modules.dep,说明基础编译环境配置无误。
  • 核心问题:将某内核树内(in tree)模块设为编译模块后,尽管其Makefile仅与树外模块名称不同,执行make时却出现大量类似如下的汇编错误:
/tmp/ccz5G4aS.s: Assembler messages:
/tmp/ccz5G4aS.s:1400: Error: selected processor does not support `dsb ' in ARM mode
  • 排查进展:通过make -pq对比树内、树外模块的KBUILD_AFLAGS与KBUILD_CFLAGS,参数完全一致,但树内模块仍编译失败。目前仅能通过修改模块名称作为临时规避方案,寻求根本解决办法。

相关编译参数

KBUILD_CFLAGS

KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 -fno-dwarf2-cfi-asm -fno-ipa-sra -mabi=aapcs-linux -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv5t -Wa,-march=armv7-a   -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned

KBUILD_AFLAGS

KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE -mabi=aapcs-linux -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv5t -Wa,-march=armv7-a  -include asm/unified.h -msoft-float -Wa,-gdwarf-2

内容的提问来源于stack exchange,提问作者Pete

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 20:05:17