A zynq device firmware repairing method based on a usb interface

By building a two-step boot mechanism on the ZYNQ system platform and using the USB interface to perform firmware repair, the problems of complex operation and high professional threshold in the existing technology are solved, and user-operable local firmware repair is realized.

CN122152379APending Publication Date: 2026-06-05BEIJING DAHUA RADIO INSTR FACTORY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING DAHUA RADIO INSTR FACTORY
Filing Date
2026-03-12
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing firmware repair technologies for ZYNQ devices suffer from problems such as complex operation, high professional threshold, dependence on external conditions, and inability to achieve user-operability under a fixed boot architecture.

Method used

A two-step boot mechanism based on the ZYNQ system platform is constructed to achieve firmware repair via USB interface, including automatic detection of firmware integrity, reading the firmware from the USB flash drive and performing verification and burning.

Benefits of technology

It provides ordinary users with a simple and reliable means of firmware repair, reduces the technical threshold and time cost, and enables local repair under a fixed boot architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152379A_ABST
    Figure CN122152379A_ABST
Patent Text Reader

Abstract

The application discloses a ZYNQ device firmware repairing method based on a USB interface, and constructs a two-step starting mechanism based on a ZYNQ system platform: after power-on of the device, firstly, the ZYNQ system starts a system from a Flash, and the system automatically detects the integrity of a main firmware in an EMMC; when the main firmware is detected to be intact, the ZYNQ system immediately switches to EMMC starting, loads a complete application system, and enters a normal working mode; when the main firmware in the EMMC is detected to be abnormal, the ZYNQ system does not attempt to start the damaged firmware, but automatically enters a repairing mode, identifies a firmware file in a U disk through the USB interface, reads the firmware file into a memory and carries out verification, and after the verification, automatically burns the firmware file into a specified area of the EMMC, and the repairing process is completed. The application provides a simple and reliable ZYNQ system firmware repairing method, and only by inserting a U disk containing correct firmware and restarting the device, the complex firmware repairing process can be completed, and the technical threshold and time cost of ZYNQ system device maintenance are greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to firmware repair technology for ZYNQ devices, and more particularly to a firmware repair method for ZYNQ devices based on a USB interface. Background Technology

[0002] With the widespread application of embedded systems in industrial fields such as power electronics, system reliability and maintainability have become critical requirements. ZYNQ, as a programmable SoC integrating an ARM processor and FPGAs, is widely used in high-performance embedded systems. In actual deployments, due to long-term system operation involving reading and writing to the eMMC, environmental interference, unexpected power outages, or malicious attacks, the firmware stored in the eMMC may become corrupted, causing the system to fail to boot. Traditional firmware repair methods typically rely on professionals using JTAG or other serial port tools for on-site repair, which is complex and requires high levels of expertise and equipment, resulting in low efficiency and high maintenance costs. Furthermore, existing firmware repair solutions often rely on external devices or complex operating procedures, lacking a simple and reliable local repair method. Therefore, there is an urgent need for a localized, non-intrusive, and user-operable firmware repair mechanism to improve system reliability and maintainability.

[0003] Existing technology and defects

[0004] Currently, there are mainstream solutions for firmware repair of ZYNQ devices, such as JTAG-based repair, remote network repair, and dual-system backup boot, but all of them have significant drawbacks.

[0005] JTAG-based repair is the most basic method for debugging and restoring ZYNQ devices. It involves directly connecting an emulator to the ZYNQ processor to flash the firmware. While this method can achieve low-level repair, it requires expensive specialized tools and skilled technicians, and it cannot meet the rapid response needs of large-scale device deployments.

[0006] Remote network repair is another common method for debugging and restoring ZYNQ devices. It involves downloading firmware images from a remote server via a network interface for updates or repairs. While this method avoids on-site maintenance, its effectiveness depends entirely on a stable network link and the proper functioning of the device's network interface. In real-world industrial scenarios, network outages or corrupted device network drivers can lead to repair failures. Furthermore, this method introduces additional network security risks, making it unsuitable for many security-critical applications.

[0007] Some high-reliability ZYNQ devices also employ a dual-system backup boot scheme, which involves partitioning the storage medium into two independent system partitions. When the primary system fails, it can switch to the backup system to continue operating. This method improves system availability, but it cannot fundamentally repair a damaged primary system and occupies twice the storage space in the long run, increasing hardware costs. More importantly, this scheme will completely fail when both systems fail simultaneously due to a common cause (such as a firmware version defect).

