Using upstream qdl possible?
Summary
Would it be possible to replace the pre-packaged version of qdl with a self-compiled version from Upstream?
Details / Background Info
the prepacked qdl depends on libxml2.so.2 which is insecure and for example not packaged in NixOS anymore, thus making particle tachyon setup not work on NixOS
Environment (if relevant)
- OS:
- Node (run
node -v): - NPM (run
npm -v): - Particle CLI (run
particle version):
+1 on this. On a NixOS system and am unable to set up my Particle Tachyon via the CLI.
I've created a patched version of the CLI that will attempt to use the qdl command provided in PATH if it exists.
But I have noticed that the upstream QDL is missing features that the included binary includes, notably the --zip parameter and the --skip-reset flags, both of which the particle-cli uses.
To flash my tachyon, I also removed the --skip-reset from the code, which required me to re-enter flashing mode multiple times (as expected since the board is now resetting). This got the CLI all the way to the final stage when it needed the --zip option.
So, I stopped the CLI there and unzipped the ~/.particle/downloads/tachyon-ubuntu-20.04-NA-headless-formfactor_dvt-1.0.161.zip myself into a tachyon-firmware folder and flashed the board with:
# Use an updated QDL version available on nixpkgs unstable
nix shell github:NixOS/nixpkgs/5b1e9a3f5a9fb689ba6383ecbdf4d7c9513cdf9d#qdl
# Flash as sudo since I don't have udev rules installed
sudo qdl --debug --storage ufs --serial E6723BF6 \
--include tachyon-firmware/images/qcm6490/edl \
tachyon-firmware/images/qcm6490/edl/prog_firehose_ddr.elf \
tachyon-firmware/images/qcm6490/edl/rawprogram_unsparse0.xml \
tachyon-firmware/images/qcm6490/edl/rawprogram1.xml \
tachyon-firmware/images/qcm6490/edl/rawprogram2.xml \
tachyon-firmware/images/qcm6490/edl/rawprogram3.xml \
tachyon-firmware/images/qcm6490/edl/rawprogram4.xml \
tachyon-firmware/images/qcm6490/edl/rawprogram5.xml \
tachyon-firmware/images/qcm6490/edl/rawprogram6.xml \
tachyon-firmware/images/qcm6490/edl/patch0.xml \
tachyon-firmware/images/qcm6490/edl/patch1.xml \
tachyon-firmware/images/qcm6490/edl/patch2.xml \
tachyon-firmware/images/qcm6490/edl/patch3.xml \
tachyon-firmware/images/qcm6490/edl/patch4.xml \
tachyon-firmware/images/qcm6490/edl/patch5.xml \
tachyon-firmware/images/qcm6490/edl/patch6.xml
After this, my board booted right up. Though, it did not connect to particle and the LED was stuck fading green in/out. I was able to open a shell via adb, and found that the modem was not working, which I believe is a separate issue. All the other particle services and command utilities were successfully installed.