Change in simtrace2[master]: firmware: add crc stub to all dfu apps to ensure reliable loading

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Hoernchen gerrit-no-reply at lists.osmocom.org
Wed Dec 8 09:44:18 UTC 2021


Hello Jenkins Builder, laforge, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/simtrace2/+/26463

to look at the new patch set (#3).

Change subject: firmware: add crc stub to all dfu apps to ensure reliable loading
......................................................................

firmware: add crc stub to all dfu apps to ensure reliable loading

DFU flashing of apps sometimes aborts, and although rare this leads to
broken devices if no boot button or serial/jtag access exists, because
the bootloader will keep trying to start a half-flashed app that then
crashes at some point.

The easiest fix that works with existing bootloaders is to prepend a
small 512 byte stub that calculcates the crc and compares it with the
crc calculated at build time, and then either starts the actual app, or
sets the dfu flag and resets. This ensures we either have a working,
running app, or end up in the bootloader, ready to flash again.

For obvious reasons this only applies to dfu apps, and not to flash
targets like the actual bootloader itself.

Change-Id: Id6df0486c8b779889d21800dc2441b3aa9af8a5f
---
M firmware/Makefile
M firmware/apps/blupdate/main.c
M firmware/libboard/common/resources/sam3s4/dfu.ld
M firmware/libboard/common/resources/sam3s4/flash.ld
A firmware/libcommon/source/crcstub.c
A firmware/misc/crctool.c
6 files changed, 215 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/63/26463/3
-- 
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26463
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Id6df0486c8b779889d21800dc2441b3aa9af8a5f
Gerrit-Change-Number: 26463
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211208/f9dc0e5c/attachment.htm>


More information about the gerrit-log mailing list