particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

feat: [sc-130894] Include UUID (app hash) in particle binary inspect #769

Closed monkbroc closed 1 month ago

monkbroc commented 2 months ago

Story details: https://app.shortcut.com/particle/story/130894

To help compare firmware running on a device from particle serial inspect with a firmware binary, it's helpful to have particle binary inspect output the UUID (app hash).

Steps to test:

particle binary inspect tracker-edge-19@3.3.0.bin
tracker-edge-19@3.3.0.bin
 CRC is ok (2356f30a)
 Compiled for tracker
 This is an application module number 2 at version 6
 It has a UUID of fb333f913ca62afdb67b9bc95ac335f9ebfb9e7e00f50525aef7bf22135df48e
 It is firmware for product id 26 at version 19
 It depends on a system module number 1 at version 3301

Also include assets in output from .bin (i.e not a bundle) to see if a binary includes assets.

particle binary inspect argon_firmware_1728490941405.bin
argon_firmware_1728490941405.bin
 CRC is ok (8ee2479a)
 Compiled for argon
 This is an application module number 2 at version 6
 It has a UUID of ebf856a8e18130faecac3b9a3425bb008129c94c3bc72f7d03f86391aa237d6e
 It is firmware for product id 12 at version 10
 It depends on a system module number 1 at version 6101
It depends on assets:
 my_asset.txt failed (hash should be f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 but is not in the bundle)