1、编译内核
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:100:scripts/dtc/dtc] 错误 1
make[1]: *** [scripts/Makefile.build:403:scripts/dtc] 错误 2
./scripts/dtc/dtc-lexer.lex.c:640:YYLTYPE yylloc; 前面加上 extern
2、
编译驱动例子报错
https://blog.csdn.net/qq_44933518/article/details/105881723
wang@wang-ubu22:~/program/driversimxv1.7/03_newchrled$ vi Makefile
wang@wang-ubu22:~/program/driversimxv1.7/03_newchrled$ make
make -C /home/wang/program/l/vlinux-imx-4.1.15-2.1.0-g3dc0a4b-v2.7 M=/home/wang/program/driversimxv1.7/03_newchrled modules
make[1]: 进入目录“/home/wang/program/l/vlinux-imx-4.1.15-2.1.0-g3dc0a4b-v2.7”
CC [M] /home/wang/program/driversimxv1.7/03_newchrled/newchrled.o
cc1: error: code model kernel does not support PIC mode
3、
https://blog.csdn.net/qq_42230338/article/details/117920537
#ARCH ?= $(SUBARCH) #CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) ARCH ?= arm CROSS_COMPILE ?= arm-linux-gnueabihf-
估计编译模块的时候要去搜Makefile吧
而默认是通过命令传参的 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all -j16
标签:wang,dtc,newchrled,COMPILE,编译,program,内核,v1.7,scripts From: https://www.cnblogs.com/cnchengv/p/16727112.html