@@ -36,7 +36,7 @@ PIP_PROXY := --proxy $(https_proxy)
3636else
3737PIP_PROXY :=
3838endif
39- VENV_PIP_INSTALL := $(VENV_PIP ) install $(PIP_PROXY ) --timeout 90 --trusted-host pypi.org --trusted-host files.pythonhosted.org
39+ VENV_PIP_INSTALL := $(VENV_PIP ) install $(PIP_PROXY ) --no-cache-dir -- timeout 120 --retries 20 --trusted-host pypi.org --trusted-host files.pythonhosted.org
4040
4141# #############################################################################
4242# Set default goal before any targets. The default goal here is "test"
@@ -65,85 +65,123 @@ ALL_IP_UPGRADE_TARGETS =
6565ALL_GENERATE_DESIGN_TARGETS =
6666ALL_PACKAGE_DESIGN_TARGETS =
6767ALL_BUILD_TARGETS =
68- ALL_SW_BUILD_TARGETS =
6968ALL_TEST_TARGETS =
70- ALL_INSTALL_SOF_TARGETS =
69+ ALL_INSTALL_TARGETS =
70+ ALL_CLEAN_TARGETS =
71+ ALL_DEV_CLEAN_TARGETS =
7172ALL_TARGET_ALL_NAMES =
7273
74+ ALL_SW_TARGET_STEM_NAMES =
75+ ALL_SW_BUILD_TARGETS =
76+ ALL_SW_INSTALL_TARGETS =
77+
7378# Define function to create targets
7479define create_targets_on_subdir
75- ALL_TARGET_STEM_NAMES += $(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) )
76- ALL_PRE_PREP_TARGETS += $(addsuffix -pre-prep,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
77- ALL_PREP_TARGETS += $(addsuffix -prep,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
78- ALL_IP_UPGRADE_TARGETS += $(addsuffix -ip-upgrade,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
79- ALL_GENERATE_DESIGN_TARGETS += $(addsuffix -generate-design,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
80- ALL_PACKAGE_DESIGN_TARGETS += $(addsuffix -package-design,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
81- ALL_BUILD_TARGETS += $(addsuffix -build,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
82- ALL_SW_BUILD_TARGETS += $(addsuffix -sw-build,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
83- ALL_TEST_TARGETS += $(addsuffix -test,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
84- ALL_INSTALL_SOF_TARGETS += $(addsuffix -install-sof,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
85- ALL_TARGET_ALL_NAMES += $(addsuffix -all,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
80+ ALL_TARGET_STEM_NAMES += $(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) )
81+ ALL_PRE_PREP_TARGETS += $(addsuffix -pre-prep,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
82+ ALL_PREP_TARGETS += $(addsuffix -prep,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
83+ ALL_IP_UPGRADE_TARGETS += $(addsuffix -ip-upgrade,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
84+ ALL_GENERATE_DESIGN_TARGETS += $(addsuffix -generate-design,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
85+ ALL_PACKAGE_DESIGN_TARGETS += $(addsuffix -package-design,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
86+ ALL_BUILD_TARGETS += $(addsuffix -build,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
87+ ALL_TEST_TARGETS += $(addsuffix -test,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
88+ ALL_INSTALL_TARGETS += $(addsuffix -install,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
89+ ALL_CLEAN_TARGETS += $(addsuffix -clean,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
90+ ALL_DEV_CLEAN_TARGETS += $(addsuffix -dev-clean,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
91+ ALL_TARGET_ALL_NAMES += $(addsuffix -all,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
8692
8793
8894$(strip $(1 ) ) -%-pre-prep : venv
89- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -pre-prep
95+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -pre-prep
9096
9197$(strip $(1 ) ) -%-prep : venv
92- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -prep
98+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -prep
9399
94100$(strip $(1 ) ) -%-ip-upgrade : venv
95- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -ip-upgrade
101+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -ip-upgrade
96102
97103$(strip $(1 ) ) -%-generate-design : venv
98- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -generate-design
104+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -generate-design
99105
100106$(strip $(1 ) ) -%-package-design :
101- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -package-design INSTALL_ROOT=$(INSTALL_ROOT ) /$(strip $(3 ) )
107+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -package-design INSTALL_ROOT_DESIGNS= $( INSTALL_ROOT ) / $( strip $( 4 ) ) /designs INSTALL_ROOT_BINARIES =$(INSTALL_ROOT ) /$(strip $(4 ) ) /binaries/ $( strip $( 1 ) ) INSTALL_ROOT_ARTIFACTS= $( INSTALL_ROOT ) /artifacts/ $( strip $( 1 ) )
102108
103109$(strip $(1 ) ) -%-build :
104- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -build
110+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -build
105111
106- $(strip $(1 ) ) -%-sw-build :
107- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -sw-build
112+ $(strip $(1 ) ) -%-build-sw :
113+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -build-sw
114+
115+ $(strip $(1 ) ) -%-install-sw :
116+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -install-sw INSTALL_ROOT_DESIGNS=$(INSTALL_ROOT ) /$(strip $(4 ) ) /designs INSTALL_ROOT_BINARIES=$(INSTALL_ROOT ) /$(strip $(4 ) ) /binaries/$(strip $(1 ) ) INSTALL_ROOT_ARTIFACTS=$(INSTALL_ROOT ) /artifacts/$(strip $(1 ) )
108117
109118$(strip $(1 ) ) -%-test :
110- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -test
111-
112- $(strip $(1 ) ) -%-install-sof :
113- $(MAKE ) --no-print-directory -C $(strip $(1 ) ) $$* -install-sof INSTALL_ROOT=$(INSTALL_ROOT ) /$(strip $(3 ) )
114-
115- .PHONY: $(addsuffix -all,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
116- $(addsuffix -all,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) ) : venv
117- $(MAKE ) $(addsuffix -pre-prep,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
118- $(MAKE ) $(addsuffix -generate-design,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
119- $(MAKE ) $(addsuffix -package-design,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
120- $(MAKE ) $(addsuffix -prep,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
121- $(MAKE ) $(addsuffix -build,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
122- $(MAKE ) $(addsuffix -sw-build,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
123- $(MAKE ) $(addsuffix -test,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
124- $(MAKE ) $(addsuffix -install-sof,$(addprefix $(strip $(1 ) ) -,$(strip $(2 ) ) ) )
119+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -test
120+
121+ $(strip $(1 ) ) -%-install :
122+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -install INSTALL_ROOT_DESIGNS=$(INSTALL_ROOT ) /$(strip $(4 ) ) /designs INSTALL_ROOT_BINARIES=$(INSTALL_ROOT ) /$(strip $(4 ) ) /binaries/$(strip $(1 ) ) INSTALL_ROOT_ARTIFACTS=$(INSTALL_ROOT ) /artifacts/$(strip $(1 ) )
123+
124+ $(strip $(1 ) ) -%-clean :
125+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -clean
126+
127+ $(strip $(1 ) ) -%-clean-sw :
128+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -clean-sw
129+
130+ $(strip $(1 ) ) -%-dev-clean :
131+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -dev-clean
132+
133+ .PHONY: $(addsuffix -all,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
134+ $(addsuffix -all,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) ) : venv
135+ $(MAKE ) $(addsuffix -pre-prep,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
136+ $(MAKE ) $(addsuffix -generate-design,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
137+ $(MAKE ) $(addsuffix -package-design,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
138+ $(MAKE ) $(addsuffix -prep,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
139+ $(MAKE ) $(addsuffix -build,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
140+ $(MAKE ) $(addsuffix -test,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
141+ $(MAKE ) $(addsuffix -install,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
142+ $(MAKE ) $(addsuffix -build-sw,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
143+ $(MAKE ) $(addsuffix -install-sw,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
144+ endef
145+
146+ # Create targets per SW project on each subdir
147+ define create_sw_targets_on_subdir
148+ ALL_SW_TARGET_STEM_NAMES += $(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) )
149+ ALL_SW_BUILD_TARGETS += $(addsuffix -build-sw,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
150+ ALL_SW_INSTALL_TARGETS += $(addsuffix -install-sw,$(addprefix $(strip $(1 ) ) -,$(strip $(3 ) ) ) )
125151
152+ $(strip $(1 ) ) -%-build-sw :
153+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -build-sw INSTALL_ROOT_DESIGNS=$(INSTALL_ROOT ) /$(strip $(4 ) ) /designs INSTALL_ROOT_BINARIES=$(INSTALL_ROOT ) /$(strip $(4 ) ) /binaries/$(strip $(1 ) ) INSTALL_ROOT_ARTIFACTS=$(INSTALL_ROOT ) /artifacts/$(strip $(1 ) )
154+
155+ $(strip $(1 ) ) -%-install-sw :
156+ $(MAKE ) --no-print-directory -C $(strip $(2 ) ) $$* -install-sw INSTALL_ROOT_DESIGNS=$(INSTALL_ROOT ) /$(strip $(4 ) ) /designs INSTALL_ROOT_BINARIES=$(INSTALL_ROOT ) /$(strip $(4 ) ) /binaries/$(strip $(1 ) ) INSTALL_ROOT_ARTIFACTS=$(INSTALL_ROOT ) /artifacts/$(strip $(1 ) )
126157endef
127158
159+
128160# Create rules for subdirs
129161TARGET_SUBDIR := \
130162 a5ed065es-premium-devkit-oobe \
131163 a5ed065es-premium-devkit-emmc \
132164 a5ed065es-premium-devkit-debug2 \
133- a5ed065es-modular-devkit-som
165+ a5ed065es-modular-devkit-som \
166+ a5ed013-devkit-oobe
134167
135- # Create the subdir recipes by recurinsively calling the create_targets_on_subdir on each TARGET_SUBDIR
168+ # Create the subdir recipes by recursively calling the create_targets_on_subdir on each TARGET_SUBDIR
136169define create_subdir_targets
137- $(foreach target, $(shell make --no-print-directory -q -C $(1 ) print-targets) , $(eval $(call create_targets_on_subdir, $(1 ) , $( target ) , designs ) ) )
170+ $(foreach target, $(shell make --no-print-directory -q -C $(1 ) print-targets) , $(eval $(call create_targets_on_subdir, $(1 ) ,$( 1 ) , $( target ) ,$( NOOP ) ) ) )
138171endef
139172$(foreach subdir,$(TARGET_SUBDIR),$(eval $(call create_subdir_targets,$(subdir))))
140173
174+ define create_subdir_sw_targets
175+ $(foreach target, $(shell make --no-print-directory -q -C $(1 ) print-sw-targets) , $(eval $(call create_sw_targets_on_subdir, $(1 ) ,$(1 ) ,$(target ) ,$(NOOP ) ) ) )
176+ endef
177+ $(foreach subdir,$(TARGET_SUBDIR),$(eval $(call create_subdir_sw_targets,$(subdir))))
178+
141179# ##############################################################################
142180# UTILITY TARGETS
143181# ##############################################################################
144182# Deep clean using git
145183.PHONY : dev-clean
146- dev-clean :
184+ dev-clean : $( ALL_DEV_CLEAN_TARGETS )
147185 rm -rf $(INSTALL_ROOT ) $(WORK_ROOT )
148186 git clean -dfx --exclude=/.vscode --exclude=.lfsconfig
149187
@@ -154,7 +192,7 @@ dev-update :
154192 git submodule update --init --recursive
155193
156194.PHONY : clean
157- clean :
195+ clean : $( ALL_CLEAN_TARGETS )
158196 rm -rf $(INSTALL_ROOT ) $(WORK_ROOT )
159197 git clean -dfx --exclude=/.vscode --exclude=.lfsconfig --exclude=$(VENV_DIR )
160198
@@ -199,16 +237,19 @@ package-designs: $(ALL_PACKAGE_DESIGN_TARGETS)
199237.PHONY : build
200238build : $(ALL_BUILD_TARGETS )
201239
202- # SW-Build options
203- .PHONY : sw- build
204- sw- build : $(ALL_SW_BUILD_TARGETS )
240+ # BUILD-Sw options
241+ .PHONY : build-sw
242+ build-sw : $(ALL_SW_BUILD_TARGETS )
205243
206244# Run all tests
207245.PHONY : test
208246test : $(ALL_TEST_TARGETS )
209247
210- .PHONY : install-sof
211- install-sof : $(ALL_INSTALL_SOF_TARGETS )
248+ .PHONY : install
249+ install : $(ALL_INSTALL_TARGETS )
250+
251+ .PHONY : install-sw
252+ install-sw : $(ALL_SW_INSTALL_TARGETS )
212253
213254.PHONY : all
214255all : $(ALL_TARGET_ALL_NAMES )
@@ -222,10 +263,10 @@ help:
222263 $(info ----------------)
223264 $(info all : Run and "all" target on each of the target designs)
224265 $(info ----------------)
225- $(info All Targets : $(ALL_TARGET_ALL_NAMES ) )
226- $(info Stem names : $(ALL_TARGET_STEM_NAMES ) )
227- $(info Pre-Prep Targets : $(ALL_PRE_PREP_TARGETS ) )
228- $(info Prep Targets : $(ALL_PREP_TARGETS ) )
229- $(info Build Targets : $(ALL_BUILD_TARGETS ) )
230- $(info Test Targets : $(ALL_TEST_TARGETS ) )
231- $(info Package Targets : $(ALL_PACKAGE_DESIGN_TARGETS ) )
266+ $(info All Targets : $(ALL_TARGET_ALL_NAMES ) )
267+ $(info Stem names : $(ALL_TARGET_STEM_NAMES ) )
268+ $(info Package Targets : $(ALL_PACKAGE_DESIGN_TARGETS ) )
269+ $(info Build Targets : $(ALL_BUILD_TARGETS ) )
270+ $(info Test Targets : $(ALL_TEST_TARGETS ) )
271+ $(info Software Build Targets : $(ALL_SW_BUILD_TARGETS ) )
272+ $(info Software Install Targets : $(ALL_SW_INSTALL_TARGETS ) )
0 commit comments