[0008] Meanwhile, although local ZYNQ firmware repair via USB flash drive is conceptually the simplest approach, its implementation is limited by the ZYNQ hardware architecture. This solution requires the device processor to support and configure the boot mode to boot from USB devices. However, industrial equipment, for reliability, cost, or safety reasons, is designed with a fixed boot order from non-volatile memory, thus not supporting booting from USB flash drives. This fundamental hardware limitation makes the intuitive and simple USB flash drive repair solution unusable on most existing devices.

[0009] In summary, existing technologies present a clear contradiction: the simple USB flash drive repair method is limited by the boot capabilities of ZYNQ hardware, making it unusable for devices using the ZYNQ platform; while the general firmware repair technology JTAG faces high professional barriers, relies on external conditions, and lacks user operability. There is an urgent need for a user-operable local repair solution that can operate within a fixed boot architecture.

[0010] In view of this, the present invention is hereby proposed. Summary of the Invention

[0011] The purpose of this invention is to provide a firmware repair method for ZYNQ devices based on a USB interface, so as to solve the above-mentioned technical problems existing in the prior art.

[0012] The objective of this invention is achieved through the following technical solution:

[0013] A firmware repair method for ZYNQ devices based on a USB interface, comprising a two-step boot mechanism based on the ZYNQ system platform, including:

[0014] Step 1: After the device is powered on, the ZYNQ system first boots from the Flash, and the system automatically detects the integrity of the main firmware in the EMMC;

[0015] Step 2: When the main firmware is detected to be intact, the ZYNQ system immediately switches to EMMC boot, loads the complete application system, and enters normal working mode;

[0016] When an abnormality is detected in the EMMC main firmware, the ZYNQ system will not attempt to boot the corrupted firmware. Instead, it will automatically enter repair mode, identify the firmware file in the USB flash drive through the USB interface, read it into memory and verify it. After successful verification, it will automatically burn the firmware to the designated area of ​​the EMMC, thus completing the repair process.

[0017] Compared with existing technologies, the ZYNQ device firmware repair method based on the USB interface provided by this invention offers ordinary users or on-site maintenance personnel a simple and reliable means of repairing ZYNQ system firmware. Simply insert a USB flash drive containing the correct firmware and restart the device to complete the complex firmware repair process, which greatly reduces the technical threshold and time cost of ZYNQ system device maintenance. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a firmware repair method for ZYNQ devices based on a USB interface, as provided in this embodiment of the invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them, and do not constitute a limitation on the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.

[0020] First, the following explanations are provided for the terms that may be used in this article:

[0021] The terms “including,” “contains,” “comprising,” “having,” or other similar semantic descriptions shall be interpreted as non-exclusive inclusion.

[0022] The term "composed of" excludes any technical features not expressly listed. When used in a claim, it closes the claim to exclude all technical features other than those expressly listed, except for associated conventional impurities. If the term appears only in a clause of a claim, it limits the claim to the elements expressly listed in that clause; elements recited in other clauses are not excluded from the overall claim.

[0023] The technical solution provided by this invention will be described in detail below. Contents not described in detail in the embodiments of this invention are prior art known to those skilled in the art. Where specific conditions are not specified in the embodiments of this invention, they shall be performed according to conventional conditions in the art or conditions recommended by the manufacturer. Reagents or instruments used in the embodiments of this invention whose manufacturers are not specified are all conventional products that can be purchased commercially.

[0024] like Figure 1 As shown, a firmware repair method for ZYNQ devices based on a USB interface is proposed, which constructs a two-step boot mechanism based on the ZYNQ system platform, including:

[0025] Step 1: After the device is powered on, the ZYNQ system first boots from the Flash, and the system automatically detects the integrity of the main firmware in the EMMC;

[0026] Step 2: When the main firmware is detected to be intact, the ZYNQ system immediately switches to EMMC boot, loads the complete application system, and enters normal working mode;

[0027] When an abnormality is detected in the EMMC main firmware, the ZYNQ system will not attempt to boot the corrupted firmware. Instead, it will automatically enter repair mode, identify the firmware file in the USB flash drive through the USB interface, read it into memory and verify it. After successful verification, it will automatically burn the firmware to the designated area of ​​the EMMC, thus completing the repair process.

[0028] In the first step, a hardware setup for a basic Linux system is built and placed in Flash memory. This basic Linux system supports USB interface drivers, firmware verification functions, USB flash drive firmware reading, EMMC firmware loading, and EMMC firmware burning functions.

[0029] The underlying Linux system image does not store temporary data or user data during operation after leaving the factory, and does not perform data burning and updating operations on the Flash. The firmware of the Flash in the system is no longer updated after leaving the factory.

[0030] The specific steps include:

[0031] S1. After the device is powered on, ZYNQ strictly follows the boot sequence set by the hardware, first loading the basic Linux system image from Flash;

[0032] S2. After the system starts, the basic Linux system detects and verifies whether the firmware and programs in the EMMC partition are complete and correct.

[0033] S3. If the firmware verification in EMMC passes, load the complete kernel image and complete system image from EMMC.

[0034] S4. Finally, start the full system, which contains the applications required for actual operation;

[0035] S5. If a firmware abnormality is detected in the EMMC, the system will enter repair mode and wait for the USB flash drive to be inserted into the USB port.

[0036] S6. When a USB flash drive is detected to be inserted, if the USB flash drive contains EMMC firmware, the firmware in the USB flash drive is read into the system memory, and then the firmware in the memory is verified.

[0037] S7. If the verification passes, the verified firmware will be burned into the EMMC to repair the original damaged firmware in the EMMC.

[0038] Once the burning process is complete, the user removes the USB drive and restarts the device. After restarting, the system repeats steps S1 to S4 once more.

[0039] In the above process, the firmware verification algorithm used in the boot process is the same as the verification algorithm used in the repair process.

[0040] The verification algorithm includes:

[0041] CRC32 checksum is used to ensure file integrity, while SHAR256 checksum is used to ensure that firmware sub-files have not been tampered with.

[0042] In summary, the firmware repair method for ZYNQ devices based on the USB interface in this invention innovatively utilizes a "two-step boot" mechanism based on the ZYNQ system platform. This enables firmware repair via the local USB interface even if the device hardware itself does not support booting from a USB flash drive. It provides ordinary users or on-site maintenance personnel with a simple and reliable means of repairing ZYNQ system firmware. Simply inserting a USB flash drive containing the correct firmware and restarting the device completes the complex firmware repair process, significantly reducing the technical threshold and time cost of ZYNQ system device maintenance.

[0043] To more clearly demonstrate the technical solution and its effects provided by the present invention, the following detailed description of the ZYNQ device firmware repair method based on the USB interface provided by the present invention is given by way of specific embodiments.

[0044] Example 1

[0045] "Step 1": After the device is powered on, the ZYNQ system first boots from the Flash memory. This system automatically checks the integrity of the main firmware in the EMMC. Since the basic Linux system image stored in the Flash memory does not store temporary data or user data during operation after leaving the factory, no data burning or updating operations are performed on the Flash memory. Therefore, the firmware of the Flash memory in the system designed in this invention is no longer updated after leaving the factory.

[0046] Step Two: When the main firmware is detected to be intact, the ZYNQ system immediately switches to eMMC boot, loads the complete application system, and enters normal operating mode. When an eMMC firmware anomaly is detected, the ZYNQ system will not attempt to boot the corrupted firmware. Instead, it automatically enters repair mode, identifies the firmware file on the USB flash drive via the USB interface, reads it into memory, and performs a rigorous verification. Once the verification is successful, it automatically flashes the firmware to the designated area of ​​the eMMC, completing the repair process.

[0047] The core innovation of this invention lies in adding a firmware integrity verification program and an EMMC firmware burning program to the basic Linux system used for the first step of the ZYNQ system's Flash boot, and adding a USB host driver to support the mounting of USB flash drives and the reading of firmware data, ultimately realizing the function of repairing EMMC firmware through the USB interface.

[0048] This solution provides ordinary users or on-site maintenance personnel with a simple and reliable means of repairing ZYNQ system firmware. Simply insert a USB flash drive containing the correct firmware and restart the device to complete the complex firmware repair process, which greatly reduces the technical threshold and time cost of ZYNQ system device maintenance.

[0049] The specific implementation method of this invention is as follows: Figure 1 As shown:

[0050] In the hardware design phase, the boot mode of the ZYNQ processor is fixed to boot from Flash. In the software design phase, a basic Linux system is built and placed in Flash memory. This basic Linux system supports USB interface drivers, firmware verification, USB flash drive firmware reading, EMMC firmware loading, and EMMC firmware burning.

