Commit 68fff960 authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Greg Kroah-Hartman

greybus: Support building greybus on host PC

Introduce INSTALL_MOD_PATH to allow for building and installing of the
greybus modules from a different location.

This lets you build the greybus modules on a PC and then install the
modules to an SD card in the appropriate location relative to the SD such
as /media/sdcard/lib/modules/version and subsequent running of depmod in
the same location. If INSTALL_MOD_PATH isn't specified the default
behaviour of installing and depmoding to /lib/modules/version is
maintained.
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent a4749bbe
...@@ -41,6 +41,7 @@ obj-m += gb-es2.o ...@@ -41,6 +41,7 @@ obj-m += gb-es2.o
KERNELVER ?= $(shell uname -r) KERNELVER ?= $(shell uname -r)
KERNELDIR ?= /lib/modules/$(KERNELVER)/build KERNELDIR ?= /lib/modules/$(KERNELVER)/build
INSTALL_MOD_PATH ?= /..
PWD := $(shell pwd) PWD := $(shell pwd)
# add -Wall to try to catch everything we can. # add -Wall to try to catch everything we can.
...@@ -63,6 +64,6 @@ coccicheck: ...@@ -63,6 +64,6 @@ coccicheck:
$(MAKE) -C $(KERNELDIR) M=$(PWD) coccicheck $(MAKE) -C $(KERNELDIR) M=$(PWD) coccicheck
install: module install: module
mkdir -p /lib/modules/$(KERNELVER)/kernel/drivers/greybus/ mkdir -p $(INSTALL_MOD_PATH)/lib/modules/$(KERNELVER)/kernel/drivers/greybus/
cp -f *.ko /lib/modules/$(KERNELVER)/kernel/drivers/greybus/ cp -f *.ko $(INSTALL_MOD_PATH)/lib/modules/$(KERNELVER)/kernel/drivers/greybus/
depmod -a $(KERNELVER) depmod -b $(INSTALL_MOD_PATH) -a $(KERNELVER)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment