From: John Stultz Date: Fri, 10 Oct 2014 21:42:33 +0000 (-0700) Subject: greybus: Changes required for integrating into the Android build X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~2021 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8218605d20fff015bb3f76060ad7fe87d4362fc0;p=karo-tx-linux.git greybus: Changes required for integrating into the Android build In order to easily integrate into the Android build, include an Android.mk. Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/Android.mk b/drivers/staging/greybus/Android.mk new file mode 100644 index 000000000000..773129badf62 --- /dev/null +++ b/drivers/staging/greybus/Android.mk @@ -0,0 +1,29 @@ +.PHONY: build-greybus + +$(PRODUCT_OUT)/ramdisk.img: build-greybus + +include $(CLEAR_VARS) +GREYBUS_SRC_PATH := $(ANDROID_BUILD_TOP)/external/greybus/ +LOCAL_PATH := $(GREYBUS_SRC_PATH) +LOCAL_SRC_FILES := greybus.ko +LOCAL_MODULE := $(LOCAL_SRC_FILES) +LOCAL_MODULE_CLASS := EXECUTABLES +LOCAL_MODULE_PATH := $(PRODUCT_OUT)/root/lib/modules +$(LOCAL_PATH)/$(LOCAL_SRC_FILES): build-greybus +include $(BUILD_PREBUILT) + +KDIRARG := KERNELDIR="${ANDROID_PRODUCT_OUT}/obj/kernel" +ifneq ($(ANDROID_64),) + ARCHARG := ARCH=arm64 + FLAGARG := EXTRA_CFLAGS+=-fno-pic +else + ARCHARG := ARCH=arm +endif +ARGS := $(KDIRARG) $(ARCHARG) $(FLAGARG) + +build-greybus: android_kernel + make clean -C $(GREYBUS_SRC_PATH) + cd $(GREYBUS_SRC_PATH) &&\ + $(MAKE) -j$(MAKE_JOBS) CROSS_COMPILE=$(KERNEL_TOOLS_PREFIX) $(ARGS) + mkdir -p $(PRODUCT_OUT)/root/lib/modules + cp $(GREYBUS_SRC_PATH)/greybus.ko $(PRODUCT_OUT)/root/lib/modules