|
CycloneBOOT 2.6.6
Secure Bootloader for ARM Cortex-M MCU
|
CycloneBOOT Bootloader fallback managment. More...
#include "boot_fallback.h"#include "debug.h"#include "image/image.h"#include "second_stage/boot.h"#include "second_stage/boot_common.h"Macros | |
| #define | TRACE_LEVEL CBOOT_TRACE_LEVEL |
Functions | |
| cboot_error_t | fallbackFindSlotWithEquivImg (BootContext *context, Slot **slotEquivImg, Memory *memories) |
| Search for the fallback slot that contains the image equivalent of the current image in internal flash slot. "Equivalent" means that the image to be found will have the same index than the current image in internal flash. | |
| cboot_error_t | fallbackCompareSlots (Slot *slot1, Slot *slot2, int8_t *res) |
| Compare two given slots together with respect to the index of the images inside the slots. | |
| cboot_error_t | fallbackDeleteSlot (Slot *slot) |
| Delete the given slot. In other words it erase the content of the given slot. | |
| cboot_error_t | fallbackRestoreBackupSlot (BootContext *context, Slot *slot) |
| Restore the image contained in the backup slot. It will extract the firmware application from the image inside the backup slot. Then a new image that old the back application firmware will be generated in internal memory slot. It will allow the system to boot to the backup application firmware. | |
| bool_t | bootIsFallbackAvailable (BootContext *context) |
| Report whether a fall back to a previous firmware is possible. | |
| cboot_error_t | fallbackTask (BootContext *context, Memory *memories) |
| Fallback Task routine. | |
CycloneBOOT Bootloader fallback managment.
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.
| bool_t bootIsFallbackAvailable | ( | BootContext * | context | ) |
Report whether a fall back to a previous firmware is possible.
| [in] | context | Pointer to the Bootloader context |
| cboot_error_t fallbackCompareSlots | ( | Slot * | slot1, |
| Slot * | slot2, | ||
| int8_t * | res | ||
| ) |
Compare two given slots together with respect to the index of the images inside the slots.
| [in] | slot1 | Pointer to the first slot to be compared with. |
| [in] | slot2 | Pointer to the second slot to be compared with. |
| [ou] | res Result of the slot comparison. |
| cboot_error_t fallbackDeleteSlot | ( | Slot * | slot | ) |
Delete the given slot. In other words it erase the content of the given slot.
| [in] | slot | Pointer to the slot to be deleted. |
| cboot_error_t fallbackFindSlotWithEquivImg | ( | BootContext * | context, |
| Slot ** | slotEquivImg, | ||
| Memory * | memories | ||
| ) |
Search for the fallback slot that contains the image equivalent of the current image in internal flash slot. "Equivalent" means that the image to be found will have the same index than the current image in internal flash.
| [in] | context | Pointer to bootloader context. |
| [out] | slotEquivImg | Pointer to the slot that holding the equivalent image. |
| cboot_error_t fallbackRestoreBackupSlot | ( | BootContext * | context, |
| Slot * | slot | ||
| ) |
Restore the image contained in the backup slot. It will extract the firmware application from the image inside the backup slot. Then a new image that old the back application firmware will be generated in internal memory slot. It will allow the system to boot to the backup application firmware.
| [in] | slot | Pointer to the slot to be deleted. |
| cboot_error_t fallbackTask | ( | BootContext * | context, |
| Memory * | memories | ||
| ) |
Fallback Task routine.
| [in] | context | Pointer to the Bootloader context |