Skip to content

Commit

Permalink
modules: device Makefile to build ext kernel modules
Browse files Browse the repository at this point in the history
This makefile is used in kernel-omap Android.mk to
build the modules against the locked kernel tree.

Change-Id: I1757f6261cee7284410be97b6db52e4536b5ecdd
  • Loading branch information
tpruvot committed Apr 4, 2012
1 parent 3aaf7fc commit 379a0c9
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 35 deletions.
47 changes: 47 additions & 0 deletions modules/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Makefile for Android Defy kernel-omap tree
# "make jordan_modules" in repo root (not here)


# list of modules to build :
obj-m += symsearch/
obj-m += overclock/
obj-m += backlight/
obj-m += multitouch/
obj-m += mmcfix/
obj-m += gpiofix/
obj-m += clockfix/
obj-m += logcap/
obj-m += usbled/


PWD := $(shell pwd)

.PHONY: clean
#######################################################################################
clean:
@find $(PWD) | grep "\\.o$$" | xargs rm -f
@find $(PWD) | grep "\\.ko$$" | xargs rm -f
@find $(PWD) | grep "\\.cmd$$" | xargs rm -f
@find $(PWD) | grep "\\.mod.c$$" | xargs rm -f
@find $(PWD) | grep "\\.order$$" | xargs rm -f
@find $(PWD) | grep "\\.tmp_versions$$" | xargs rm -rf
@cd $(PWD) && git checkout *.ko


EXTRA_CFLAGS += -I$(KERNEL_DIR) -DUTS_RELEASE=\\\"2.6.32.9\\\"

.PHONY: all
#######################################################################################
# Build the modules
#######################################################################################
all: modules
modules:
pwd
@echo $@ EXTRA_CFLAGS = $(EXTRA_CFLAGS)
$(MAKE) CROSS_COMPILE=$(CROSS_COMPILE) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" ARCH=$(ARCH) -C $(KERNEL_DIR) M=$(PWD) modules
@find $(PWD) | grep "\\.o$$" | xargs rm -f
@find $(PWD) | grep "\\.cmd$$" | xargs rm -f
@find $(PWD) | grep "\\.mod.c$$" | xargs rm -f
@find $(PWD) | grep "\\.order$$" | xargs rm -f
@find $(PWD) | grep "\\.tmp_versions$$" | xargs rm -rf

35 changes: 0 additions & 35 deletions modules/README

This file was deleted.

26 changes: 26 additions & 0 deletions modules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
How to compile jordan kernel modules
------------------------------------

These external kernel modules require the Defy kernel tree :

It is available at https://github.com/CyanogenDefy/kernel-omap

Add to your repo manifest \<project path="kernel" name="CyanogenDefy/kernel-omap" />

---

"repo sync" and then, in root of your android repo :

. build/envsetup.sh
lunch cyanogen_jordan-eng

make kernel
make jordan_modules

---

PS : Do not make menuconfig, or use make in kernel tree, if you have an error reporting
the kernel source is not clean, type before :

make kernel_clean

0 comments on commit 379a0c9

Please sign in to comment.