diff options
author | Teresa Gámez <t.gamez@phytec.de> | 2014-05-15 11:10:09 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-06-09 21:50:55 +0200 |
commit | 0172c2c801f511b2e0b42d68f2eb3988a4c6af94 (patch) | |
tree | 0c39029fd766099f91be828de942568f90f52b30 /rules/barebox_mlo.make | |
parent | e055ef0d79a1eb84c760978c943dd0b918476365 (diff) | |
download | ptxdist-0172c2c801f511b2e0b42d68f2eb3988a4c6af94.tar.gz ptxdist-0172c2c801f511b2e0b42d68f2eb3988a4c6af94.tar.xz |
barebox_mlo: use images/barebox-*-mlo.img as images
New barebox versions may create multiple MLO images.
Adapted barebox_mlo rule to handle this.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/barebox_mlo.make')
-rw-r--r-- | rules/barebox_mlo.make | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/rules/barebox_mlo.make b/rules/barebox_mlo.make index 3c5357560..f90955c8f 100644 --- a/rules/barebox_mlo.make +++ b/rules/barebox_mlo.make @@ -76,9 +76,18 @@ $(STATEDIR)/barebox_mlo.install: $(STATEDIR)/barebox_mlo.targetinstall: @$(call targetinfo) # #barebox renamed barebox.bin.ift to MLO, so fall back to barebox.bin.ift - @ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \ - "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \ - install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO" + @rm -f $(IMAGEDIR)/MLO + @for image in `ls $(BAREBOX_MLO_DIR)/images/barebox-*-mlo.img`; do \ + install -D -m644 $$image $(IMAGEDIR)/`basename $$image`; \ + if [ ! -e "$(IMAGEDIR)/MLO" ]; then \ + ln -sf `basename $$image` $(IMAGEDIR)/MLO; \ + fi; \ + done + @if [ ! -e "$(IMAGEDIR)/MLO" ]; then \ + ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \ + "$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \ + install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"; \ + fi @$(call touch) |