Jelajahi Sumber

Add support for LE compilation

Add .am files for LE build compilation. These files will replace
Makefile and Kbuild files only on LE builds.

Change-Id: Ib8dfa89523adf802acce57be0d2064f790bac6d2
Signed-off-by: Anirudh Raghavendra <[email protected]>
Anirudh Raghavendra 2 tahun lalu
induk
melakukan
9f5f25be96
3 mengubah file dengan 40 tambahan dan 1 penghapusan
  1. 15 0
      Kbuild.am
  2. 19 0
      Makefile.am
  3. 6 1
      dsp/adsprpc.c

+ 15 - 0
Kbuild.am

@@ -0,0 +1,15 @@
+# ported from Android.mk
+$(info within KBUILD file KBUILD_EXTRA_SYMBOLS = $(KBUILD_EXTRA_SYMBOLS))
+
+ifeq ($(CONFIG_ARCH_PINEAPPLE), y)
+$(info within KBUILD file CONFIG_ARCH_PINEAPPLE = $(CONFIG_ARCH_PINEAPPLE))
+KBUILD_CPPFLAGS += -DCONFIG_DSP_PINEAPPLE=1
+ccflags-y += -DCONFIG_DSP_PINEAPPLE=1
+ccflags-y += -DCONFIG_MSM_ADSPRPC_TRUSTED=1
+endif
+
+frpc-trusted-adsprpc-y := dsp/adsprpc.o	\
+                          dsp/adsprpc_compat.o \
+                          dsp/adsprpc_socket.o \
+
+obj-m := frpc-trusted-adsprpc.o

+ 19 - 0
Makefile.am

@@ -0,0 +1,19 @@
+DSP_KERNEL_ROOT=$(ROOTDIR)vendor/qcom/opensource/dsp-kernel
+KBUILD_OPTIONS := DSP_KERNEL_ROOT=$(DSP_KERNEL_ROOT) CONFIG_MSM_ADSPRPC_TRUSTED=m
+
+ifeq ($(TARGET_SUPPORT),genericarmv8)
+	KBUILD_OPTIONS += CONFIG_ARCH_PINEAPPLE=y
+endif
+
+all:
+	$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
+
+modules_install:
+	$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
+
+%:
+	$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
+
+clean:
+	rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers
+	rm -rf .tmp_versions

+ 6 - 1
dsp/adsprpc.c

@@ -40,7 +40,6 @@
 #include <linux/msm_dma_iommu_mapping.h>
 #include "adsprpc_compat.h"
 #include "adsprpc_shared.h"
-#include "fastrpc.h"
 #include <soc/qcom/qcom_ramdump.h>
 #include <soc/qcom/minidump.h>
 #include <linux/delay.h>
@@ -64,6 +63,12 @@
 #define CREATE_TRACE_POINTS
 #include "fastrpc_trace.h"
 
+#ifdef CONFIG_MSM_ADSPRPC_TRUSTED
+#include "../include/linux/fastrpc.h"
+#else
+#include "fastrpc.h"
+#endif
+
 #define TZ_PIL_PROTECT_MEM_SUBSYS_ID 0x0C
 #define TZ_PIL_CLEAR_PROTECT_MEM_SUBSYS_ID 0x0D
 #define TZ_PIL_AUTH_QDSP6_PROC 1