summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishal Mahaveer2017-09-29 00:04:51 -0500
committerGowtham Tammana2017-09-29 15:53:29 -0500
commite0dafca8fb5b8300049f0cf43730ba92a8ace4f7 (patch)
tree5f4b64719e649ddb9f6d01f1667ce0bbd9355319
parent33245fdf6aa82faecfb779a137b3bf7028bb1a89 (diff)
downloaddevice-ti-proprietary-open-e0dafca8fb5b8300049f0cf43730ba92a8ace4f7.tar.gz
device-ti-proprietary-open-e0dafca8fb5b8300049f0cf43730ba92a8ace4f7.tar.xz
device-ti-proprietary-open-e0dafca8fb5b8300049f0cf43730ba92a8ace4f7.zip
jacinto6: sgx_src: build pvrsrv kernel module from source
Changes to switch from using prebuilt pvrsrv kernel module to building pvrsrv kernel module as part of Android build and install it in /vendor/lib/modules location. The pvrsrvkm kernel module would no longer be part of sgx.tgz tarball. Change-Id: I107088d3c0423bccfe78aa0733a4c4c1c1ad7c97 Signed-off-by: Vishal Mahaveer <vishalm@ti.com> Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
-rw-r--r--jacinto6/sgx.tgzbin1683188 -> 1564556 bytes
-rw-r--r--jacinto6/sgx/Android.mk30
-rw-r--r--jacinto6/sgx_src/Android.mk53
-rw-r--r--jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk28
-rw-r--r--jacinto6/ti-jacinto6-vendor.mk1
5 files changed, 69 insertions, 43 deletions
diff --git a/jacinto6/sgx.tgz b/jacinto6/sgx.tgz
index 01f5ba6..9c7e334 100644
--- a/jacinto6/sgx.tgz
+++ b/jacinto6/sgx.tgz
Binary files differ
diff --git a/jacinto6/sgx/Android.mk b/jacinto6/sgx/Android.mk
index 9d007ad..bfb50e3 100644
--- a/jacinto6/sgx/Android.mk
+++ b/jacinto6/sgx/Android.mk
@@ -74,26 +74,6 @@ $$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP)
74 $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@ 74 $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@
75endef 75endef
76 76
77define _add-sgx-vendor-km
78include $$(CLEAR_VARS)
79$(if $(word 2,$1),$(error Invalid SGX module name $1))
80LOCAL_MODULE := $(basename $(notdir $1))
81LOCAL_SRC_FILES := $1
82LOCAL_MODULE_TAGS := optional
83LOCAL_MODULE_SUFFIX := $(suffix $1)
84LOCAL_MODULE_CLASS := ETC
85LOCAL_MODULE_PATH := $$(TARGET_OUT)/lib/$(dir $1)
86LOCAL_STRIP_MODULE := false
87OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_ETC)
88LOCAL_PATH := $$(img-sgx.untarred_bin)
89include $$(BUILD_SYSTEM)/base_rules.mk
90$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1
91$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP)
92 @echo "Copy $$@ <- $$(PRIVATE_SRC)"
93 @mkdir -p $$(dir $$@)
94 $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@
95endef
96
97prebuilt_sgx_vendor_libs := \ 77prebuilt_sgx_vendor_libs := \
98 lib/libIMGegl.so \ 78 lib/libIMGegl.so \
99 lib/libglslcompiler.so \ 79 lib/libglslcompiler.so \
@@ -116,11 +96,8 @@ prebuilt_sgx_vendor_bins := \
116#prebuilt_sgx_vendor_etc := \ 96#prebuilt_sgx_vendor_etc := \
117# etc/powervr.ini 97# etc/powervr.ini
118 98
119prebuilt_sgx_vendor_km := \
120 modules/pvrsrvkm.ko
121
122prebuilt_sgx_modules := \ 99prebuilt_sgx_modules := \
123 $(foreach _file,$(prebuilt_sgx_vendor_libs) $(prebuilt_sgx_vendor_bins) $(prebuilt_sgx_vendor_etc) $(prebuilt_sgx_vendor_km),\ 100 $(foreach _file,$(prebuilt_sgx_vendor_libs) $(prebuilt_sgx_vendor_bins) $(prebuilt_sgx_vendor_etc),\
124 $(notdir $(basename $(_file)))) 101 $(notdir $(basename $(_file))))
125 102
126include $(CLEAR_VARS) 103include $(CLEAR_VARS)
@@ -138,15 +115,10 @@ $(foreach _file,$(prebuilt_sgx_vendor_bins),\
138$(foreach _file,$(prebuilt_sgx_vendor_etc),\ 115$(foreach _file,$(prebuilt_sgx_vendor_etc),\
139 $(eval $(call _add-sgx-vendor-etc,$(_file)))) 116 $(eval $(call _add-sgx-vendor-etc,$(_file))))
140 117
141$(foreach _file,$(prebuilt_sgx_vendor_km),\
142 $(eval $(call _add-sgx-vendor-km,$(_file))))
143
144prebuilt_sgx_modules := 118prebuilt_sgx_modules :=
145prebuilt_sgx_vendor_libs := 119prebuilt_sgx_vendor_libs :=
146prebuilt_sgx_vendor_bins := 120prebuilt_sgx_vendor_bins :=
147prebuilt_sgx_vendor_etc := 121prebuilt_sgx_vendor_etc :=
148prebuilt_sgx_vendor_km :=
149_add-sgx-vendor-lib := 122_add-sgx-vendor-lib :=
150_add-sgx-vendor-bin := 123_add-sgx-vendor-bin :=
151_add-sgx-vendor-etc := 124_add-sgx-vendor-etc :=
152_add-sgx-vendor-km :=
diff --git a/jacinto6/sgx_src/Android.mk b/jacinto6/sgx_src/Android.mk
new file mode 100644
index 0000000..663404c
--- /dev/null
+++ b/jacinto6/sgx_src/Android.mk
@@ -0,0 +1,53 @@
1# Copyright (C) 2011 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16LOCAL_PATH := $(call my-dir)
17include $(CLEAR_VARS)
18
19MODULE_TARGET := pvrsrvkm.ko
20LOCAL_MODULE := $(basename $(MODULE_TARGET))
21LOCAL_MODULE_SUFFIX := $(suffix $(MODULE_TARGET))
22LOCAL_MODULE_CLASS := ETC
23
24local-build := $(LOCAL_PATH)/eurasia_km/eurasiacon/build/linux2/omap_android
25out-intermediates := $(call intermediates-dir-for, ETC, $(LOCAL_MODULE))
26
27PVRSRVKM := $(LOCAL_PATH)/$(MODULE_TARGET)
28
29$(PVRSRVKM): $(local-build)/Makefile $(KERNELDIR)/.version
30 @echo "Building $@"
31 @$(MAKE) -f Makefile -C $(local-build) \
32 CROSS_COMPILE=arm-linux-androideabi- \
33 KERNEL_CROSS_COMPILE=arm-linux-androideabi- \
34 KERNELDIR=$(KERNELDIR) \
35 ARCH=arm \
36 ANDROID_ROOT=$(ANDROID_BUILD_TOP) \
37 PLATFORM_RELEASE="8.0" \
38 OUT=$(ANDROID_BUILD_TOP)/$(out-intermediates)
39 @$(ACP) -fp $(ANDROID_BUILD_TOP)/$(out-intermediates)/target/$(MODULE_TARGET) $@
40 @echo "Finished building $@"
41
42GEN := $(out-intermediates)/$(MODULE_TARGET)
43$(GEN): $(PVRSRVKM)
44 @echo "Copying $@ <- $<"
45 $(copy-file-to-target)
46
47LOCAL_MODULE_TAGS := optional
48LOCAL_SRC_FILES := $(MODULE_TARGET)
49LOCAL_GENERATED_SOURCES += $(GEN)
50LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/modules
51LOCAL_STRIP_MODULE := false
52BOARD_VENDOR_KERNEL_MODULES += $(PVRSRVKM)
53include $(BUILD_PREBUILT)
diff --git a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
index f2a5600..b99d976 100644
--- a/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
+++ b/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/common/android/platform_version.mk
@@ -41,25 +41,25 @@
41# If there's no build.prop file in the expected location, bail out. Tell the 41# If there's no build.prop file in the expected location, bail out. Tell the
42# user which file we were trying to read in case TARGET_DEVICE was not set. 42# user which file we were trying to read in case TARGET_DEVICE was not set.
43# 43#
44BUILD_PROP := $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop 44#BUILD_PROP := $(TARGET_ROOT)/product/$(TARGET_DEVICE)/system/build.prop
45ifeq ($(wildcard $(BUILD_PROP)),) 45#ifeq ($(wildcard $(BUILD_PROP)),)
46$(warning *** Could not determine Android version. Did you set ANDROID_ROOT,\ 46#$(warning *** Could not determine Android version. Did you set ANDROID_ROOT,\
47OUT_DIR and TARGET_DEVICE in your environment correctly?) 47#OUT_DIR and TARGET_DEVICE in your environment correctly?)
48$(error Error reading $(BUILD_PROP)) 48#$(error Error reading $(BUILD_PROP))
49endif 49#endif
50 50
51# Extract version.release and version.codename from the build.prop file. 51# Extract version.release and version.codename from the build.prop file.
52# If either of the values aren't in the build.prop, the Make variables won't 52# If either of the values aren't in the build.prop, the Make variables won't
53# be defined, and fallback handling will take place. 53# be defined, and fallback handling will take place.
54# 54#
55define newline 55#define newline
56 56#
57 57#
58endef 58#endef
59$(eval $(subst #,$(newline),$(shell cat $(BUILD_PROP) | \ 59#$(eval $(subst #,$(newline),$(shell cat $(BUILD_PROP) | \
60 grep '^ro.build.version.release=\|^ro.build.version.codename=' | \ 60# grep '^ro.build.version.release=\|^ro.build.version.codename=' | \
61 sed -e 's,ro.build.version.release=,PLATFORM_RELEASE=,' \ 61# sed -e 's,ro.build.version.release=,PLATFORM_RELEASE=,' \
62 -e 's,ro.build.version.codename=,PLATFORM_CODENAME=,' | tr '\n' '#'))) 62# -e 's,ro.build.version.codename=,PLATFORM_CODENAME=,' | tr '\n' '#')))
63 63
64define release-starts-with 64define release-starts-with
65$(shell echo $(PLATFORM_RELEASE) | grep -q ^$(1); \ 65$(shell echo $(PLATFORM_RELEASE) | grep -q ^$(1); \
diff --git a/jacinto6/ti-jacinto6-vendor.mk b/jacinto6/ti-jacinto6-vendor.mk
index 1bb1d16..534d095 100644
--- a/jacinto6/ti-jacinto6-vendor.mk
+++ b/jacinto6/ti-jacinto6-vendor.mk
@@ -17,4 +17,5 @@
17# the Texas Instruments OMAP 54xx series SoCs 17# the Texas Instruments OMAP 54xx series SoCs
18 18
19PRODUCT_PACKAGES += \ 19PRODUCT_PACKAGES += \
20 pvrsrvkm \
20 ti_jacinto6_sgx_libs 21 ti_jacinto6_sgx_libs