Embedded device firmware upgrading method, electronic device and storage medium

By loading UBOOT programs in embedded devices and automatically obtaining and applying firmware upgrades using the LAN, the problem of inefficient upgrades of traditional firmware is solved, and a fast and automated firmware upgrade process is achieved.

CN119847571AInactive Publication Date: 2025-04-18SHENZHEN XINRUISHI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510330999.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-04-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional embedded equipment firmware upgrade methods are inefficient, especially when handling batches of equipment, which require manual intervention and long-term startup, resulting in low upgrade efficiency.

Method used

UBOOT-based embedded device firmware upgrade method is adopted to realize automated firmware upgrade by loading UBOOT programs and ensuring that the device and PC manager are in the same IP segment during its configuration stage. The specific steps include connecting the embedded device to the LAN, obtaining the IP address through the DHCP server, activating the timing function and listening to the upgrade notification sent by the PC management machine, and obtaining and applying the upgrade firmware if the notification is received.

Benefits of technology

It realizes that firmware upgrades can be completed without running the operating system. The entire process is automatically completed in seconds, saving a lot of labor hours, high degree of automation, and significantly improving firmware upgrade efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847571A_ABST
    Figure CN119847571A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of embedded equipment, in particular to an embedded equipment firmware upgrading method, electronic equipment and a storage medium, which comprises the following steps: when the embedded equipment is subjected to firmware upgrading, an operating system does not need to be operated, only a UBOOT program needs to be loaded, and the embedded equipment and a PC (Personal Computer) management machine are ensured to be in the same IP (Internet Protocol) network segment in a UBOOT configuration stage; and the condition of direct communication is provided. If the embedded device receives an upgrading notification sent by the PC management machine within a preset duration, obtaining upgrading firmware according to the upgrading notification, and performing firmware upgrading by using the upgrading firmware; and if the embedded equipment does not receive the upgrading notice within a preset duration, quitting the UBOOT program and starting an operating system. The whole firmware upgrading process can be automatically completed within seconds, a large amount of working hours are saved, manual intervention is not needed, the automation degree is high, and the firmware upgrading efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded devices, and in particular to a method for upgrading embedded device firmware based on UBOOT, an electronic device and a computer-readable storage medium. Background Art

[0002] Embedded devices are computer hardware and software components built into other devices or systems to perform specific functions. The firmware of embedded devices is its core software, responsible for controlling hardware operations and implementing specific functions. With the continuous advancement of technology and the increase in security requirements, the firmware of embedded devices needs to be upgraded regularly to fix vulnerabilities, enhance functions or improve performance. Common methods for upgrading embedded device firmware include: USB automatic upgrade, manual upgrade from server, tool upgrade and cloud upgrade. These methods are suitable for different application scenarios, and can effectively implement the update and maintenance of embedded device firmware. However, these traditional upgrade methods also have disadvantages such as requiring manual intervention or long startup time, resulting in low upgrade efficiency. With the rapid development of Internet of Things technology and smart devices, the number of embedded devices continues to increase. When these traditional methods are used to handle firmware upgrades of batch embedded devices, the increase in manual intervention and startup time is more obvious, which further reduces the overall upgrade efficiency. The specific analysis is as follows: 1. USB automatic upgrade Process: Before upgrading, insert the USB flash drive into the embedded device and use the UBOOT program to detect whether the USB flash drive contains the upgrade firmware. If so, write the upgrade firmware into the FLASH of the embedded device to complete the firmware upgrade.

[0003] Disadvantages: The USB flash drive must be inserted manually, which requires human intervention and the upgrade efficiency is low.

[0004] 2. Manually upgrade from the server Process: Deploy the server before upgrading, and connect the embedded device to the computer through the serial port. After the embedded device is powered on, press Ctrl+C to enter the UBOOT console, and manually enter commands to clear the memory, download the firmware, and write it.

[0005] Disadvantages: Although there is no need to use a USB flash drive, manual serial port connection is still required, and the upgrade efficiency is low.

