Commit 8218605d authored by John Stultz's avatar John Stultz Committed by Greg Kroah-Hartman

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: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 9b60aa02
.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
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