summaryrefslogtreecommitdiffstats
path: root/rules/barebox.make
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-01-24 16:23:27 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-01-29 10:50:50 +0100
commitce949b343b5bf2ae3c31d42e0534366ae4acbebc (patch)
treeb3215f6eadb5b067d6a65049174baea7eef671dc /rules/barebox.make
parentc6705c1e7b70b75746763eaf1e336b8adb5cf377 (diff)
downloadptxdist-ce949b343b5bf2ae3c31d42e0534366ae4acbebc.tar.gz
ptxdist-ce949b343b5bf2ae3c31d42e0534366ae4acbebc.tar.xz
barebox: use images/barebox-*.img as images
New barebox versions will create those and there may be more than one. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules/barebox.make')
-rw-r--r--rules/barebox.make11
1 files changed, 10 insertions, 1 deletions
diff --git a/rules/barebox.make b/rules/barebox.make
index 375c6e3cb..2dcc0ca83 100644
--- a/rules/barebox.make
+++ b/rules/barebox.make
@@ -134,7 +134,16 @@ ifdef PTXCONF_BAREBOX_BAREBOXENV
@$(call install_finish, barebox)
endif
- @if [ -e $(BAREBOX_DIR)/barebox-flash-image ]; then \
+ @rm -f $(IMAGEDIR)/barebox-image
+ @for image in `ls $(BAREBOX_DIR)/images/barebox-*.img`; do \
+ install -D -m644 $$image $(IMAGEDIR)/`basename $$image`; \
+ if [ ! -e $(IMAGEDIR)/barebox-image ]; then \
+ ln -sf `basename $$image` $(IMAGEDIR)/barebox-image; \
+ fi; \
+ done
+ @if [ -e $(IMAGEDIR)/barebox-image ]; then \
+ :; \
+ elif [ -e $(BAREBOX_DIR)/barebox-flash-image ]; then \
install -D -m644 $(BAREBOX_DIR)/barebox-flash-image $(IMAGEDIR)/barebox-image; \
else \
install -D -m644 $(BAREBOX_DIR)/barebox.bin $(IMAGEDIR)/barebox-image; \