Firefly开源社区

标题: 内核编译出错:unrecognized command line option '-mgeneral-regs-only' [打印本页]

作者: tedyyan    时间: 2017-3-29 14:45
标题: 内核编译出错:unrecognized command line option '-mgeneral-regs-only'
:~/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


作者: tedyyan    时间: 2017-3-29 15:05
自带的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-/
作者: 饿客登门    时间: 2017-3-29 15:59
总之就是编译器的毛病,之前也遇到这个问题,换了 Linaro 4.9.x 就好了。
作者: freeheartgy    时间: 2023-3-9 15:08
tedyyan 发表于 2017-3-29 15:05
自带的prebuild里的交叉编译不行,必须要自己装

export ARCH=arm64e

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




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1