Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This tool is entirely written from scratch to replace the original Denon one we have been using thus far for releases of the custom firmware.
Implementation
The updater uses Google's Go wrapper around libusb to reimplement FastBoot, the protocol used for flashing inMusic devices (and various other Linux-based devices).
It can be built with either a purely Go implementation of xz or, if go build tag
libxz
is set, a cgo wrapper around the native xz library for efficient on-the-fly image decompression. The variable ingo/Makefile
defaults to setting thelibxz
tag. Some code had to be copied over to my repository to allow determining the exact amount of data to be transferred to the device as it is required for the flashing procedure. This is also then used for progress display purposes.Matching device IDs as well as firmware version is read from the generated Device Tree Blob file, SHA1 checksum verification for the images contained in the DTB is also implemented. All other info is read from a supplied
config.toml
file of which its entire structure is packed into a Gostruct
type.The GUI is implemented using gioui. This allows clear separation of state and UI rendering without over-complications usually encountered with other frameworks I've so far tried. A Go-side built-in font is used for rendering the UI to avoid system font rendering issues in Wine during testing. It was originally even slower while I was using a data copy buffer in the FastBoot code of 4096 bytes, increasing that to 16384 bytes helped. I suspect I could set it even higher for more performance but didn't test it yet.
This is not the most optimized implementation as the
fastboot
CLI is able to flash the entire firmware within 30 seconds whereas this implementation takes slightly over twice as long.The updater generation script has been modified to use this file and to not copy the updater file to manipulate 7z to include all files without paths anymore.
The devices list also has been updated to carry proper display names for every device, the name is used as part of the generated config.toml file for the new updater.
Screenshots
Known issues
References