-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.KM.Android
executable file
·119 lines (105 loc) · 4.56 KB
/
Makefile.KM.Android
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
include Rules.make
OMAPES=INVALIDVAL
.PHONY: all_km buildkernel
.PHONY: clean_km cleankernelmodule
.PHONY: help_km
all_km: prepare_km buildkernel
buildkernel:
ifeq ($(OMAPES),3.x)
@echo "building the sgx kernel modules..."
@export KERNELDIR=$(KERNEL_INSTALL_DIR) && \
export PATH=$(CSTOOL_PATH):$(PATH) && \
export CROSS_COMPILE=$(CSTOOL_PREFIX) && \
export EURASIAROOT=$(EURASIAROOT) && \
export ANDROID_PRODUCT=zoom2 && \
export ANDROID_ROOT=$(ANDROID_ROOT) && \
export ARCH=arm && \
make -C $(GFX_KERNMOD_SRCPATH)/eurasiacon/build/linux/omap3430_android/kbuild KERNELDIR=$(KERNEL_INSTALL_DIR) TI_PLATFORM=omap3430 TARGET_PRODUCT=$(ANDROID_PRODUCT)
@echo "copying the sgx kernel modules to appropriate folder..."
@cp -rf $(GFX_KERNMOD_SRCPATH)/eurasiacon/binary_omap3430_android_release/pvrsrvkm.ko $(GFX_REL_ES3_LIB_SRCPATH_ANDROID)/.
@cp -rf $(GFX_KERNMOD_SRCPATH)/eurasiacon/binary_omap3430_android_release/omaplfb.ko $(GFX_REL_ES3_LIB_SRCPATH_ANDROID)/.
else
@echo "building the sgx kernel modules..."
@export KERNELDIR=$(KERNEL_INSTALL_DIR) && \
export PATH=$(CSTOOL_PATH):$(PATH) && \
export CROSS_COMPILE=$(CSTOOL_PREFIX) && \
export EURASIAROOT=$(EURASIAROOT) && \
export ANDROID_PRODUCT=zoom3 && \
export ANDROID_ROOT=$(ANDROID_ROOT) && \
export ARCH=arm && \
make -C $(GFX_KERNMOD_SRCPATH)/eurasiacon/build/linux/omap3630_android/kbuild KERNELDIR=$(KERNEL_INSTALL_DIR) TI_PLATFORM=omap3630 TARGET_PRODUCT=$(ANDROID_PRODUCT)
@echo "copying the sgx kernel modules to appropriate folder..."
ifeq ($(OMAPES),5.x)
@cp -rf $(GFX_KERNMOD_SRCPATH)/eurasiacon/binary_omap3630_android_release/pvrsrvkm.ko $(GFX_REL_ES5_LIB_SRCPATH_ANDROID)/.
@cp -rf $(GFX_KERNMOD_SRCPATH)/eurasiacon/binary_omap3630_android_release/omaplfb.ko $(GFX_REL_ES5_LIB_SRCPATH_ANDROID)/.
endif
ifeq ($(OMAPES),6.x)
@cp -rf $(GFX_KERNMOD_SRCPATH)/eurasiacon/binary_omap3630_android_release/pvrsrvkm.ko $(GFX_REL_ES6_LIB_SRCPATH_ANDROID)/.
@cp -rf $(GFX_KERNMOD_SRCPATH)/eurasiacon/binary_omap3630_android_release/omaplfb.ko $(GFX_REL_ES6_LIB_SRCPATH_ANDROID)/.
endif
endif
prepare_km:
############################### CLEAN ##################################
clean_km: cleankernelmodule
cleankernelmodule:
@echo "cleaning the sgx kernel modules..."
ifeq ($(OMAPES),3.x)
export KERNELDIR=$(KERNEL_INSTALL_DIR) && \
export PATH=$(CSTOOL_PATH):$(PATH) && \
export CROSS_COMPILE=$(CSTOOL_PREFIX) && \
export EURASIAROOT=$(EURASIAROOT) && \
export DISCIMAGE=$(ANDROID_DISCIMAGE) && \
export ANDROID_ROOT=$(ANDROID_ROOT) && \
export ANDROID_PRODUCT=zoom3 && make -C $(GFX_KERNMOD_SRCPATH)/eurasiacon/build/linux/omap3430_android/kbuild KERNELDIR=$(KERNEL_INSTALL_DIR) clean
else
export KERNELDIR=$(KERNEL_INSTALL_DIR) && \
export PATH=$(CSTOOL_PATH):$(PATH) && \
export CROSS_COMPILE=$(CSTOOL_PREFIX) && \
export EURASIAROOT=$(EURASIAROOT) && \
export DISCIMAGE=$(ANDROID_DISCIMAGE) && \
export ANDROID_ROOT=$(ANDROID_ROOT) && \
export ANDROID_PRODUCT=zoom3 && make -C $(GFX_KERNMOD_SRCPATH)/eurasiacon/build/linux/omap3630_android/kbuild KERNELDIR=$(KERNEL_INSTALL_DIR) clean
endif
############################# INSTALL ##################################
install_km:
ifeq ($(OMAPES),INVALIDVAL)
@echo "OMAPES value not specified (Mandatory value)..Exiting..."
exit 1
endif
# @patch -p0 -d $(ANDROID_DISCIMAGE) < initrc.patch
ifeq ($(OMAPES),2.x)
@cd $(GFX_REL_ES2_LIB_SRCPATH_ANDROID) && \
export DISCIMAGE=$(ANDROID_DISCIMAGE) && \
export ANDROID_ROOT=$(ANDROID_ROOT) && \
export ANDROID_PRODUCT=zoom3 && \
./install.sh --no-x --no-bcdevice
endif
ifeq ($(OMAPES),3.x)
@cd $(GFX_REL_ES3_LIB_SRCPATH_ANDROID) && \
export DISCIMAGE=$(ANDROID_DISCIMAGE) && \
export ANDROID_ROOT=$(ANDROID_ROOT) && \
export ANDROID_PRODUCT=zoom3 && \
./install.sh --no-x --no-bcdevice
endif
ifeq ($(OMAPES),5.x)
@cd $(GFX_REL_ES5_LIB_SRCPATH_ANDROID) && \
export DISCIMAGE=$(ANDROID_DISCIMAGE) && \
export ANDROID_ROOT=$(ANDROID_ROOT) && \
export ANDROID_PRODUCT=zoom3 && \
./install.sh --no-x --no-bcdevice
endif
ifeq ($(OMAPES),6.x)
@cd $(GFX_REL_ES6_LIB_SRCPATH_ANDROID) && \
export DISCIMAGE=$(ANDROID_DISCIMAGE) && \
export ANDROID_ROOT=$(ANDROID_ROOT) && \
export ANDROID_PRODUCT=zoom3 && \
./install.sh --no-x --no-bcdevice
endif
############################# HELP ##################################
help_km:
@echo ""
@echo "Usage (for build): make"
@echo "Usage (for install): make install OMAPES={2.x | 3.x | 5.x | 6.x}"
@echo "See online Graphics Getting Started Guide for further details."
@echo ""
###########################################################################