初级会员
- 积分
- 118
- 金钱
- 118
- 注册时间
- 2013-9-9
- 在线时间
- 25 小时
|
10金钱
大家好!我正在使用正点原子的linux开发板,在编译驱动时编译不过去,
总是提示:
make[1]: Entering directory '/home/way3/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek'
make[1]: *** No rule to make target 'kernel_modules'。 停止。
make[1]: Leaving directory '/home/way3/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek'
Makefile:8: recipe for target 'kernel_modules' failed
make: *** [kernel_modules] Error 2
使用的是vs code工程,json使用为如下:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/home/way3/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek/include",
"/home/way3/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek/arch/arm/include",
"/home/way3/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek/arch/arm/include/generated/"
],
"defines": [],
"compilerPath": "/usr/bin/gcc", //正点原子这里为 "/usr/bin/clang", 我工程时百波浪线,我改成了gcc.
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
make如下:
LDIR := /home/way3/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek
CURRENT_PATH := $(shell pwd)
obj-m := chardevbase.o
build: kernel_modules
kernel_modules:
$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) kernel_modules
clean:
$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean
路径与格式我都检测了好几遍,一直编译不过去,有哪位大哥能帮忙指点一下,非常感谢!!!
|
|