Commit 2c19f9c8 authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski
Browse files
parents c6153874 1a9c6d84
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ jobs:
        - "sig-ecdsa-mbedtls enc-aes256-ec256 validate-primary-slot"
        - "sig-rsa validate-primary-slot overwrite-only downgrade-prevention"
        - "sig-rsa validate-primary-slot ram-load"
        - "sig-rsa enc-rsa validate-primary-slot ram-load"
        - "sig-rsa validate-primary-slot direct-xip"
        - "sig-rsa validate-primary-slot ram-load multiimage"
        - "sig-rsa validate-primary-slot direct-xip multiimage"
+9 −11
Original line number Diff line number Diff line
# [mcuboot](http://mcuboot.com/)
# [MCUboot](http://mcuboot.com/)

[![Package on PyPI](https://img.shields.io/pypi/v/imgtool.svg)][pypi]
[![Coverity Scan Build Status](https://scan.coverity.com/projects/12307/badge.svg)][coverity]
@@ -16,7 +16,7 @@
[travis]: https://travis-ci.org/mcu-tools/mcuboot
[license]: https://github.com/mcu-tools/mcuboot/blob/main/LICENSE

This is mcuboot version 1.8.0-rc2
This is MCUboot version 1.8.0

MCUboot is a secure bootloader for 32-bit MCUs. The goal of MCUboot is to
define a common infrastructure for the bootloader, system flash layout on
@@ -24,7 +24,7 @@ microcontroller systems, and to provide a secure bootloader that enables
simple software upgrades.

MCUboot is operating system and hardware independent and relies on
hardware porting layers from the operating. Currently, mcuboot works
hardware porting layers from the operating. Currently, MCUboot works
with both the Apache Mynewt and Zephyr operating systems, but more
ports are planned in the future. RIOT is currently supported as a boot
target with a complete port planned.
@@ -45,7 +45,7 @@ Instructions for different operating systems can be found here:
The issues being planned and worked on are tracked using GitHub issues. To
participate please visit:

[MCUBoot GitHub Issues](https://github.com/mcu-tools/mcuboot/issues)
[MCUboot GitHub Issues](https://github.com/mcu-tools/mcuboot/issues)

~~Issues were previously tracked on [MCUboot JIRA](https://runtimeco.atlassian.net/projects/MCUB/summary)
, but it is now deprecated.~~
@@ -55,7 +55,7 @@ participate please visit:
Information and documentation on the bootloader are stored within the source.

~~It was previously also documented on confluence:
[MCUBoot Confluence](https://runtimeco.atlassian.net/wiki/discover/all-updates)
[MCUboot Confluence](https://runtimeco.atlassian.net/wiki/discover/all-updates)
however, it is now deprecated and not currently maintained~~

For more information in the source, here are some pointers:
@@ -66,15 +66,13 @@ For more information in the source, here are some pointers:
- [boot/mynewt](boot/mynewt): Mynewt bootloader app
- [boot/nuttx](boot/nuttx): Bootloader application and port of MCUboot interfaces for NuttX.
- [boot/espressif](boot/espressif): Bootloader application and MCUboot port for Espressif SoCs.
- [imgtool](scripts/imgtool.py): A tool to securely sign firmware images for booting by mcuboot.
- [imgtool](scripts/imgtool.py): A tool to securely sign firmware images for booting by MCUboot.
- [sim](sim): A bootloader simulator for testing and regression

## Joining

Developers welcome!

* Our developer mailing list:
  https://groups.io/g/mcuboot
* Our Slack channel: https://mcuboot.slack.com/ <br />
  Get your invite [here!](https://join.slack.com/t/mcuboot/shared_invite/MjE2NDcwMTQ2MTYyLTE1MDA4MTIzNTAtYzgyZTU0NjFkMg)
* Our IRC channel: http://irc.freenode.net, #mcuboot
* [Our developer mailing list](https://groups.io/g/MCUBoot)
* [Our Slack channel](https://mcuboot.slack.com/) <br />
  Get [your invite](https://join.slack.com/t/mcuboot/shared_invite/MjE2NDcwMTQ2MTYyLTE1MDA4MTIzNTAtYzgyZTU0NjFkMg)
+13 −10
Original line number Diff line number Diff line
@@ -63,6 +63,10 @@

BOOT_LOG_MODULE_DECLARE(mcuboot);

#ifndef BOOT_IMAGE_NUMBER
#define BOOT_IMAGE_NUMBER MCUBOOT_IMAGE_NUMBER
#endif

#define BOOT_SERIAL_INPUT_MAX   512
#define BOOT_SERIAL_OUT_MAX     (128 * MCUBOOT_IMAGE_NUMBER)

@@ -77,10 +81,6 @@ BOOT_LOG_MODULE_DECLARE(mcuboot);
#define htons(x) sys_cpu_to_be16(x)
#endif

#ifndef BOOT_IMAGE_NUMBER
#define BOOT_IMAGE_NUMBER MCUBOOT_IMAGE_NUMBER
#endif

#if (BOOT_IMAGE_NUMBER > 1)
#define IMAGES_ITER(x) for ((x) = 0; (x) < BOOT_IMAGE_NUMBER; ++(x))
#else
@@ -444,14 +444,14 @@ out:
}

/*
 * Console echo control/image erase. Send empty response, don't do anything.
 * Send rc code only.
 */
static void
bs_empty_rsp(char *buf, int len)
bs_rc_rsp(int rc_code)
{
    map_start_encode(&cbor_state, 10);
    tstrx_put(&cbor_state, "rc");
    uintx32_put(&cbor_state, 0);
    uintx32_put(&cbor_state, rc_code);
    map_end_encode(&cbor_state, 10);
    boot_serial_output();
}
@@ -463,7 +463,7 @@ bs_empty_rsp(char *buf, int len)
static void
bs_reset(char *buf, int len)
{
    bs_empty_rsp(buf, len);
    bs_rc_rsp(0);

#ifdef __ZEPHYR__
#ifdef CONFIG_MULTITHREADING
@@ -515,24 +515,27 @@ boot_serial_input(char *buf, int len)
            bs_upload(buf, len);
            break;
        default:
            bs_empty_rsp(buf, len);
            bs_rc_rsp(MGMT_ERR_ENOTSUP);
            break;
        }
    } else if (hdr->nh_group == MGMT_GROUP_ID_DEFAULT) {
        switch (hdr->nh_id) {
        case NMGR_ID_CONS_ECHO_CTRL:
            bs_empty_rsp(buf, len);
            bs_rc_rsp(0);
            break;
        case NMGR_ID_RESET:
            bs_reset(buf, len);
            break;
        default:
            bs_rc_rsp(MGMT_ERR_ENOTSUP);
            break;
        }
    } else if (MCUBOOT_PERUSER_MGMT_GROUP_ENABLED == 1) {
        if (bs_peruser_system_specific(hdr, buf, len, &cbor_state) == 0) {
            boot_serial_output();
        }
    } else {
        bs_rc_rsp(MGMT_ERR_ENOTSUP);
    }
}

+3 −0
Original line number Diff line number Diff line
@@ -25,6 +25,9 @@
#include <stddef.h>
#include <stdint.h>

/* mcuboot_config.h is needed for MCUBOOT_HW_KEY to work */
#include "mcuboot_config/mcuboot_config.h"

#ifdef __cplusplus
extern "C" {
#endif
+2 −2
Original line number Diff line number Diff line
@@ -224,8 +224,9 @@ boot_find_status(int image_index, const struct flash_area **fap)

        off = boot_magic_off(*fap);
        rc = flash_area_read(*fap, off, magic, BOOT_MAGIC_SZ);
        if (rc != 0) {
        flash_area_close(*fap);

        if (rc != 0) {
            return rc;
        }

@@ -233,7 +234,6 @@ boot_find_status(int image_index, const struct flash_area **fap)
            return 0;
        }

        flash_area_close(*fap);
    }

    /* If we got here, no magic was found */
Loading