[0051] In actual operation, after powering on, ZYNQ strictly follows the boot sequence configured in the hardware. First, it loads the basic Linux system image from Flash (S1). After the system boots, the basic Linux system checks and verifies whether the firmware and programs in the eMMC partition are complete and correct (S2). If the firmware verification in eMMC passes, it loads the complete kernel image and complete system image from eMMC (S3). Finally, it boots the complete system (S4), which contains the applications required for actual operation.

[0052] If an firmware anomaly is detected in the eMMC, the system enters repair mode and waits for a USB flash drive to be inserted (S5). When the USB flash drive is detected, if it contains eMMC firmware, the firmware is read into the system memory. Then, the firmware in memory is verified (S6). If the verification passes, the verified firmware is burned into the eMMC to repair the originally damaged firmware in the eMMC (S7). After burning is complete, the user can remove the USB flash drive and restart the device. After restarting the device, the system loads the minimum system from Flash again (S1) and verifies the firmware in the eMMC (S2). If the verification passes, the system is read from the eMMC (S3), and the complete system and applications are started (S4).

[0053] To simplify the firmware creation process, this invention uses the same firmware verification algorithm during the boot process as the verification algorithm used in the repair process. Furthermore, using the same algorithm ensures that firmware that passes verification during the repair process will also pass verification during the boot process. The verification algorithms used in this invention include CRC32 checksum to ensure file integrity and SHAR256 checksum to ensure that firmware sub-files have not been tampered with.

[0054] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims. The information disclosed in the background section is intended only to enhance the understanding of the overall background technology of the present invention and should not be construed as an admission or implication in any way that such information constitutes prior art known to those skilled in the art.

Claims

1. A firmware repair method for ZYNQ devices based on a USB interface, characterized in that, Construct a two-step startup mechanism based on the ZYNQ system platform, including: Step 1: After the device is powered on, the ZYNQ system first boots from the Flash, and the system automatically detects the integrity of the main firmware in the EMMC; Step 2: When the main firmware is detected to be intact, the ZYNQ system immediately switches to EMMC boot, loads the complete application system, and enters normal working mode; When an abnormality is detected in the EMMC main firmware, the ZYNQ system will not attempt to boot the corrupted firmware. Instead, it will automatically enter repair mode, identify the firmware file in the USB flash drive through the USB interface, read it into memory and verify it. After successful verification, it will automatically burn the firmware to the designated area of ​​the EMMC, thus completing the repair process.

2. The firmware repair method for ZYNQ devices based on a USB interface according to claim 1, characterized in that, In the first step, a hardware setup for a basic Linux system is built and placed in Flash memory. This basic Linux system supports USB interface drivers, firmware verification functions, USB flash drive firmware reading, EMMC firmware loading, and EMMC firmware burning functions. The underlying Linux system image does not store temporary data or user data during operation after leaving the factory, and does not perform data burning and updating operations on the Flash. The firmware of the Flash in the system is no longer updated after leaving the factory.

3. The firmware repair method for ZYNQ devices based on a USB interface according to claim 2, characterized in that, The specific steps include: S1. After the device is powered on, ZYNQ strictly follows the boot sequence set by the hardware, first loading the basic Linux system image from Flash; S2. After the system starts, the basic Linux system detects and verifies whether the firmware and programs in the EMMC partition are complete and correct. S3. If the firmware verification in EMMC passes, load the complete kernel image and complete system image from EMMC. S4. Finally, start the full system, which contains the applications required for actual operation; S5. If a firmware abnormality is detected in the EMMC, the system will enter repair mode and wait for the USB flash drive to be inserted into the USB port. S6. When a USB flash drive is detected to be inserted, if the USB flash drive contains EMMC firmware, the firmware in the USB flash drive is read into the system memory, and then the firmware in the memory is verified. S7. If the verification passes, the verified firmware will be burned into the EMMC to repair the original damaged firmware in the EMMC. Once the burning process is complete, the user removes the USB drive and restarts the device. After restarting, the system repeats steps S1 to S4 once more.

4. The firmware repair method for ZYNQ devices based on a USB interface according to claim 1, 2, or 3, characterized in that, In the above process, the firmware verification algorithm used in the boot process is the same as the verification algorithm used in the repair process.

5. The firmware repair method for ZYNQ devices based on a USB interface according to claim 4, characterized in that, The verification algorithm includes: CRC32 checksum is used to ensure file integrity, while SHAR256 checksum is used to ensure that firmware sub-files have not been tampered with.