<p>Hoernchen <strong>uploaded patch set #5</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/simtrace2/+/26463">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">firmware: add crc stub to all dfu apps to ensure reliable loading<br><br>DFU flashing of apps sometimes aborts, and although rare this leads to<br>broken devices if no boot button or serial/jtag access exists, because<br>the bootloader will keep trying to start a half-flashed app that then<br>crashes at some point.<br><br>The easiest fix that works with existing bootloaders is to prepend a<br>small 512 byte stub that calculcates the crc and compares it with the<br>crc calculated at build time, and then either starts the actual app, or<br>sets the dfu flag and resets. This ensures we either have a working,<br>running app, or end up in the bootloader, ready to flash again.<br><br>For obvious reasons this only applies to dfu apps, and not to flash<br>targets like the actual bootloader itself.<br><br>Change-Id: Id6df0486c8b779889d21800dc2441b3aa9af8a5f<br>---<br>M contrib/prepare_upload.sh<br>M firmware/Makefile<br>M firmware/apps/blupdate/main.c<br>M firmware/libboard/common/resources/sam3s4/dfu.ld<br>M firmware/libboard/common/resources/sam3s4/flash.ld<br>A firmware/libcommon/source/crcstub.c<br>A firmware/misc/crctool.c<br>7 files changed, 253 insertions(+), 28 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/63/26463/5</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/simtrace2/+/26463">change 26463</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/simtrace2/+/26463"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: simtrace2 </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id6df0486c8b779889d21800dc2441b3aa9af8a5f </div>
<div style="display:none"> Gerrit-Change-Number: 26463 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: tsaitgaist <kredon@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>