From: Gerhard Sittig Date: Sat, 19 Feb 2022 12:01:27 +0000 (+0100) Subject: sigrok-fwextract-kingst-la2016: extract more blobs (all of them) X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9814f29fa896bd7a68d33548df2a6f4d8c66bb16;p=sigrok-util.git sigrok-fwextract-kingst-la2016: extract more blobs (all of them) The previous implementation exclusively extracted the 01a2 MCU firmware and the LA1016 and LA2016 FPGA bitstreams. The sigrok device driver already supports more devices, and may easily support even more similar devices when their firmware becomes available. Simplify users' reports for currently unsupported devices by just extracting all blobs from the KingstVis executable. This eliminates the necessity to manipulate the extractor script (including regexes), raising the application's diag verbosity is sufficient. Users decide how many of the extracted blobs they copy to the firmware directory, keeping unused files is non-fatal. --- diff --git a/firmware/kingst-la/sigrok-fwextract-kingst-la2016 b/firmware/kingst-la/sigrok-fwextract-kingst-la2016 index ac626bc..712bb01 100755 --- a/firmware/kingst-la/sigrok-fwextract-kingst-la2016 +++ b/firmware/kingst-la/sigrok-fwextract-kingst-la2016 @@ -198,21 +198,14 @@ if __name__ == "__main__": exe_fn = options.executable res = qt_resources(exe_fn) - writer = res_writer(res) - # extract all firmware and fpga bitstreams - # writer.extract_re(r"fwfpga/(.*)", r"kingst-\1-fpga.bitstream") - # writer.extract_re(r"fwusb/fw(.*)", r"kingst-la-\1.fw", decoder=maybe_intel_hex_as_blob) - - # extract fx2 mcu firmware for both the la2016 and la1016 - # note that 0x01a2 is the usb pid for both of these devices - writer.extract_re("fwusb/fw01A2", "kingst-la-01a2.fw", decoder=maybe_intel_hex_as_blob) - - # extract fpga bitstreams for la2016 - # there are two bitstreams, newer hardware uses the 'a1' bitstream - writer.extract_re("fwfpga/LA2016(.*)", r"kingst-la2016\1-fpga.bitstream") - - # extract fpga bitstreams for la1016 - # there are two bitstreams, newer hardware uses the 'a1' bitstream - writer.extract_re("fwfpga/LA1016(.*)", r"kingst-la1016\1-fpga.bitstream") + # Extract all MCU firmware and FPGA bitstream images. The sigrok + # project may not cover all KingstVIS supported devices. Users can + # either just copy those files which are strictly required for their + # specific device (diagnostics will identify those). Or just copy a + # few more files while some of them remain unused later (their size + # is small). Seeing which files would be contained is considered + # valuable, to identify device variants or candidate models. + writer.extract_re(r"fwusb/fw(.*)", r"kingst-la-\1.fw", decoder=maybe_intel_hex_as_blob) + writer.extract_re(r"fwfpga/(.*)", r"kingst-\1-fpga.bitstream")