[0006] 3. Tool upgrade Process: The tool software runs on the PC management machine, detects the embedded device through the local area network, transfers the firmware to the embedded device through the network, and then completes the operation of writing the firmware into FLASH.

[0007] Disadvantages: The embedded device needs to run the entire operating system and manually operate the tool software to upgrade the firmware. The time required to start the entire operating system of the embedded device is usually 5 to 10 times the time it takes to run only the UBOOT program, which takes too much time and has low upgrade efficiency.

[0008] 4. Cloud upgrade Process: The firmware is placed on a host server on the Internet. After the embedded device is connected to the Internet, it checks whether there is available firmware. If so, it is downloaded and flashed to the FLASH of the embedded device to complete the firmware upgrade.

[0009] Disadvantages: It requires Internet access, and like the tool upgrade method, the entire operating system must be run to complete the firmware upgrade, which takes too much time and has low upgrade efficiency.

[0010] It can be seen that when the embedded device performs firmware upgrade, the above upgrade methods all have the problem of low efficiency. It is urgent to explore a more efficient and automated embedded device firmware upgrade solution to better meet the needs of large-scale device management. Summary of the invention

[0011] In view of this, the present invention proposes a method for upgrading embedded device firmware based on UBOOT, an electronic device and a computer-readable storage medium, aiming to solve the problem of low upgrading efficiency of traditional embedded device firmware upgrading methods.

[0012] In order to solve the above problems, the present invention adopts the following technical solutions: In a first aspect, the present invention proposes a method for upgrading firmware of an embedded device based on UBOOT, comprising: Step S100: The embedded device is connected to a local area network; wherein the local area network is established by a switch, and the local area network is also connected to a PC management machine; Step S200: when the embedded device is powered on, a UBOOT program is loaded and an IP request is sent to a DHCP server in the local area network through the UBOOT program; Step S300: When the embedded device receives the IP address assigned to the embedded device by the DHCP server according to the IP request, the current IP address is updated to the received IP address; wherein the assigned IP address is an unused IP address in the local area network; Step S400: the embedded device starts the timing function and monitors the upgrade notification sent by the PC management machine; Step S500: If the upgrade notification is received within the preset time, the upgrade firmware is obtained according to the upgrade notification, and the firmware of the embedded device is upgraded using the upgrade firmware; if the upgrade notification is not received within the preset time, the UBOOT program is exited and the operating system of the embedded device is started.

[0013] Furthermore, the step S400 includes: the embedded device starts the timing function and establishes a broadcast monitor based on the UDP protocol at a preset port to monitor the upgrade notification sent by the PC management machine to the preset target address; wherein the upgrade notification carries the supported version, version parameters and date information of the upgraded firmware.

[0014] Furthermore, the preset port is port 8888, the preset target address is 255.255.255.255, and the upgrade notification is encapsulated in XML format.

[0015] Furthermore, the flash memory of the embedded device allocates a partition for storing version description information of the current firmware; wherein the version description information includes version description, version and date.

[0016] Further, obtaining the upgrade firmware according to the upgrade notification, and using the upgrade firmware to upgrade the firmware of the embedded device includes: According to the upgrade notification, obtain the supported version, version parameters and date information of the upgrade firmware carried in the upgrade notification; Obtaining the version description, version and date of the current firmware stored in the partition, and determining whether the supported version is consistent with the version description; When the supported version and the version description are inconsistent, the step S500 is continued to be executed until the preset time is reached; When the supported version is consistent with the version description, determining whether the version parameter is newer than the version; If the version parameter is not newer than the version, continue to execute step S500 until the preset time is reached; If the version parameter is newer than the version, determining whether the date information is later than the date; When the date information is not later than the date, continue to execute step S500 until the preset time is reached; When the date information is later than the date, the upgrade firmware corresponding to the upgrade notification is obtained from the PC management machine based on the TFTP protocol, and the firmware of the embedded device is upgraded using the upgrade firmware.

[0017] In a second aspect, the present invention further provides an electronic device, wherein the electronic device is an embedded device, comprising: a memory for storing program instructions; and The processor is used to execute the program instructions to implement the steps of the method for upgrading the firmware of an embedded device based on UBOOT as described above.

