Hello osmith, Jenkins Builder, laforge, tsaitgaist,

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

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

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

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 contrib/prepare_upload.sh
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
7 files changed, 245 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/63/26463/7
--
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: 7
Gerrit-Owner: Hoernchen <ew...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: osmith <osm...@sysmocom.de>
Gerrit-Reviewer: tsaitgaist <kre...@sysmocom.de>
Gerrit-MessageType: newpatchset

Reply via email to