This mode assists in validating the `rawprogram_.xml` and `patch_.xml`
files, as well as the Firehose commands that are expected to be sent
to the Firehose programmer.
Dry run implementation is also expected to be extended for
the Digests Table generation required for Firehose Validated Image
Programming (VIP).
Example of usage:
$ qdl --dry-run --serial=0AA94EFD --debug prog_firehose_ddr.elf rawprogram*.xml patch*.xml
qdl version v2.1-24-g30ac3a8-dirty
This is a dry-run execution of QDL. No actual flashing has been performed
waiting for programmer...
FIREHOSE WRITE: <?xml version="1.0"?>
<data><configure MemoryName="ufs" MaxPayloadSizeToTargetInBytes="1048576"
verbose="0" ZLPAwareHost="1" SkipStorageInit="0"/></data>
FIREHOSE WRITE: <?xml version="1.0"?>
<data><configure MemoryName="ufs" MaxPayloadSizeToTargetInBytes="0"
verbose="0" ZLPAwareHost="1" SkipStorageInit="0"/></data>
accepted max payload size: 0
FIREHOSE WRITE: <?xml version="1.0"?>
<data><program SECTOR_SIZE_IN_BYTES="4096" num_partition_sectors="131072"
physical_partition_number="0" start_sector="6" filename="efi.bin"/></data>
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Decouple the flashing logic from the underlying type of communication.
This is needed for introducing simulation mode, where no real flashing is
performed, but firehose packets are used for other tasks, like
VIP table generation.
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Introduce the --allow-fusing parameter, which must be explicitly set
if the "secdata" partition is programmed, as it will lead to irreversible
changes (fuses will be blown during the next boot).
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Split the implementation of the program_find_bootable_partition() function
into two functions. One of these should be a generic program_find_partition()
function that can be used to search for a specific program struct in the
programs linked list.
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Fix build warning in sahara protocol implementation:
sahara.c: In function ‘sahara_debug64_one’:
sahara.c:348:25: warning: ignoring return value of ‘write’
declared with attribute ‘warn_unused_result’ [-Wunused-result]
348 | write(fd, buf, n);
| ^~~~~~~~~~~~~~~~~
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Add Linux arm64, Mac Intel and Windows arm64 to the CI build. GitHub Actions runners for those platforms are available for OSS repos for free.
Signed-off-by: Julien Vanier <jvanier@gmail.com>
Data files must be opened in binary mode on Windows to avoid EOF being reported early when null bytes are encountered.
Signed-off-by: Julien Vanier <jvanier@gmail.com>
GitHub Actions doesn't provide workers for Ubuntu arm64 or Mac x64. A paid plan with hosted runners is necessary for those architectures.
Signed-off-by: Julien Vanier <jvanier@gmail.com>
Compile for Linux x64 and arm64, Mac x64 and arm64 and Windows x64 on GitHub Actions. Upload binaries and required libraries for testing on those systems.
Signed-off-by: Julien Vanier <jvanier@gmail.com>
Make build compatible with Windows using MSYS2 MINGW64 compiler. Add a small compatibility file for functions that don't exist in MINGW64.
Signed-off-by: Julien Vanier <jvanier@gmail.com>
Erase operations are currently only supported on devices using NAND storage. With this change, erase operations also work on devices with UFS storage.
Signed-off-by: Julien Vanier <julien@particle.io>
Using fake target name forces make to rebuild all targets that depend on
it. Properly specify version.h as a target name and use double-colon to
let make know that it's a special build target.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>