* [Buildroot] [PATCH] sam-ba: use correct host arch binary for sam-ba symlink
@ 2018-03-22 16:24 Joshua Henderson
2018-03-25 20:25 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Joshua Henderson @ 2018-03-22 16:24 UTC (permalink / raw)
To: buildroot
Make the symlink created in the host/bin directory point to the right host arch
binary. This takes into account using the 32 bit or 64 bit binary.
Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
---
package/sam-ba/sam-ba.mk | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/package/sam-ba/sam-ba.mk b/package/sam-ba/sam-ba.mk
index 244ede3..3ad98e0 100644
--- a/package/sam-ba/sam-ba.mk
+++ b/package/sam-ba/sam-ba.mk
@@ -23,10 +23,16 @@ endef
# then create a symbolic link from $(HOST_DIR)/bin to the
# application binary, for easier usage.
+ifeq ($(HOSTARCH),x86_64)
+SAM_BA_BIN_NAME=sam-ba_64
+else
+SAM_BA_BIN_NAME=sam-ba
+endif
+
define HOST_SAM_BA_INSTALL_CMDS
mkdir -p $(HOST_DIR)/opt/sam-ba/
cp -a $(@D)/* $(HOST_DIR)/opt/sam-ba/
- ln -sf ../../opt/sam-ba/sam-ba $(HOST_DIR)/bin/sam-ba
+ ln -sf ../opt/sam-ba/$(SAM_BA_BIN_NAME) $(HOST_DIR)/bin/sam-ba
endef
$(eval $(host-generic-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] sam-ba: use correct host arch binary for sam-ba symlink
2018-03-22 16:24 [Buildroot] [PATCH] sam-ba: use correct host arch binary for sam-ba symlink Joshua Henderson
@ 2018-03-25 20:25 ` Thomas Petazzoni
2018-03-26 18:10 ` Joshua Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-03-25 20:25 UTC (permalink / raw)
To: buildroot
Hello Joshua,
On Thu, 22 Mar 2018 09:24:26 -0700, Joshua Henderson wrote:
> Make the symlink created in the host/bin directory point to the right host arch
> binary. This takes into account using the 32 bit or 64 bit binary.
>
> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
> ---
> package/sam-ba/sam-ba.mk | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
In fact, your commit does much more than fixing the sam-ba symlink
depending on the host architecture: the sam-ba symlink was *always*
broken. Indeed, you're changing this:
- ln -sf ../../opt/sam-ba/sam-ba $(HOST_DIR)/bin/sam-ba
+ ln -sf ../opt/sam-ba/$(SAM_BA_BIN_NAME) $(HOST_DIR)/bin/sam-ba
I.e you're removing one level of ../ when creating the relative
symlink. And this is needed since we moved $(HOST_DIR)/usr to
$(HOST_DIR).
So even on a x86 32 bit system, where the binary is named "sam-ba",
your commit fixes the symbolic link. I've reworded the commit log
accordingly, and applied your patch. Thanks!
Peter: this commit qualifies for 2018.02.x.
Joshua: what about updating to 2.17, or even Sam-ba 3.x ?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] sam-ba: use correct host arch binary for sam-ba symlink
2018-03-25 20:25 ` Thomas Petazzoni
@ 2018-03-26 18:10 ` Joshua Henderson
2018-03-26 18:15 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Joshua Henderson @ 2018-03-26 18:10 UTC (permalink / raw)
To: buildroot
Thomas, Alexandre,
On 03/25/2018 01:25 PM, Thomas Petazzoni wrote:
> Hello Joshua,
>
> On Thu, 22 Mar 2018 09:24:26 -0700, Joshua Henderson wrote:
>> Make the symlink created in the host/bin directory point to the right host arch
>> binary. This takes into account using the 32 bit or 64 bit binary.
>>
>> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
>> ---
>> package/sam-ba/sam-ba.mk | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> In fact, your commit does much more than fixing the sam-ba symlink
> depending on the host architecture: the sam-ba symlink was *always*
> broken. Indeed, you're changing this:
>
> - ln -sf ../../opt/sam-ba/sam-ba $(HOST_DIR)/bin/sam-ba
> + ln -sf ../opt/sam-ba/$(SAM_BA_BIN_NAME) $(HOST_DIR)/bin/sam-ba
>
> I.e you're removing one level of ../ when creating the relative
> symlink. And this is needed since we moved $(HOST_DIR)/usr to
> $(HOST_DIR).
>
> So even on a x86 32 bit system, where the binary is named "sam-ba",
> your commit fixes the symbolic link. I've reworded the commit log
> accordingly, and applied your patch. Thanks!
That is correct. Thank you for clarifying.
>
> Peter: this commit qualifies for 2018.02.x.
>
> Joshua: what about updating to 2.17, or even Sam-ba 3.x ?
I have something in this direction in progress. I just have to finish up reconciling the update to sam-ba 3.x with things like board/atmel/flasher.sh. I'm not sure what that means yet. Should flasher.sh stick around?
Josh
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] sam-ba: use correct host arch binary for sam-ba symlink
2018-03-26 18:10 ` Joshua Henderson
@ 2018-03-26 18:15 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-03-26 18:15 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 26 Mar 2018 11:10:32 -0700, Joshua Henderson wrote:
> I have something in this direction in progress. I just have to
> finish up reconciling the update to sam-ba 3.x with things like
> board/atmel/flasher.sh. I'm not sure what that means yet. Should
> flasher.sh stick around?
It doesn't have to, as long as there is some reasonable details in
board/atmel/readme.txt that explains who to flash the boards.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-26 18:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-22 16:24 [Buildroot] [PATCH] sam-ba: use correct host arch binary for sam-ba symlink Joshua Henderson
2018-03-25 20:25 ` Thomas Petazzoni
2018-03-26 18:10 ` Joshua Henderson
2018-03-26 18:15 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox