diff options
author | Anand Balagopalakrishnan | 2016-10-13 00:20:13 -0500 |
---|---|---|
committer | Anand Balagopalakrishnan | 2016-10-13 07:26:25 -0500 |
commit | e68719ba7c54602c710b6615cd665f5b7f47f85e (patch) | |
tree | 60860108022ff73d26ed2c897a0144eeece680df | |
parent | a5a0fe1799cabfa1278321b667263cf3fa2cf32f (diff) | |
download | omap5-sgx-ddk-linux-e68719ba7c54602c710b6615cd665f5b7f47f85e.tar.gz omap5-sgx-ddk-linux-e68719ba7c54602c710b6615cd665f5b7f47f85e.tar.xz omap5-sgx-ddk-linux-e68719ba7c54602c710b6615cd665f5b7f47f85e.zip |
km: build: remove dependency on user-mode builds
Change-Id: Ifb8776e1bde6b0c3328097d4568ca8f8a0dcdf04
Signed-off-by: Anand Balagopalakrishnan <anandb@ti.com>
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/config/core.mk | 3 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk | 7 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile | 46 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/omap_linux/install_km.sh.m4 | 21 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/pvrversion.mk | 17 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/scripts.mk | 193 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/scripts/common.m4 | 797 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/scripts/install.sh.m4 | 359 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/scripts/install.sh.tpl | 304 | ||||
-rw-r--r-- | eurasia_km/eurasiacon/build/linux2/toplevel.mk | 41 |
10 files changed, 1711 insertions, 77 deletions
diff --git a/eurasia_km/eurasiacon/build/linux2/config/core.mk b/eurasia_km/eurasiacon/build/linux2/config/core.mk index 08ff716..1c4bc1f 100644 --- a/eurasia_km/eurasiacon/build/linux2/config/core.mk +++ b/eurasia_km/eurasiacon/build/linux2/config/core.mk | |||
@@ -415,6 +415,7 @@ include ../kernel_version.mk | |||
415 | PVRSRV_MODULE_BASEDIR ?= /lib/modules/$(KERNEL_ID)/extra/ | 415 | PVRSRV_MODULE_BASEDIR ?= /lib/modules/$(KERNEL_ID)/extra/ |
416 | $(eval $(call KernelConfigMake,KERNELDIR,$(KERNELDIR))) | 416 | $(eval $(call KernelConfigMake,KERNELDIR,$(KERNELDIR))) |
417 | # Needed only by install script | 417 | # Needed only by install script |
418 | $(eval $(call KernelConfigMake,KERNEL_ID,$(KERNEL_ID))) | ||
418 | $(eval $(call KernelConfigMake,KERNEL_COMPONENTS,$(KERNEL_COMPONENTS))) | 419 | $(eval $(call KernelConfigMake,KERNEL_COMPONENTS,$(KERNEL_COMPONENTS))) |
419 | $(eval $(call TunableKernelConfigMake,EXTRA_PVRSRVKM_COMPONENTS,)) | 420 | $(eval $(call TunableKernelConfigMake,EXTRA_PVRSRVKM_COMPONENTS,)) |
420 | $(eval $(call TunableKernelConfigMake,EXTRA_KBUILD_SOURCE,)) | 421 | $(eval $(call TunableKernelConfigMake,EXTRA_KBUILD_SOURCE,)) |
@@ -488,6 +489,7 @@ $(eval $(call BothConfigC,LINUX,)) | |||
488 | $(eval $(call BothConfigC,PVR_BUILD_DIR,"\"$(PVR_BUILD_DIR)\"")) | 489 | $(eval $(call BothConfigC,PVR_BUILD_DIR,"\"$(PVR_BUILD_DIR)\"")) |
489 | $(eval $(call BothConfigC,PVR_BUILD_TYPE,"\"$(BUILD)\"")) | 490 | $(eval $(call BothConfigC,PVR_BUILD_TYPE,"\"$(BUILD)\"")) |
490 | $(eval $(call BothConfigC,PVRSRV_MODNAME,"\"$(PVRSRV_MODNAME)\"")) | 491 | $(eval $(call BothConfigC,PVRSRV_MODNAME,"\"$(PVRSRV_MODNAME)\"")) |
492 | $(eval $(call KernelConfigMake,PVRSRV_MODNAME,$(PVRSRV_MODNAME))) | ||
491 | 493 | ||
492 | $(eval $(call TunableBothConfigC,SGXCORE,)) | 494 | $(eval $(call TunableBothConfigC,SGXCORE,)) |
493 | $(eval $(call BothConfigC,SGX$(SGXCORE),)) | 495 | $(eval $(call BothConfigC,SGX$(SGXCORE),)) |
@@ -510,6 +512,7 @@ endif | |||
510 | 512 | ||
511 | ifneq ($(DISPLAY_CONTROLLER),) | 513 | ifneq ($(DISPLAY_CONTROLLER),) |
512 | $(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) | 514 | $(eval $(call BothConfigC,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) |
515 | $(eval $(call KernelConfigMake,DISPLAY_CONTROLLER,$(DISPLAY_CONTROLLER))) | ||
513 | endif | 516 | endif |
514 | 517 | ||
515 | ifneq ($(strip $(KERNELDIR)),) | 518 | ifneq ($(strip $(KERNELDIR)),) |
diff --git a/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk b/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk index 63542f0..76ad7ae 100644 --- a/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk +++ b/eurasia_km/eurasiacon/build/linux2/kbuild/kbuild.mk | |||
@@ -77,6 +77,8 @@ kbuild_clean: $(TARGET_OUT)/kbuild/Makefile | |||
77 | V=$(V) W=$(W) \ | 77 | V=$(V) W=$(W) \ |
78 | TOP=$(TOP) clean | 78 | TOP=$(TOP) clean |
79 | 79 | ||
80 | ifneq ($(wildcard $(PVR_BUILD_DIR)/install.sh.m4),) | ||
81 | # Old style install script. | ||
80 | kbuild_install: $(TARGET_OUT)/kbuild/Makefile | 82 | kbuild_install: $(TARGET_OUT)/kbuild/Makefile |
81 | @: $(if $(strip $(DISCIMAGE)),,$(error $$(DISCIMAGE) was empty or unset while trying to use it to set INSTALL_MOD_PATH for modules_install)) | 83 | @: $(if $(strip $(DISCIMAGE)),,$(error $$(DISCIMAGE) was empty or unset while trying to use it to set INSTALL_MOD_PATH for modules_install)) |
82 | @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \ | 84 | @$(MAKE) -Rr --no-print-directory -C $(KERNELDIR) M=$(abspath $(TARGET_OUT)/kbuild) \ |
@@ -89,3 +91,8 @@ kbuild_install: $(TARGET_OUT)/kbuild/Makefile | |||
89 | INSTALL_MOD_PATH="$(DISCIMAGE)" \ | 91 | INSTALL_MOD_PATH="$(DISCIMAGE)" \ |
90 | V=$(V) W=$(W) \ | 92 | V=$(V) W=$(W) \ |
91 | TOP=$(TOP) modules_install | 93 | TOP=$(TOP) modules_install |
94 | else | ||
95 | # New style install script: We just have to generate the install script and run it as normal. | ||
96 | kbuild_install: install | ||
97 | kbuild: install_script_km | ||
98 | endif \ No newline at end of file | ||
diff --git a/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile b/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile index d4d5354..b6afc80 100644 --- a/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile +++ b/eurasia_km/eurasiacon/build/linux2/omap_linux/Makefile | |||
@@ -1,42 +1,7 @@ | |||
1 | ########################################################################### ### | 1 | ########################################################################### ### |
2 | #@Title Root makefile for OMAP4430 Linux. Builds everything else. | 2 | #@Title Root makefile for OMAP4430 Linux. Builds everything else. |
3 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | 3 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved |
4 | #@License Dual MIT/GPLv2 | 4 | #@License Strictly Confidential. |
5 | # | ||
6 | # The contents of this file are subject to the MIT license as set out below. | ||
7 | # | ||
8 | # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
9 | # of this software and associated documentation files (the "Software"), to deal | ||
10 | # in the Software without restriction, including without limitation the rights | ||
11 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
12 | # copies of the Software, and to permit persons to whom the Software is | ||
13 | # furnished to do so, subject to the following conditions: | ||
14 | # | ||
15 | # The above copyright notice and this permission notice shall be included in | ||
16 | # all copies or substantial portions of the Software. | ||
17 | # | ||
18 | # Alternatively, the contents of this file may be used under the terms of | ||
19 | # the GNU General Public License Version 2 ("GPL") in which case the provisions | ||
20 | # of GPL are applicable instead of those above. | ||
21 | # | ||
22 | # If you wish to allow use of your version of this file only under the terms of | ||
23 | # GPL, and not to allow others to use your version of this file under the terms | ||
24 | # of the MIT license, indicate your decision by deleting the provisions above | ||
25 | # and replace them with the notice and other provisions required by GPL as set | ||
26 | # out in the file called "GPL-COPYING" included in this distribution. If you do | ||
27 | # not delete the provisions above, a recipient may use your version of this file | ||
28 | # under the terms of either the MIT license or GPL. | ||
29 | # | ||
30 | # This License is also included in this distribution in the file called | ||
31 | # "MIT-COPYING". | ||
32 | # | ||
33 | # EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS | ||
34 | # PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING | ||
35 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
36 | # PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR | ||
37 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
38 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
39 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
40 | ### ########################################################################### | 5 | ### ########################################################################### |
41 | 6 | ||
42 | # If a product wasn't specified, we're a J6 EVM. | 7 | # If a product wasn't specified, we're a J6 EVM. |
@@ -114,8 +79,6 @@ KERNEL_COMPONENTS := srvkm bufferclass_example | |||
114 | 79 | ||
115 | SUPPORT_OLD_ION_API := 1 | 80 | SUPPORT_OLD_ION_API := 1 |
116 | 81 | ||
117 | include ../kernel_version.mk | ||
118 | |||
119 | # Only enable active power management if passive power management is | 82 | # Only enable active power management if passive power management is |
120 | # enabled, as indicated by LDM_PLATFORM being set to 1. On OMAP, | 83 | # enabled, as indicated by LDM_PLATFORM being set to 1. On OMAP, |
121 | # the system can suspend in the case where active power management is | 84 | # the system can suspend in the case where active power management is |
@@ -174,6 +137,11 @@ else | |||
174 | OPK_DEFAULT := libpvrPVR2D_FLIPWSEGL.so | 137 | OPK_DEFAULT := libpvrPVR2D_FLIPWSEGL.so |
175 | endif | 138 | endif |
176 | 139 | ||
140 | include ../common/xorg_test.mk | ||
141 | |||
142 | ifneq ($(strip $(KERNELDIR)),) | ||
143 | include ../kernel_version.mk | ||
144 | |||
177 | ifeq ($(SYS_OMAP5_UEVM),1) | 145 | ifeq ($(SYS_OMAP5_UEVM),1) |
178 | XORG_EXPLICIT_PVR_SERVICES_LOAD := 1 | 146 | XORG_EXPLICIT_PVR_SERVICES_LOAD := 1 |
179 | ifeq ($(call kernel-version-at-least,3,8,13),true) | 147 | ifeq ($(call kernel-version-at-least,3,8,13),true) |
@@ -227,7 +195,6 @@ endif | |||
227 | endif | 195 | endif |
228 | endif | 196 | endif |
229 | 197 | ||
230 | include ../common/xorg_test.mk | ||
231 | ifeq ($(SUPPORT_BUILD_XORG),1) | 198 | ifeq ($(SUPPORT_BUILD_XORG),1) |
232 | SUPPORT_DRI_DRM := 1 | 199 | SUPPORT_DRI_DRM := 1 |
233 | endif | 200 | endif |
@@ -298,6 +265,7 @@ OPK_FALLBACK := libpvrPVR2D_DRIWSEGL.so | |||
298 | XORG_PVR_VIDEO ?= generic_drm | 265 | XORG_PVR_VIDEO ?= generic_drm |
299 | endif | 266 | endif |
300 | endif | 267 | endif |
268 | endif # KERNELDIR | ||
301 | 269 | ||
302 | include ../config/core.mk | 270 | include ../config/core.mk |
303 | include ../common/xorg.mk | 271 | include ../common/xorg.mk |
diff --git a/eurasia_km/eurasiacon/build/linux2/omap_linux/install_km.sh.m4 b/eurasia_km/eurasiacon/build/linux2/omap_linux/install_km.sh.m4 new file mode 100644 index 0000000..e676bce --- /dev/null +++ b/eurasia_km/eurasiacon/build/linux2/omap_linux/install_km.sh.m4 | |||
@@ -0,0 +1,21 @@ | |||
1 | ########################################################################### ### | ||
2 | ##@Title Target install script | ||
3 | ##@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
4 | ##@License Strictly Confidential. | ||
5 | ### ########################################################################### | ||
6 | |||
7 | STANDARD_HEADER | ||
8 | INTERPRETER | ||
9 | |||
10 | ## Set up variables. | ||
11 | ## | ||
12 | ifelse(SUPPORT_DRI_DRM,1,,[[ | ||
13 | DISPLAY_CONTROLLER(DISPLAY_KERNEL_MODULE) | ||
14 | ]]) | ||
15 | |||
16 | BUFFER_CLASS_DEVICE(bc_example) | ||
17 | |||
18 | |||
19 | ## Configure how to create install_km.sh | ||
20 | ## | ||
21 | STANDARD_KERNEL_MODULES | ||
diff --git a/eurasia_km/eurasiacon/build/linux2/pvrversion.mk b/eurasia_km/eurasiacon/build/linux2/pvrversion.mk new file mode 100644 index 0000000..41eb0d0 --- /dev/null +++ b/eurasia_km/eurasiacon/build/linux2/pvrversion.mk | |||
@@ -0,0 +1,17 @@ | |||
1 | ########################################################################### ### | ||
2 | #@Title Extract info from pvrversion.h | ||
3 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
4 | #@License Strictly Confidential. | ||
5 | ### ########################################################################### | ||
6 | |||
7 | # Version information | ||
8 | PVRVERSION_H := $(TOP)/include4/pvrversion.h | ||
9 | |||
10 | # scripts.mk uses these to set the install script's version suffix | ||
11 | PVRVERSION_MAJ := $(shell perl -ne '/\sPVRVERSION_MAJ\s+(\w+)/ and print $$1' $(PVRVERSION_H)) | ||
12 | PVRVERSION_MIN := $(shell perl -ne '/\sPVRVERSION_MIN\s+(\w+)/ and print $$1' $(PVRVERSION_H)) | ||
13 | PVRVERSION_FAMILY := $(shell perl -ne '/\sPVRVERSION_FAMILY\s+"(\S+)"/ and print $$1' $(PVRVERSION_H)) | ||
14 | PVRVERSION_BRANCHNAME := $(shell perl -ne '/\sPVRVERSION_BRANCHNAME\s+"(\S+)"/ and print $$1' $(PVRVERSION_H)) | ||
15 | PVRVERSION_BUILD := $(shell perl -ne '/\sPVRVERSION_BUILD\s+(\w+)/ and print $$1' $(PVRVERSION_H)) | ||
16 | |||
17 | PVRVERSION := "${PVRVERSION_FAMILY}_${PVRVERSION_BRANCHNAME}\@${PVRVERSION_BUILD}" | ||
diff --git a/eurasia_km/eurasiacon/build/linux2/scripts.mk b/eurasia_km/eurasiacon/build/linux2/scripts.mk new file mode 100644 index 0000000..0225221 --- /dev/null +++ b/eurasia_km/eurasiacon/build/linux2/scripts.mk | |||
@@ -0,0 +1,193 @@ | |||
1 | ########################################################################### ### | ||
2 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
3 | #@License Strictly Confidential. | ||
4 | ### ########################################################################### | ||
5 | |||
6 | define if-component | ||
7 | ifneq ($$(filter $(1),$$(COMPONENTS)),) | ||
8 | M4DEFS += $(2) | ||
9 | endif | ||
10 | endef | ||
11 | |||
12 | # common.m4 lives here | ||
13 | # | ||
14 | M4FLAGS := -I$(MAKE_TOP)/scripts | ||
15 | |||
16 | # The driver version is required to rename libraries | ||
17 | # | ||
18 | include $(MAKE_TOP)/pvrversion.mk | ||
19 | |||
20 | # These defs are either obsolete features, or not derived from | ||
21 | # user variables | ||
22 | # | ||
23 | M4DEFS := \ | ||
24 | -DKM_SUFFIX=ko \ | ||
25 | -DLIB_SUFFIX=so \ | ||
26 | -DSUPPORT_SRVINIT=1 \ | ||
27 | -DKERNEL_ID=$(KERNEL_ID) \ | ||
28 | -DPVRVERSION="$(PVRVERSION)" \ | ||
29 | -DSOLIB_VERSION=$(PVRVERSION_MAJ).$(PVRVERSION_MIN).$(PVRVERSION_BUILD) \ | ||
30 | -DSHLIB_DESTDIR=$(SHLIB_DESTDIR) \ | ||
31 | -DDEMO_DESTDIR=$(DEMO_DESTDIR) \ | ||
32 | -DHEADER_DESTDIR=$(HEADER_DESTDIR) \ | ||
33 | -DEGL_DESTDIR=$(EGL_DESTDIR) \ | ||
34 | -DSUPPORT_UNITTESTS=1 | ||
35 | |||
36 | # Map COMPONENTS on to SUPPORT_ defs | ||
37 | # | ||
38 | $(eval $(call if-component,opengles1,\ | ||
39 | -DSUPPORT_OPENGLES1=1 -DOGLES1_MODULE=$(opengles1_target) \ | ||
40 | -DSUPPORT_OPENGLES1_V1_ONLY=0)) | ||
41 | $(eval $(call if-component,opengles2,\ | ||
42 | -DSUPPORT_OPENGLES2=1 -DOGLES2_MODULE=$(opengles2_target))) | ||
43 | $(eval $(call if-component,egl,\ | ||
44 | -DSUPPORT_LIBEGL=1 -DEGL_MODULE=$(egl_target))) | ||
45 | $(eval $(call if-component,pvr2d,\ | ||
46 | -DSUPPORT_LIBPVR2D=1)) | ||
47 | $(eval $(call if-component,glslcompiler,\ | ||
48 | -DSUPPORT_SOURCE_SHADER=1)) | ||
49 | $(eval $(call if-component,opencl,\ | ||
50 | -DSUPPORT_OPENCL=1)) | ||
51 | $(eval $(call if-component,rscompute,\ | ||
52 | -DSUPPORT_RSCOMPUTE=1)) | ||
53 | $(eval $(call if-component,opengl_mesa,\ | ||
54 | -DSUPPORT_OPENGL=1)) | ||
55 | $(eval $(call if-component,opengl,\ | ||
56 | -DSUPPORT_OPENGL_NULLWS=1)) | ||
57 | $(eval $(call if-component,null_pvr2d_flip,\ | ||
58 | -DSUPPORT_NULL_PVR2D_FLIP=1)) | ||
59 | $(eval $(call if-component,null_pvr2d_blit,\ | ||
60 | -DSUPPORT_NULL_PVR2D_BLIT=1)) | ||
61 | $(eval $(call if-component,null_pvr2d_front,\ | ||
62 | -DSUPPORT_NULL_PVR2D_FRONT=1)) | ||
63 | $(eval $(call if-component,null_pvr2d_remote,\ | ||
64 | -DSUPPORT_NULL_PVR2D_REMOTE=1)) | ||
65 | $(eval $(call if-component,null_pvr2d_linuxfb,\ | ||
66 | -DSUPPORT_NULL_PVR2D_LINUXFB=1)) | ||
67 | $(eval $(call if-component,null_drm_ws,\ | ||
68 | -DSUPPORT_NULL_DRM_WS=1)) | ||
69 | $(eval $(call if-component,ews_ws,\ | ||
70 | -DSUPPORT_EWS=1)) | ||
71 | $(eval $(call if-component,ews_ws_remote,\ | ||
72 | -DSUPPORT_EWS_REMOTE=1)) | ||
73 | $(eval $(call if-component,pdump,\ | ||
74 | -DPDUMP=1)) | ||
75 | $(eval $(call if-component,imgtcl,\ | ||
76 | -DSUPPORT_IMGTCL=1)) | ||
77 | $(eval $(call if-component,ews_wm,\ | ||
78 | -DSUPPORT_LUA=1)) | ||
79 | $(eval $(call if-component,xmultiegltest,\ | ||
80 | -DSUPPORT_XUNITTESTS=1)) | ||
81 | $(eval $(call if-component,pvr_conf,\ | ||
82 | -DSUPPORT_XORG_CONF=1)) | ||
83 | $(eval $(call if-component,graphicshal,\ | ||
84 | -DSUPPORT_GRAPHICS_HAL=1)) | ||
85 | $(eval $(call if-component,xorg,\ | ||
86 | -DSUPPORT_XORG=1 \ | ||
87 | -DXORG_DEST= \ | ||
88 | -DXORG_DIR=$(LWS_PREFIX) \ | ||
89 | -DPVR_DDX_DESTDIR=$(LWS_PREFIX)/lib/xorg/modules/drivers \ | ||
90 | -DPVR_DRI_DESTDIR=$(LWS_PREFIX)/lib/dri \ | ||
91 | -DPVR_DDX_INPUT_DESTDIR=$(LWS_PREFIX)/lib/xorg/modules/input \ | ||
92 | -DXORG_EXPLICIT_PVR_SERVICES_LOAD=$(XORG_EXPLICIT_PVR_SERVICES_LOAD) \ | ||
93 | -DPVR_DRI_CLIENT_MODULE=$(PVR_DRI_CLIENT_MODULE))) | ||
94 | |||
95 | # These defs are common to all driver builds, and inherited from config.mk | ||
96 | # | ||
97 | M4DEFS += \ | ||
98 | -DBUILD=$(BUILD) \ | ||
99 | -DPVR_BUILD_DIR=$(PVR_BUILD_DIR) \ | ||
100 | -DPVRSRV_MODNAME=$(PVRSRV_MODNAME) \ | ||
101 | -DDISPLAY_KERNEL_MODULE=$(DISPLAY_CONTROLLER) \ | ||
102 | -DPROFILE_COMMON=1 \ | ||
103 | -DFFGEN_UNIFLEX=1 \ | ||
104 | -DSUPPORT_SGX_HWPERF=$(SUPPORT_SGX_HWPERF) \ | ||
105 | |||
106 | # These are common to some builds, and inherited from config.mk | ||
107 | # | ||
108 | ifeq ($(SUPPORT_DRI_DRM),1) | ||
109 | M4DEFS += -DSUPPORT_DRI_DRM=1 -DSUPPORT_DRI_DRM_NOT_PCI=$(PVR_DRI_DRM_NOT_PCI) | ||
110 | ifeq ($(PVR_DRI_DRM_NOT_PCI),1) | ||
111 | M4DEFS += -DDRM_MODNAME=drm | ||
112 | endif | ||
113 | endif | ||
114 | |||
115 | ifeq ($(SUPPORT_ANDROID_PLATFORM),1) | ||
116 | M4DEFS += \ | ||
117 | -DSUPPORT_ANDROID_PLATFORM=$(SUPPORT_ANDROID_PLATFORM) \ | ||
118 | -DPVR_ANDROID_HAS_EGL_CFG=$(PVR_ANDROID_HAS_EGL_CFG) \ | ||
119 | -DGRALLOC_MODULE=gralloc.$(HAL_VARIANT).so \ | ||
120 | -DHWCOMPOSER_MODULE=hwcomposer.$(HAL_VARIANT).so \ | ||
121 | -DCAMERA_MODULE=camera.$(HAL_VARIANT).so \ | ||
122 | -DSENSORS_MODULE=sensors.$(HAL_VARIANT).so \ | ||
123 | -DMEMTRACK_MODULE=memtrack.$(HAL_VARIANT).so | ||
124 | endif | ||
125 | |||
126 | ifeq ($(PVR_REMOTE),1) | ||
127 | M4DEFS += -DPVR_REMOTE=1 | ||
128 | endif | ||
129 | |||
130 | ifneq ($(wildcard $(MAKE_TOP)/$(PVR_BUILD_DIR)/install.sh.m4),) | ||
131 | # Build using old scheme where M4 built entire install.sh | ||
132 | |||
133 | $(TARGET_OUT)/install.sh: \ | ||
134 | $(PVRVERSION_H) $(CONFIG_MK) $(CONFIG_KERNEL_MK) \ | ||
135 | $(MAKE_TOP)/scripts/install.sh.m4 \ | ||
136 | $(MAKE_TOP)/$(PVR_BUILD_DIR)/install.sh.m4 \ | ||
137 | | $(TARGET_OUT) | ||
138 | $(if $(V),,@echo " GEN " $(call relative-to-top,$@)) | ||
139 | $(M4) $(M4FLAGS) $(M4DEFS) \ | ||
140 | $(MAKE_TOP)/scripts/install.sh.m4 \ | ||
141 | $(MAKE_TOP)/$(PVR_BUILD_DIR)/install.sh.m4 > $@ | ||
142 | $(CHMOD) +x $@ | ||
143 | install_script: $(TARGET_OUT)/install.sh | ||
144 | install_script_km: | ||
145 | else | ||
146 | # Build using new scheme where M4 just builds KM/UM specific portions of the script. | ||
147 | $(TARGET_OUT)/install.sh: $(PVRVERSION_H) $(MAKE_TOP)/scripts/install.sh.tpl | ||
148 | $(if $(V),,@echo " GEN (from tpl) " $(call relative-to-top,$@)) | ||
149 | @sed 's/\[PVRVERSION\]/$(PVRVERSION)/g' $(MAKE_TOP)/scripts/install.sh.tpl > $@ | ||
150 | $(CHMOD) +x $@ | ||
151 | install_script: $(TARGET_OUT)/install.sh | ||
152 | install_script_km: $(TARGET_OUT)/install.sh | ||
153 | |||
154 | ifneq ($(wildcard $(MAKE_TOP)/$(PVR_BUILD_DIR)/install_km.sh.m4),) | ||
155 | # Need to install KM files | ||
156 | $(TARGET_OUT)/install_km.sh: $(PVRVERSION_H) $(CONFIG_KERNEL_MK) \ | ||
157 | $(MAKE_TOP)/scripts/common.m4 \ | ||
158 | $(MAKE_TOP)/$(PVR_BUILD_DIR)/install_km.sh.m4 \ | ||
159 | | $(TARGET_OUT) | ||
160 | $(if $(V),,@echo " GEN " $(call relative-to-top,$@)) | ||
161 | $(M4) $(M4FLAGS) $(M4DEFS) \ | ||
162 | $(MAKE_TOP)/scripts/common.m4 \ | ||
163 | $(MAKE_TOP)/$(PVR_BUILD_DIR)/install_km.sh.m4 > $@ | ||
164 | |||
165 | install_script_km: $(TARGET_OUT)/install_km.sh | ||
166 | endif | ||
167 | |||
168 | ifneq ($(wildcard $(MAKE_TOP)/$(PVR_BUILD_DIR)/install_um.sh.m4),) | ||
169 | # Need to install UM files | ||
170 | $(TARGET_OUT)/install_um.sh: $(PVRVERSION_H) $(CONFIG_MK)\ | ||
171 | $(MAKE_TOP)/scripts/common.m4 \ | ||
172 | $(MAKE_TOP)/$(PVR_BUILD_DIR)/install_um.sh.m4 \ | ||
173 | | $(TARGET_OUT) | ||
174 | $(if $(V),,@echo " GEN " $(call relative-to-top,$@)) | ||
175 | $(M4) $(M4FLAGS) $(M4DEFS) \ | ||
176 | $(MAKE_TOP)/scripts/common.m4 \ | ||
177 | $(MAKE_TOP)/$(PVR_BUILD_DIR)/install_um.sh.m4 > $@ | ||
178 | |||
179 | install_script: $(TARGET_OUT)/install_um.sh | ||
180 | endif | ||
181 | |||
182 | endif | ||
183 | |||
184 | $(TARGET_OUT)/rc.pvr: \ | ||
185 | $(PVRVERSION_H) $(CONFIG_MK) $(CONFIG_KERNEL_MK) \ | ||
186 | $(MAKE_TOP)/scripts/rc.pvr.m4 $(MAKE_TOP)/$(PVR_BUILD_DIR)/rc.pvr.m4 \ | ||
187 | | $(TARGET_OUT) | ||
188 | $(if $(V),,@echo " GEN " $(call relative-to-top,$@)) | ||
189 | $(M4) $(M4FLAGS) $(M4DEFS) $(MAKE_TOP)/scripts/rc.pvr.m4 \ | ||
190 | $(MAKE_TOP)/$(PVR_BUILD_DIR)/rc.pvr.m4 > $@ | ||
191 | $(CHMOD) +x $@ | ||
192 | |||
193 | init_script: $(TARGET_OUT)/rc.pvr | ||
diff --git a/eurasia_km/eurasiacon/build/linux2/scripts/common.m4 b/eurasia_km/eurasiacon/build/linux2/scripts/common.m4 new file mode 100644 index 0000000..e6c17b1 --- /dev/null +++ b/eurasia_km/eurasiacon/build/linux2/scripts/common.m4 | |||
@@ -0,0 +1,797 @@ | |||
1 | divert(-1) | ||
2 | ########################################################################### ### | ||
3 | ##@Title Target common m4 macros. | ||
4 | ##@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
5 | ##@License Strictly Confidential. | ||
6 | ### ########################################################################### | ||
7 | |||
8 | # Define how we quote things. | ||
9 | # | ||
10 | changequote([[, ]]) | ||
11 | |||
12 | # Define how we comment things. We don't define a comment end delimiter here so | ||
13 | # the end-of-line serves that function. Why change the comment starter? We do | ||
14 | # this so we that we can have macro replacement in text intended as comments in | ||
15 | # the output stream. The default starter is '#'; "dnl" is also usuable. Note | ||
16 | # that the way we've set up the diversion discipline means that only comments | ||
17 | # inside pushdivert...popdivert pairs will be copied anyway. | ||
18 | # | ||
19 | changecom([[##]]) | ||
20 | |||
21 | #! Some macros to handle diversions conviently. | ||
22 | #! | ||
23 | define([[_current_divert]], [[-1]]) | ||
24 | define([[pushdivert]], [[pushdef([[_current_divert]],$1)divert($1)]]) | ||
25 | define([[popdivert]], [[popdef([[_current_divert]])divert(_current_divert)]]) | ||
26 | define([[pushmain]], [[pushdivert(100)]]) | ||
27 | |||
28 | ## Diversion discipline | ||
29 | ## | ||
30 | ## 0 standard-output stream - DO NOT USE | ||
31 | ## 1 shell script interpreter directive | ||
32 | ## 2 copyright | ||
33 | ## 3 version trace | ||
34 | ## 4-49 for use only by common.m4 | ||
35 | ## 50-99 for use by other macro bodies (rc.pvr.m4, install.sh.m4 etc.) | ||
36 | ## 100 main output body of script. | ||
37 | ## 200 macro bodies's trailers | ||
38 | ## 201 common.m4's trailers | ||
39 | ## | ||
40 | |||
41 | ############################################################################### | ||
42 | ## | ||
43 | ## Diversion #1 - Copy in the interpreter line | ||
44 | ## | ||
45 | ############################################################################### | ||
46 | define([[INTERPRETER]], [[pushdivert(1)dnl | ||
47 | #!/bin/sh | ||
48 | popdivert]]) | ||
49 | |||
50 | |||
51 | ############################################################################### | ||
52 | ## | ||
53 | ## Diversion #2 - Copy in the copyright text. | ||
54 | ## NOTE: The following license applies to the generated files, not this file. | ||
55 | ############################################################################### | ||
56 | pushdivert(2)dnl | ||
57 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
58 | #@License MIT | ||
59 | # The contents of this file are subject to the MIT license as set out below. | ||
60 | # | ||
61 | # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
62 | # of this software and associated documentation files (the "Software"), to deal | ||
63 | # in the Software without restriction, including without limitation the rights | ||
64 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
65 | # copies of the Software, and to permit persons to whom the Software is | ||
66 | # furnished to do so, subject to the following conditions: | ||
67 | # | ||
68 | # The above copyright notice and this permission notice shall be included in | ||
69 | # all copies or substantial portions of the Software. | ||
70 | # | ||
71 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
72 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
73 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
74 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
75 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
76 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
77 | # THE SOFTWARE. | ||
78 | |||
79 | popdivert | ||
80 | |||
81 | |||
82 | ############################################################################### | ||
83 | ## | ||
84 | ## Some defines for useful constants | ||
85 | ## | ||
86 | ############################################################################### | ||
87 | define([[TRUE]], [[1]]) | ||
88 | define([[FALSE]], [[0]]) | ||
89 | |||
90 | |||
91 | ############################################################################### | ||
92 | ## | ||
93 | ## Some defines for where things go. | ||
94 | ## | ||
95 | ############################################################################### | ||
96 | define([[RC_DESTDIR]], [[/etc/init.d]]) | ||
97 | define([[MOD_ROOTDIR]], [[/lib/modules/KERNEL_ID]]) | ||
98 | define([[MOD_DESTDIR]], [[MOD_ROOTDIR/extra]]) | ||
99 | define([[MODULES_DEP]], [[${DISCIMAGE}MOD_ROOTDIR/modules.dep]]) | ||
100 | define([[MODULES_TMP]], [[/tmp/modules.$$.tmp]]) | ||
101 | define([[MODULES_CONF]], [[${DISCIMAGE}/etc/modules.conf]]) | ||
102 | define([[MODPROBE_CONF]], [[${DISCIMAGE}/etc/modprobe.conf]]) | ||
103 | define([[LIBMODPROBE_CONF]], [[${DISCIMAGE}/lib/modules/modprobe.conf]]) | ||
104 | define([[PATH_DEPMOD]], [[/sbin/depmod]]) | ||
105 | define([[PATH_MODPROBE]], [[/sbin/modprobe]]) | ||
106 | define([[APK_DESTDIR]], [[/data/app]]) | ||
107 | define([[HAL_DESTDIR]], [[SHLIB_DESTDIR/hw]]) | ||
108 | |||
109 | ############################################################################### | ||
110 | ## | ||
111 | ## Diversion #3 - start of the versioning trace information. | ||
112 | ## | ||
113 | ############################################################################### | ||
114 | pushdivert(3)dnl | ||
115 | [[#]] Auto-generated for PVR_BUILD_DIR from ifelse(BUILD,release, build: PVRVERSION) | ||
116 | popdivert | ||
117 | |||
118 | |||
119 | ############################################################################### | ||
120 | ## | ||
121 | ## Diversion #4 - end of versioning trace information. | ||
122 | ## Leave a comment line and a blank line for output tidiness. | ||
123 | ## | ||
124 | ############################################################################### | ||
125 | pushdivert(4)dnl | ||
126 | # | ||
127 | |||
128 | popdivert | ||
129 | |||
130 | |||
131 | ## The following two commented line are templates for creating 'variables' which | ||
132 | ## operate thus: | ||
133 | ## | ||
134 | ## A(5) -> A=5 | ||
135 | ## A -> outputs A | ||
136 | ## CAT_A(N) -> A=A,N | ||
137 | ## | ||
138 | ## define([[A]], [[ifelse($#, 0, _A, [[define([[_A]], $1)]])]])dnl | ||
139 | ## define([[CAT_A]], [[define([[_A]], ifelse(defn([[_A]]),,$1,[[defn([[_A]])[[,$1]]]]))]]) | ||
140 | |||
141 | |||
142 | ############################################################################### | ||
143 | ## | ||
144 | ## TARGET_HAS_DEPMOD - | ||
145 | ## Indicates that the target has a depmod binary available. This means we | ||
146 | ## don't have to update modules.dep manually - unpleasant. | ||
147 | ## | ||
148 | ############################################################################### | ||
149 | define([[TARGET_HAS_DEPMOD]], [[ifelse($#, 0, _$0, [[define([[_$0]], $1)]])]]) | ||
150 | |||
151 | |||
152 | ############################################################################### | ||
153 | ## | ||
154 | ## TARGET_RUNS_DEPMOD_AT_BOOT | ||
155 | ## Indicates that the target runs depmod every boot time. This means we don't | ||
156 | ## have to run it ourselves. | ||
157 | ## | ||
158 | ############################################################################### | ||
159 | define([[TARGET_RUNS_DEPMOD_AT_BOOT]], [[ifelse($#, 0, _$0, [[define([[_$0]], $1)]])]]) | ||
160 | |||
161 | define([[DISPLAY_CONTROLLER]], [[define([[_DISPLAY_CONTROLLER_]], $1), | ||
162 | define([[_DISPLAY_CONTROLLER_FAILED_]], $1_failed)]]) | ||
163 | |||
164 | define([[BUFFER_CLASS_DEVICE]], [[define([[_BUFFER_CLASS_DEVICE_]], $1), | ||
165 | define([[_BUFFER_CLASS_DEVICE_FAILED_]], $1_failed)]]) | ||
166 | |||
167 | |||
168 | |||
169 | ############################################################################### | ||
170 | ## | ||
171 | ## INSTALL_KERNEL_MODULE - | ||
172 | ## install a kernel loadable module in the correct place in the file system, | ||
173 | ## updating the module dependencies file(s) if necessary. | ||
174 | ## | ||
175 | ## Parameters: | ||
176 | ## $1 - name of kernel module file without leading path components | ||
177 | ## $2 - name of any other kernel module upon which $1 is dependent. | ||
178 | ## | ||
179 | ############################################################################### | ||
180 | define([[INSTALL_KERNEL_MODULE]], [[pushdivert(52)dnl | ||
181 | install_file $1 MOD_DESTDIR/$1 "kernel module" 0644 0:0 | ||
182 | ifelse(TARGET_RUNS_DEPMOD_AT_BOOT,TRUE,,TARGET_HAS_DEPMOD,FALSE,[[dnl | ||
183 | FIXUP_MODULES_DEP($1, $2)dnl | ||
184 | ]],[[dnl | ||
185 | if [ "$host" = 1 ]; then | ||
186 | FIXUP_MODULES_DEP($1, $2)dnl | ||
187 | fi | ||
188 | ]])dnl | ||
189 | popdivert()]]) | ||
190 | |||
191 | |||
192 | ############################################################################### | ||
193 | ## | ||
194 | ## FIXUP_MODULES_DEP - | ||
195 | ## Fix up the modules dependency file. | ||
196 | ## | ||
197 | ## Parameters: | ||
198 | ## $1 - name of kernel module file without leading path components | ||
199 | ## $2 - name of any other kernel module upon which $1 is dependent. | ||
200 | ## | ||
201 | ############################################################################### | ||
202 | define([[FIXUP_MODULES_DEP]], [[pushdivert(52)dnl | ||
203 | grep -v -e "extra/$1" MODULES_DEP >MODULES_TMP | ||
204 | ifelse([[$2]], [[]],dnl | ||
205 | echo "MOD_DESTDIR/$1:" >>MODULES_TMP, | ||
206 | echo "MOD_DESTDIR/$1: MOD_DESTDIR/$2" >>MODULES_TMP) | ||
207 | cp MODULES_TMP MODULES_DEP | ||
208 | popdivert()]]) | ||
209 | |||
210 | |||
211 | ############################################################################### | ||
212 | ## | ||
213 | ## INSTALL_SHARED_LIBRARY - | ||
214 | ## Install a shared library (in /usr/lib) with the correct version number and | ||
215 | ## links. | ||
216 | ## | ||
217 | ## Parameters: | ||
218 | ## $1 - name of shared library to install | ||
219 | ## $2 - optional version suffix. | ||
220 | ## | ||
221 | ############################################################################### | ||
222 | define([[INSTALL_SHARED_LIBRARY]], [[pushdivert(52)dnl | ||
223 | ifelse($2,,install_file $1 SHLIB_DESTDIR/$1 "shared library" 0644 0:0,install_file $1 SHLIB_DESTDIR/$1.$2 "shared library" 0644 0:0 | ||
224 | install_link $1.$2 SHLIB_DESTDIR/$1) | ||
225 | popdivert()]]) | ||
226 | |||
227 | |||
228 | ############################################################################### | ||
229 | ## | ||
230 | ## INSTALL_SHARED_LIBRARY_DESTDIR - | ||
231 | ## Install a shared library in a non-standard library directory, with the | ||
232 | ## correct version number and links. | ||
233 | ## | ||
234 | ## Parameters: | ||
235 | ## $1 - name of shared library to install | ||
236 | ## $2 - optional version suffix | ||
237 | ## $3 - name of a subdirectory to install to | ||
238 | ## | ||
239 | ############################################################################### | ||
240 | define([[INSTALL_SHARED_LIBRARY_DESTDIR]], [[pushdivert(52)dnl | ||
241 | ifelse($2,,install_file $1 $3/$1 "shared library" 0644 0:0,install_file $1 $3/$1.$2 "shared library" 0644 0:0 | ||
242 | install_link $1.$2 $3/$1) | ||
243 | popdivert()]]) | ||
244 | |||
245 | |||
246 | ############################################################################### | ||
247 | ## | ||
248 | ## INSTALL_BINARY - | ||
249 | ## Install a binary file. These always go in /usr/local/bin presently. | ||
250 | ## | ||
251 | ## Parameters: | ||
252 | ## $1 - name of file in local directory which is to be copied to /usr/local/bin | ||
253 | ## | ||
254 | ############################################################################### | ||
255 | define([[INSTALL_BINARY]], [[pushdivert(52)dnl | ||
256 | install_file $1 DEMO_DESTDIR/$1 "binary" 0755 0:0 | ||
257 | popdivert()]]) | ||
258 | |||
259 | ############################################################################### | ||
260 | ## | ||
261 | ## INSTALL_APK - | ||
262 | ## Install an .apk file. These are only installed on Android. | ||
263 | ## | ||
264 | ## Parameters: | ||
265 | ## $1 - name of file in local directory which is to be copied to /data/app | ||
266 | ## | ||
267 | ############################################################################### | ||
268 | define([[INSTALL_APK]], [[pushdivert(52)dnl | ||
269 | install_file $1.apk APK_DESTDIR/$1.apk "binary" 0644 1000:1000 | ||
270 | popdivert()]]) | ||
271 | |||
272 | ############################################################################### | ||
273 | ## | ||
274 | ## INSTALL_SHADER - | ||
275 | ## Install a binary file. These always go in /usr/local/bin presently. | ||
276 | ## | ||
277 | ## Parameters: | ||
278 | ## $1 - name of file in local directory which is to be copied to /usr/local/bin | ||
279 | ## | ||
280 | ############################################################################### | ||
281 | define([[INSTALL_SHADER]], [[pushdivert(52)dnl | ||
282 | install_file $1 DEMO_DESTDIR/$1 "shader" 0644 0:0 | ||
283 | popdivert()]]) | ||
284 | |||
285 | |||
286 | ############################################################################### | ||
287 | ## | ||
288 | ## INSTALL_INITRC - | ||
289 | ## Install a run-time configuration file. This goes in /etc/init.d unless | ||
290 | ## RC_DESTDIR has been updated. | ||
291 | ## | ||
292 | ## No parameters. | ||
293 | ## | ||
294 | ############################################################################### | ||
295 | define([[INSTALL_INITRC]], [[pushdivert(52)dnl | ||
296 | install_file $1 RC_DESTDIR/$1 "boot script" 0755 0:0 | ||
297 | popdivert()]]) | ||
298 | |||
299 | ############################################################################### | ||
300 | ## | ||
301 | ## INSTALL_HEADER - | ||
302 | ## Install a header. These go in HEADER_DESTDIR, which is normally | ||
303 | ## /usr/include. | ||
304 | ## | ||
305 | ## Parameters: | ||
306 | ## $1 - name of header to install | ||
307 | ## $2 - subdirectory of /usr/include to install it to | ||
308 | ## | ||
309 | ############################################################################### | ||
310 | define([[INSTALL_HEADER]], [[pushdivert(52)dnl | ||
311 | install_file $1 HEADER_DESTDIR/$2/$1 "header" 0644 0:0 | ||
312 | popdivert()]]) | ||
313 | |||
314 | ############################################################################### | ||
315 | ## | ||
316 | ## Some defines for general expansion | ||
317 | ## | ||
318 | ## No parameters. | ||
319 | ## | ||
320 | ############################################################################### | ||
321 | define([[SHARED_LIBRARY]], [[INSTALL_SHARED_LIBRARY($1,$2)]]) | ||
322 | define([[SHARED_LIBRARY_DESTDIR]], [[INSTALL_SHARED_LIBRARY_DESTDIR($1, $2, $3)]]) | ||
323 | define([[APK]], [[INSTALL_APK($1)]]) | ||
324 | define([[UNITTEST]], [[INSTALL_BINARY($1)]]) | ||
325 | define([[EXECUTABLE]], [[INSTALL_BINARY($1)]]) | ||
326 | define([[GLES1UNITTEST]], [[INSTALL_BINARY($1)]]) | ||
327 | define([[GLES2UNITTEST]], [[INSTALL_BINARY($1)]]) | ||
328 | define([[GLES2UNITTEST_SHADER]], [[INSTALL_SHADER($1)]]) | ||
329 | define([[GLUNITTEST_SHADER]], [[INSTALL_SHADER($1)]]) | ||
330 | define([[HEADER]], [[INSTALL_HEADER($1, $2)]]) | ||
331 | define([[KERNEL_MODULE]], [[INSTALL_KERNEL_MODULE($1, $2)]]) | ||
332 | # FIXME:Services 4.0: | ||
333 | # These should be installed somewhere else | ||
334 | define([[INITBINARY]], [[INSTALL_BINARY($1)]]) | ||
335 | |||
336 | |||
337 | ############################################################################### | ||
338 | ## | ||
339 | ## STANDARD_SCRIPTS - | ||
340 | ## Install all standard script parts of a DDK distribution. | ||
341 | ## | ||
342 | ## No parameters. | ||
343 | ## | ||
344 | ############################################################################### | ||
345 | define([[STANDARD_SCRIPTS]], [[pushdivert(52)dnl | ||
346 | # Install the standard scripts | ||
347 | # | ||
348 | INSTALL_INITRC(rc.pvr)dnl | ||
349 | |||
350 | popdivert()]]) | ||
351 | |||
352 | |||
353 | ############################################################################### | ||
354 | ## | ||
355 | ## STANDARD_LIBRARIES | ||
356 | ## Install all standard parts of a DDK distribution. | ||
357 | ## | ||
358 | ## No parameters. | ||
359 | ## | ||
360 | ############################################################################### | ||
361 | define([[STANDARD_LIBRARIES]], [[pushdivert(52)dnl | ||
362 | # Install the standard libraries | ||
363 | # | ||
364 | ifelse(SUPPORT_OPENGLES1_V1_ONLY,0, | ||
365 | ifelse(SUPPORT_OPENGLES1,1, [[SHARED_LIBRARY_DESTDIR([[OGLES1_MODULE]],[[SOLIB_VERSION]],[[EGL_DESTDIR]])]]))dnl | ||
366 | |||
367 | ifelse(SUPPORT_OPENGLES1_V1,1,[[SHARED_LIBRARY_DESTDIR([[OGLES1_V1_MODULE]],[[SOLIB_VERSION]],[[EGL_DESTDIR]])]])dnl | ||
368 | ifelse(SUPPORT_OPENGLES1_V1_ONLY,1,[[SHARED_LIBRARY_DESTDIR([[OGLES1_MODULE]],[[SOLIB_VERSION]],[[EGL_DESTDIR]])]])dnl | ||
369 | |||
370 | ifelse(FFGEN_UNIFLEX,1,[[SHARED_LIBRARY([[libusc.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
371 | |||
372 | ifelse(SUPPORT_OPENGLES2,1,[[SHARED_LIBRARY_DESTDIR([[OGLES2_MODULE]],[[SOLIB_VERSION]],[[EGL_DESTDIR]])]])dnl | ||
373 | |||
374 | ifelse(SUPPORT_OPENGLES2,1, | ||
375 | ifelse(SUPPORT_SOURCE_SHADER,1,[[SHARED_LIBRARY([[libglslcompiler.LIB_SUFFIX]],[[SOLIB_VERSION]])]]))dnl | ||
376 | |||
377 | ifelse(SUPPORT_OPENCL,1,[[SHARED_LIBRARY([[libPVROCL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
378 | ifelse(SUPPORT_OPENCL,1,[[SHARED_LIBRARY([[liboclcompiler.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
379 | ifelse(SUPPORT_OPENCL,1, | ||
380 | ifelse(SUPPORT_ANDROID_PLATFORM,1,[[SHARED_LIBRARY([[libocl1test1.so]],[[SOLIB_VERSION]])]]))dnl | ||
381 | |||
382 | ifelse(SUPPORT_RSCOMPUTE,1,[[SHARED_LIBRARY([[libPVRRS.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
383 | ifelse(SUPPORT_RSCOMPUTE,1,[[SHARED_LIBRARY([[librsccompiler.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
384 | ifelse(SUPPORT_RSCOMPUTE,1,[[SHARED_LIBRARY([[librsccore.bc]],[[SOLIB_VERSION]])]])dnl | ||
385 | |||
386 | ifelse(PVR_REMOTE,1, | ||
387 | ifelse(SUPPORT_ANDROID_PLATFORM,1,[[SHARED_LIBRARY([[libvncserver.so]],[[SOLIB_VERSION]])]]))dnl | ||
388 | |||
389 | SHARED_LIBRARY([[libIMGegl.LIB_SUFFIX]],[[SOLIB_VERSION]])dnl | ||
390 | ifelse(SUPPORT_LIBEGL,1,[[SHARED_LIBRARY_DESTDIR([[EGL_MODULE]],[[SOLIB_VERSION]],[[EGL_DESTDIR]])]])dnl | ||
391 | ifelse(SUPPORT_LIBPVR2D,1,[[SHARED_LIBRARY([[libpvr2d.LIB_SUFFIX]],[[SOLIB_VERSION]])]], | ||
392 | [[SHARED_LIBRARY([[libnullws.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
393 | |||
394 | ifelse(SUPPORT_NULL_PVR2D_BLIT,1,[[SHARED_LIBRARY([[libpvrPVR2D_BLITWSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
395 | ifelse(SUPPORT_NULL_PVR2D_FLIP,1,[[SHARED_LIBRARY([[libpvrPVR2D_FLIPWSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
396 | ifelse(SUPPORT_NULL_PVR2D_FRONT,1,[[SHARED_LIBRARY([[libpvrPVR2D_FRONTWSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
397 | ifelse(SUPPORT_NULL_PVR2D_REMOTE,1,[[SHARED_LIBRARY([[libpvrPVR2D_REMWSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
398 | ifelse(SUPPORT_NULL_PVR2D_LINUXFB,1,[[SHARED_LIBRARY([[libpvrPVR2D_LINUXFBWSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
399 | ifelse(SUPPORT_NULL_DRM_WS,1,[[SHARED_LIBRARY([[libpvrDRMWSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
400 | |||
401 | ifelse(SUPPORT_EWS,1,[[SHARED_LIBRARY([[libpvrEWS_WSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
402 | ifelse(SUPPORT_EWS_REMOTE,1,[[SHARED_LIBRARY([[libpvrEWS_REMWSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
403 | ifelse(SUPPORT_DRI_DRM,1,[[SHARED_LIBRARY([[libpvrPVR2D_DRIWSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
404 | |||
405 | SHARED_LIBRARY([[libdbm.LIB_SUFFIX]],[[SOLIB_VERSION]])dnl | ||
406 | |||
407 | SHARED_LIBRARY([[libsrv_um.LIB_SUFFIX]],[[SOLIB_VERSION]])dnl | ||
408 | ifelse(SUPPORT_SRVINIT,1,[[SHARED_LIBRARY([[libsrv_init.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
409 | ifelse(SUPPORT_SGX_HWPERF,1,[[SHARED_LIBRARY([[libPVRScopeServices.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
410 | |||
411 | ifelse(SUPPORT_IMGTCL,1,[[SHARED_LIBRARY([[libimgtcl.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
412 | |||
413 | ifelse(SUPPORT_OPENGL,1,[[SHARED_LIBRARY([[libPVROGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
414 | ifelse(SUPPORT_XORG,1,,[[ | ||
415 | ifelse(SUPPORT_OPENGL,1, install_link libPVROGL.LIB_SUFFIX.SOLIB_VERSION SHLIB_DESTDIR/libGL.LIB_SUFFIX.1 | ||
416 | install_link libPVROGL.LIB_SUFFIX.SOLIB_VERSION SHLIB_DESTDIR/libGL.LIB_SUFFIX)]]) | ||
417 | |||
418 | ifelse(SUPPORT_MESA,1,[[SHARED_LIBRARY([[libpvr_dri_support.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
419 | |||
420 | ifelse(SUPPORT_GRAPHICS_HAL,1, | ||
421 | [[SHARED_LIBRARY_DESTDIR([[GRALLOC_MODULE]],[[SOLIB_VERSION]],[[HAL_DESTDIR]])]])dnl | ||
422 | ifelse(SUPPORT_GRAPHICS_HAL,1, | ||
423 | [[SHARED_LIBRARY_DESTDIR([[HWCOMPOSER_MODULE]],[[SOLIB_VERSION]],[[HAL_DESTDIR]])]])dnl | ||
424 | ifelse(SUPPORT_GRAPHICS_HAL,1, | ||
425 | [[SHARED_LIBRARY_DESTDIR([[CAMERA_MODULE]],[[SOLIB_VERSION]],[[HAL_DESTDIR]])]])dnl | ||
426 | ifelse(SUPPORT_GRAPHICS_HAL,1, | ||
427 | [[SHARED_LIBRARY_DESTDIR([[SENSORS_MODULE]],[[SOLIB_VERSION]],[[HAL_DESTDIR]])]])dnl | ||
428 | ifelse(SUPPORT_GRAPHICS_HAL,1, | ||
429 | [[SHARED_LIBRARY_DESTDIR([[MEMTRACK_MODULE]],[[SOLIB_VERSION]],[[HAL_DESTDIR]])]])dnl | ||
430 | ifelse(SUPPORT_GRAPHICS_HAL,1, | ||
431 | [[SHARED_LIBRARY([[libpvrANDROID_WSEGL.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
432 | |||
433 | ifelse(SUPPORT_GRAPHICS_HAL,1, | ||
434 | [[SHARED_LIBRARY([[libcreatesurface.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
435 | |||
436 | ifelse(SUPPORT_EWS,1,[[SHARED_LIBRARY([[libews.LIB_SUFFIX]],[[SOLIB_VERSION]])]])dnl | ||
437 | |||
438 | popdivert()]]) | ||
439 | |||
440 | |||
441 | |||
442 | ############################################################################### | ||
443 | ## | ||
444 | ## STANDARD_EXECUTABLES | ||
445 | ## Install all standard executables of a DDK distribution. | ||
446 | ## | ||
447 | ## No parameters. | ||
448 | ## | ||
449 | ############################################################################### | ||
450 | define([[STANDARD_EXECUTABLES]], [[pushdivert(52)dnl | ||
451 | # Install the standard executables | ||
452 | # | ||
453 | |||
454 | ifelse(SUPPORT_SRVINIT,1,[[INITBINARY(pvrsrvctl)]])dnl | ||
455 | ifelse(SUPPORT_SRVINIT,1,[[UNITTEST(sgx_init_test)]])dnl | ||
456 | |||
457 | ifelse(PVR_REMOTE,1,[[EXECUTABLE(pvrvncsrv)]])dnl | ||
458 | ifelse(PVR_REMOTE,1,[[EXECUTABLE(pvrvncinput)]])dnl | ||
459 | ifelse(PDUMP,1,[[UNITTEST(pdump)]])dnl | ||
460 | |||
461 | ifelse(SUPPORT_EWS,1,[[EXECUTABLE(ews_server)]])dnl | ||
462 | ifelse(SUPPORT_EWS,1, | ||
463 | ifelse(SUPPORT_OPENGLES2,1,[[EXECUTABLE(ews_server_es2)]]))dnl | ||
464 | ifelse(SUPPORT_EWS,1, | ||
465 | ifelse(SUPPORT_LUA,1,[[EXECUTABLE(ews_wm)]]))dnl | ||
466 | |||
467 | popdivert()]]) | ||
468 | |||
469 | ############################################################################### | ||
470 | ## | ||
471 | ## STANDARD_UNITTESTS | ||
472 | ## Install all standard unitests built as part of a DDK distribution. | ||
473 | ## | ||
474 | ## No parameters. | ||
475 | ## | ||
476 | ############################################################################### | ||
477 | define([[STANDARD_UNITTESTS]], [[pushdivert(52)dnl | ||
478 | # Install the standard unittests | ||
479 | # | ||
480 | |||
481 | ifelse(SUPPORT_ANDROID_PLATFORM,1,[[ | ||
482 | if [ ! -d ${DISCIMAGE}/data ]; then | ||
483 | mkdir ${DISCIMAGE}/data | ||
484 | chown 1000:1000 ${DISCIMAGE}/data | ||
485 | chmod 0771 ${DISCIMAGE}/data | ||
486 | fi | ||
487 | |||
488 | if [ ! -d ${DISCIMAGE}/data/app ]; then | ||
489 | mkdir ${DISCIMAGE}/data/app | ||
490 | chown 1000:1000 ${DISCIMAGE}/data/app | ||
491 | chmod 0771 ${DISCIMAGE}/data/app | ||
492 | fi | ||
493 | ]])dnl | ||
494 | |||
495 | UNITTEST(services_test)dnl | ||
496 | UNITTEST(sgx_blit_test)dnl | ||
497 | UNITTEST(sgx_clipblit_test)dnl | ||
498 | UNITTEST(sgx_flip_test)dnl | ||
499 | UNITTEST(sgx_render_flip_test)dnl | ||
500 | UNITTEST(pvr2d_test)dnl | ||
501 | |||
502 | ifelse(SUPPORT_ANDROID_PLATFORM,1,[[ | ||
503 | UNITTEST(testwrap)dnl | ||
504 | ifelse(SUPPORT_OPENGLES1,1,[[ | ||
505 | APK(gles1test1)dnl | ||
506 | APK(gles1_texture_stream)dnl | ||
507 | ]])dnl | ||
508 | ifelse(SUPPORT_OPENGLES2,1,[[ | ||
509 | APK(gles2test1)dnl | ||
510 | APK(gles2_texture_stream)dnl | ||
511 | ]])dnl | ||
512 | ifelse(SUPPORT_OPENCL,1,[[ | ||
513 | APK(ocl1test1)dnl | ||
514 | ]])dnl | ||
515 | APK(eglinfo)dnl | ||
516 | APK(launcher)dnl | ||
517 | ifelse(SUPPORT_RSCOMPUTE,1,[[ | ||
518 | UNITTEST(rsc_unit_test)dnl | ||
519 | UNITTEST(rsc_unit_test2)dnl | ||
520 | UNITTEST(rsc_runtime_test)dnl | ||
521 | UNITTEST(rsc_runtime_test2)dnl | ||
522 | ]])dnl | ||
523 | ]],[[ | ||
524 | ifelse(SUPPORT_OPENGLES1,1,[[ | ||
525 | GLES1UNITTEST(gles1test1)dnl | ||
526 | GLES1UNITTEST(gles1_texture_stream)dnl | ||
527 | ]])dnl | ||
528 | ifelse(SUPPORT_OPENGLES2,1,[[ | ||
529 | GLES2UNITTEST(gles2test1)dnl | ||
530 | GLES2UNITTEST_SHADER(glsltest1_vertshader.txt)dnl | ||
531 | GLES2UNITTEST_SHADER(glsltest1_fragshaderA.txt)dnl | ||
532 | GLES2UNITTEST_SHADER(glsltest1_fragshaderB.txt)dnl | ||
533 | GLES2UNITTEST(gles2_texture_stream)dnl | ||
534 | ]])dnl | ||
535 | ifelse(SUPPORT_OPENGL,1,[[ | ||
536 | UNITTEST(gltest1)dnl | ||
537 | UNITTEST(gltest2)dnl | ||
538 | GLUNITTEST_SHADER(gltest2_vertshader.txt)dnl | ||
539 | GLUNITTEST_SHADER(gltest2_fragshaderA.txt)dnl | ||
540 | GLUNITTEST_SHADER(gltest2_fragshaderB.txt)dnl | ||
541 | ]])dnl | ||
542 | UNITTEST(eglinfo)dnl | ||
543 | ifelse(SUPPORT_OPENCL,1,[[ | ||
544 | UNITTEST(ocl_unit_test)dnl | ||
545 | UNITTEST(ocl_filter_test)dnl | ||
546 | ]])dnl | ||
547 | ]])dnl | ||
548 | |||
549 | ifelse(SUPPORT_ANDROID_PLATFORM,1,[[ | ||
550 | UNITTEST(framebuffer_test)dnl | ||
551 | UNITTEST(texture_benchmark)dnl | ||
552 | ]])dnl | ||
553 | |||
554 | ifelse(SUPPORT_XUNITTESTS,1,[[ | ||
555 | UNITTEST(xtest)dnl | ||
556 | UNITTEST(xeglinfo)dnl | ||
557 | ifelse(SUPPORT_OPENGLES1,1,[[ | ||
558 | GLES1UNITTEST(xgles1test1)dnl | ||
559 | GLES1UNITTEST(xmultiegltest)dnl | ||
560 | GLES1UNITTEST(xgles1_texture_stream)dnl | ||
561 | GLES1UNITTEST(xgles1image_external)dnl | ||
562 | ]])dnl | ||
563 | ifelse(SUPPORT_OPENGLES2,1,[[ | ||
564 | GLES2UNITTEST(xgles2test1)dnl | ||
565 | GLES2UNITTEST(xgles2_texture_stream)dnl | ||
566 | GLES2UNITTEST(xgles2image)dnl | ||
567 | GLES2UNITTEST_SHADER(xgles2image_vertshader.txt)dnl | ||
568 | GLES2UNITTEST_SHADER(xgles2image_fragshaderA.txt)dnl | ||
569 | GLES2UNITTEST_SHADER(xgles2image_fragshaderB.txt)dnl | ||
570 | GLES2UNITTEST_SHADER(xgles2image_vertshaderW.txt)dnl | ||
571 | GLES2UNITTEST_SHADER(xgles2image_fragshaderW.txt)dnl | ||
572 | ]])dnl | ||
573 | ifelse(SUPPORT_OPENGL,1,[[ | ||
574 | UNITTEST(xgltest1)dnl | ||
575 | UNITTEST(xgltest2)dnl | ||
576 | GLUNITTEST_SHADER(gltest2_vertshader.txt)dnl | ||
577 | GLUNITTEST_SHADER(gltest2_fragshaderA.txt)dnl | ||
578 | GLUNITTEST_SHADER(gltest2_fragshaderB.txt)dnl | ||
579 | ]])dnl | ||
580 | ]])dnl | ||
581 | |||
582 | ifelse(SUPPORT_EWS,1,[[ | ||
583 | ifelse(SUPPORT_OPENGLES1,1,[[ | ||
584 | GLES1UNITTEST(ews_test_gles1)dnl | ||
585 | GLES2UNITTEST(ews_test_gles1_egl_image_external)dnl | ||
586 | ]])dnl | ||
587 | ifelse(SUPPORT_OPENGLES2,1,[[ | ||
588 | GLES2UNITTEST(ews_test_gles2)dnl | ||
589 | GLES2UNITTEST_SHADER(ews_test_gles2_main.vert)dnl | ||
590 | GLES2UNITTEST_SHADER(ews_test_gles2_main.frag)dnl | ||
591 | GLES2UNITTEST_SHADER(ews_test_gles2_pp.vert)dnl | ||
592 | GLES2UNITTEST_SHADER(ews_test_gles2_pp.frag)dnl | ||
593 | GLES2UNITTEST(ews_test_gles2_egl_image_external)dnl | ||
594 | GLES2UNITTEST_SHADER(ews_test_gles2_egl_image_external.vert)dnl | ||
595 | GLES2UNITTEST_SHADER(ews_test_gles2_egl_image_external.frag)dnl | ||
596 | ]])dnl | ||
597 | UNITTEST(ews_test_swrender)dnl | ||
598 | ]])dnl | ||
599 | |||
600 | ifelse(SUPPORT_WAYLAND,1,[[ | ||
601 | ifelse(SUPPORT_OPENGLES1,1,[[ | ||
602 | GLES1UNITTEST(wgles1test1)dnl | ||
603 | ]])dnl | ||
604 | ifelse(SUPPORT_OPENGLES2,1,[[ | ||
605 | GLES2UNITTEST(wgles2test1)dnl | ||
606 | ]])dnl | ||
607 | ]])dnl | ||
608 | |||
609 | ifelse(SUPPORT_SURFACELESS,1,[[ | ||
610 | ifelse(SUPPORT_OPENGLES2,1,[[ | ||
611 | GLES2UNITTEST(sgles2test1)dnl | ||
612 | ]])dnl | ||
613 | ]])dnl | ||
614 | |||
615 | popdivert()]]) | ||
616 | |||
617 | |||
618 | define([[NON_SHIPPING_TESTS]], [[pushdivert(52)dnl | ||
619 | # Install internal unittests | ||
620 | # | ||
621 | mkdir -p $DISCIMAGE/usr/local/bin/gles2tests | ||
622 | if test -d $EURASIAROOT/eurasiacon/opengles2/tests; then | ||
623 | for test in $(find $EURASIAROOT/eurasiacon/opengles2/tests -regex '.*makefile.linux' -exec cat {} \;|egrep 'MODULE\W*='|dos2unix|cut -d '=' -f2) | ||
624 | do | ||
625 | if test -f $test; then | ||
626 | install_file $test /usr/local/bin/gles2tests/$test "binary" 0755 0:0 | ||
627 | fi | ||
628 | done | ||
629 | |||
630 | echo "Shaders -> /usr/local/bin/glestests" | ||
631 | find $EURASIAROOT/eurasiacon/opengles2/tests -regex '.*\.vert' -exec cp -f {} $DISCIMAGE/usr/local/bin/gles2tests \; | ||
632 | find $EURASIAROOT/eurasiacon/opengles2/tests -regex '.*\.frag' -exec cp -f {} $DISCIMAGE/usr/local/bin/gles2tests \; | ||
633 | fi | ||
634 | |||
635 | mkdir -p $DISCIMAGE/usr/local/bin/gles1tests | ||
636 | if test -d $EURASIAROOT/eurasiacon/opengles1/tests; then | ||
637 | |||
638 | for test in $(find $EURASIAROOT/eurasiacon/opengles1/tests -regex '.*makefile.linux' -exec cat {} \;|egrep -r 'MODULE\W*='|dos2unix|cut -d '=' -f2) | ||
639 | do | ||
640 | if test -f $test; then | ||
641 | install_file $test /usr/local/bin/gles1tests/$test "binary" 0755 0:0 | ||
642 | fi | ||
643 | done | ||
644 | fi | ||
645 | |||
646 | popdivert()]]) | ||
647 | |||
648 | |||
649 | ############################################################################### | ||
650 | ## | ||
651 | ## STANDARD_KERNEL_MODULES | ||
652 | ## Install all regular kernel modules - the PVR serviecs module (includes the | ||
653 | ## SGX driver) and the display driver, if one is defined. We also do a run of | ||
654 | ## depmod(8) if the mode requires. | ||
655 | ## | ||
656 | ## No parameters. | ||
657 | ## | ||
658 | ############################################################################### | ||
659 | define([[STANDARD_KERNEL_MODULES]], [[pushdivert(52)dnl | ||
660 | # Check the kernel module directory is there | ||
661 | # | ||
662 | if [ ! -d "${DISCIMAGE}MOD_ROOTDIR" ]; then | ||
663 | echo "" | ||
664 | echo "Can't find MOD_ROOTDIR on file system installation root" | ||
665 | echo -n "There is no kernel module area setup yet. " | ||
666 | if [ "$from" = target ]; then | ||
667 | echo "On your build machine you should invoke:" | ||
668 | echo | ||
669 | echo " $ cd \$KERNELDIR" | ||
670 | echo " $ make INSTALL_MOD_PATH=\$DISCIMAGE modules_install" | ||
671 | else | ||
672 | echo "You should invoke:" | ||
673 | echo | ||
674 | echo " $ cd $KERNELDIR" | ||
675 | echo " $ make INSTALL_MOD_PATH=$DISCIMAGE modules_install" | ||
676 | fi | ||
677 | echo | ||
678 | exit 1; | ||
679 | fi | ||
680 | |||
681 | # Install the standard kernel modules | ||
682 | # Touch some files that might not exist so that busybox/modprobe don't complain | ||
683 | # | ||
684 | ifelse(TARGET_HAS_DEPMOD,FALSE,[[cp MODULES_DEP MODULES_DEP[[.old]] | ||
685 | ]])dnl | ||
686 | |||
687 | ifelse(SUPPORT_DRI_DRM_NOT_PCI,1,[[dnl | ||
688 | KERNEL_MODULE(DRM_MODNAME.KM_SUFFIX)dnl | ||
689 | KERNEL_MODULE(PVRSRV_MODNAME.KM_SUFFIX, [[DRM_MODNAME.KM_SUFFIX]])dnl | ||
690 | ]],[[dnl | ||
691 | KERNEL_MODULE(PVRSRV_MODNAME.KM_SUFFIX)dnl | ||
692 | ifelse(PDUMP,1,[[KERNEL_MODULE([[dbgdrv.KM_SUFFIX]])]])dnl | ||
693 | ]])dnl | ||
694 | |||
695 | ifdef([[_DISPLAY_CONTROLLER_]], | ||
696 | if [ -z "$NO_DISPLAYMOD" ]; then | ||
697 | KERNEL_MODULE(_DISPLAY_CONTROLLER_[[.]]KM_SUFFIX, [[PVRSRV_MODNAME.KM_SUFFIX]]) | ||
698 | fi) | ||
699 | |||
700 | ifdef([[_BUFFER_CLASS_DEVICE_]], | ||
701 | if [ -z "$NO_BCDEVICE" ]; then | ||
702 | KERNEL_MODULE(_BUFFER_CLASS_DEVICE_[[.]]KM_SUFFIX, [[PVRSRV_MODNAME.KM_SUFFIX]]) | ||
703 | fi) | ||
704 | |||
705 | ifelse(SUPPORT_ANDROID_PLATFORM,1,,[[ | ||
706 | $DOIT touch LIBMODPROBE_CONF | ||
707 | $DOIT touch MODULES_CONF | ||
708 | $DOIT rm -f MODULES_TMP | ||
709 | ]]) | ||
710 | |||
711 | popdivert()]]) | ||
712 | |||
713 | ############################################################################### | ||
714 | ## | ||
715 | ## STANDARD_HEADERS | ||
716 | ## Install headers | ||
717 | ## | ||
718 | ## No parameters. | ||
719 | ## | ||
720 | ############################################################################### | ||
721 | define([[STANDARD_HEADERS]], [[pushdivert(52)dnl | ||
722 | ifelse(SUPPORT_EWS,1,[[dnl | ||
723 | HEADER(ews.h, ews)dnl | ||
724 | HEADER(ews_types.h, ews)dnl | ||
725 | ]])dnl | ||
726 | popdivert()]]) | ||
727 | |||
728 | ############################################################################### | ||
729 | ## | ||
730 | ## XORG_ALL - | ||
731 | ## | ||
732 | ## No parameters. | ||
733 | ## | ||
734 | ############################################################################### | ||
735 | define([[XORG_ALL]], [[pushdivert(54)dnl | ||
736 | install_X() | ||
737 | { | ||
738 | popdivert()dnl | ||
739 | pushdivert(55)dnl | ||
740 | ifelse(LWS_INSTALL_TREE,1,[[dnl | ||
741 | [ -d usr ] && | ||
742 | install_tree usr/local/XSGX XORG_DEST/usr/local/XSGX "Linux window system executables and libraries" | ||
743 | ]])dnl | ||
744 | ifelse(SUPPORT_XORG,1,[[dnl | ||
745 | [ -f pvr_drv.so ] && | ||
746 | install_file pvr_drv.so PVR_DDX_DESTDIR/pvr_drv.so "X.Org PVR DDX video module" 0755 0:0 | ||
747 | [ -f pvrinp_drv.so ] && | ||
748 | install_file pvrinp_drv.so PVR_DDX_INPUT_DESTDIR/pvrinp_drv.so "X.Org PVR DDX input module" 0755 0:0 | ||
749 | ifelse(SUPPORT_XORG_CONF,1,[[dnl | ||
750 | [ -f xorg.conf ] && | ||
751 | install_file xorg.conf XORG_DIR/etc/xorg.conf "X.Org configuration file" 0644 0:0 | ||
752 | ]])dnl | ||
753 | ]])dnl | ||
754 | ifelse(SUPPORT_MESA,1,[[dnl | ||
755 | [ -f PVR_DRI_CLIENT_MODULE ] && | ||
756 | install_file PVR_DRI_CLIENT_MODULE PVR_DRI_DESTDIR/PVR_DRI_CLIENT_MODULE "X.Org PVR DRI module" 0755 0:0 | ||
757 | ]])dnl | ||
758 | popdivert()dnl | ||
759 | pushdivert(56)dnl | ||
760 | } | ||
761 | popdivert()dnl | ||
762 | pushmain()dnl | ||
763 | [ -z "$NO_X" ] && install_X | ||
764 | popdivert()]]) | ||
765 | |||
766 | ############################################################################### | ||
767 | ## | ||
768 | ## LWS_ALL - | ||
769 | ## | ||
770 | ## No parameters. | ||
771 | ## | ||
772 | ############################################################################### | ||
773 | define([[LWS_ALL]], [[XORG_ALL]])dnl | ||
774 | |||
775 | ############################################################################### | ||
776 | ## | ||
777 | ## DRM_ALL - | ||
778 | ## | ||
779 | ## No parameters. | ||
780 | ## | ||
781 | ############################################################################### | ||
782 | define([[DRM_ALL]], [[pushdivert(54)dnl | ||
783 | install_drm() | ||
784 | { | ||
785 | popdivert()dnl | ||
786 | pushdivert(55)dnl | ||
787 | ifelse(SUPPORT_DRI_DRM,1,[[dnl | ||
788 | [ -d usr ] && | ||
789 | install_tree usr/local/XSGX /usr/local/XSGX "DRM libraries" | ||
790 | ]])dnl | ||
791 | popdivert()dnl | ||
792 | pushdivert(56)dnl | ||
793 | } | ||
794 | popdivert()dnl | ||
795 | pushmain()dnl | ||
796 | [ -z "$NO_DRM" ] && install_drm | ||
797 | popdivert()]]) | ||
diff --git a/eurasia_km/eurasiacon/build/linux2/scripts/install.sh.m4 b/eurasia_km/eurasiacon/build/linux2/scripts/install.sh.m4 new file mode 100644 index 0000000..3c3690d --- /dev/null +++ b/eurasia_km/eurasiacon/build/linux2/scripts/install.sh.m4 | |||
@@ -0,0 +1,359 @@ | |||
1 | divert(-1) | ||
2 | ############################################################################ ### | ||
3 | ##@Title Target install script | ||
4 | ##@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
5 | ##@License Strictly Confidential. | ||
6 | #### ########################################################################### | ||
7 | |||
8 | include(../scripts/common.m4) | ||
9 | |||
10 | ############################################################################### | ||
11 | ## | ||
12 | ## Diversion discipline | ||
13 | ## | ||
14 | ## 49 variables | ||
15 | ## 50 generic functions | ||
16 | ## 51 function header of install_pvr function | ||
17 | ## 52 body of install_pvr function | ||
18 | ## 53 function trailer of install_pvr function | ||
19 | ## 54 function header of install_X function | ||
20 | ## 55 body of install_X function | ||
21 | ## 56 function trailer of install_X function | ||
22 | ## 80 script body | ||
23 | ## 200 main case statement for decoding arguments. | ||
24 | ## | ||
25 | ############################################################################### | ||
26 | |||
27 | ############################################################################### | ||
28 | ## | ||
29 | ## Diversion #49 - Variables that might be overridden | ||
30 | ## | ||
31 | ############################################################################### | ||
32 | pushdivert(49)dnl | ||
33 | # PVR Consumer services version number | ||
34 | # | ||
35 | [[PVRVERSION]]="PVRVERSION" | ||
36 | |||
37 | popdivert | ||
38 | |||
39 | define([[SET_DDK_INSTALL_LOG_PATH]], [[pushdivert(49)dnl | ||
40 | # Where we record what we did so we can undo it. | ||
41 | # | ||
42 | DDK_INSTALL_LOG=/etc/powervr_ddk_install.log | ||
43 | popdivert]]) | ||
44 | |||
45 | ############################################################################### | ||
46 | ## | ||
47 | ## Diversion #50 - Some generic functions | ||
48 | ## | ||
49 | ############################################################################### | ||
50 | pushdivert(50)dnl | ||
51 | |||
52 | [[# basic installation function | ||
53 | # $1=blurb | ||
54 | # | ||
55 | bail() | ||
56 | { | ||
57 | echo "$1" >&2 | ||
58 | echo "" >&2 | ||
59 | echo "Installation failed" >&2 | ||
60 | exit 1 | ||
61 | } | ||
62 | |||
63 | # basic installation function | ||
64 | # $1=fromfile, $2=destfilename, $3=blurb, $4=chmod-flags, $5=chown-flags | ||
65 | # | ||
66 | install_file() | ||
67 | { | ||
68 | if [ ! -e $1 ]; then | ||
69 | [ -n "$VERBOSE" ] && echo "skipping file $1 -> $2" | ||
70 | return | ||
71 | fi | ||
72 | |||
73 | DESTFILE=${DISCIMAGE}$2 | ||
74 | DESTDIR=`dirname $DESTFILE` | ||
75 | |||
76 | $DOIT mkdir -p ${DESTDIR} || bail "Couldn't mkdir -p ${DESTDIR}" | ||
77 | [ -n "$VERBOSE" ] && echo "Created directory `dirname $2`" | ||
78 | |||
79 | # Delete the original so that permissions don't persist. | ||
80 | $DOIT rm -f $DESTFILE | ||
81 | $DOIT cp -f $1 $DESTFILE || bail "Couldn't copy $1 to $DESTFILE" | ||
82 | $DOIT chmod $4 ${DISCIMAGE}$2 | ||
83 | $DOIT chown $5 ${DISCIMAGE}$2 | ||
84 | |||
85 | echo "$3 `basename $1` -> $2" | ||
86 | $DOIT echo "file $2" >>${DISCIMAGE}${DDK_INSTALL_LOG} | ||
87 | } | ||
88 | |||
89 | # Install a symbolic link | ||
90 | # $1=fromfile, $2=destfilename | ||
91 | # | ||
92 | install_link() | ||
93 | { | ||
94 | DESTFILE=${DISCIMAGE}$2 | ||
95 | DESTDIR=`dirname $DESTFILE` | ||
96 | |||
97 | if [ ! -e ${DESTDIR}/$1 ]; then | ||
98 | [ -n "$VERBOSE" ] && echo $DOIT "skipping link ${DESTDIR}/$1" | ||
99 | return | ||
100 | fi | ||
101 | |||
102 | $DOIT mkdir -p ${DESTDIR} || bail "Couldn't mkdir -p ${DESTDIR}" | ||
103 | [ -n "$VERBOSE" ] && echo "Created directory `dirname $2`" | ||
104 | |||
105 | # Delete the original so that permissions don't persist. | ||
106 | # | ||
107 | $DOIT rm -f $DESTFILE | ||
108 | |||
109 | $DOIT ln -s $1 $DESTFILE || bail "Couldn't link $1 to $DESTFILE" | ||
110 | $DOIT echo "link $2" >>${DISCIMAGE}${DDK_INSTALL_LOG} | ||
111 | [ -n "$VERBOSE" ] && echo " linked `basename $1` -> $2" | ||
112 | } | ||
113 | |||
114 | # Tree-based installation function | ||
115 | # $1 = fromdir $2=destdir $3=blurb | ||
116 | # | ||
117 | install_tree() | ||
118 | { | ||
119 | if [ ! -z $INSTALL_TARGET ]; then | ||
120 | # Use rsync and SSH to do the copy as it is way faster. | ||
121 | echo "rsyncing $3 to root@$INSTALL_TARGET:$2" | ||
122 | $DOIT rsync -crlpt -e ssh $1/* root@$INSTALL_TARGET:$2 || bail "Couldn't rsync $1 to root@$INSTALL_TARGET:$2" | ||
123 | else | ||
124 | $DOIT mkdir -p ${DISCIMAGE}$2 || bail "Couldn't mkdir -p ${DISCIMAGE}$2" | ||
125 | if [ -z "$DOIT" ]; then | ||
126 | tar -C $1 -cf - . | tar -C ${DISCIMAGE}$2 -x${VERBOSE}f - | ||
127 | else | ||
128 | $DOIT "tar -C $1 -cf - . | tar -C ${DISCIMAGE}$2 -x${VERBOSE}f -" | ||
129 | fi | ||
130 | fi | ||
131 | |||
132 | if [ $? = 0 ]; then | ||
133 | echo "Installed $3 in ${DISCIMAGE}$2" | ||
134 | $DOIT echo "tree $2" >>${DISCIMAGE}${DDK_INSTALL_LOG} | ||
135 | else | ||
136 | echo "Failed copying $3 from $1 to ${DISCIMAGE}$2" | ||
137 | fi | ||
138 | } | ||
139 | |||
140 | # Uninstall something. | ||
141 | # | ||
142 | uninstall() | ||
143 | { | ||
144 | if [ ! -f ${DISCIMAGE}${DDK_INSTALL_LOG} ]; then | ||
145 | echo "Nothing to un-install." | ||
146 | return; | ||
147 | fi | ||
148 | |||
149 | BAD=0 | ||
150 | VERSION="" | ||
151 | while read type data; do | ||
152 | case $type in | ||
153 | version) # do nothing | ||
154 | echo "Uninstalling existing version $data" | ||
155 | VERSION="$data" | ||
156 | ;; | ||
157 | link|file) | ||
158 | if [ -z "$VERSION" ]; then | ||
159 | BAD=1; | ||
160 | echo "No version record at head of ${DISCIMAGE}${DDK_INSTALL_LOG}" | ||
161 | elif ! $DOIT rm -f ${DISCIMAGE}${data}; then | ||
162 | BAD=1; | ||
163 | else | ||
164 | [ -n "$VERBOSE" ] && echo "Deleted $type $data" | ||
165 | fi | ||
166 | ;; | ||
167 | tree) | ||
168 | if [ "${data}" = "/usr/local/XSGX" ]; then | ||
169 | $DOIT rm -Rf ${DISCIMAGE}${data} | ||
170 | fi | ||
171 | ;; | ||
172 | esac | ||
173 | done < ${DISCIMAGE}${DDK_INSTALL_LOG}; | ||
174 | |||
175 | if [ $BAD = 0 ]; then | ||
176 | echo "Uninstallation completed." | ||
177 | $DOIT rm -f ${DISCIMAGE}${DDK_INSTALL_LOG} | ||
178 | else | ||
179 | echo "Uninstallation failed!!!" | ||
180 | fi | ||
181 | } | ||
182 | |||
183 | # Help on how to invoke | ||
184 | # | ||
185 | usage() | ||
186 | { | ||
187 | echo "usage: $0 [options...]" | ||
188 | echo "" | ||
189 | echo "Options: -v verbose mode" | ||
190 | echo " -n dry-run mode" | ||
191 | echo " -u uninstall-only mode" | ||
192 | echo " --no-pvr don't install PowerVR driver components" | ||
193 | echo " --no-x don't install X window system" | ||
194 | echo " --no-drm don't install DRM libraries" | ||
195 | echo " --no-display don't install integrated PowerVR display module" | ||
196 | echo " --no-bcdevice don't install buffer class device module" | ||
197 | echo " --root path use path as the root of the install file system" | ||
198 | exit 1 | ||
199 | } | ||
200 | |||
201 | ]]popdivert | ||
202 | |||
203 | ############################################################################### | ||
204 | ## | ||
205 | ## Diversion 51 - the start of the install_pvr() function | ||
206 | ## | ||
207 | ############################################################################### | ||
208 | pushdivert(51)dnl | ||
209 | install_pvr() | ||
210 | { | ||
211 | $DOIT echo "version PVRVERSION" >${DISCIMAGE}${DDK_INSTALL_LOG} | ||
212 | popdivert | ||
213 | |||
214 | pushdivert(53)dnl | ||
215 | } | ||
216 | |||
217 | popdivert | ||
218 | |||
219 | pushdivert(80)[[ | ||
220 | # Work out if there are any special instructions. | ||
221 | # | ||
222 | while [ "$1" ]; do | ||
223 | case "$1" in | ||
224 | -v|--verbose) | ||
225 | VERBOSE=v; | ||
226 | ;; | ||
227 | -r|--root) | ||
228 | DISCIMAGE=$2; | ||
229 | shift; | ||
230 | ;; | ||
231 | -t|--install-target) | ||
232 | INSTALL_TARGET=$2; | ||
233 | shift; | ||
234 | ;; | ||
235 | -u|--uninstall) | ||
236 | UNINSTALL=y | ||
237 | ;; | ||
238 | -n) DOIT=echo | ||
239 | ;; | ||
240 | --no-pvr) | ||
241 | NO_PVR=y | ||
242 | ;; | ||
243 | --no-x) | ||
244 | NO_X=y | ||
245 | ;; | ||
246 | --no-drm) | ||
247 | NO_DRM=y | ||
248 | ;; | ||
249 | --no-display) | ||
250 | NO_DISPLAYMOD=y | ||
251 | ;; | ||
252 | --no-bcdevice) | ||
253 | NO_BCDEVICE=y | ||
254 | ;; | ||
255 | -h | --help | *) | ||
256 | usage | ||
257 | ;; | ||
258 | esac | ||
259 | shift | ||
260 | done | ||
261 | |||
262 | # Find out where we are? On the target? On the host? | ||
263 | # | ||
264 | case `uname -m` in | ||
265 | arm*) host=0; | ||
266 | from=target; | ||
267 | DISCIMAGE=/; | ||
268 | ;; | ||
269 | sh*) host=0; | ||
270 | from=target; | ||
271 | DISCIMAGE=/; | ||
272 | ;; | ||
273 | i?86*) host=1; | ||
274 | from=host; | ||
275 | if [ -z "$DISCIMAGE" ]; then | ||
276 | echo "DISCIMAGE must be set for installation to be possible." >&2 | ||
277 | exit 1 | ||
278 | fi | ||
279 | ;; | ||
280 | x86_64*) host=1; | ||
281 | from=host; | ||
282 | if [ -z "$DISCIMAGE" ]; then | ||
283 | echo "DISCIMAGE must be set for installation to be possible." >&2 | ||
284 | exit 1 | ||
285 | fi | ||
286 | ;; | ||
287 | *) echo "Don't know host to perform on machine type `uname -m`" >&2; | ||
288 | exit 1 | ||
289 | ;; | ||
290 | esac | ||
291 | |||
292 | if [ ! -z "$INSTALL_TARGET" ]; then | ||
293 | if ssh -q -o "BatchMode=yes" root@$INSTALL_TARGET "test 1"; then | ||
294 | echo "Using rsync/ssh to install to $INSTALL_TARGET" | ||
295 | else | ||
296 | echo "Can't access $INSTALL_TARGET via ssh." | ||
297 | # We have to use the `whoami` trick as this script is often run with | ||
298 | # sudo -E | ||
299 | if [ ! -e ~`whoami`/.ssh/id_rsa.pub ] ; then | ||
300 | echo " You need to generate a public key for root via ssh-keygen" | ||
301 | echo " then append it to root@$INSTALL_TARGET:~/.ssh/authorized_keys." | ||
302 | else | ||
303 | echo "Have you installed root's public key into root@$INSTALL_TARGET:~/.ssh/authorized_keys?" | ||
304 | echo "You can do so by executing the following as root:" | ||
305 | echo "ssh root@$INSTALL_TARGET \"mkdir -p .ssh; cat >> .ssh/authorized_keys\" < ~/.ssh/id_rsa.pub" | ||
306 | fi | ||
307 | echo "Falling back to copy method." | ||
308 | unset INSTALL_TARGET | ||
309 | fi | ||
310 | fi | ||
311 | |||
312 | if [ ! -d "$DISCIMAGE" ]; then | ||
313 | echo "$0: $DISCIMAGE does not exist." >&2 | ||
314 | exit 1 | ||
315 | fi | ||
316 | |||
317 | echo | ||
318 | echo "Installing PowerVR Consumer/Embedded DDK ']]PVRVERSION[[' on $from" | ||
319 | echo | ||
320 | echo "File system installation root is $DISCIMAGE" | ||
321 | echo | ||
322 | |||
323 | ]]popdivert | ||
324 | |||
325 | |||
326 | ############################################################################### | ||
327 | ## | ||
328 | ## Main Diversion - call the install_pvr function unless NO_PVR is non-null | ||
329 | ## | ||
330 | ############################################################################### | ||
331 | pushmain()dnl | ||
332 | # Uninstall whatever's there already. | ||
333 | # | ||
334 | uninstall | ||
335 | [ -n "$UNINSTALL" ] && exit | ||
336 | |||
337 | # Now start installing things we want. | ||
338 | # | ||
339 | [ -z "$NO_PVR" ] && install_pvr | ||
340 | popdivert | ||
341 | |||
342 | |||
343 | ############################################################################### | ||
344 | ## | ||
345 | ## Diversion 200 - | ||
346 | ## Divert some text to appear when the final input stream is closed. | ||
347 | ## | ||
348 | ############################################################################### | ||
349 | pushdivert(200)dnl | ||
350 | |||
351 | # All done... | ||
352 | # | ||
353 | echo | ||
354 | echo "Installation complete!" | ||
355 | if [ "$host" = 0 ]; then | ||
356 | echo "You may now reboot your target." | ||
357 | fi | ||
358 | echo | ||
359 | popdivert | ||
diff --git a/eurasia_km/eurasiacon/build/linux2/scripts/install.sh.tpl b/eurasia_km/eurasiacon/build/linux2/scripts/install.sh.tpl new file mode 100644 index 0000000..71e2042 --- /dev/null +++ b/eurasia_km/eurasiacon/build/linux2/scripts/install.sh.tpl | |||
@@ -0,0 +1,304 @@ | |||
1 | #!/bin/bash | ||
2 | ############################################################################ ### | ||
3 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | ||
4 | #@License Strictly Confidential. | ||
5 | #### ########################################################################### | ||
6 | |||
7 | SCRIPT_ROOT=`dirname $0` | ||
8 | |||
9 | # PVR Consumer services version number | ||
10 | # | ||
11 | PVRVERSION=[PVRVERSION] | ||
12 | |||
13 | # Exit with an error messages. | ||
14 | # $1=blurb | ||
15 | # | ||
16 | bail() | ||
17 | { | ||
18 | echo "$1" >&2 | ||
19 | echo "" >&2 | ||
20 | echo "Installation failed" >&2 | ||
21 | exit 1 | ||
22 | } | ||
23 | |||
24 | # basic installation function | ||
25 | # $1=fromfile, $2=destfilename, $3=blurb, $4=chmod-flags, $5=chown-flags | ||
26 | # | ||
27 | install_file() | ||
28 | { | ||
29 | DESTFILE=${DISCIMAGE}$2 | ||
30 | DESTDIR=`dirname $DESTFILE` | ||
31 | |||
32 | if [ ! -e $1 ]; then | ||
33 | [ -n "$VERBOSE" ] && echo "skipping file $1 -> $2" | ||
34 | return | ||
35 | fi | ||
36 | |||
37 | # Destination directory - make sure it's there and writable | ||
38 | # | ||
39 | if [ -d "${DESTDIR}" ]; then | ||
40 | if [ ! -w "${DESTDIR}" ]; then | ||
41 | bail "${DESTDIR} is not writable." | ||
42 | fi | ||
43 | else | ||
44 | $DOIT mkdir -p ${DESTDIR} || bail "Couldn't mkdir -p ${DESTDIR}" | ||
45 | [ -n "$VERBOSE" ] && echo "Created directory `dirname $2`" | ||
46 | fi | ||
47 | |||
48 | # Delete the original so that permissions don't persist. | ||
49 | # | ||
50 | $DOIT rm -f $DESTFILE | ||
51 | |||
52 | $DOIT cp -f $1 $DESTFILE || bail "Couldn't copy $1 to $DESTFILE" | ||
53 | $DOIT chmod $4 ${DESTFILE} | ||
54 | $DOIT chown $5 ${DESTFILE} | ||
55 | |||
56 | echo "$3 `basename $1` -> $2" | ||
57 | $DOIT echo "file $2" >>${DDK_INSTALL_LOG} | ||
58 | } | ||
59 | |||
60 | # Install a symbolic link | ||
61 | # $1=fromfile, $2=destfilename | ||
62 | # | ||
63 | install_link() | ||
64 | { | ||
65 | DESTFILE=${DISCIMAGE}$2 | ||
66 | DESTDIR=`dirname $DESTFILE` | ||
67 | |||
68 | if [ ! -e ${DESTDIR}/$1 ]; then | ||
69 | [ -n "$VERBOSE" ] && echo $DOIT "skipping link ${DESTDIR}/$1" | ||
70 | return | ||
71 | fi | ||
72 | |||
73 | # Destination directory - make sure it's there and writable | ||
74 | # | ||
75 | if [ -d "${DESTDIR}" ]; then | ||
76 | if [ ! -w "${DESTDIR}" ]; then | ||
77 | bail "${DESTDIR} is not writable." | ||
78 | fi | ||
79 | else | ||
80 | $DOIT mkdir -p ${DESTDIR} || bail "Couldn't mkdir -p ${DESTDIR}" | ||
81 | [ -n "$VERBOSE" ] && echo "Created directory `dirname $2`" | ||
82 | fi | ||
83 | |||
84 | SONAME=`objdump -p ${DESTDIR}/$1 | grep SONAME | awk '{print $2}'` | ||
85 | |||
86 | if [ -n "$SONAME" ]; then | ||
87 | $DOIT ln -sf $1 ${DESTDIR}/$SONAME || bail "Couldn't link $1 to $SONAME" | ||
88 | $DOIT echo "link ${DESTDIR}/$SONAME" >>${DDK_INSTALL_LOG} | ||
89 | fi | ||
90 | |||
91 | BASENAME=`expr match $1 '\(.\+\.so\)'` | ||
92 | |||
93 | if [ "$BASENAME" != "$1" ]; then | ||
94 | $DOIT ln -sf $1 ${DESTDIR}/$BASENAME || bail "Couldn't link $1 to $BASENAME" | ||
95 | $DOIT echo "link ${DESTDIR}/$BASENAME" >>${DDK_INSTALL_LOG} | ||
96 | fi | ||
97 | } | ||
98 | |||
99 | # Tree-based installation function | ||
100 | # $1 = fromdir $2=destdir $3=blurb | ||
101 | # | ||
102 | install_tree() | ||
103 | { | ||
104 | # Make the destination directory if it's not there | ||
105 | # | ||
106 | if [ ! -d ${DISCIMAGE}$2 ]; then | ||
107 | $DOIT mkdir -p ${DISCIMAGE}$2 || bail "Couldn't mkdir -p ${DISCIMAGE}$2" | ||
108 | fi | ||
109 | if [ "$DONTDOIT" ]; then | ||
110 | echo "### tar -C $1 -cf - . | tar -C ${DISCIMAGE}$2 -x${VERBOSE}f -" | ||
111 | else | ||
112 | tar -C $1 -cf - . | tar -C ${DISCIMAGE}$2 -x${VERBOSE}f - | ||
113 | fi | ||
114 | if [ $? = 0 ]; then | ||
115 | echo "Installed $3 in ${DISCIMAGE}$2" | ||
116 | $DOIT echo "tree $2" >>${DDK_INSTALL_LOG} | ||
117 | else | ||
118 | echo "Failed copying $3 from $1 to ${DISCIMAGE}$2" | ||
119 | fi | ||
120 | } | ||
121 | |||
122 | # Uninstall something. | ||
123 | # | ||
124 | uninstall() | ||
125 | { | ||
126 | if [ ! -f ${DDK_INSTALL_LOG} ]; then | ||
127 | echo "Nothing to un-install." | ||
128 | return; | ||
129 | fi | ||
130 | |||
131 | BAD=0 | ||
132 | VERSION="" | ||
133 | while read type data; do | ||
134 | case $type in | ||
135 | version) # do nothing | ||
136 | echo "Uninstalling existing version $data" | ||
137 | VERSION="$data" | ||
138 | ;; | ||
139 | link|file) | ||
140 | if [ -z "$VERSION" ]; then | ||
141 | BAD=1; | ||
142 | echo "No version record at head of ${DDK_INSTALL_LOG}" | ||
143 | elif ! $DOIT rm -f ${DISCIMAGE}${data}; then | ||
144 | BAD=1; | ||
145 | else | ||
146 | [ -n "$VERBOSE" ] && echo "Deleted $type $data" | ||
147 | fi | ||
148 | ;; | ||
149 | tree) # so far, do nothing | ||
150 | ;; | ||
151 | esac | ||
152 | done < ${DDK_INSTALL_LOG}; | ||
153 | |||
154 | if [ $BAD = 0 ]; then | ||
155 | echo "Uninstallation completed." | ||
156 | $DOIT rm -f ${DDK_INSTALL_LOG} | ||
157 | else | ||
158 | echo "Uninstallation failed!!!" | ||
159 | fi | ||
160 | } | ||
161 | |||
162 | # Help on how to invoke | ||
163 | # | ||
164 | usage() | ||
165 | { | ||
166 | echo "usage: $0 [options...]" | ||
167 | echo "" | ||
168 | echo "Options: -v verbose mode" | ||
169 | echo " -n dry-run mode" | ||
170 | echo " -u uninstall-only mode" | ||
171 | echo " --no-x don't install X window system" | ||
172 | echo " --no-display don't install integrated PowerVR display module" | ||
173 | echo " --root path use path as the root of the install file system" | ||
174 | exit 1 | ||
175 | } | ||
176 | |||
177 | # Work out if there are any special instructions. | ||
178 | # | ||
179 | while [ "$1" ]; do | ||
180 | case "$1" in | ||
181 | -v|--verbose) | ||
182 | VERBOSE=v | ||
183 | ;; | ||
184 | -r|--root) | ||
185 | DISCIMAGE=$2 | ||
186 | shift; | ||
187 | ;; | ||
188 | -u|--uninstall) | ||
189 | UNINSTALL=y | ||
190 | ;; | ||
191 | -n) | ||
192 | DOIT=echo | ||
193 | ;; | ||
194 | --no-x) | ||
195 | NO_X=y | ||
196 | ;; | ||
197 | --no-display) | ||
198 | NO_DISPLAYMOD=y | ||
199 | ;; | ||
200 | -h | --help | *) | ||
201 | usage | ||
202 | ;; | ||
203 | esac | ||
204 | shift | ||
205 | done | ||
206 | |||
207 | # Find out where we are? On the target? On the host? | ||
208 | # If we are running on an ARM device, assume we are on the target, and | ||
209 | # set DISCIMAGE appropriately. | ||
210 | case `uname -m` in | ||
211 | arm*) | ||
212 | host=0 | ||
213 | from=target | ||
214 | DISCIMAGE=/ | ||
215 | ;; | ||
216 | sh*) | ||
217 | host=0 | ||
218 | from=target | ||
219 | DISCIMAGE=/ | ||
220 | ;; | ||
221 | i?86*) | ||
222 | host=1 | ||
223 | from=host | ||
224 | ;; | ||
225 | x86_64*) | ||
226 | host=1 | ||
227 | from=host | ||
228 | ;; | ||
229 | *) | ||
230 | bail "Don't know host to perform on machine type `uname -m`" | ||
231 | ;; | ||
232 | esac | ||
233 | |||
234 | if [ -z "$DISCIMAGE" ]; then | ||
235 | bail "DISCIMAGE must be set for installation to be possible." | ||
236 | fi | ||
237 | |||
238 | if [ ! -d "$DISCIMAGE" ]; then | ||
239 | bail "$0: $DISCIMAGE does not exist." | ||
240 | fi | ||
241 | |||
242 | echo | ||
243 | echo "Installing PowerVR '$PVRVERSION' on $from" | ||
244 | echo | ||
245 | echo "File system installation root is $DISCIMAGE" | ||
246 | echo | ||
247 | |||
248 | OLDLOG=$DISCIMAGE/etc/powervr_ddk_install.log | ||
249 | KMLOG=$DISCIMAGE/etc/powervr_ddk_install_km.log | ||
250 | UMLOG=$DISCIMAGE/etc/powervr_ddk_install_um.log | ||
251 | |||
252 | # Uninstall anything using the old-style install scripts. | ||
253 | if [ -f $OLDLOG ]; then | ||
254 | if [ ! -f $KMLOG -a ! -f $UMLOG ]; then | ||
255 | DDK_INSTALL_LOG=$OLDLOG | ||
256 | uninstall | ||
257 | else | ||
258 | rm $OLDLOG | ||
259 | fi | ||
260 | fi | ||
261 | |||
262 | # Install KM components | ||
263 | if [ -f $SCRIPT_ROOT/install_km.sh ]; then | ||
264 | DDK_INSTALL_LOG=$KMLOG | ||
265 | echo "Uninstalling Kernel components" | ||
266 | uninstall | ||
267 | if [ -z "$UNINSTALL" ]; then | ||
268 | echo "Installing Kernel components" | ||
269 | $DOIT echo "version $PVRVERSION" > ${DDK_INSTALL_LOG} | ||
270 | source $SCRIPT_ROOT/install_km.sh | ||
271 | fi | ||
272 | echo | ||
273 | fi | ||
274 | |||
275 | # Install UM components | ||
276 | if [ -f $SCRIPT_ROOT/install_um.sh ]; then | ||
277 | DDK_INSTALL_LOG=$UMLOG | ||
278 | echo "Uninstalling User components" | ||
279 | uninstall | ||
280 | if [ -z "$UNINSTALL" ]; then | ||
281 | echo "Installing User components" | ||
282 | $DOIT echo "version $PVRVERSION" > ${DDK_INSTALL_LOG} | ||
283 | source $SCRIPT_ROOT/install_um.sh | ||
284 | fi | ||
285 | echo | ||
286 | fi | ||
287 | |||
288 | # Create an OLDLOG so old versions of the driver can uninstall. | ||
289 | $DOIT echo "version $PVRVERSION" > ${OLDLOG} | ||
290 | if [ -f $KMLOG ]; then | ||
291 | tail -n +1 $KMLOG >> $OLDLOG | ||
292 | fi | ||
293 | if [ -f $UMLOG ]; then | ||
294 | tail -n +1 $UMLOG >> $OLDLOG | ||
295 | fi | ||
296 | |||
297 | |||
298 | # All done... | ||
299 | # | ||
300 | echo "Installation complete!" | ||
301 | if [ "$host" = 0 ]; then | ||
302 | echo "You may now reboot your target." | ||
303 | fi | ||
304 | echo | ||
diff --git a/eurasia_km/eurasiacon/build/linux2/toplevel.mk b/eurasia_km/eurasiacon/build/linux2/toplevel.mk index 81ecb9e..6a677f8 100644 --- a/eurasia_km/eurasiacon/build/linux2/toplevel.mk +++ b/eurasia_km/eurasiacon/build/linux2/toplevel.mk | |||
@@ -1,41 +1,6 @@ | |||
1 | ########################################################################### ### | 1 | ########################################################################### ### |
2 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved | 2 | #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved |
3 | #@License Dual MIT/GPLv2 | 3 | #@License Strictly Confidential. |
4 | # | ||
5 | # The contents of this file are subject to the MIT license as set out below. | ||
6 | # | ||
7 | # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
8 | # of this software and associated documentation files (the "Software"), to deal | ||
9 | # in the Software without restriction, including without limitation the rights | ||
10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
11 | # copies of the Software, and to permit persons to whom the Software is | ||
12 | # furnished to do so, subject to the following conditions: | ||
13 | # | ||
14 | # The above copyright notice and this permission notice shall be included in | ||
15 | # all copies or substantial portions of the Software. | ||
16 | # | ||
17 | # Alternatively, the contents of this file may be used under the terms of | ||
18 | # the GNU General Public License Version 2 ("GPL") in which case the provisions | ||
19 | # of GPL are applicable instead of those above. | ||
20 | # | ||
21 | # If you wish to allow use of your version of this file only under the terms of | ||
22 | # GPL, and not to allow others to use your version of this file under the terms | ||
23 | # of the MIT license, indicate your decision by deleting the provisions above | ||
24 | # and replace them with the notice and other provisions required by GPL as set | ||
25 | # out in the file called "GPL-COPYING" included in this distribution. If you do | ||
26 | # not delete the provisions above, a recipient may use your version of this file | ||
27 | # under the terms of either the MIT license or GPL. | ||
28 | # | ||
29 | # This License is also included in this distribution in the file called | ||
30 | # "MIT-COPYING". | ||
31 | # | ||
32 | # EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS | ||
33 | # PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING | ||
34 | # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
35 | # PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR | ||
36 | # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
37 | # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
38 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
39 | ### ########################################################################### | 4 | ### ########################################################################### |
40 | 5 | ||
41 | # Define the default goal. This masks a previous definition of the default | 6 | # Define the default goal. This masks a previous definition of the default |
@@ -145,6 +110,7 @@ INTERNAL_INCLUDED_ALL_MAKEFILES := | |||
145 | 110 | ||
146 | ifneq ($(INTERNAL_CLOBBER_ONLY),true) | 111 | ifneq ($(INTERNAL_CLOBBER_ONLY),true) |
147 | # Please do not change the format of the following lines | 112 | # Please do not change the format of the following lines |
113 | -include $(CONFIG_MK) | ||
148 | -include $(CONFIG_KERNEL_MK) | 114 | -include $(CONFIG_KERNEL_MK) |
149 | # These files may not exist in GPL km source packages | 115 | # These files may not exist in GPL km source packages |
150 | -include $(MAKE_TOP)/xorgconf.mk | 116 | -include $(MAKE_TOP)/xorgconf.mk |
@@ -177,7 +143,7 @@ kbuild install: | |||
177 | ifneq ($(INTERNAL_CLOBBER_ONLY),true) | 143 | ifneq ($(INTERNAL_CLOBBER_ONLY),true) |
178 | -include $(MAKE_TOP)/scripts.mk | 144 | -include $(MAKE_TOP)/scripts.mk |
179 | -include $(MAKE_TOP)/kbuild/kbuild.mk | 145 | -include $(MAKE_TOP)/kbuild/kbuild.mk |
180 | else | 146 | endif |
181 | # We won't depend on 'build' here so that people can build subsets of | 147 | # We won't depend on 'build' here so that people can build subsets of |
182 | # components and still have the install script attempt to install the | 148 | # components and still have the install script attempt to install the |
183 | # subset. | 149 | # subset. |
@@ -197,7 +163,6 @@ install: | |||
197 | exit 1; \ | 163 | exit 1; \ |
198 | fi | 164 | fi |
199 | @cd $(TARGET_OUT) && ./install.sh | 165 | @cd $(TARGET_OUT) && ./install.sh |
200 | endif | ||
201 | 166 | ||
202 | # You can say 'make all_modules' to attempt to make everything, or 'make | 167 | # You can say 'make all_modules' to attempt to make everything, or 'make |
203 | # components' to only make the things which are listed (in the per-build | 168 | # components' to only make the things which are listed (in the per-build |