Click here to Skip to main content
15,942,847 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

I have a folder in the kernel with one .c file, .h file and makefile, when i tried to compile the kernel source it shows the error

make[3]: *** No rule to make target `drivers/staging/t1framer/char_ds26521.o', needed by `drivers/staging/t1framer/built-in.o'.  Stop.
make[2]: *** [drivers/staging/t1framer] Error 2
make[1]: *** [drivers/staging] Error 2
make: *** [drivers] Error 2

can any one help why this error is coming, here i have paste my Makefile also


obj-y := char_ds26521.o

KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)


        $(MAKE) -C $(KDIR) M=$(PWD) modules


        $(MAKE) -C $(KDIR) M=$(PWD) clean

MY C files and Header Files are


1 solution

I'm not an expert of make, but it looks you are using predefinite rules, hence your source file name should match the object one. Namely you should have a char_ds26521.c source file in your folder (I don't know if it makes sense renaming your char_dev.c).
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900