修改u-boot編譯選項以便支援使用arm-linux-gnueabihf-編譯器編譯(soft-float & VFP hard)
阿新 • • 發佈:2019-01-26
預設的u-boot編譯時使用的soft float api,而arm-linux-eabihf-預設使用的float預設是hard,使用arm-linux-gnueabihf-gcc -v可以找到選項--with-float=hard,而檢視arch/arm/cpu/armv7/config.mk中有語句如下:
PLATFORM_RELFLAGS += -fno-common --ffixed-r8 -msoft-float
修改其為
PLATFORM_RELFLAGS += -fno-common --ffixed-r8 -mfloat-abi=hard
儲存退出
再次編譯
清除所有配置檔案
1. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
使用arndale_octa_config
2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- arndale_octa_config
編譯
3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
4.生成u-boot。
此時不會再報錯。
arm-linux-gnueabihf-ld: error: /usr/lib/gcc/arm-linux-gnueabihf/4.6/libgcc.a(_udivdi3.o) uses VFP register arguments, u-boot does not