OpenWrt Forum Archive

Topic: Creating kernel module packages

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I am trying to create a kernel module package, which consists of a single C file which must be compiled using the 2.6 kernel build system.

I already have a makefile for my 386 system, which looks like this:

obj-m    := my-module.o

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

default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules


Can someone suggest a suitable template package Makefile?

I worked out that the appropriate template is broadcom-mmc.

The discussion might have continued from here.