mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Teresa Gámez" <t.gamez@phytec.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images
Date: Wed, 14 May 2014 09:54:32 +0200	[thread overview]
Message-ID: <1400054072-1680-2-git-send-email-t.gamez@phytec.de> (raw)
In-Reply-To: <1400054072-1680-1-git-send-email-t.gamez@phytec.de>

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>
---
 rules/barebox_mlo.make |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/rules/barebox_mlo.make b/rules/barebox_mlo.make
index 3c53575..8b2bce4 100644
--- a/rules/barebox_mlo.make
+++ b/rules/barebox_mlo.make
@@ -76,9 +76,20 @@ $(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 \
+		:; \
+	else \
+		ptxd_get_path "$(BAREBOX_MLO_DIR)/MLO" \
+			"$(BAREBOX_MLO_DIR)/barebox.bin.ift" && \
+		install -D -m644 "$${ptxd_reply}" "$(IMAGEDIR)/MLO"; \
+	fi
 
 	@$(call touch)
 
-- 
1.7.0.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2014-05-14  7:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14  7:54 [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts Teresa Gámez
2014-05-14  7:54 ` Teresa Gámez [this message]
2014-05-14  8:47   ` [ptxdist] [PATCH 2/2] barebox_mlo: use images/barebox-*-mlo.img as images Alexander Aring
2014-05-14  9:04     ` Uwe Kleine-König
2014-05-14  9:22       ` Alexander Aring
2014-05-14  8:49 ` [ptxdist] [PATCH 1/2] dtc: Seperate path and filename of dts Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400054072-1680-2-git-send-email-t.gamez@phytec.de \
    --to=t.gamez@phytec.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox