You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/04/24 04:21:46 UTC
(nuttx-apps) branch master updated: mcuboot: add option to specify MCUboot source git repository
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new a9fdc0bae mcuboot: add option to specify MCUboot source git repository
a9fdc0bae is described below
commit a9fdc0baea39875fff9dfb6107a2b571e1e26829
Author: Michal Lenc <mi...@seznam.cz>
AuthorDate: Tue Apr 23 11:47:50 2024 +0200
mcuboot: add option to specify MCUboot source git repository
Configuration option MCUBOOT_REPOSITORY adds possibility to configure
MCUboot GIT repository to be downloaded (for specified hash commit or
version). This allows to use different forks and personal repositories.
MCUboot main repository is kept as default option.
Signed-off-by: Michal Lenc <mi...@seznam.cz>
---
boot/mcuboot/Kconfig | 12 ++++++++++++
boot/mcuboot/Makefile | 13 +++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/boot/mcuboot/Kconfig b/boot/mcuboot/Kconfig
index c09133149..f5c904a7a 100644
--- a/boot/mcuboot/Kconfig
+++ b/boot/mcuboot/Kconfig
@@ -12,9 +12,21 @@ menuconfig BOOT_MCUBOOT
if BOOT_MCUBOOT
+config MCUBOOT_REPOSITORY
+ string "MCUboot GIT repository"
+ default "github.com/mcu-tools/mcuboot"
+ ---help---
+ Specifies the location of MCUboot GIT repository . This
+ is by default MCUboot main GIT repository, but it can be changed
+ to user's fork if required.
+
config MCUBOOT_VERSION
string "MCUboot version"
default "fefc398cc13ebbc527e297fe9df78cd98a359d75"
+ ---help---
+ Defines MCUboot version to be downloaded. Either release tag
+ or commit hash should be specified. Using newer MCUboot version
+ may cause compatability issues.
config MCUBOOT_ENABLE_LOGGING
bool "Enable MCUboot logging"
diff --git a/boot/mcuboot/Makefile b/boot/mcuboot/Makefile
index 3fbd6c62a..8232a1250 100644
--- a/boot/mcuboot/Makefile
+++ b/boot/mcuboot/Makefile
@@ -20,10 +20,11 @@
include $(APPDIR)/Make.defs
-MCUBOOT_VERSION := $(patsubst "%",%,$(CONFIG_MCUBOOT_VERSION))
-MCUBOOT_TARBALL = $(MCUBOOT_VERSION).tar.gz
-MCUBOOT_UNPACK = mcuboot
-MCUBOOT_SRCDIR = $(MCUBOOT_UNPACK)$(DELIM)boot$(DELIM)bootutil$(DELIM)src
+MCUBOOT_VERSION := $(patsubst "%",%,$(CONFIG_MCUBOOT_VERSION))
+MCUBOOT_REPOSITORY := $(patsubst "%",%,$(CONFIG_MCUBOOT_REPOSITORY))
+MCUBOOT_TARBALL = $(MCUBOOT_VERSION).tar.gz
+MCUBOOT_UNPACK = mcuboot
+MCUBOOT_SRCDIR = $(MCUBOOT_UNPACK)$(DELIM)boot$(DELIM)bootutil$(DELIM)src
DEPPATH += --dep-path $(MCUBOOT_UNPACK)$(DELIM)src
DEPPATH += --dep-path $(MCUBOOT_SRCDIR)
@@ -75,8 +76,8 @@ CXXFLAGS += ${INCDIR_PREFIX}mcuboot/ext/tinycrypt/lib/include
endif
$(MCUBOOT_TARBALL):
- $(Q) echo "Downloading MCUboot-$(MCUBOOT_VERSION)"
- $(Q) curl -O -L https://github.com/mcu-tools/mcuboot/archive/$(MCUBOOT_TARBALL)
+ $(Q) echo "Downloading MCUboot-$(MCUBOOT_VERSION) from $(MCUBOOT_REPOSITORY)"
+ $(Q) curl -O -L --proto-default https $(MCUBOOT_REPOSITORY)/archive/$(MCUBOOT_TARBALL)
$(MCUBOOT_UNPACK): $(MCUBOOT_TARBALL)
$(Q) echo "Unpacking: $(MCUBOOT_TARBALL) -> $(MCUBOOT_UNPACK)"