barebox: use the symlink to copy the barebox binary to the images directory
authorGregory Hermant <gregory.hermant@calao-systems.com>
Thu, 22 Nov 2012 02:35:11 +0000 (02:35 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 10 Dec 2012 20:56:54 +0000 (21:56 +0100)
Barebox creates a symlink to the binary. This symlink points to
the barebox.bin or to the compressed zbarebox.bin binary.

Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com>
Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
boot/barebox/barebox.mk

index a025d5f4a3eba81104ddeb45bfc0f5f6b25c4ec3..6cc49766923e28e0bd81f3e20ba709d8e21c3f5f 100644 (file)
@@ -72,7 +72,11 @@ define BAREBOX_BUILD_CMDS
 endef
 
 define BAREBOX_INSTALL_IMAGES_CMDS
-       cp $(@D)/barebox.bin $(BINARIES_DIR)
+       if test -h $(@D)/barebox-flash-image ; then \
+               cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
+       else \
+               cp $(@D)/barebox.bin $(BINARIES_DIR);\
+       fi
 endef
 
 ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)