summaryrefslogtreecommitdiffstats
path: root/images
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2019-12-04 17:01:58 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-12-09 10:23:54 +0100
commit554f4cabf86d24dcf2648c0396d4dfcd215d0ce6 (patch)
tree971ea258c3aab0b86577d9d157330de23b602b96 /images
parente9e329f3811c13b3013420015e916f1de4deb915 (diff)
downloadbarebox-554f4cabf86d24dcf2648c0396d4dfcd215d0ce6.tar.gz
barebox-554f4cabf86d24dcf2648c0396d4dfcd215d0ce6.tar.xz
images: i.MX: rearrange image rules in preparation for boilerplate removal
The following commit will introduce a variable define to remove the duplication in the different [supe]*imximg rules. Prepare for this by rearranging the command line flags to line up with the letters in the extension (i.e. -e -s for esimximg instead of -s -e) and by splitting off a multi-target rule into two. The former improves readability when the define is introduced, as it is then easy to see the correspondence between extension and arguments. The latter is needed because we will call the variable for each target. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images')
-rw-r--r--images/Makefile.imx13
1 files changed, 8 insertions, 5 deletions
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 6572474e19..53d4ac8202 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -31,17 +31,20 @@ $(obj)/%.pimximg: $(obj)/% FORCE
-p $($(patsubst $(obj)/%.pblb,PBL_MEMORY_SIZE_%,$<)))
$(obj)/%.psimximg: $(obj)/% FORCE
- $(call if_changed,imx_image,$(CFG_$(patsubst %.psimximg,%.imximg,$(@F))),-s \
- -p $($(patsubst $(obj)/%.pblb,PBL_MEMORY_SIZE_%,$<)))
+ $(call if_changed,imx_image,$(CFG_$(patsubst %.psimximg,%.imximg,$(@F))),\
+ -p $($(patsubst $(obj)/%.pblb,PBL_MEMORY_SIZE_%,$<)) -s)
$(obj)/%.simximg: $(obj)/% FORCE
$(call if_changed,imx_image,$(CFG_$(patsubst %.simximg,%.imximg,$(@F))),-s)
$(obj)/%.usimximg: $(obj)/% FORCE
- $(call if_changed,imx_image,$(CFG_$(patsubst %.usimximg,%.imximg,$(@F))),-s -u)
+ $(call if_changed,imx_image,$(CFG_$(patsubst %.usimximg,%.imximg,$(@F))),-u -s)
+
+$(obj)/%.esimximg: $(obj)/% FORCE
+ $(call if_changed,imx_image,$(CFG_$(patsubst %.esimximg,%.imximg,$(@F))),-e -s)
-$(obj)/%.esimximg $(obj)/%.esimximg.dek: $(obj)/% FORCE
- $(call if_changed,imx_image,$(CFG_$(patsubst %.esimximg,%.imximg,$(@F))),-s -e)
+$(obj)/%.esimximg.dek: $(obj)/% FORCE
+ $(call if_changed,imx_image,$(CFG_$(patsubst %.esimximg,%.imximg,$(@F))),-e -s)
.SECONDEXPANSION:
$(obj)/%.img.dek: $(obj)/$$(FILE_$$(@F))