Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d736bf2 authored by PJ Bostley's avatar PJ Bostley
Browse files

kbuild: PWD isn't set reliably by shell. srctree is the proper macro.



Current makefile is using a make macro of $(PWD) in shell command to
find the root of the kernel source tree, this has a problem when
building the kernel outside of the android build system as this is an
Android macro no a kbuild one.  We can improve this by using the
$(srctree) macro the kbuild system provides for exactly this purpose.

Change-Id: I0cb7611a6f770eb2651f642f12e51efcc2b9e729
Signed-off-by: default avatarPJ Bostley <pbostley@codeaurora.org>
parent d81481d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ ccflags-$(CONFIG_MOBICORE_DEBUG) += -DDEBUG
ccflags-$(CONFIG_MOBICORE_VERBOSE) += -DDEBUG_VERBOSE

# Choose one platform from the folder
MOBICORE_PLATFORM := $(shell (ls -1 $(PWD)/$(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms | tail -1) )
MOBICORE_PLATFORM := $(shell (ls -1 $(srctree)/$(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms | tail -1) )
# Use the available platform folder
ccflags-y += -I$(GUD_ROOT_FOLDER)/MobiCoreDriver/platforms/$(MOBICORE_PLATFORM)
# MobiCore Driver includes
+1 −1
Original line number Diff line number Diff line
GCC_VERSION      := $(shell $(CONFIG_SHELL) $(PWD)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc)
GCC_VERSION      := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc)
ccflags-y += -Idrivers/media/video/msm

obj-$(CONFIG_MSM_FD) += msm_fd_dev.o msm_fd_hw.o
+1 −1
Original line number Diff line number Diff line
GCC_VERSION      := $(shell $(CONFIG_SHELL) $(PWD)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc)
GCC_VERSION      := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc)

ccflags-y += -Idrivers/media/platform/msm/camera_v2/jpeg_10
ccflags-y += -Idrivers/media/platform/msm/camera_v2/sensor/io
+1 −1
Original line number Diff line number Diff line
GCC_VERSION      := $(shell $(CONFIG_SHELL) $(PWD)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc)
GCC_VERSION      := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CROSS_COMPILE)gcc)

obj-$(CONFIG_MSM_VPU) := 	\
		vpu_v4l2.o \