CycloneBOOT 2.6.6
Secure Bootloader for ARM Cortex-M MCU
Loading...
Searching...
No Matches
boot_common.h File Reference

CycloneBOOT 1st Stage Bootloader Utility Functions. More...

#include "first_stage/boot.h"

Go to the source code of this file.

Macros

#define INIT_VECT_SIZE   16
 

Functions

cboot_error_t bootCheckImage (BootContext *context)
 Verify the whole-image CRC32 integrity of the installed 2nd stage bootloader.
 
cboot_error_t bootCheckImageAt (BootContext *context, const Slot *slot)
 Verify the integrity of an image held in a slot. A candidate staged encrypted in external memory is checked on its cipher magic number, which tells the key apart, then on a trailer covering the header crc, the iv and the encrypted body.
 
bool_t bootIsEncryptedCandidate (const FlashInfo *info, const Slot *slot)
 Tell whether a candidate is stored encrypted.
 
cboot_error_t bootCheckRuntimeImageAt (BootContext *context, const Slot *slot)
 Verify the embedded runtime-integrity digest of an image held in a slot.
 

Detailed Description

CycloneBOOT 1st Stage Bootloader Utility Functions.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2021-2026 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneBOOT Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.6.6

Function Documentation

◆ bootCheckImage()

cboot_error_t bootCheckImage ( BootContext *  context)

Verify the whole-image CRC32 integrity of the installed 2nd stage bootloader.

Parameters
[in]contextPointer to Bootloader context
Returns
cboot_error_t

◆ bootCheckImageAt()

cboot_error_t bootCheckImageAt ( BootContext *  context,
const Slot *  slot 
)

Verify the integrity of an image held in a slot. A candidate staged encrypted in external memory is checked on its cipher magic number, which tells the key apart, then on a trailer covering the header crc, the iv and the encrypted body.

Parameters
[in]contextPointer to Bootloader context
[in]slotSlot holding the image to verify
Returns
cboot_error_t

◆ bootCheckRuntimeImageAt()

cboot_error_t bootCheckRuntimeImageAt ( BootContext *  context,
const Slot *  slot 
)

Verify the embedded runtime-integrity digest of an image held in a slot.

Parameters
[in]contextPointer to Bootloader context
[in]slotSlot holding the image to verify
Returns
cboot_error_t

◆ bootIsEncryptedCandidate()

bool_t bootIsEncryptedCandidate ( const FlashInfo *  info,
const Slot *  slot 
)

Tell whether a candidate is stored encrypted.

Parameters
[in]infoInformation of the memory holding the slot
[in]slotSlot holding the candidate
Returns
TRUE for an update slot in external memory, FALSE otherwise