Firefly开源社区

内核编译出错:unrecognized command line option '-mgeneral-regs-only'

109

积分

0

威望

0

贡献

技术小白

积分
109
发表于 2017-3-29 14:45:45     
:~/proj/firefly-rk3399/kernel$ echo $CROSS_COMPILE
/home/teddy/proj/firefly-rk3288-lollipop/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
:~/proj/firefly-rk3399/kernel$ echo $ARCH
arm
-----------------------------------------------------------------------------------------------
:~/proj/firefly-rk3399/kernel$ make -j8 ARCH=arm64 rk3399-firefly.img
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CC      scripts/mod/empty.o
  CC      scripts/mod/devicetable-offsets.s
  CHK     include/generated/utsrelease.h
cc1: error: unrecognized command line option '-mgeneral-regs-only'
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: error: unrecognized command line option '-mgeneral-regs-only'
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
cc1: error: unrecognized command line option '-mgeneral-regs-only'
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

----------------------------------------------------------------------------------------------
make -j8 ARCH=arm64 rk3399-firefly.img
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CC      scripts/mod/empty.o
  CC      scripts/mod/devicetable-offsets.s
  CHK     include/generated/utsrelease.h
arm-eabi-gcc: error: unrecognized command line option '-mgeneral-regs-only'
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
make[2]: *** Waiting for unfinished jobs....
arm-eabi-gcc: error: unrecognized command line option '-mgeneral-regs-only'
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
arm-eabi-gcc: error: unrecognized command line option '-mgeneral-regs-only'
make[1]: *** [kernel/bounds.s] Error

回复

使用道具 举报

109

积分

0

威望

0

贡献

技术小白

积分
109
发表于 2017-3-29 15:05:47     
自带的prebuild里的交叉编译不行,必须要自己装

export ARCH=arm64e

sudo apt-get install gcc-aarch64-linux-gnu
sudo apt-get install gcc-arm-linux-gnueabi

export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-

export CROSS32CC=arm-linux-gnueabi-gcc

https://devtalk.nvidia.com/defau ... general-regs-only-/
回复

使用道具 举报

185

积分

3

威望

0

贡献

技术小白

积分
185
发表于 2017-3-29 15:59:51     
总之就是编译器的毛病,之前也遇到这个问题,换了 Linaro 4.9.x 就好了。
回复

使用道具 举报

13

积分

0

威望

0

贡献

技术小白

积分
13
发表于 2023-3-9 15:08:07     
tedyyan 发表于 2017-3-29 15:05
自带的prebuild里的交叉编译不行,必须要自己装

export ARCH=arm64e

在3399PRO LINUX 1.4的内核里面编译NPU的固件,遇到这个问题,感谢楼主,完美解决。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表