Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d56f1d25d2 | ||
|
|
6588085679 |
@@ -70,6 +70,13 @@ Lib/GNU, Bin/secboot.img, Tools/GNU/link_w600_2m.ld (→ ld/) und wm_tool.c (→
|
|||||||
exportierte) `session_id`, wäre also ein größerer Eingriff für denselben Effekt. Nebenbei:
|
exportierte) `session_id`, wäre also ein größerer Eingriff für denselben Effekt. Nebenbei:
|
||||||
`nRetCode = ret` (ein lwIP-`err_t` in einer sonst `HTTP_CLIENT_*`-Codes tragenden Variable) durch
|
`nRetCode = ret` (ein lwIP-`err_t` in einer sonst `HTTP_CLIENT_*`-Codes tragenden Variable) durch
|
||||||
`HTTP_CLIENT_ERROR_BAD_STATE` ersetzt.
|
`HTTP_CLIENT_ERROR_BAD_STATE` ersetzt.
|
||||||
|
**Fix vom 2026-09-12 (am EVK gefunden):** `nl_sha256_init()` stand am Anfang von `fwup_scheduler()`,
|
||||||
|
also einmal beim Task-Start. Der Task überlebt aber jede Update-Sitzung, sodass ab dem zweiten Versuch
|
||||||
|
pro Boot ein bereits finalisierter Kontext weiterbenutzt wurde und der Trailer-Hash zwangsläufig nicht
|
||||||
|
mehr passte (`last_ota_error=hash`). Der Init sitzt jetzt dort, wo der `T_BOOTER`-Header eintrifft, also
|
||||||
|
genau einmal pro Image. Ohne diesen Fix war nach jeder Ablehnung ein Reboot nötig, bevor ein Update
|
||||||
|
überhaupt wieder gelingen konnte.
|
||||||
|
|
||||||
2. `Src/OS/RTOS/include/FreeRTOSConfig.h`: `configGENERATE_RUN_TIME_STATS 0`, QConnex-Debug-Hooks entfernt.
|
2. `Src/OS/RTOS/include/FreeRTOSConfig.h`: `configGENERATE_RUN_TIME_STATS 0`, QConnex-Debug-Hooks entfernt.
|
||||||
3. `undefined reference` beim Linken auf `EarlyInit` und `pre_gpio_config` (von
|
3. `undefined reference` beim Linken auf `EarlyInit` und `pre_gpio_config` (von
|
||||||
`sdk/Platform/Sys/wm_main.c` als `extern`-Hooks erwartet, aber nur von der App bereitgestellt):
|
`sdk/Platform/Sys/wm_main.c` als `extern`-Hooks erwartet, aber nur von der App bereitgestellt):
|
||||||
|
|||||||
@@ -190,8 +190,11 @@ static void fwup_scheduler(void *data)
|
|||||||
u32 tmplen = 0;
|
u32 tmplen = 0;
|
||||||
bool isacrossflash = FALSE;
|
bool isacrossflash = FALSE;
|
||||||
|
|
||||||
|
/* ninlight: the context is (re)initialised per image, where the T_BOOTER header arrives -
|
||||||
|
* NOT here. This task outlives every update session, so initialising once at task start
|
||||||
|
* left a finalised context behind after the first attempt and every later update in the
|
||||||
|
* same boot failed with last_ota_error=hash. Found on the EVK, 2026-09-12. */
|
||||||
nl_sha256_ctx sha;
|
nl_sha256_ctx sha;
|
||||||
nl_sha256_init(&sha);
|
|
||||||
u8 image_sha256[32] = {0};
|
u8 image_sha256[32] = {0};
|
||||||
u8 *RSA_SHA256 = NULL;
|
u8 *RSA_SHA256 = NULL;
|
||||||
|
|
||||||
@@ -264,6 +267,7 @@ static void fwup_scheduler(void *data)
|
|||||||
fwup->current_state |= TLS_FWUP_STATE_ERROR_IO;
|
fwup->current_state |= TLS_FWUP_STATE_ERROR_IO;
|
||||||
goto request_finish;
|
goto request_finish;
|
||||||
}
|
}
|
||||||
|
nl_sha256_init(&sha); /* fresh context for this image */
|
||||||
nl_sha256_update(&sha, (u8*)&booter, sizeof(T_BOOTER));
|
nl_sha256_update(&sha, (u8*)&booter, sizeof(T_BOOTER));
|
||||||
|
|
||||||
if ((IMG_TYPE_OLD_PLAIN == booter.img_type ) ||(IMG_TYPE_NEW_PLAIN == booter.img_type))
|
if ((IMG_TYPE_OLD_PLAIN == booter.img_type ) ||(IMG_TYPE_NEW_PLAIN == booter.img_type))
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ set -euo pipefail
|
|||||||
DEV=${1:?usage: tools/flash.sh <device> <port> [full]}
|
DEV=${1:?usage: tools/flash.sh <device> <port> [full]}
|
||||||
PORT=${2:?usage: tools/flash.sh <device> <port> [full]}
|
PORT=${2:?usage: tools/flash.sh <device> <port> [full]}
|
||||||
MODE=${3:-app}
|
MODE=${3:-app}
|
||||||
|
# wm_tool prepends /dev/ itself - accept either spelling.
|
||||||
|
PORT=${PORT#/dev/}
|
||||||
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
||||||
TOOL="$ROOT/build/host-tools/wm_tool"
|
TOOL="$ROOT/build/host-tools/wm_tool"
|
||||||
if [ ! -x "$TOOL" ] || [ "$ROOT/sdk/tools/wm_tool.c" -nt "$TOOL" ]; then
|
if [ ! -x "$TOOL" ] || [ "$ROOT/sdk/tools/wm_tool.c" -nt "$TOOL" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user