Patchwork barebox: use the symlink to copy the barebox binary to the images directory

login
register
mail settings
Submitter Gregory Hermant
Date Nov. 22, 2012, 12:35 p.m.
Message ID <1353587711-26855-1-git-send-email-gregory.hermant@calao-systems.com>
Download mbox | patch
Permalink /patch/201040/
State Accepted
Commit 62b13aea1dadea09cdddf06f2b9673bc927dcc0c
Headers show

Comments

Gregory Hermant - Nov. 22, 2012, 12:35 p.m.
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>
---
 boot/barebox/barebox.mk |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Fabio Porcedda - Dec. 7, 2012, 11:10 a.m.
On Thu, Nov 22, 2012 at 1:35 PM, Gregory Hermant
<gregory.hermant@calao-systems.com> wrote:
> 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>
> ---
>  boot/barebox/barebox.mk |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
> index a025d5f..6cc4976 100644
> --- a/boot/barebox/barebox.mk
> +++ b/boot/barebox/barebox.mk
> @@ -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)
> --
> 1.7.9.5
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com>

Thanks
--
Fabio Porcedda
Fabio Porcedda - Dec. 7, 2012, 12:40 p.m.
On Fri, Dec 7, 2012 at 12:10 PM, Fabio Porcedda
<fabio.porcedda@gmail.com> wrote:
> On Thu, Nov 22, 2012 at 1:35 PM, Gregory Hermant
> <gregory.hermant@calao-systems.com> wrote:
>> 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>
>> ---
>>  boot/barebox/barebox.mk |    6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
>> index a025d5f..6cc4976 100644
>> --- a/boot/barebox/barebox.mk
>> +++ b/boot/barebox/barebox.mk
>> @@ -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)
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>
> Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com>

Acked-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com>

Thanks
--
Fabio Porcedda
Arnout Vandecappelle - Dec. 10, 2012, 7:17 a.m.
On 22/11/12 13:35, Gregory Hermant wrote:
> 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>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Peter Korsgaard - Dec. 10, 2012, 8:59 p.m.
>>>>> "Gregory" == Gregory Hermant <gregory.hermant@calao-systems.com> writes:

 Gregory> Barebox creates a symlink to the binary. This symlink points to
 Gregory> the barebox.bin or to the compressed zbarebox.bin binary.

Committed, thanks.

Patch

diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index a025d5f..6cc4976 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -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)