九鼎创展论坛

标题: x6818驱动编程,编译报错 [打印本页]

作者: jantw996    时间: 2022-5-22 16:17
标题: x6818驱动编程,编译报错
make -C /opt/x6818_linux_180209/kernel/   M=`pwd`   modules
make[1]: Entering directory '/opt/x6818_linux_180209/linux/kernel/kernel-3.4.39'
  CC [M]  /home/book/nfsroot/study/module/day2/chardev/kbuf/6818/kbuf.o
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’?
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’; did you mean ‘-fno-sched-interblock’?
gcc: error: unrecognized command line option ‘-mfpu=vfp’; did you mean ‘-mcpu=’?
gcc: error: unrecognized command line option ‘-mfloat-abi=softfp’
scripts/Makefile.build:313: recipe for target '/home/book/nfsroot/study/module/day2/chardev/kbuf/6818/kbuf.o' failed
make[2]: *** [/home/book/nfsroot/study/module/day2/chardev/kbuf/6818/kbuf.o] Error 1
Makefile:1365: recipe for target '_module_/home/book/nfsroot/study/module/day2/chardev/kbuf/6818' failed
make[1]: *** [_module_/home/book/nfsroot/study/module/day2/chardev/kbuf/6818] Error 2
make[1]: Leaving directory '/opt/x6818_linux_180209/linux/kernel/kernel-3.4.39'
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2


把Makefile   里的内核路径改成/opt/x6818_linux_180209/linux/kernel/kernel-3.4.39
报同样的问题,不知道怎么解决,装了gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi.,
还是一样的问题,可能是环境配置不对,但不知道怎样解决,内核编译是通过的

作者: jantw996    时间: 2022-5-22 16:19
arm-linux-gcc   是用的4.5.1版本,arm-linux-gcc -v  能够显示版本号
arm-linux-gnueabi-gcc  -v  也能够显示版本号
作者: jantw996    时间: 2022-5-22 16:21
辞职在家学linux驱动编程,希望技术大咖能帮下,这个问题一直困恼,学习进行不下去,已经快一个星期了




欢迎光临 九鼎创展论坛 (http://bbs.9tripod.com/) Powered by Discuz! X3.2