Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save krasCGQ/884347b1b7e756dfcceeb8547c7095b9 to your computer and use it in GitHub Desktop.
Save krasCGQ/884347b1b7e756dfcceeb8547c7095b9 to your computer and use it in GitHub Desktop.
From 985447f09d3f439194f69be12f4cf72952e1f317 Mon Sep 17 00:00:00 2001
From: Albert I <krascgq@outlook.co.id>
Date: Wed, 29 Nov 2017 19:47:19 +0800
Subject: [PATCH] kernel: Fix out-tree kernel compile
I blame Samsung.
Signed-off-by: Albert I <krascgq@outlook.co.id>
---
drivers/gud/Makefile | 14 ++++++++------
drivers/sensorhub/Makefile | 20 ++------------------
drivers/sensorhub/factory/Makefile | 11 +++++++++++
firmware/Makefile | 20 ++++++++++----------
4 files changed, 31 insertions(+), 34 deletions(-)
create mode 100644 drivers/sensorhub/factory/Makefile
diff --git a/drivers/gud/Makefile b/drivers/gud/Makefile
index 609f291e085..42f99de4c32 100644
--- a/drivers/gud/Makefile
+++ b/drivers/gud/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for the kernel mobicore drivers
#
-GUD_ROOT_FOLDER := drivers/gud/
+GUD_ROOT_FOLDER := drivers/gud
# add our modules to kernel.
obj-$(CONFIG_MOBICORE_API) += mcKernelApi.o
obj-$(CONFIG_MOBICORE_DRIVER) += mcDrvModule.o
@@ -19,16 +19,18 @@ mcKernelApi-objs := MobiCoreKernelApi/main.o \
MobiCoreKernelApi/connection.o
# Release mode by default
-ccflags-y := -DNDEBUG -include $(GUD_ROOT_FOLDER)/build_tag.h
+ccflags-y := -DNDEBUG -include build_tag.h
ccflags-y += -Wno-declaration-after-statement
ccflags-$(CONFIG_MOBICORE_DEBUG) += -DDEBUG
ccflags-$(CONFIG_MOBICORE_VERBOSE) += -DDEBUG_VERBOSE
-# Choose one platform from the folder
-MOBICORE_PLATFORM := $(shell (ls -1 $(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms | tail -1) )
-# Use the available platform folder
-ccflags-y += -I$(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms/$(MOBICORE_PLATFORM)
+# Seriously, Samsung?
+#MOBICORE_PLATFORM := $(shell (ls -1 $(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms | tail -1) )
+# Use exynos5410 platform folder if defined
+ifeq ($(CONFIG_SOC_EXYNOS5410),y)
+ccflags-y += -I$(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms/EXYNOS_5410_STD
+endif
# MobiCore Driver includes
ccflags-y += -I$(GUD_ROOT_FOLDER)/MobiCoreDriver/public
# MobiCore KernelApi required incldes
diff --git a/drivers/sensorhub/Makefile b/drivers/sensorhub/Makefile
index e015a4dd21b..8eab15ac1b6 100644
--- a/drivers/sensorhub/Makefile
+++ b/drivers/sensorhub/Makefile
@@ -8,25 +8,9 @@ obj-$(CONFIG_SENSORS_SSP) += ssp_dev.o ssp_i2c.o ssp_data.o ssp_sysfs.o\
obj-$(CONFIG_SENSORS_SYSFS) += sensors_core.o
-obj-$(CONFIG_SENSORS_SSP_K330) += factory/accel_k330.o factory/gyro_k330.o
+obj-$(CONFIG_SENSORS_SSP_AK8963C) += ssp_ak8963c.o
-obj-$(CONFIG_SENSORS_SSP_CM36651) += factory/light_cm36651.o factory/prox_cm36651.o
-
-obj-$(CONFIG_SENSORS_SSP_CM3323) += factory/light_cm3323.o
-
-obj-$(CONFIG_SENSORS_SSP_MAX88920) += factory/prox_max88920.o factory/gesture_max88920.o
-
-obj-$(CONFIG_SENSORS_SSP_AK8963C) += ssp_ak8963c.o factory/magnetic_ak8963c.o
-
-obj-$(CONFIG_SENSORS_SSP_AK8963C_DOEPLUS) += ssp_ak8963c_doeplus.o factory/magnetic_ak8963c.o
-
-obj-$(CONFIG_SENSORS_SSP_BMP182) += factory/pressure_bmp182.o
-
-obj-$(CONFIG_SENSORS_SSP_SHTC1) += factory/temphumidity_shtc1.o
-
-obj-$(CONFIG_SENSORS_SSP_AT32UC3L0128) += factory/mcu_at32uc3l0128.o
-
-obj-$(CONFIG_SENSORS_SSP_ATUC128L5HAR) += factory/mcu_atuc128l5har.o
+obj-$(CONFIG_SENSORS_SSP_AK8963C_DOEPLUS) += ssp_ak8963c_doeplus.o
obj-$(CONFIG_SENSORS_SSP_SENSORHUB) += ssp_sensorhub.o
diff --git a/drivers/sensorhub/factory/Makefile b/drivers/sensorhub/factory/Makefile
new file mode 100644
index 00000000000..9cd3ff14f61
--- /dev/null
+++ b/drivers/sensorhub/factory/Makefile
@@ -0,0 +1,11 @@
+obj-$(CONFIG_SENSORS_SSP_K330) += accel_k330.o gyro_k330.o
+obj-$(CONFIG_SENSORS_SSP_CM36651) += light_cm36651.o prox_cm36651.o
+obj-$(CONFIG_SENSORS_SSP_CM3323) += light_cm3323.o
+obj-$(CONFIG_SENSORS_SSP_MAX88920) += prox_max88920.o gesture_max88920.o
+obj-$(CONFIG_SENSORS_SSP_AK8963C) += magnetic_ak8963c.o
+obj-$(CONFIG_SENSORS_SSP_AK8963C_DOEPLUS) += magnetic_ak8963c.o
+obj-$(CONFIG_SENSORS_SSP_BMP182) += pressure_bmp182.o
+obj-$(CONFIG_SENSORS_SSP_SHTC1) += temphumidity_shtc1.o
+obj-$(CONFIG_SENSORS_SSP_AT32UC3L0128) += mcu_at32uc3l0128.o
+obj-$(CONFIG_SENSORS_SSP_ATUC128L5HAR) += mcu_atuc128l5har.o
+
diff --git a/firmware/Makefile b/firmware/Makefile
index 72feb9532d0..b102fc42002 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -148,24 +148,24 @@ fw-shipped-$(CONFIG_EPEN_WACOM_G9PLL) += epen/W9007_B804.bin epen/W9007_B878.bin
fw-shipped-$(CONFIG_SENSORS_SSP) += ssp.fw
fw-shipped-$(CONFIG_SENSORS_SSP) += ssp_crashed.fw
-TSPFIRMWARE_DIRECTORY = firmware/tsp_atmel
-ifeq ($(shell test -d $(TSPFIRMWARE_DIRECTORY) && echo yes),yes)
+#TSPFIRMWARE_DIRECTORY = firmware/tsp_atmel
+#ifeq ($(shell test -d $(TSPFIRMWARE_DIRECTORY) && echo yes),yes)
fw-shipped-$(CONFIG_TOUCHSCREEN_ATMEL_MXT540E) += tsp_atmel/mXT540E.fw
fw-shipped-$(CONFIG_TOUCHSCREEN_ATMEL_MXT540S) += tsp_atmel/mXT540Sg.fw tsp_atmel/mXT540Si.fw
fw-shipped-$(CONFIG_TOUCHSCREEN_MXT768E) += tsp_atmel/mXT768E.fw
fw-shipped-$(CONFIG_TOUCHSCREEN_ATMEL_MXT1664S) += tsp_atmel/mXT1664S_v.fw
-else
-$(warning '$(TSPFIRMWARE_DIRECTORY)' directory dose not exist)
-endif
+#else
+#$(warning '$(TSPFIRMWARE_DIRECTORY)' directory dose not exist)
+#endif
-TSPFIRMWARE_DIRECTORY = firmware/tsp_synaptics
-ifeq ($(shell test -d $(TSPFIRMWARE_DIRECTORY) && echo yes),yes)
+#TSPFIRMWARE_DIRECTORY = firmware/tsp_synaptics
+#ifeq ($(shell test -d $(TSPFIRMWARE_DIRECTORY) && echo yes),yes)
fw-shipped-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI) += tsp_synaptics/synaptics_b0_h.fw \
tsp_synaptics/synaptics_b0_5_1.fw \
tsp_synaptics/synaptics_b0_fac.fw tsp_synaptics/synaptics_b0_5_1_fac.fw
-else
-$(warning '$(TSPFIRMWARE_DIRECTORY)' directory dose not exist)
-endif
+#else
+#$(warning '$(TSPFIRMWARE_DIRECTORY)' directory dose not exist)
+#endif
fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment