summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Gonzalez2012-06-01 13:46:34 -0500
committerTony Lofthouse2012-07-30 12:56:24 -0500
commite72411ed59c25391dbc4d5f7af595e25900ae7a4 (patch)
tree9be2ec2d060bb90ddb6e2a866eaeee4c6d252057
parentea8f31fa6aee1b13577b254a74daf35e34641e4a (diff)
downloaddevice-ti-proprietary-open-e72411ed59c25391dbc4d5f7af595e25900ae7a4.tar.gz
device-ti-proprietary-open-e72411ed59c25391dbc4d5f7af595e25900ae7a4.tar.xz
device-ti-proprietary-open-e72411ed59c25391dbc4d5f7af595e25900ae7a4.zip
SGX prebuilt binaries: Untar to and copy from intermediate directories.
This will untar SGX prebuilt binaries to an intermediate directory and install them in the Android filesystem without polluting the git tree with untracked files. Change-Id: I806a9aa4a939b6109399df999603706e3c34f17e
-rw-r--r--Android.mk13
-rw-r--r--omap4/sgx/Android.mk42
-rwxr-xr-xuntar.sh1
3 files changed, 45 insertions, 11 deletions
diff --git a/Android.mk b/Android.mk
index ce2221f..96a5cf3 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,9 +1,20 @@
1LOCAL_PATH := $(my-dir) 1LOCAL_PATH := $(my-dir)
2$(hide $(shell $(LOCAL_PATH)/untar.sh $(LOCAL_PATH)/omap4 sgx $(LOCAL_PATH)/omap4/sgx.tgz)) 2img-sgx.untarred_intermediates := $(call intermediates-dir-for, FAKE, img-sgx.untarred)
3img-sgx.untarred_timestamp := $(img-sgx.untarred_intermediates)/stamp
4img-sgx.untarred_bin := $(img-sgx.untarred_intermediates)/sgx
5img-sgx.tar := $(LOCAL_PATH)/$(TARGET_BOARD_PLATFORM)/sgx.tgz
6
3$(hide $(shell $(LOCAL_PATH)/untar.sh $(LOCAL_PATH)/wl12xx wpan $(LOCAL_PATH)/wl12xx/wpan.tgz)) 7$(hide $(shell $(LOCAL_PATH)/untar.sh $(LOCAL_PATH)/wl12xx wpan $(LOCAL_PATH)/wl12xx/wpan.tgz))
4 8
5include $(call all-subdir-makefiles) 9include $(call all-subdir-makefiles)
6 10
11$(img-sgx.untarred_timestamp) : $(img-sgx.tar)
12 @echo "Unzip $(dir $@) <- $<"
13 $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
14 $(hide) tar -C $(dir $@) -xzf $<
15 $(hide) touch $@
16
17
7# Install Ducati from the TGZ defined in the device-inherited mk file 18# Install Ducati from the TGZ defined in the device-inherited mk file
8############################################# 19#############################################
9ifneq ($(DUCATI_TGZ),) 20ifneq ($(DUCATI_TGZ),)
diff --git a/omap4/sgx/Android.mk b/omap4/sgx/Android.mk
index 8b9f258..92b2354 100644
--- a/omap4/sgx/Android.mk
+++ b/omap4/sgx/Android.mk
@@ -1,5 +1,3 @@
1LOCAL_PATH := $(call my-dir)
2
3define _add-sgx-vendor-lib 1define _add-sgx-vendor-lib
4include $$(CLEAR_VARS) 2include $$(CLEAR_VARS)
5$(if $(word 2,$1),$(error Invalid SGX module name $1)) 3$(if $(word 2,$1),$(error Invalid SGX module name $1))
@@ -8,10 +6,16 @@ LOCAL_SRC_FILES := $1
8LOCAL_MODULE_TAGS := optional 6LOCAL_MODULE_TAGS := optional
9LOCAL_MODULE_SUFFIX := $(suffix $1) 7LOCAL_MODULE_SUFFIX := $(suffix $1)
10LOCAL_MODULE_CLASS := SHARED_LIBRARIES 8LOCAL_MODULE_CLASS := SHARED_LIBRARIES
11LOCAL_MODULE_PATH := $$(TARGET_OUT)$(abspath /vendor/$(dir $1)) 9LOCAL_MODULE_PATH := $$(TARGET_OUT_VENDOR)/$(dir $1)
12LOCAL_STRIP_MODULE := false 10LOCAL_STRIP_MODULE := false
13OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_LIBRARIES) 11OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_LIBRARIES)
14include $$(BUILD_PREBUILT) 12LOCAL_PATH := $$(img-sgx.untarred_bin)
13include $$(BUILD_SYSTEM)/base_rules.mk
14$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1
15$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP)
16 @echo "Copy $$@ <- $$(PRIVATE_SRC)"
17 @mkdir -p $(dir $$@)
18 $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@
15endef 19endef
16 20
17define _add-sgx-vendor-bin 21define _add-sgx-vendor-bin
@@ -22,10 +26,16 @@ LOCAL_SRC_FILES := $1
22LOCAL_MODULE_TAGS := optional 26LOCAL_MODULE_TAGS := optional
23LOCAL_MODULE_SUFFIX := $(suffix $1) 27LOCAL_MODULE_SUFFIX := $(suffix $1)
24LOCAL_MODULE_CLASS := EXECUTABLES 28LOCAL_MODULE_CLASS := EXECUTABLES
25LOCAL_MODULE_PATH := $$(TARGET_OUT)$(abspath /vendor/$(dir $1)) 29LOCAL_MODULE_PATH := $$(TARGET_OUT_VENDOR)/$(dir $1)
26LOCAL_STRIP_MODULE := false 30LOCAL_STRIP_MODULE := false
27OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_EXECUTABLES) 31OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_EXECUTABLES)
28include $$(BUILD_PREBUILT) 32LOCAL_PATH := $$(img-sgx.untarred_bin)
33include $$(BUILD_SYSTEM)/base_rules.mk
34$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1
35$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP)
36 @echo "Copy $$@ <- $$(PRIVATE_SRC)"
37 @mkdir -p $$(dir $$@)
38 $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@
29endef 39endef
30 40
31define _add-sgx-vendor-etc 41define _add-sgx-vendor-etc
@@ -36,10 +46,16 @@ LOCAL_SRC_FILES := $1
36LOCAL_MODULE_TAGS := optional 46LOCAL_MODULE_TAGS := optional
37LOCAL_MODULE_SUFFIX := $(suffix $1) 47LOCAL_MODULE_SUFFIX := $(suffix $1)
38LOCAL_MODULE_CLASS := ETC 48LOCAL_MODULE_CLASS := ETC
39LOCAL_MODULE_PATH := $$(TARGET_OUT)$(abspath /$(dir $1)) 49LOCAL_MODULE_PATH := $$(TARGET_OUT)/$(dir $1)
40LOCAL_STRIP_MODULE := false 50LOCAL_STRIP_MODULE := false
41OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_ETC) 51OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_ETC)
42include $$(BUILD_PREBUILT) 52LOCAL_PATH := $$(img-sgx.untarred_bin)
53include $$(BUILD_SYSTEM)/base_rules.mk
54$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1
55$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP)
56 @echo "Copy $$@ <- $$(PRIVATE_SRC)"
57 @mkdir -p $$(dir $$@)
58 $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@
43endef 59endef
44 60
45define _add-sgx-vendor-km 61define _add-sgx-vendor-km
@@ -50,10 +66,16 @@ LOCAL_SRC_FILES := $1
50LOCAL_MODULE_TAGS := optional 66LOCAL_MODULE_TAGS := optional
51LOCAL_MODULE_SUFFIX := $(suffix $1) 67LOCAL_MODULE_SUFFIX := $(suffix $1)
52LOCAL_MODULE_CLASS := ETC 68LOCAL_MODULE_CLASS := ETC
53LOCAL_MODULE_PATH := $$(TARGET_OUT)$(abspath /lib/$(dir $1)) 69LOCAL_MODULE_PATH := $$(TARGET_OUT)/lib/$(dir $1)
54LOCAL_STRIP_MODULE := false 70LOCAL_STRIP_MODULE := false
55OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_ETC) 71OVERRIDE_BUILT_MODULE_PATH := $$(TARGET_OUT_INTERMEDIATE_ETC)
56include $$(BUILD_PREBUILT) 72LOCAL_PATH := $$(img-sgx.untarred_bin)
73include $$(BUILD_SYSTEM)/base_rules.mk
74$$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $$(img-sgx.untarred_bin)/$1
75$$(LOCAL_BUILT_MODULE) : $$(img-sgx.untarred_timestamp) | $$(ACP)
76 @echo "Copy $$@ <- $$(PRIVATE_SRC)"
77 @mkdir -p $$(dir $$@)
78 $$(hide) $$(ACP) -fp $$(PRIVATE_SRC) $$@
57endef 79endef
58 80
59prebuilt_sgx_vendor_libs := \ 81prebuilt_sgx_vendor_libs := \
diff --git a/untar.sh b/untar.sh
index 2e5b77f..a7a0948 100755
--- a/untar.sh
+++ b/untar.sh
@@ -11,4 +11,5 @@ if [ -d $1/$2 ]; then
11 rm -rf $1/$2 11 rm -rf $1/$2
12fi 12fi
13 13
14[ ! -d $1 ] && mkdir -p $1
14tar -C $1 -zxf $3 15tar -C $1 -zxf $3