新手上路
- 积分
- 41
- 金钱
- 41
- 注册时间
- 2017-8-19
- 在线时间
- 8 小时
|
5金钱
按照教程进行编写,make之后提示:
- make -C /home/yuyang/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek M=/home/yuyang/linux/linux_drivers/1_chrdevbase; modules
- make[1]: 进入目录“/home/yuyang/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek”
- LD /home/yuyang/linux/linux_drivers/1_chrdevbase/built-in.o
- CC [M] /home/yuyang/linux/linux_drivers/1_chrdevbase/chrdevbase.o
- Building modules, stage 2.
- MODPOST 1 modules
- CC /home/yuyang/linux/linux_drivers/1_chrdevbase/chrdevbase.mod.o
- LD [M] /home/yuyang/linux/linux_drivers/1_chrdevbase/chrdevbase.ko
- make[1]: 离开目录“/home/yuyang/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek”
- /bin/sh: 1: modules: not found
- make: *** [Makefile:10:kernel_modules] 错误 127
复制代码
百度无果,各位这是什么原因造成的?
makefile如下,根据教程,改了目录
- KERNELDIR := /home/yuyang/linux/kernel/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek
- CURRENT_PATH := $(shell pwd);
- obj-m := chrdevbase.o
- build: kernel_modules
- kernel_modules:
- $(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) modules
- clean:
- $(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean
复制代码
|
|