-
Notifications
You must be signed in to change notification settings - Fork 233
[nrf noup] boot: zephyr: Add bm firmware loader code #451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
boot/zephyr/firmware_loader_bm.c
Outdated
bool firmware_loader_image_valid = false; | ||
bool app_installer_is_installer_image = false; | ||
|
||
liteinstalls_init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
liteinstalls_init();
What is tis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bm_installs...
} | ||
|
||
invalid_softdevice: | ||
#ifdef CONFIG_BOOT_FIRMWARE_LOADER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't that code purposed for CONFIG_BOOT_FIRMWARE_LOADER=y only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now yes, but can be reused in future to allow for single slot mode (not firmware loader mode) with serial recovery for application and softdevice
BOOT_LOG_DBG("Booting installer"); | ||
rsp->br_image_off = flash_area_get_off(&fa_app_installer); | ||
rsp->br_hdr = &hdr_app_installer; | ||
} else if (boot_firmware_loader == true && softdevice_image_valid == true && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fully understand that when valid app_installer_image was detected then triggering the loader by the app must have been spurious. For entering by pin/pin reset
Doesn't assignment to boot app_installer_image open possibility for bricking or hanging the device by installer which has a bug which caused that it might hangs?
I would move firmware_loader_image boot assignment ahead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the installer image runs and deletes itself (well, the header) so it should not brick itself. Once the installer image runs, the integrity of the firmware loader is invalid, because it will be replacing it and the softdevice, and both must be present for the firmware loader image to be usable
Adds firmware loader code for use in baremetal mode Signed-off-by: Jamie McCrae <[email protected]>
|
#include <assert.h> | ||
#include <zephyr/kernel.h> | ||
#include <zephyr/sys/__assert.h> | ||
#include <zephyr/drivers/flash.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some includes are unneded: flash.h, usb_device.h
Adds firmware loader code for use in baremetal mode