summaryrefslogtreecommitdiffstats
blob: 859183f28185451552972aa877dd2a2556c29726 (plain) (blame)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
LOCAL_PATH := $(my-dir)
img-sgx.untarred_intermediates := $(call intermediates-dir-for, FAKE, img-sgx.untarred)
img-sgx.untarred_timestamp := $(img-sgx.untarred_intermediates)/stamp
img-sgx.untarred_bin := $(img-sgx.untarred_intermediates)/sgx
img-sgx.tar := $(LOCAL_PATH)/jacinto6/sgx.tgz

include $(call all-subdir-makefiles)

$(img-sgx.untarred_timestamp) : $(img-sgx.tar)
	@echo "Unzip $(dir $@) <- $<"
	$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
	$(hide) tar -C $(dir $@) -xzf $<
	$(hide) touch $@


# Install Ducati from the TGZ defined in the device-inherited mk file
#############################################
ifneq ($(DUCATI_TGZ),)
ti-ducati.untarred_intermediates := $(call intermediates-dir-for, FAKE, ti-ducati.untarred)
ti-ducati.untarred_timestamp := $(ti-ducati.untarred_intermediates)/stamp

$(ti-ducati.untarred_timestamp) : $(DUCATI_TGZ)
	@echo "Unzip $(dir $@) <- $<)"
	$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
	$(hide) tar -C $(dir $@) -zxf $<
	$(hide) touch $@

include $(CLEAR_VARS)
LOCAL_MODULE := $(DUCATI_BINARY)
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware

include $(BUILD_SYSTEM)/base_rules.mk

$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-ducati.untarred_intermediates)/$(DUCATI_BINARY)
$(LOCAL_BUILT_MODULE) : $(ti-ducati.untarred_timestamp) | $(ACP)
	@echo "Copy $@ <- $(PRIVATE_SRC)"
	@mkdir -p $(dir $@)
	$(hide) $(ACP) -fp $(PRIVATE_SRC) $@
endif
#############################################

#############################################
# Install J6Entry touch firmware
#############################################
ifneq ($(TOUCH_TGZ),)
ti-touch.untarred_intermediates := $(call intermediates-dir-for, FAKE, ti-touch.untarred)
ti-touch.untarred_timestamp := $(ti-touch.untarred_intermediates)/stamp

$(ti-touch.untarred_timestamp) : $(TOUCH_TGZ)
	@echo "Unzip $(dir $@) <- $<)"
	$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
	$(hide) tar -C $(dir $@) -zxf $<
	$(hide) touch $@

include $(CLEAR_VARS)
LOCAL_MODULE := $(TOUCH_BINARY)
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware

include $(BUILD_SYSTEM)/base_rules.mk

$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-touch.untarred_intermediates)/$(TOUCH_BINARY)
$(LOCAL_BUILT_MODULE) : $(ti-touch.untarred_timestamp) | $(ACP)
	@echo "Copy $@ <- $(PRIVATE_SRC)"
	@mkdir -p $(dir $@)
	$(hide) $(ACP) -fp $(PRIVATE_SRC) $@
endif
#############################################

#############################################
# Install Tesla-binary FW
#############################################

ifneq ($(TESLA_TGZ),)
ti-tesla.untarred_intermediates := $(call intermediates-dir-for, FAKE, ti-tesla.untarred)
ti-tesla.untarred_timestamp := $(ti-tesla.untarred_intermediates)/stamp

$(ti-tesla.untarred_timestamp) : $(TESLA_TGZ)
	@echo "Unzip $(dir $@) <- $<)"
	$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
	$(hide) tar -C $(dir $@) -zxf $<
	$(hide) touch $@

include $(CLEAR_VARS)
LOCAL_MODULE := tesla-dsp.bin
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware

include $(BUILD_SYSTEM)/base_rules.mk

$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-tesla.untarred_intermediates)/tesla-dsp.bin
$(LOCAL_BUILT_MODULE) : $(ti-tesla.untarred_timestamp) | $(ACP)
	@echo "Copy $@ <- $(PRIVATE_SRC)"
	@mkdir -p $(dir $@)
	$(hide) $(ACP) -fp $(PRIVATE_SRC) $@
endif
#############################################

#############################################
# Install prueth firmware
#############################################
ifneq ($(PRUETH_TGZ),)
ti-prueth.untarred_intermediates := $(call intermediates-dir-for, FAKE, ti-prueth.untarred)
ti-prueth.untarred_timestamp := $(ti-prueth.untarred_intermediates)/stamp

$(ti-prueth.untarred_timestamp) : $(PRUETH_TGZ)
	@echo "Unzip $(dir $@) <- $<)"
	$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
	$(hide) tar -C $(dir $@) -zxf $<
	$(hide) touch $@

include $(CLEAR_VARS)
LOCAL_MODULE := am57xx-pru0-prueth-fw.elf
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware/ti-pruss

include $(BUILD_SYSTEM)/base_rules.mk

$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-prueth.untarred_intermediates)/am57xx-pru0-prueth-fw.elf
$(LOCAL_BUILT_MODULE) : $(ti-prueth.untarred_timestamp) | $(ACP)
	@echo "Copy $@ <- $(PRIVATE_SRC)"
	@mkdir -p $(dir $@)
	$(hide) $(ACP) -fp $(PRIVATE_SRC) $@

include $(CLEAR_VARS)
LOCAL_MODULE := am57xx-pru1-prueth-fw.elf
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware/ti-pruss

include $(BUILD_SYSTEM)/base_rules.mk

$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-prueth.untarred_intermediates)/am57xx-pru1-prueth-fw.elf
$(LOCAL_BUILT_MODULE) : $(ti-prueth.untarred_timestamp) | $(ACP)
	@echo "Copy $@ <- $(PRIVATE_SRC)"
	@mkdir -p $(dir $@)
	$(hide) $(ACP) -fp $(PRIVATE_SRC) $@
endif
#############################################