I'm trying to cross compile a helloworld kernel (2.6.x) module for ARM architecture on my intel x86 host.
The tool chain for ARM is located at: /home/vivek/ti-sdk-am335x-evm-05.07.00.00/linux-devkit/bin
The kernel source is located at: /home/vivek/Arago
The hellow.c
and Makefile
are located on Desktop on /home/vivek/Desktop/hellodriver
I have given the path for cross compiler as /home/vivek/ti-sdk-am335x-evm-05.07.00.00/linux-devkit/bin
My Makefile is follows:-
export ARCH=arm
export CROSS_COMPILE=arm-arago-linux-gnueabi-
obj-m =Hello.o
KDIR =/home/vivek/Arago
PWD = $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
On executing make
I am getting
vivek@ubuntu:~/Desktop/hellodriver$ make
make: Nothing to be done for `default'.
What am I doing wrong?
There is mistake in your Makefile. As your source code name is
hellow.c
, But in your Makefile itsHello.o
.So change your
obj-m =Hello.o
toobj-m =hellow.o
And one more thing
Etan Reisner
said above make sure youusing Tab for command in Makefile
.