Hi,
I'm trying to generate a ZIP file for DFU update of the bootloader only. I'm using nrfutil 5.2.0 (but also tried the master branch of the github repository pc-nrfutil, it results in the same behavior).
nrfutil pkg generate --bootloader Bootloader.ihex --hw-version 52 --key-file mykey.pem --sd-req 0xA5 --bootloader-version 5 out.zip
When I display the package:
$ nrfutil pkg display out.zip
DFU Package: <out.zip>:
|
|- Image count: 1
|
|- Image #0:
|- Type: bootloader
|- Image file: Bootloader.ihex
|- Init packet file: Bootloader.ihex
|
|- op_code: INIT
|- signature_type: ECDSA_P256_SHA256
|- signature (little-endian): <sig>
|
|- fw_version: 0x00000005 (5)
|- hw_version 0x00000034 (52)
|- sd_req: 0xA5
|- type: BOOTLOADER
|- sd_size: 0
|- bl_size: 35400
|- app_size: 0
|
|- hash_type: SHA256
|- hash (little-endian): <hash>
|
|- boot_validation_type: ['VALIDATE_GENERATED_CRC']
|- boot_validation_signature (little-endian): ['']
|
|- is_debug: False
However, when I now manually unzip the ZIP file, there's a "ihex" file inside it. When I open it with a text editor, however, it's only 141 Byte big, and contains binary data (so no actual valid Intel HEX data).
Subsequently, an update with nrfutil dfu ble also fails (pc_ble_driver_py.exceptions.NordicSemiException: Response Code InvalidParameter). Segger RTT logging yield a "Trying to create an object with a size that is not page aligned".
The bootloader is the secure_ble_dfu example from the nRF SDK 14.2.0.
What's also surprising to me: When I generate a package with both softdevice and bootloader, the zip file contains a valid hex file and a ".dat" file with 153 bytes. It seems to be that that's what the bootloader.hex from the first package is supposed to be?