[Buildroot] [PATCH] sam-ba: use correct host arch binary for sam-ba symlink

Joshua Henderson joshua.henderson at microchip.com
Thu Mar 22 16:24:26 UTC 2018

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 at 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)
 	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
 $(eval $(host-generic-package))

More information about the buildroot mailing list