Original bootloader hibernates with battery too low

Hello,

after flashing HackieboxNG 0.9.3c (debug) I get the following boot log:

INFO  main.c:777:main: HackieboxNG preloader debug 0.9.3 b14eb68
INFO  main.c:789:main: Wakeup by cause 7
DEBUG main.c:797:main: Mounting sd card...
TRACE helper.c:49:SdFileExists: sd:/revvox/boot/ngbootloader.bin exists.
DEBUG main.c:850:main: Open sd:/revvox/boot/ngbootloader.bin ...
DEBUG main.c:854:main: Read sd:/revvox/boot/ngbootloader.bin ...
DEBUG main.c:858:main: Read 36095 bytes
INFO  main.c:629:prepareRun: SHA256 hash=06c54cac0c61cd6fba21ab94c76969198ce41c25b10f105edc7ce60e537cd6b6 
DEBUG main.c:342:BoardDeinitCustom: Prepare board deinitialization...
INFO  main.c:758:prepareRun: Start firmware sd:/revvox/boot/ngbootloader.bin ...
INFO  main.c:777:main: HackieboxNG bootloader debug 0.9.3 b14eb68
INFO  main.c:789:main: Wakeup by cause 7
TRACE config.c:193:Config_InitImageInfos: Initialize ImageInfos
DEBUG main.c:797:main: Mounting sd card...
TRACE config.c:222:Config_ReadJsonCfg: Reading config with 2198b in size.
TRACE helper.c:60:FlashFileExists: flash:/sys/pre-img.bin exists.
INFO  main.c:406:ReadBootInfo: Read bootinfo firmware=1, state=0xabcddcba
WARN  helper.c:52:SdFileExists: sd:/revvox/boot/ng-ofw3.bin doesn't exist.
WARN  helper.c:52:SdFileExists: sd:/revvox/boot/ng-cfw1.bin doesn't exist.
WARN  helper.c:52:SdFileExists: sd:/revvox/boot/ng-cfw2.bin doesn't exist.
WARN  helper.c:52:SdFileExists: sd:/revvox/boot/ng-cfw3.bin doesn't exist.
WARN  helper.c:52:SdFileExists: sd:/revvox/boot/ng-add1.bin doesn't exist.
WARN  helper.c:52:SdFileExists: sd:/revvox/boot/ng-add2.bin doesn't exist.
WARN  helper.c:52:SdFileExists: sd:/revvox/boot/ng-add3.bin doesn't exist.
DEBUG main.c:807:main: Battery level is 11998, poweroff at 8869
DEBUG main.c:825:main: Open flash:/sys/pre-img.bin ...
DEBUG main.c:832:main: Read 20480 bytes
DEBUG main.c:342:BoardDeinitCustom: Prepare board deinitialization...
INFO  main.c:755:prepareRun: Start firmware flash:/sys/pre-img.bin ...
---:--:--.---	BSP	Unknown newer hw platform (57592), last known is (16)

CC3200 bootloader v4287950848-DEBUG (M���
0uild:  dl:243.90.129 sl:32.104.144.248 hw:tb-smt-57592:253:141 sw:UNKNOWN img_ix:4
loaded battery critical level = 260866
battery_level = 4411
battery too low
---:--:--.---	BSP	Entered hibernate

The battery was charging for more than 5 hours. HackieboxNG reports a different battery level than the original bootloader, and the battery critical level seems to be way off. Do you have any idea what went wrong here?

Check the battery voltage. Maybe it is defective. If not, there may be another problem with your box.

The battery-level within HackieboxNG is just sampled once. This could be very inaccurate.
Also, the value is the raw value of the pin. I don’t know if the ofw bootloader does any calculations on it.

https://github.com/toniebox-reverse-engineering/hackiebox_cfw_ng/blob/2b00ddb8b4d672fe4ae091d5c0b53f23c6bdd865/sd-bootloader-ng/bootmanager/config.c#L10

After writing /sys/pre-img.bin again, the box booted the ofw. I don´t understand why, but am happy anyway. Thanks for your suggestions!

Great, that looks like the bootloader was defective.