[0018] In a third aspect, the present invention further proposes a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the method for upgrading embedded device firmware based on UBOOT as described above are implemented.

[0019] Compared with the prior art, the invention has the following beneficial effects: a method for firmware upgrade of an embedded device based on UBOOT, an electronic device and a computer-readable storage medium, comprising: the embedded device is connected to a local area network; wherein the local area network is established by a switch, and the local area network is also connected to a PC management machine; when the embedded device is powered on, a UBOOT program is loaded and an IP request is sent to a DHCP server in the local area network through the UBOOT program; when the embedded device receives an IP address assigned to the embedded device by the DHCP server according to the IP request, the current IP address is updated to the received IP address; wherein the assigned IP address is an unused IP address in the local area network; the embedded device starts a timing function and listens to an upgrade notification sent by the PC management machine; if the upgrade notification is received within a preset time, an upgrade firmware is obtained according to the upgrade notification, and the firmware of the embedded device is upgraded using the upgrade firmware; if the upgrade notification is not received within the preset time, the UBOOT program is exited and the operating system of the embedded device is started. It can be seen that when the embedded device is upgrading its firmware, it does not need to run the operating system, but only needs to load the UBOOT program, and during the UBOOT configuration phase, ensure that the embedded device and the PC management machine are in the same IP network segment and have the conditions for direct communication. After receiving the upgrade notification from the PC management machine, the embedded device can automatically obtain the firmware and complete the firmware upgrade. The entire firmware upgrade process can be completed automatically within a few seconds, saving a lot of man-hours and without manual intervention. It has a high degree of automation and significantly improves the efficiency of firmware upgrades. It is particularly suitable for handling firmware upgrades of batch embedded devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 A flowchart of a first embodiment of a method for upgrading firmware of an embedded device based on UBOOT according to the present invention; Figure 2 It is a flow chart of a second embodiment of a method for upgrading firmware of an embedded device based on UBOOT of the present invention; Figure 3 It is a schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0023] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0024] It should be noted that UBOOT (Universal Boot Loader) is an open source boot loader that is widely used in embedded devices. It is responsible for starting and initializing the device and provides support for subsequent operating systems and applications.

[0025] See also Figure 1 As shown, it is a flow chart of the first embodiment of the method for upgrading the firmware of an embedded device based on UBOOT of the present invention.

[0026] In this embodiment, the method for upgrading the firmware of an embedded device based on UBOOT includes: Step S100: The embedded device is connected to a local area network.

[0027] The local area network is established by a switch, and the local area network is also connected to a PC management machine.

[0028] Specifically, the switch establishes a local area network, the embedded device is connected to the switch through a network cable, the PC management machine is also connected to the switch through a network cable, and the embedded device communicates with the PC management machine through the local area network to complete signaling control, upgrade firmware transmission, etc. The tool software running on the PC management machine is responsible for managing and monitoring the firmware upgrade process of the embedded device, including firmware version management, upgrade notification, firmware transmission, progress monitoring, error handling, and log recording.

[0029] Step S200: When the embedded device is powered on, the UBOOT program is loaded and an IP request is sent to the DHCP server in the local area network through the UBOOT program.

[0030] Specifically, the embedded device will automatically start the UBOOT program after it is powered on. This process is achieved through hardware design and firmware configuration, and the user does not need to set it manually. During the embedded device design phase, the developer will correctly burn the binary file of the UBOOT program into a non-volatile storage medium (such as NAND or NOR Flash) to ensure that the UBOOT program can be loaded smoothly when the device is powered on. In addition, the developer will also configure relevant startup parameters in the UBOOT program, including hardware initialization settings, environment variables, and startup sequence. These configurations ensure that the UBOOT program can smoothly perform the initialization process and prepare for the subsequent loading of the operating system of the embedded device. After the embedded device loads the UBOOT program, the program will automatically execute the preset command and send an IP request to the DHCP server in the local area network.

[0031] Step S300: When the embedded device receives the IP address assigned to the embedded device by the DHCP server according to the IP request, the current IP address is updated to the received IP address.

[0032] The allocated IP address is an unused IP address in the local area network.

[0033] Specifically, in a local area network, although the embedded device and the PC management machine are in the same network environment, they still need to be assigned a unique IP address so that they can be accurately identified and located, thereby achieving effective communication. When the embedded device is started, it can dynamically obtain an unused IP address through the DHCP server to smoothly access the network.

[0034] Specifically, each device in the local area network requires a unique IP address. After the embedded device is powered on, if the last IP address is used directly, and the address is already occupied by other devices, it will cause an IP address conflict, which will lead to network communication problems. Therefore, requesting a DHCP server to assign an unused IP address can ensure that each embedded device in the network has a unique identifier. The main function of a DHCP (Dynamic Host Configuration Protocol) server is to dynamically assign IP addresses. Specifically, the DHCP server automatically assigns unused IP addresses and other network configuration parameters (such as subnet mask, gateway, DNS server, etc.) based on device requests in the network. For embedded devices, especially when deploying large-scale embedded devices, manually configuring the static IP address of each device is very cumbersome and error-prone. Through a DHCP server, devices can automatically obtain IP addresses, simplifying the network configuration process.

[0035] Specifically, the network configuration process is the process of establishing network communication, including: (1) The tool software starts the DHCP service DHCP service is a standard network service used to dynamically assign IP addresses to hosts, including embedded devices. Only after the embedded device successfully obtains the appropriate IP address can it avoid IP address conflicts with other devices, thus ensuring that all devices in the network can work properly.

[0036] After receiving the IP request sent by the embedded device, the tool software will allocate an unused IP address to the embedded device.

[0037] (2) Embedded device requests IP address in UBOOT About 1 second after the embedded device is powered on, UBOOT will send an IP request to the LAN to obtain an available IP address. After receiving the reply from the DHCP server to the IP request, the embedded device will update its IP address to the new IP address. At this point, the embedded device and the PC management machine (tool software) are in the same IP network segment and have the conditions for direct communication.

[0038] Step S400: The embedded device starts a timing function and monitors an upgrade notification sent by the PC management machine.

[0039] Specifically, the embedded device setting timing function can limit the time the device stays in the UBOOT environment. If no upgrade notification is received from the PC management machine within the preset time, the embedded device will automatically start its operating system. This mechanism ensures that the embedded device can start quickly under normal circumstances, avoiding delays caused by waiting for upgrades, and also provides flexible upgrade options for the device to ensure that the firmware can be upgraded in time when needed.

[0040] Step S500: If the upgrade notification is received within the preset time, the upgrade firmware is obtained according to the upgrade notification, and the firmware of the embedded device is upgraded using the upgrade firmware; if the upgrade notification is not received within the preset time, the UBOOT program is exited and the operating system of the embedded device is started.

[0041] Specifically, this selection mechanism allows the embedded device to decide whether to perform a firmware upgrade based on actual conditions when powered on. If an upgrade notification is received within a preset time (the preset time can be set to 5 seconds), the embedded device can immediately start downloading and upgrading the firmware to ensure that the device is always up to date. If no upgrade notification is received within the preset time, the embedded device can quickly exit the UBOOT program and start the operating system, saving system resources and time and ensuring the normal operation of the device.

[0042] Specifically, once the embedded device receives the upgrade notification, it will automatically perform the subsequent steps, including firmware download, verification and installation. This automated process reduces manual intervention and waiting time, making the entire firmware upgrade process faster. In addition, the firmware can be designed to support incremental updates (downloading only the changed parts), so that the download time will be significantly reduced, further speeding up the completion of the entire firmware upgrade process.

[0043] Compared with the prior art, the UBOOT-based embedded device firmware upgrade method of the embodiment of the present invention does not need to run the operating system when the embedded device performs the firmware upgrade, but only needs to load the UBOOT program, and ensure that the embedded device and the PC management machine are in the same IP network segment during the UBOOT configuration phase, and have the conditions for direct communication. After receiving the upgrade notification sent by the PC management machine, the embedded device can automatically obtain the firmware and complete the firmware upgrade. The entire firmware upgrade process can be automatically completed within a few seconds, saving a lot of man-hours and without manual intervention. It has a high degree of automation, significantly improves the efficiency of firmware upgrades, and is particularly suitable for processing firmware upgrades of batch embedded devices.

[0044] In some embodiments of the present application, step S400 includes: the embedded device starts a timing function and establishes a broadcast monitor based on the UDP protocol at a preset port to monitor the upgrade notification sent by the PC management machine to a preset target address.

[0045] The upgrade notification carries the supported versions, version parameters and date information of the upgraded firmware.

[0046] Specifically, UDP (User Datagram Protocol) is a connectionless network protocol that is suitable for fast data transmission without establishing a connection. The embedded device will create a listening program on a specific port (preset port) and use the UDP protocol for communication. The listening mechanism of the embedded device will pay special attention to the upgrade notifications from the PC management machine. These notifications will be sent to a preset target address so that all embedded devices in the same local area network can receive them. It should be noted that in the network, the target address refers to the specific address where the device wants to receive the message. By setting the preset target address, the embedded device can accurately receive the upgrade notification from the PC management machine.

[0047] Specifically, the tool software selects a firmware upgrade package and uses the file name of the firmware upgrade package as the broadcast notification content, that is, the main content of the upgrade notification. The tool software sends an upgrade notification in the form of a broadcast package to notify embedded devices in the local area network that firmware upgrades are available. The upgrade notification is sent once per second. After receiving the upgrade notification, the embedded device decides whether to upgrade. The communication method of the upgrade notification is that the tool software sends a message notification to the target address 255.255.255.255 in UDP broadcast mode, and the target port is 8888. Among them, the content of the upgrade notification is: <upgradenotification> <firmware>nvr.N3xxB-11NEA-AI_V6.2.0_20241125 <firmware> < / firmware> < / firmware> < / upgradenotification> The upgrade notification is encapsulated in XML format, which is a text format that can be seamlessly transmitted between different operating systems and programming languages, enhancing the interoperability of the system. The firmware describes the supported versions, version parameters and date information of the firmware.

[0048] In some embodiments of the present application, the preset port is port 8888, the preset target address is 255.255.255.255, and the upgrade notification is encapsulated in XML format.

[0049] Specifically, when the embedded device completes the reset of its own IP address, a direct path to the tool software is established. The next step is to establish a UDP broadcast listener on port 8888, with the target address being 255.255.255.255, and immediately attempt to receive upgrade notifications for 5 seconds. If no upgrade notification is received during this period, the subsequent startup process of the embedded device will continue after 5 seconds.

[0050] In some embodiments of the present application, the flash memory of the embedded device allocates a partition for storing version description information of the current firmware.

[0051] The version description information includes version description, version and date.

[0052] Specifically, a 64KB partition is allocated in the embedded device FLASH to store the version description information of the current device firmware in the following format: Firmware=nvr.N3xxB-11NEA-AI_V6.2.0_20241125 The content of the version description information is divided into three parts: version description, version and date. In the above form, the version description is nvr.N3xxB-11NEA-AI, the version is V6.2.0, and the date is 20241125, which is November 25, 2024.

[0053] See also Figure 2 As shown, it is a flow chart of the second embodiment of the method for upgrading the firmware of an embedded device based on UBOOT of the present invention.

[0054] Compared with other embodiments of the method for upgrading the firmware of an embedded device based on UBOOT, this embodiment describes step S500 in detail.

[0055] In this embodiment, in step S500, obtaining the upgrade firmware according to the upgrade notification, and using the upgrade firmware to upgrade the firmware of the embedded device includes: Step S501: According to the upgrade notification, the supported versions, version parameters and date information of the upgrade firmware carried in the upgrade notification are obtained.

[0056] Specifically, the supported version is the type of hardware or software platform supported by the firmware. This information ensures the compatibility of the firmware with the device. The version parameter is the version number of the firmware, which is usually used to identify the update level and functional changes of the firmware. The change of the version number can help the device determine whether the new firmware is more advanced than the current firmware. The date information is the release date of the firmware, which is usually used to determine the timeliness and update frequency of the firmware. Newer firmware may contain fixed vulnerabilities or added functions.

[0057] Step S502: obtaining the version description, version and date of the current firmware stored in the partition, and determining whether the supported version is consistent with the version description.

[0058] Specifically, the version description is the type of hardware or software platform supported by the current firmware, which is used to determine compatibility with the new firmware. The version is the version number of the current firmware, which is used to compare with the version parameters of the new firmware. The date is the release date of the current firmware, which is used to help determine whether a firmware upgrade is needed.

[0059] Step S503: When the supported version and the version description are inconsistent, continue to execute step S500 until the preset time duration is reached.

[0060] Specifically, if the supported version and the version description are inconsistent, it means that the new firmware (upgrade firmware) is not applicable to the current embedded device, and the device does not need to upgrade the firmware, and only needs to wait for the next upgrade notification.

[0061] Step S504: When the supported version is consistent with the version description, it is determined whether the version parameter is newer than the version.

[0062] Specifically, if the supported version is consistent with the version description, the embedded device will continue to determine whether the version parameter of the upgraded firmware is newer than the version of the current firmware.

[0063] Step S505: If the version parameter is not newer than the version, continue to execute step S500 until the preset time is reached.

[0064] Step S506: If the version parameter is newer than the version, determine whether the date information is later than the date.

[0065] Specifically, if the version parameter is newer than the version, the embedded device will continue to determine whether the date information of the upgraded firmware is later than the date of the current firmware.

[0066] Step S507: When the date information is not later than the date, continue to execute step S500 until the preset time is reached.

[0067] Step S508: When the date information is later than the date, the upgrade firmware corresponding to the upgrade notification is obtained from the PC management machine based on the TFTP protocol, and the firmware of the embedded device is upgraded using the upgrade firmware.

[0068] Specifically, if the release date (date information) of the upgraded firmware is later than the date of the current firmware, the embedded device will choose to perform the firmware upgrade to ensure that the latest firmware is used.

[0069] Specifically, after receiving the upgrade notification, the embedded device will automatically determine whether to perform the firmware upgrade based on the actual situation. The specific judgment process is as follows: Process A. If the version in the Firmware field in the upgrade notification is found to be inconsistent with itself, then ignore this upgrade notification and continue to receive upgrade notifications until the 5-second time is up, and then proceed to the subsequent device startup process. If the version is found to be consistent with itself, proceed to process B.

[0070] Process B. If the version is the same, check whether the version parameter in the upgrade notification is newer than its own version. If it is less than its own version, ignore this upgrade notification and continue to receive upgrade notifications until the 5-second time is up, and then follow the subsequent device startup process. If the version is newer than its own version, follow process C.

[0071] Process C. If both the model and version meet the firmware upgrade conditions, the date information in the upgrade notification is checked to see if it is later than the version itself. If it is not a later version, the upgrade notification is ignored directly, and the upgrade notification continues to be received until the 5-second time is up, and the subsequent device startup process is performed. If it is later, the embedded device performs the firmware upgrade process D.

[0072] Process D. Download the firmware upgrade package, such as nvr.N3xxB-11NEA-AI_V6.2.0_20241125.bin, from the PC management machine (computer) where the tool software is located based on the TFTP protocol (Trivial File Transfer Protocol). After the download is complete, this firmware is written to the FLASH partition. After the writing action is completed, the embedded device will automatically restart to complete the entire firmware upgrade process.

[0073] The UBOOT-based embedded device firmware upgrade method of the embodiment of the present invention forms an intelligent automatic upgrade decision process through a series of conditional judgments, which can ensure the rationality and security of the embedded device when performing firmware upgrades and avoid unnecessary waste of time and resources. Specifically, it includes: Compatibility check: First check whether the upgraded firmware is applicable to the current device (version consistency) to ensure the compatibility of the firmware.

[0074] Version and date verification: After confirming compatibility, further check the version parameters and date information to ensure that the upgraded firmware is superior to the current firmware in terms of functionality and security.

[0075] Circular waiting mechanism: If the firmware upgrade conditions are not met, the device will continue to wait for new upgrade notifications to avoid unnecessary firmware upgrade operations.

[0076] Final upgrade: The device will perform a firmware upgrade only when all conditions are met to ensure that the device always runs in the best condition.

[0077] This automated judgment mechanism effectively improves the intelligence and automation level of firmware upgrades, reduces the need for manual intervention, and ensures the stability and security of the equipment.

[0078] In the UBOOT-based embedded device firmware upgrade method of the embodiment of the present invention, the embedded device does not need to run the operating system, but only needs to load the UBOOT program, and this process does not exceed 3 seconds. It takes another 5 seconds to complete the interaction with the tool software in the local area network, and if necessary, the device firmware is downloaded and upgraded. This method does not require manual intervention (such as operating the serial port, inserting a USB flash drive, etc.) nor the support of additional hardware devices (such as USB flash drives, etc.), which saves time and labor, is highly feasible, and has a wide range of applications.

[0079] The UBOOT-based embedded device firmware upgrade method of the embodiment of the present invention has the following advantages: (1) No additional hardware assistance is required, such as USB flash drive, serial port or other professional equipment, to upgrade the firmware. The entire automatic firmware upgrade environment is an ordinary LAN and an ordinary computer.

[0080] (2) Since there is no need to run the LINUX kernel, let alone start the operating system of the entire embedded device, the entire firmware upgrade process can be completed, saving a lot of production time. Taking the existing products as an example, the LINUX kernel startup time is 20 seconds, the operating system startup time is 2 minutes, and the firmware upgrade process using the method of the embodiment of the present invention is 8 seconds (3 seconds + 5 seconds). In other words, each device can save 2 minutes and 12 seconds. In mass production activities, the method for upgrading embedded device firmware based on UBOOT provided by the embodiment of the present invention will greatly reduce the upgrade cost.

[0081] (3) UBOOT supports automatic execution of the upgrade process through scripts, reducing the complexity and possibility of errors in manual operations. UBOOT also supports the TFTP network protocol, which can directly download firmware through the network, especially in a LAN environment, which can greatly increase the download speed, shorten the upgrade time, and has a high degree of automation.

[0082] The following is an embodiment of the electronic device provided by the present invention. The embodiment of the electronic device and the embodiment of the method for upgrading the firmware of an embedded device based on UBOOT belong to the same concept, and the details not described in detail in the embodiment of the electronic device can refer to the embodiment of the method for upgrading the firmware of an embedded device based on UBOOT.

[0083] See also Figure 3 As shown, it is a schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present invention.

[0084] In this embodiment, an electronic device is an embedded device, including: Memory 1005, used to store program instructions; and The processor 1001 is used to execute the program instructions to implement the steps of the method for upgrading the firmware of an embedded device based on UBOOT as described above.

[0085] The electronic device of the embodiment of the present invention can be a computing device such as a desktop computer, a notebook, a palm computer, and a server. Figure 3 As shown, the electronic device may include: a processor 1001 (such as a CPU), a network interface 1004, a user interface 1003, a memory 1005 and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit, such as a keyboard (Keyboard), and the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0086] Those skilled in the art will understand that Figure 3 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0087] like Figure 3 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and a computer program.

[0088] exist Figure 3In the electronic device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the computer program stored in the memory 1005. When the computer program is called and executed by the processor 1001, the steps of the above-mentioned UBOOT-based embedded device firmware upgrade method are implemented.

[0089] The following is an embodiment of the computer-readable storage medium provided by the present invention. The embodiment of the computer-readable storage medium and the embodiment of the embedded device firmware upgrade method and electronic device based on UBOOT belong to the same concept, and the details not described in detail in the embodiment of the computer-readable storage medium can refer to the embodiment of the embedded device firmware upgrade method and electronic device based on UBOOT.

[0090] In this embodiment, a computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the method for upgrading the firmware of an embedded device based on UBOOT as described above are implemented.

[0091] Since the electronic device and computer-readable storage medium of the present invention can both implement the steps of the above-mentioned method for upgrading the firmware of an embedded device based on UBOOT, they at least have all the beneficial effects brought by the technical solution of the above-mentioned method for upgrading the firmware of an embedded device based on UBOOT, and they are not described one by one here.

[0092] The above description is only a partial or preferred embodiment of the present invention. Neither the text nor the drawings can limit the scope of protection of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the overall concept of the present invention, or direct / indirect application in other related technical fields are included in the scope of protection of the present invention.

[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0094] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for upgrading the firmware of an embedded device based on UBOOT, characterized in that: include: Step S100: The embedded device is connected to a local area network; wherein the local area network is established by a switch, and the local area network is also connected to a PC management machine; Step S200: when the embedded device is powered on, a UBOOT program is loaded and an IP request is sent to a DHCP server in the local area network through the UBOOT program; Step S300: When the embedded device receives the IP address assigned to the embedded device by the DHCP server according to the IP request, the current IP address is updated to the received IP address; wherein the assigned IP address is an unused IP address in the local area network; Step S400: the embedded device starts the timing function and monitors the upgrade notification sent by the PC management machine; Step S500: If the upgrade notification is received within the preset time, the upgrade firmware is obtained according to the upgrade notification, and the firmware of the embedded device is upgraded using the upgrade firmware; if the upgrade notification is not received within the preset time, the UBOOT program is exited and the operating system of the embedded device is started.

2. The method for upgrading the firmware of an embedded device based on UBOOT according to claim 1, characterized in that: The step S400 includes: the embedded device starts the timing function and establishes a broadcast monitor based on the UDP protocol at a preset port to monitor the upgrade notification sent by the PC management machine to the preset target address; wherein the upgrade notification carries the supported version, version parameters and date information of the upgraded firmware.

3. The method for upgrading the firmware of an embedded device based on UBOOT according to claim 2, characterized in that: The preset port is port 8888, the preset target address is 255.255.255.255, and the upgrade notification is encapsulated in XML format.

4. The method for upgrading the firmware of an embedded device based on UBOOT according to claim 1, characterized in that: The flash memory of the embedded device allocates a partition for storing version description information of the current firmware; wherein the version description information includes version description, version and date.

5. The method for upgrading the firmware of an embedded device based on UBOOT according to claim 4, characterized in that: The step of obtaining the upgrade firmware according to the upgrade notification, and using the upgrade firmware to upgrade the firmware of the embedded device includes: According to the upgrade notification, obtain the supported version, version parameters and date information of the upgrade firmware carried in the upgrade notification; Obtaining the version description, version and date of the current firmware stored in the partition, and determining whether the supported version is consistent with the version description; When the supported version and the version description are inconsistent, the step S500 is continued to be executed until the preset time is reached; When the supported version is consistent with the version description, determining whether the version parameter is newer than the version; If the version parameter is not newer than the version, continue to execute step S500 until the preset time is reached; If the version parameter is newer than the version, determining whether the date information is later than the date; When the date information is not later than the date, continue to execute step S500 until the preset time is reached; When the date information is later than the date, the upgrade firmware corresponding to the upgrade notification is obtained from the PC management machine based on the TFTP protocol, and the firmware of the embedded device is upgraded using the upgrade firmware.

6. An electronic device, wherein the electronic device is an embedded device, characterized in that: include: A memory for storing program instructions; as well as A processor is used to execute the program instructions to implement the steps of the method for upgrading the firmware of an embedded device based on UBOOT as described in any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the method for upgrading firmware of an embedded device based on UBOOT as claimed in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • System and method for automatically upgrading network devices in batch in factory

    CN105450455A

  • Method and system for upgrading embedded device

    CN107995265A

  • Multi-MCU firmware upgrading method

    CN118796232A

  • Method, system and device for updating server BMC management firmware in batches and medium

    CN118963788A