当前位置: 技术问答>linux和unix
copy模块到内核失败?
来源: 互联网 发布时间:2016-08-06
本文导语: KERNELDIR = /HHARM2440/kernel/linux-2.6.28.5 # The current directory is passed to sub-makes as argument PWD := $(shell pwd) INSTALLDIR = /HHARM2440/filesystem/rootfs/lib/modules CROSS_COMPILE =/usr/local/arm/3.4.1/bin/arm-linux- CC = $(CROSS_COMPILE)gcc obj-m :=...
KERNELDIR = /HHARM2440/kernel/linux-2.6.28.5
# The current directory is passed to sub-makes as argument
PWD := $(shell pwd)
INSTALLDIR = /HHARM2440/filesystem/rootfs/lib/modules
CROSS_COMPILE =/usr/local/arm/3.4.1/bin/arm-linux-
CC = $(CROSS_COMPILE)gcc
obj-m := hello.o
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
cp hello.ko $(INSTALLDIR)
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
.PHONY: modules modules_install clean
make 后查看/lib/modules没有hello。ko?
|
make modules_install了没有?
modules_install:
cp hello.ko $(INSTALLDIR)
modules_install:
cp hello.ko $(INSTALLDIR)