Article 5F5S6 Kernel 2.4 compiling device driver

Kernel 2.4 compiling device driver

by
Slack_nub
from LinuxQuestions.org on (#5F5S6)
Hello,
I'm using Slackware 10.1 kernel 2.4.29. I need to enable a Ethernet device driver as kernel module. I have the c file for the driver and I made a makefile according to
https://tldp.org/LDP/lkmpg/2.4/html/x208.htm

My goal is to have a file named devicedriver.o in /lib/modules/2.4.29/kernel/drivers/net so INSMOD will be able to load the ethernet card driver.

This is my makefile
TARGET := devicedriver
WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
INCLUDE := -isystem /lib/modules/2.4.29/build/include
CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE}
CC := gcc

${TARGET}.o: ${TARGET}.c

.PHONY: clean

clean:
rm -rf ${TARGET}.o
I place the makefile in the same folder as my devicedriver.c in /10.1
I got "make: Nothing to be done for 'makefile'." after I run $make makefile

Can you please help me out? Thanks.latest?d=yIl2AUoC8zA latest?i=YKEIMdqGBYM:hbVF1VQfHeE:F7zBnMy latest?i=YKEIMdqGBYM:hbVF1VQfHeE:V_sGLiP latest?d=qj6IDK7rITs latest?i=YKEIMdqGBYM:hbVF1VQfHeE:gIN9vFwYKEIMdqGBYM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments