A method for synchronously and parallelly upgrading firmware of multiple SOC vision systems via a network
By planning the CHIPID value and network address in the multi-SOC vision system and using the debug serial port to upgrade the system firmware, the network synchronization and parallel upgrade of the multi-SOC vision system is achieved, solving the problem of high upgrade costs in the existing technology and reducing production and Maintenance cost.
Patent Information
- Application Number
- CN202410994098.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The firmware upgrade method of existing multi-SOC systems has problems with high development costs, production costs and maintenance costs, and cannot meet the synchronous parallel upgrade requirements of multi-SOC products.
By planning multiple identical GPIOs as CHIPID values on embedded hardware circuits, distinguishing the network addresses of the main chip SOC and the slave chip SOC, and using the debug serial port to execute the system firmware upgrade command, the synchronization of the all-in-one system firmware through network media is achieved. Parallel upgrade.
It effectively reduces the time required for firmware upgrade, reduces production cycle and maintenance costs, and improves the firmware upgrade efficiency of multi-SOC vision systems.
Smart Images

Figure CN118519958B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for synchronously and parallelly upgrading firmware of a multi-SOC vision system through a network, belonging to the technical field of embedded AI vision. Background Art
[0002] With the rapid development of AI technology in recent years, embedded vision products are gradually moving towards high definition, intelligence and diversification. Product forms have also evolved from traditional single-lens wide-angle information acquisition to dual-lens and multi-lens panoramic three-dimensional spatial information acquisition, which has put forward higher requirements on the information acquisition and processing capabilities of the visual system. Multi-SOC collaborative processing has become the mainstream direction of future machine vision development.
[0003] AI vision products process front-end collected information through core processors such as CPU, GPU, DSP and FPGA to realize artificial intelligence requirements such as product face recognition, personnel statistics, behavior analysis and vehicle identification. Through multi-sensor and multi-lens information collection design, panoramic and three-dimensional information collection requirements can be realized.
[0004] At present, the existing multi-SOC system upgrade method on the market is to compress the firmware of multiple SOCs into one upgrade package. During the upgrade, the firmware of multiple SOCs to be upgraded are only stored in the same storage. The actual upgrade logic is still that multiple upgrade firmwares correspond to multiple SOCs, and one system upgrade package is used to upgrade one SOC, which greatly increases the development cost and production line production cost of the all-in-one system firmware upgrade package, and also increases the cost of product update, upgrade and maintenance in the later stage. Summary of the invention
[0005] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a method for synchronously and parallelly upgrading the firmware of a multi-SOC visual system through a network. In the embedded hardware circuit, multiple identical GPIOs (English: General-purpose input / output, general-purpose input / output) are planned for each SOC as CHIPID, so that the master and slave chip SOCs have different CHIPID values. For example, if a product plans 4 chip SOC products, the hardware circuit needs to plan at least 2 general-purpose input and output GPIOs. When the system is in the bootloader initialization stage, the CHIPID value of the hardware is read to determine whether the current chip SOC is the master chip SOC or the slave chip SOC, and then the network address of the current chip SOC is configured so that the master chip SOC and the slave chip SOC have different network addresses to prevent network address conflicts. Each master chip SOC and slave chip SOC has a corresponding debugging serial port circuit design. When the system firmware upgrade command is executed under each debugging serial port, the all-in-one system firmware upgrade package stored on the TFTP server will be read into the memory medium of the chip SOC through the network medium. The system upgrade program will parse the matching upgrade package from the all-in-one system firmware upgrade package according to the CHIPID value of the chip SOC and perform verification. After the verification passes, the parsed matching upgrade package will be written to the storage medium to complete the upgrade of the chip SOC system firmware. When the all-in-one system firmware upgrade is actually executed, the all-in-one system firmware upgrade package is stored on the TFTP server, and the system firmware upgrade command is sent to the debugging serial ports of multiple chip SOCs at the same time through the one-click upgrade tool, so that multiple SOCs can be upgraded synchronously and in parallel through the network medium.
[0006] Preferably, the present invention provides a method for synchronously and parallelly upgrading the firmware of a multi-SOC visual system through a network, comprising: comparing the CHIPID value of the read current chip SOC with the CHIPID value of the pre-stored chip SOC, the chip SOC being a master chip SOC or a slave chip SOC, configuring a different network address for the network address of the current chip SOC; configuring a debugging serial port for the master chip SOC and the slave chip SOC, and using the debugging serial port to execute a system firmware upgrade command for upgrading the current chip SOC; reading an all-in-one system firmware upgrade package stored on a TFTP server into a memory medium of the chip SOC; based on the CHIPID value of the current chip SOC, parsing an upgrade package matching the current chip SOC from the all-in-one system firmware upgrade package and performing verification; after the verification passes, writing the upgrade package matching the current chip SOC into the storage medium of the current chip SOC.
[0007] Preferably, a plurality of identical general purpose input and output GPIO values are planned as CHIPID values for each master chip SOC and each slave chip SOC, and the high and low levels of a general purpose input and output GPIO are used as the CHIPID values of the two chip SOCs in total.
[0008] Preferably, the number of chip SOCs is less than or equal to 2^the number of general-purpose input and output GPIOs, and the general-purpose input and output GPIOs planned as CHIPID values use the same pins on different chip SOCs and the level values of the general-purpose input and output GPIOs are all different.
[0009] Preferably, the CHIPID value of the master chip SOC is preset to 0; the CHIPID value of the slave chip SOC is preset to increase in sequence based on the serial number of the slave chip SOC.
[0010] Preferably, after all the network cards of the slave chip SOC are started, they are only used for intranet communication. The MAC address design formula of the slave chip SOC is: 00:0e:99:02:b3:[0x50+n], where n is the CHIPID value of the slave chip SOC; the design formula of the default configuration IP address of the slave chip SOC is: 192.168.100.[0x50+n], where n is the CHIPID value of the slave chip SOC.
[0011] Preferentially, the all-in-one system firmware upgrade package stores the CHIPID value of the main chip SOC, the CHIPID value of the slave chip SOC, the upgrade package mapping location and the upgrade package size. The upgrade package of the main chip SOC is located at the end of the package. In the all-in-one system firmware upgrade package, the upgrade packages of the slave chip SOC are mapped in sequence to the front of the upgrade package of the main chip SOC.
[0012] Preferably, the MAC address of the main chip SOC is globally unique, and the IP address of the main chip SOC and the TFTP server are in the same local area network.
[0013] Preferentially, in the all-in-one system firmware upgrade package, the upgrade package corresponding to the slave chip SOC is placed before the upgrade package of the master chip SOC, and the a+1th slave chip SOC firmware package is placed before the ath slave chip SOC firmware package, where a is a positive integer.
[0014] Preferably, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the program.
[0015] Preferably, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0016] The beneficial effects achieved by the present invention are:
[0017] Since the existing all-in-one system firmware upgrade technology still compresses the firmware of multiple SOCs into one upgrade package, the actual upgrade logic is still many-to-many, and there are problems of high development cost, production cost, and maintenance cost of embedded vision products. The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a method for synchronous and parallel upgrade of multi-SOC vision system firmware through a network. On the embedded hardware circuit, multiple identical GPIOs (English: General-purpose input / output, general-purpose input and output) are planned for each SOC, so that the master and slave chip SOCs have different CHIPID values. For example, if the product plans 4 chip SOC products, the hardware circuit needs to plan at least 2 general-purpose input and output GPIOs. When the system is in the Bootloader initialization stage, it determines whether the current chip SOC is the master chip SOC or the slave chip SOC by reading the CHIPID value of the hardware, and then configures the network address of the current chip SOC so that the master chip SOC and the slave chip SOC have different network addresses to prevent network address conflicts. Each master chip SOC and slave chip SOC has a corresponding debugging serial port circuit design. When the system firmware upgrade command is executed under each debugging serial port, the all-in-one system firmware upgrade package stored on the TFTP server will be read into the memory medium of the chip SOC through the network medium. The system upgrade program will parse the matching upgrade package from the all-in-one system firmware upgrade package according to the CHIPID value of the chip SOC and perform verification. After the verification is passed, the parsed matching upgrade package will be written into the storage medium to complete the upgrade of the chip SOC system firmware. When the all-in-one system firmware upgrade is actually executed, the all-in-one system firmware upgrade package is stored on the TFTP server, and the system firmware upgrade command is sent to the debugging serial ports of multiple chip SOCs at the same time through a one-key upgrade tool, so as to realize the synchronous and parallel upgrade of multiple SOCs through the network medium. The present invention realizes that the all-in-one firmware upgrade package is stored on the TFTP server, and the system firmware upgrade command is sent to the serial ports of multiple SOCs at the same time through a one-key upgrade tool, so as to realize the synchronous and parallel system upgrade of multiple SOCs through the network medium, which can effectively reduce the time required for firmware upgrade, reduce the product production cycle, and reduce the production cost and maintenance cost of the product. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1The hardware structure diagram of the overall system of the present invention;
[0020] Figure 2 A schematic diagram of the internal data structure of the all-in-one system firmware upgrade package of the present invention;
[0021] Figure 3 It is a schematic diagram of the upgrade of the present invention;
[0022] Figure 4 It is a schematic diagram of the synchronous and parallel upgrade of the chip SOC of the present invention. DETAILED DESCRIPTION
[0023] To facilitate the technical solution of the application, some concepts involved in the application are first explained below.
[0024] In order to meet the intelligent and panoramic requirements of the product, the product hardware design requires a master chip SOC to be paired with multiple slave chip SOCs for collaborative processing. The embedded Linux system run by the master chip SOC is used for external interaction of visual products, such as original image information acquisition, network communication, and external storage card. The embedded Linux system run by the slave chip SOC is different from the master chip SOC, and is mainly used for background image information processing, intelligent algorithms, etc., and the embedded Linux systems run by multiple slave chip SOCs are also different. This requires software upgrades to support a multi-SOC system upgrade solution to solve the problem of software version upgrades for multi-SOC visual products, and to update multiple master and slave SOCs through a firmware upgrade package over the network. However, the original single-SOC visual product upgrade method is a one-to-one upgrade, that is, a system upgrade package is upgraded for one SOC through the network, which cannot meet the upgrade requirements of multi-SOC product systems.
[0025] See also Figure 1 This application discloses a method for synchronously and parallelly upgrading the firmware of multiple SOC vision systems through a network. The detailed technical solution is as follows:
[0026] 1. The high and low levels of a general-purpose input and output GPIO can be used as the CHIPID values of two chip SOCs. The CHIPID value is 0 or 1. Therefore, in the design of embedded hardware circuit schematics, the number of GPIOs is planned according to the total number of chip SOCs in the product. The number of SOCs is less than or equal to 2 ^ GPIO number, and the general-purpose input and output GPIOs planned as CHIPID values must use the same pins on different chip SOCs, and the level values of the general-purpose input and output GPIOs are different;
[0027] 2. According to the different GPIO level values of the master chip SOC and the slave chip SOC, define the corresponding CHIPID value for each chip SOC. The CHIPID value of the master chip SOC is fixed to 0, and the remaining CHIPID values are all slave chip SOCs, and the CHIPID values of the slave chip SOCs increase in sequence;
[0028] 3. In the system Bootloader network card initialization module, read the general input and output GPIO level value of the hardware plan, convert it into the CHIPID value of the currently executed chip SOC according to the obtained general input and output GPIO level value, and configure the network address according to the converted CHIPID value. Since there is only one external network interface on the multi-SOC visual system, it is only necessary to configure the external network card MAC address to be globally unique. The specific network address configuration logic is as follows:
[0029] (1) After the Linux system of the visual product is fully started, the network card corresponding to the main chip SOC is the only external network module. Users can only access the visual product to obtain monitoring video through this network card. The MAC address of the main chip SOC is obtained from the storage medium. The MAC address of the main chip SOC stored in the storage medium is globally unique. The MAC address value of the main chip SOC complies with the 6-byte address specification. The IP address of the main chip SOC is configured as the default 192.168.100.50 in the program or manually configured by the user after the system is started. The configured IP address of the main chip SOC is in the same LAN as the TFTP server;
[0030] (2) After the visual system is started, the network card corresponding to the slave chip SOC will be isolated from the outside and only used for intranet communication, so all products can share the MAC address of the same network card. However, the network card MAC addresses of multiple slave chip SOCs of the same device cannot be the same. The design formula of the MAC address of the slave chip SOC is: 00:0e:99:02:b3:[0x50+n], where n is the CHIPID value of the slave chip SOC, and the MAC address of the slave chip SOC cannot be edited after the system is started. The IP address is configured from the program by default, and can also be manually configured by the user during the firmware upgrade. The design formula of the IP address of the slave chip SOC in the software program is: 192.168.100.[0x50+n], where n is the CHIPID value of the slave chip SOC. The configured IP address of the slave chip SOC and the IP address of the TFTP server must be in the same local area network, and the IP address of the master chip SOC and the IP address of the slave chip SOC do not conflict;
[0031] (3) If Figure 2As shown, the packaging method of the all-in-one system firmware package is as follows: the firmware package corresponding to the master chip SOC is placed at the end of the all-in-one package, the first slave chip SOC firmware package is placed in front of the master chip SOC firmware package, the second slave chip SOC firmware package is placed in front of the first slave chip SOC firmware package, and the subsequent slave chip SOC firmware package placement logic is analogous, and the CHIPID value of the master chip SOC, the CHIPID value corresponding to the slave chip SOC, the mapping position of the all-in-one system firmware upgrade package, and the firmware package size of the all-in-one system firmware upgrade package are saved in the packet header of the all-in-one system firmware upgrade package;
[0032] (4) Implementing a system firmware upgrade command in the system bootloader debugging command. The firmware upgrade command downloads the all-in-one system firmware upgrade package stored on the TFTP server to the specified memory address through the network medium (network switching module and external network module);
[0033] (5) Figure 3 As shown, the packet header information of the all-in-one system firmware upgrade package is parsed in the system firmware upgrade command, and the CHIPID value of the currently running chip SOC is compared with the packet header information to obtain the relative offset position and upgrade package size of the upgrade package corresponding to the currently running chip SOC in the all-in-one system firmware upgrade package;
[0034] (6) Perform CRC check on the upgrade package corresponding to the currently running chip SOC. After the CRC check passes, write the upgrade package into the storage medium partition of the currently running chip SOC to complete the system firmware upgrade;
[0035] (7) Figure 4 As shown, by using the one-key upgrade tool on the PC, the system firmware upgrade command can be sent to the debugging serial ports of multiple chip SOCs of the multi-SOC vision system at the same time, realizing the synchronous and parallel upgrade of the all-in-one system firmware upgrade package.
[0036] In an embodiment of the present application, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the program.
[0037] In an embodiment of the present application, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0038] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0039] Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention invented herein. This application is intended to cover any variations, uses or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art that are not invented by the present invention. The specification and examples are intended to be exemplary only.
[0040] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above are only specific implementation methods of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.
Claims
1. A method for synchronously and parallelly upgrading the firmware of multiple SOC vision systems through a network. It is characterized in that include: Compare the read CHIPID value of the current chip SOC with the pre-stored CHIPID value of the chip SOC, determine whether the chip SOC is a master chip SOC or a slave chip SOC, and configure a different network address for the network address of the current chip SOC; Configure a debugging serial port for the master chip SOC and the slave chip SOC, and use the debugging serial port to execute a system firmware upgrade command for upgrading the current chip SOC; Read the all-in-one system firmware upgrade package stored on the TFTP server to the memory medium of the chip SOC; Based on the CHIPID value of the current chip SOC, parse the upgrade package matching the current chip SOC from the all-in-one system firmware upgrade package and perform verification; After verification, the upgrade package matching the current chip SOC is written into the storage medium of the current chip SOC; For each master chip SOC and each slave chip SOC, multiple identical general-purpose input and output GPIO values are planned as CHIPID values, and the high and low levels of a general-purpose input and output GPIO are used as the CHIPID values of the two chip SOCs in total; After all the network cards of the slave chip SOC are started, they are only used for intranet communication. The MAC address design formula of the slave chip SOC is: 00:0e:99:02:b3:[0x50+n], where n is the CHIPID value of the slave chip SOC; the design formula of the default configuration IP address of the slave chip SOC is: 192.168.100.[0x50+n], where n is the CHIPID value of the slave chip SOC.
2. According to claim 1, a method for synchronously and parallelly upgrading the firmware of a multi-SOC visual system through a network, It is characterized in that The number of chip SOCs is less than or equal to 2 ^ the number of general-purpose input and output GPIOs. The general-purpose input and output GPIOs planned as CHIPID values use the same pins on different chip SOCs and the level values of the general-purpose input and output GPIOs are different.
3. According to claim 1, a method for synchronously and parallelly upgrading the firmware of a multi-SOC visual system through a network, It is characterized in that The CHIPID value of the master chip SOC is preset to 0; the CHIPID value of the slave chip SOC is preset to increase in sequence based on the serial number of the slave chip SOC.
4. According to claim 1, a method for synchronously and parallelly upgrading the firmware of a multi-SOC visual system through a network, It is characterized in that The all-in-one system firmware upgrade package stores the CHIPID value of the main chip SOC, the CHIPID value of the slave chip SOC, the upgrade package mapping position and the upgrade package size. The upgrade package of the main chip SOC is located at the end of the package. The upgrade packages of the slave chip SOC in the all-in-one system firmware upgrade package are mapped in sequence to the front of the upgrade package of the main chip SOC.
5. According to claim 1, a method for synchronously and parallelly upgrading the firmware of a multi-SOC visual system through a network, It is characterized in that The MAC address of the main chip SOC is unique in the world, and the IP address of the main chip SOC is in the same LAN as the TFTP server.
6. The method for synchronously and parallelly upgrading the firmware of a multi-SOC visual system through a network according to claim 1, It is characterized in that In the all-in-one system firmware upgrade package, the upgrade package corresponding to the slave chip SOC is placed before the upgrade package of the master chip SOC, and the a+1th slave chip SOC firmware package is placed before the ath slave chip SOC firmware package, where a is a positive integer.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the method according to any one of claims 1 to 6 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Slave processing chip upgrade method and device
CN106293824A
Terminal OTA (Over the Air) upgrading method and system and devices
CN107579863A
Equipment upgrading method and device, storage medium and electronic device
CN113434184A
