aboutsummaryrefslogtreecommitdiff
path: root/utils/bossa
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2021-10-20 14:27:12 +0200
committerPaul Spooren <mail@aparcar.org>2021-10-23 20:52:30 -1000
commit5dd6c8ad4617b24fa54bc5d26f37e25132315f17 (patch)
treed15901ebc58184ab75e4cf496c8ecab067ef3c10 /utils/bossa
parent4160ba8725b0812091ec630b232d3a84062699ea (diff)
bossa: add bossa
Based on the work of Hirokazu MORIKAWA (nxhack): https://github.com/nxhack/openwrt-arduino-packages/tree/master/bossa BOSSA is a flash programming utility for Atmel's SAM family of flash-based ARM microcontrollers. The motivation behind BOSSA is to create a simple, easy-to-use, open source utility to replace Atmel's SAM-BA software. Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'utils/bossa')
-rw-r--r--utils/bossa/Makefile45
-rw-r--r--utils/bossa/patches/902-musl_fd.patch12
2 files changed, 57 insertions, 0 deletions
diff --git a/utils/bossa/Makefile b/utils/bossa/Makefile
new file mode 100644
index 000000000..443664bd7
--- /dev/null
+++ b/utils/bossa/Makefile
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bossa
+PKG_VERSION:=1.9.1
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/shumatech/BOSSA/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=ca650455dfa36cbd029010167347525bea424717a71a691381c0811591c93e72
+PKG_BUILD_DIR:=$(BUILD_DIR)/BOSSA-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bossa
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libstdcpp
+ TITLE:=Utility to flash ARM microcontrollers
+ URL:=http://www.shumatech.com/web/products/bossa
+endef
+
+define Package/bossa/description
+ BOSSA is a flash programming utility for Atmel's SAM family of flash-based
+ ARM microcontrollers. The motivation behind BOSSA is to create a simple,
+ easy-to-use, open source utility to replace Atmel's SAM-BA software.
+endef
+
+define Build/Compile
+ COMMON_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
+ COMMON_LDFLAGS="$(TARGET_LINKFLAGS) $(TARGET_LDFLAGS)" \
+ $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS)" bin/bossac
+endef
+
+define Package/bossa/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/bossac $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,bossa))
diff --git a/utils/bossa/patches/902-musl_fd.patch b/utils/bossa/patches/902-musl_fd.patch
new file mode 100644
index 000000000..7ca1b2865
--- /dev/null
+++ b/utils/bossa/patches/902-musl_fd.patch
@@ -0,0 +1,12 @@
+--- a/src/PosixSerialPort.cpp
++++ b/src/PosixSerialPort.cpp
+@@ -39,6 +39,9 @@
+
+ #include <string>
+
++/* __MUSL__ */
++#include <sys/select.h>
++
+ #ifndef B460800
+ #define B460800 460800
+ #endif