0
votes

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?

1
Are the $(MAKE) lines indented with tabs or spaces? Using spaces would cause the output you said you are getting.Etan Reisner
Which version of Make are you using? (If you're not sure, try make -v)Beta
Yes They are indented well using Tab. I am using gnu make 3.2Vivek Verma

1 Answers

0
votes

There is mistake in your Makefile. As your source code name is hellow.c, But in your Makefile its Hello.o.

So change your obj-m =Hello.o to obj-m =hellow.o

And one more thing Etan Reisner said above make sure you using Tab for command in Makefile.