OpenEmbedded开启硬件浮点编译支持,通过Arago的layer确认修改DEFAULTTUNE即可

http://processors.wiki.ti.com/index.php/Cortex-A8  TI官方wiki讲解Cotex-A8的一些信息,注意硬浮点跟neon开启可能会不兼容

http://elinux.org/Bitbake_Cheat_Sheet  关于bitbake语法的快速参考,用OpenEmbedded必须掌握


 终于在arago的OE layer中找到开启硬件浮点的地方,

原来一直认识该放在machine目录下,结果它竟然跑到distro目录下,通过  DEFAULTTUNE转到 openembedded-core/meta/conf/machine/include/arm 去一步步变量判断,

通过arch-armv7a.inc文件变量去选择,找到 feature-arm-vfp.inc

TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit."
ARMPKGSFX_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "vfp", "-vfp", "" ,d)}"
TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP."
TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "vfp", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", " -mfloat-abi=hard", " -mfloat-abi=softfp", d), "" ,d)}"
ARMPKGSFX_EABI .= "${@bb.utils.contains("TUNE_FEATURES", [ "callconvention-hard", "vfp" ], "hf", "", d)}"
bitbake.conf:HOST_CC_ARCH = "${TARGET_CC_ARCH}"
bitbake.conf:TARGET_CC_ARCH = "${TUNE_CCARGS}"
toolchain-scripts.bbclass:      echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script

最终去处理  -mfloat-abi=hard" 还是-mfloat-abi=softfp" ,最终结果就是默认是否开启硬件浮点数了

所以,关键地方在 DEFAULTTUNE 这个变量上面


你可能感兴趣的:(#oe)