mcumgr-cli: add package - #30550
mcumgr-cli: add package#30550brucerry wants to merge 1 commit into
Conversation
861e70d to
4207db6
Compare
MCU Manager (mcumgr) is the application tool that enables a user to communicate with and manage remote devices running an mcumgr server. It supports firmware upgrades, file management, and device management over various transports including serial, BLE, and UDP. Signed-off-by: Bruce Cheung <bruce.cheung@emplustech.com>
964a7b6 to
42de7b6
Compare
|
|
||
| PKG_LICENSE:=Apache-2.0 | ||
| PKG_LICENSE_FILES:=LICENSE | ||
| PKG_MAINTAINER:= |
There was a problem hiding this comment.
A new package must name a real maintainer as Name <email>; this is empty, and the @apache in the PR body is the upstream org, not someone who maintains the package in this feed.
| PKG_MAINTAINER:= | |
| PKG_MAINTAINER:=Bruce Cheung <bruce.cheung@emplustech.com> |
Generated by Claude Code
| PKG_VERSION:=1.0.0 | ||
| PKG_RELEASE:=1 | ||
|
|
||
| PKG_SOURCE_PROTO:=git | ||
| PKG_SOURCE_URL:=https://github.com/apache/mynewt-mcumgr-cli.git | ||
| PKG_SOURCE_VERSION:=5c56bd24066c780aad5836429bfa2ecc4f9a944c |
There was a problem hiding this comment.
1.0.0 matches nothing upstream — apache/mynewt-mcumgr-cli has no tags and no releases (git ls-remote --tags is empty), and 5c56bd2 is simply current master, committed 2022-10-04. For an untagged git source, set PKG_SOURCE_DATE and let download.mk derive PKG_VERSION (here: 2022.10.04~5c56bd24). PKG_MIRROR_HASH has to be regenerated afterwards, since the mirror tarball name contains the version.
| PKG_VERSION:=1.0.0 | |
| PKG_RELEASE:=1 | |
| PKG_SOURCE_PROTO:=git | |
| PKG_SOURCE_URL:=https://github.com/apache/mynewt-mcumgr-cli.git | |
| PKG_SOURCE_VERSION:=5c56bd24066c780aad5836429bfa2ecc4f9a944c | |
| PKG_RELEASE:=1 | |
| PKG_SOURCE_PROTO:=git | |
| PKG_SOURCE_URL:=https://github.com/apache/mynewt-mcumgr-cli.git | |
| PKG_SOURCE_DATE:=2022-10-04 | |
| PKG_SOURCE_VERSION:=5c56bd24066c780aad5836429bfa2ecc4f9a944c |
Generated by Claude Code
| PKG_LICENSE_FILES:=LICENSE | ||
| PKG_MAINTAINER:= | ||
|
|
||
| PKG_BUILD_DIR:=$(BUILD_DIR)/mcumgr-cli-$(PKG_VERSION) |
There was a problem hiding this comment.
Identical to the default in include/package.mk:11, so it can go. It is also :=-expanded here, before package.mk is included, so it would expand to .../mcumgr-cli- and break the build once PKG_VERSION is derived from PKG_SOURCE_DATE.
| PKG_BUILD_DIR:=$(BUILD_DIR)/mcumgr-cli-$(PKG_VERSION) |
Generated by Claude Code
| define Package/mcumgr-cli/install | ||
| $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) | ||
|
|
||
| $(INSTALL_DIR) $(1)/usr/bin/ | ||
| $(CP) $(PKG_INSTALL_DIR)/usr/bin/mcumgr $(1)/usr/bin/ | ||
| endef | ||
|
|
There was a problem hiding this comment.
GoPackage/Package/Install/Bin takes the package install root, so passing $(PKG_INSTALL_DIR) drops the binary in the build dir and forces the $(CP) to fetch it back out. Defining this block also makes the GoBinPackage call below a no-op (it is ifndef-guarded); drop the block and let GoBinPackage provide the recipe, as e.g. net/dnslookup does.
| define Package/mcumgr-cli/install | |
| $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) | |
| $(INSTALL_DIR) $(1)/usr/bin/ | |
| $(CP) $(PKG_INSTALL_DIR)/usr/bin/mcumgr $(1)/usr/bin/ | |
| endef |
Generated by Claude Code
| endef | ||
|
|
||
| $(eval $(call GoBinPackage,mcumgr-cli)) | ||
| $(eval $(call BuildPackage,mcumgr-cli)) |
There was a problem hiding this comment.
The generic CI runtime check runs the installed binary and expects PKG_VERSION in its output, but mcumgr reports the hardcoded VersionString: "0.0.0-dev", and GO_PKG_LDFLAGS_X cannot patch it since it is a struct field assigned in main, not a package-level string var. Add a test-version.sh in net/mcumgr-cli/ to override that check.
Generated by Claude Code
Maintainer:
Description:
🧪 Run Testing Details
✅ Formalities