Method for Executing a Complete Firmware Update Procedure for Embedded Electronic Devices

By splitting firmware updates into sub-files and utilizing additional memory from the subsystem module, the method enables complete firmware updates on embedded electronic devices with limited memory, addressing the challenge of insufficient storage capacity.

JP7683165B2Active Publication Date: 2025-05-27MOXA INC
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2024000876
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2023-11-03
Filing Date
2024-01-05
Publication Date
2025-05-27
Estimated Expiration
2044-01-05

AI Technical Summary

Technical Problem

Embedded electronic devices with limited built-in memory space face challenges in performing complete firmware updates using FOTA technology due to insufficient storage capacity.

Method used

The method involves splitting the complete firmware update file into multiple update data, dividing them into two sub-update files, creating a header file for each, and combining them into a complete FOTA file. This file is then uploaded and processed in stages, utilizing the additional memory space provided by the subsystem module to complete the update.

Benefits of technology

This approach allows for successful complete firmware updates on devices with limited memory by leveraging the additional storage capacity of the subsystem module, ensuring the update process can be executed efficiently and effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007683165000001
    Figure 0007683165000001
  • Figure 0007683165000002
    Figure 0007683165000002
  • Figure 0007683165000003
    Figure 0007683165000003
Patent Text Reader

Abstract

To provide a method for performing full firmware update procedure on an embedded electronic device.SOLUTION: A method includes, when performing full firmware update procedure on an electronic device, dividing an update file into a first sub update file and a second sub update file, creating a header file, and merging the first sub update file and the second sub update file into a full FOTA file and uploading it. The electronic device extracts each sub update file from the full FOTA file based on the header file, stores the extracted first sub update file into a first storage unit of the electronic device, and stores the extracted second sub update file into a second storage unit. After a firmware update process relating to the first sub update file is performed, the second sub update file is copied to the first storage unit, and a firmware update process relating to the second sub update file is performed.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a method for performing a complete firmware update procedure for an embedded electronic device, and particularly to a method for performing a complete firmware update procedure for an embedded electronic device with limited built-in memory space through FOTA technology. [Background technology]

[0002] Embedded electronic devices usually include hardware, software and firmware. Hardware generally refers to all the physical elements of a system required to perform a function, such as a motherboard, a video card, a central processing unit, a ventilation fan, a network camera and a power supply, and these elements can be connected to each other through a circuit board. Software generally refers to a non-physical product realized by a programming language, such as an application program (APP), a web page, various operating systems, and the like, and the hardware can provide various convenient services to users. Firmware is software embedded in a hardware device, and can control the hardware by a programming language. Common firmware is present in information products such as a basic input / output system chip on a motherboard, a CD-R drive, a CD-RW drive, an Internet Protocol gateway / router, a wireless access point (WAP) and a modem. A user can remotely control and operate the settings and functions in the firmware through a designated interface, check the current working status of the hardware, and perform hardware configuration, upgrade and adjustment.

[0003] Firmware can be regarded as a package containing all formally specially designed software, which is usually stored in the flash memory in the embedded electronic device, and the user can perform the firmware update procedure by a specific device and method. The main purposes of firmware update include correcting errors in program code, increasing or improving execution function, adjusting system security, and improving firmware efficiency.

[0004] The first kind of conventional firmware update method is to connect the embedded electronic device to a computer host using a universal serial bus (USB) port, and then use software for flashing the device, such as FlashTool, to download the latest version of the firmware in the official FTF format and update it in an offline state. Although such a technique can transmit a large firmware file to perform a complete firmware update, in certain application scenarios, the above-mentioned wired data transmission is not feasible or is very inconvenient.

[0005] The second type of conventional firmware update method uses FOTA (firmware over-the-air) technology to automatically update the operating system of an embedded electronic device. After establishing a connection with a server, the embedded electronic device can download and update the firmware without connecting to a computer. However, if an error occurs in the root file system (rootfs) or modem of the embedded electronic device, the firmware cannot be updated by connecting to a network. In addition, the storage space of the built-in flash memory of a mobile electronic device is often not sufficient to accommodate the file size required to perform a complete firmware update using FOTA technology. For this reason, electronic devices with limited built-in memory space can only adopt the above-mentioned first type of conventional firmware update method to perform a complete firmware update, which is inconvenient for users.

[0006] Therefore, there is a need for a method to perform complete firmware updates for electronic devices with limited built-in memory space via FOTA technology. [Prior art documents] [Patent documents]

[0007] [Patent Document 1] Taiwan Patent Application Publication No. 201222413 [Patent Document 2] China Patent Publication No. 114253570 [Patent Document 3] US Patent No. 11042365 Summary of the Invention

[0008] The present invention provides a method for performing a complete firmware update procedure for an embedded electronic device, comprising the steps of: splitting a complete firmware update file into a plurality of update data; dividing the plurality of update data into a first sub-update file and a second sub-update file; creating a header file (header) related to a file size of each sub-update file; combining the header file, the first sub-update file and the second sub-update file in this order as a complete firmware over-the-air (FOTA) file; uploading the complete FOTA file to the embedded electronic device; extracting contents related to the first sub-update file from the complete FOTA file based on the header file and storing the extracted first sub-update file in a first storage unit of the embedded electronic device; clearing memory space of a second storage unit in a subsystem module of the embedded electronic device; extracting contents related to the second sub-update file from the complete FOTA file based on the header file and storing the extracted second sub-update file in the second storage unit; a step of executing a firmware update process; copying the second sub-update file stored in the second storage unit to the first storage unit at a second time point later than the first time point; and a step of executing a firmware update process associated with the second sub-update file stored in the first storage unit at a third time point later than the second time point, wherein during an operation of the embedded electronic device, the first storage unit provides a first available memory space and the second storage unit provides a second available memory space, and a file size of the complete firmware update file is greater than the first available memory space and less than or equal to a sum of the first available memory space and the second available memory space. [Brief description of the drawings]

[0009] [Figure 1] FIG. 2 is a functional block diagram of an embedded electronic device according to an embodiment of the present invention. [Diagram 2] 4 is a flowchart of a method for performing a complete firmware update procedure for an embedded electronic device through FOTA technology according to an embodiment of the present invention. [Diagram 3] 1 is a schematic diagram of relevant data after the embedded electronic device according to an embodiment of the present invention performs file division of a complete firmware update procedure; [Figure 4] 2 is a schematic diagram of a complete FOTA file generated when an embedded electronic device according to an embodiment of the present invention performs a complete firmware update procedure. [Diagram 5] 5 to 9 are schematic diagrams of data at each stage when an embedded electronic device according to an embodiment of the present invention performs a complete firmware update procedure using FOTA technology. [Figure 6] 5 to 9 are schematic diagrams of data at each stage when an embedded electronic device according to an embodiment of the present invention performs a complete firmware update procedure using FOTA technology. [Figure 7] 5 to 9 are schematic diagrams of data at each stage when an embedded electronic device according to an embodiment of the present invention performs a complete firmware update procedure using FOTA technology. [Figure 8] 5 to 9 are schematic diagrams of data at each stage when an embedded electronic device according to an embodiment of the present invention performs a complete firmware update procedure using FOTA technology. [Figure 9] 5 to 9 are schematic diagrams of data at each stage when an embedded electronic device according to an embodiment of the present invention performs a complete firmware update procedure using FOTA technology. [Figure 10] 4 is a schematic diagram of data after an embedded electronic device according to an embodiment of the present invention has performed a complete firmware update procedure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] 1 is a functional block diagram of an embedded electronic device 100 according to an embodiment of the present invention. The embedded electronic device 100 includes at least a processing unit 110, a subsystem module 120, a first storage unit 131, and a user interface 140.

[0011] In an embodiment of the present invention, the embedded electronic device 100 may be, but is not limited to, an Internet of Things (IoT) appliance device, a mobile network device (mobile Internet device: MID), or a smartphone designed for various applications such as industrial, medical, communication, storage, or automotive.

[0012] In an embodiment of the present invention, the subsystem module 120 includes at least a second storage unit 132, in which subsystem firmware is stored to provide functions required for the application of the embedded electronic device 100. For example, if the embedded electronic device 100 is an Internet Service Provider (ISP) device, the subsystem module 120 may be a modem module. Note that the type of the embedded electronic device 100 and the subsystem module 120 therein do not limit the scope of the present invention.

[0013] In an embodiment of the present invention, the first storage unit 131 is an internal memory of the embedded electronic device 100, which may be, for example, but is not limited to, an embedded multimedia card (eMMC), a universal flash storage (UFS), or a high-speed non-volatile memory (NVMe).

[0014] In an embodiment of the present invention, the second storage unit 132 is an internal memory of the subsystem module 120 and may include one or more types of memory devices including, but not limited to, flash memory, random access memory (RAM), and / or read-only memory (ROM).

[0015] In the embodiment of the present invention, since the embedded electronic device 100 is a product with high demands for thinness and lightness, its built-in first storage unit 131 can only provide limited available memory space. More specifically, during the operation of the embedded electronic device 100, the available memory space provided by the first storage unit 131 cannot accommodate the memory space required to perform a complete firmware update procedure.

[0016] In an embodiment of the present invention, when embedded electronic device 100 is operating, the available memory space provided by first storage unit 131 is smaller than the memory space required to perform a complete firmware update procedure, and the sum of the available memory space provided by first storage unit 131 and second storage unit 132 is larger than the memory space required to perform the complete firmware update procedure. Thus, the present invention utilizes the additional available memory space provided by second storage unit 132 in subsystem module 120 to assist the memory space required to perform the complete firmware update procedure when embedded electronic device 100 performs the complete firmware update procedure.

[0017] 2 is a flowchart of a method for performing a complete firmware update procedure for the embedded electronic device 100 by FOTA technology according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:

[0018] Step 200: Divide the complete firmware update file into multiple update data pieces.

[0019] Step 210: Divide the plurality of update data into a first sub-update file and a second sub-update file.

[0020] Step 220: Create a header file associated with the firmware version, authentication code, and file size of each sub-update file.

[0021] Step 230: Combine the header file, the first sub-update file and the second sub-update file in this order into a complete FOTA file.

[0022] Step 240 : Upload the complete FOTA file to the embedded electronic device 100 .

[0023] Step 250: Determine whether the validity verification is successful for the complete FOTA file; if YES, execute step 260; if NO, execute step 320.

[0024] Step 260 : Extract the content related to the first sub-update file based on the header file of the complete FOTA file, and store the extracted first sub-update file in the first storage unit 131 .

[0025] Step 270: Clear the memory space of the second storage unit 132 in the subsystem module 120.

[0026] Step 280: Extract the content related to the second sub-update file based on the header file of the complete FOTA file, and store the extracted second sub-update file in the second storage unit 132.

[0027] Step 290: Determine whether the first sub-update file and the second sub-update file are complete; if YES, execute step 300; if NO, execute step 320.

[0028] Step 300: Reboot the system and execute the firmware update process associated with the first sub-update file stored in the first storage unit 131.

[0029] Step 310: Reboot the system, copy the second sub-update file stored in the second storage unit 132 to the first storage unit 131, and execute the firmware update process associated with the second sub-update file stored in the first storage unit 131.

[0030] Step 320: Indicate that the firmware update has failed and end the firmware update procedure.

[0031] The present invention splits the complete firmware update file into multiple update data in step 200, where each update data may be for the kernel, the root file system (rootfs), the original equipment manufacturer (OEM) packages, and the subsystem firmware. In one aspect, step 200 may be performed using any relevant file splitting tool or software.

[0032] In step 210, the present invention divides the multiple update data into a first sub-update file and a second sub-update file. Assuming that the complete firmware update file is divided into (M+N) update data in step 200 and the contents of each update data are different, the first sub-update file may include M update data, and the second sub-update file may include N update data, where M and N are positive integers. As mentioned above, the file size of the complete firmware update file when performing the complete firmware update procedure is larger than the available memory space provided by the first storage unit 131 and is less than the sum of the available memory space provided by both the first storage unit 131 and the second storage unit 132. In one aspect, the present invention may determine the size of the first sub-update file and the second sub-update file based on the ratio between the available memory space provided by the first storage unit 131 and the available memory space provided by the second storage unit 132.

[0033] In an embodiment of the present invention, the second sub-update file includes subsystem firmware update data in a complete firmware update file, and the time to perform the update process associated with the first sub-update file is earlier than the time to perform the update process associated with the second sub-update file.

[0034] 3 is a schematic diagram of related data after the embedded electronic device 100 according to an embodiment of the present invention executes step 210 of the complete firmware update procedure. For convenience of explanation, it is assumed that the complete firmware update file is divided into four update data, namely, rootfs update data, OEM package update data, kernel update data, and subsystem firmware update data, and the total file size thereof is about 144 MB. As shown in FIG. 3, it is assumed that the available memory space provided by the first storage unit 131 and the available memory space provided by the second storage unit 132 are similar, and after executing step 210, the first sub-update file may include a total of two update data, rootfs update data and OEM package update data (the file size is about 73 MB), and the second sub-update file may include a total of two update data, kernel update data and subsystem firmware update data (the file size is about 71 MB).

[0035] In an embodiment of the present invention, the update data in the first sub-update file is different from the update data in the second sub-update file, and the second sub-update file includes at least subsystem firmware update data.

[0036] The present invention creates a header file associated with the firmware version, a verification code, and the size of each sub-update file in step 220. The present invention combines the header file, the first sub-update file, and the second sub-update file, in that order, into a complete FOTA file in step 230.

[0037] FIG. 4 is a schematic diagram of a complete FOTA file generated when the embedded electronic device 100 according to an embodiment of the present invention performs a complete firmware update procedure. In one aspect, the verification code may be a cyclic redundancy check (CRC) for verifying errors that may occur after data transmission or storage. In another aspect, the authentication code may be any hash function of a fixed-bit authentication code generated based on data such as a network data packet or a computer file. In one aspect, Size 1 may represent the data size of the first sub-update file, and the value may be a number of bits related to the length of the first sub-update file. Size 2 may represent the file size of the second sub-update file, and the value may be a number of bits related to the length of the second sub-update file. Note that the format of the header file and the type of the authentication code are not limited to the scope of the present invention.

[0038] In step 240, the present invention may upload the complete FOTA file to the embedded electronic device 100 via the user interface 140. Then, in step 250, the embedded electronic device 100 judges whether the authenticity verification is successful for the complete FOTA data. In one embodiment, the processing unit 110 of the embedded electronic device 100 may check the content of the header file in the complete FOTA file and verify the authenticity of the verification code. If it is determined that the authenticity verification is not successful for the complete FOTA file, the present invention executes step 320 to present that the firmware update has failed and terminate the firmware update procedure, since this means that data loss or missing may occur in the process of uploading the complete FOTA file to the embedded electronic device 100.

[0039] If it is determined in step 250 that the validity verification is successful for the complete FOTA file, in steps 260 and 280, the contents related to the first sub-update file and the contents related to the second sub-update file are extracted based on the header file of the complete FOTA file, respectively. In the embodiment shown in FIG. 4, the processing unit 110 of the embedded electronic device 100 may obtain the file size Size 1 of the first sub-update file and the file size Size 2 of the second sub-update file based on the header file of the complete FOTA file, and extract corresponding data based on the file size Size 1 of the first sub-update file and the file size Size 2 of the second sub-update file, respectively. For example, if the value of the file size Size 1 is m and the value of the file size Size 2 is n (m and n are positive integers), the processing unit 110 may extract data of the 1st to mth bits after the header file in the complete FOTA file as the first sub-update file, and extract data of the (m+1)th to (m+n)th bits after the header file in the complete FOTA file as the second sub-update file.

[0040] 5 to 9 are schematic diagrams of data at each stage when the embedded electronic device 100 according to an embodiment of the present invention performs a complete firmware update procedure using FOTA technology. Before performing the firmware update procedure, the embedded electronic device 100 stores an existing kernel file, an existing rootfs file, an existing OEM file, and an existing subsystem firmware.

[0041] In step 260, the present invention stores the first sub-update file extracted from the complete FOTA file in the first storage unit 131 of the embedded electronic device 100, as shown in FIG.

[0042] In step 270, the present invention clears the memory space of the second storage unit 132 in the subsystem module 120. Then, in step 280, the present invention stores the second sub-update file extracted from the complete FOTA file in the second storage unit 132 in the subsystem module 120, as shown in FIG.

[0043] In step 290, the processing unit 110 determines whether the first sub-update file and the second sub-update file are complete based on the header file in the complete FOTA file. If it is determined that the first sub-update file stored in the first storage unit 131 and / or the second sub-update file stored in the second storage unit 132 is not complete, it means that data loss or missing may occur in the process of previous data extraction and / or data storage, in this case, the present invention executes step 320 to indicate that the firmware update has failed and terminate the firmware update procedure.

[0044] After verifying the integrity of the first sub-update file stored in the first storage unit 131 and the second sub-update file stored in the second storage unit 132, the embedded electronic device 100 reboots the system in step 300 and executes a firmware update process associated with the first sub-update file stored in the first storage unit 131. More specifically, when the system is rebooted in step 300, the existing rootfs file and the existing OEM file are updated based on the rootfs update data and the OEM update data in the first sub-update file stored in the first storage unit 131, respectively, as shown in FIG.

[0045] After the update procedure related to the first sub-update file is completed, as shown in FIG. 8, the embedded electronic device 100 reboots the system in step 310, and after the reboot is completed, copies the second sub-update file stored in the second memory unit 132 to the first memory unit 131.

[0046] Then, the embedded electronic device 100 executes a firmware update process associated with the second sub-update file stored in the first storage unit 131. More specifically, after the second sub-update file is copied to the first storage unit 131 in step 310, the embedded electronic device 100 updates the existing kernel file and the subsystem firmware update data in the second sub-update file stored in the first storage unit 131, respectively, as shown in FIG.

[0047] In one aspect, after embedded electronic device 100 is rebooted in steps 300 and 310, it executes an Original Equipment Manufacturer Secondary Boot Loader (OEMSBL) to execute the update process associated with the first sub-update file and the second sub-update file. Note that the manner in which embedded electronic device 100 executes the firmware update process is not intended to limit the scope of the present invention.

[0048] 10 is a schematic diagram of data after the embedded electronic device 100 according to an embodiment of the present invention performs a complete firmware update procedure. After the complete firmware update procedure is performed, the embedded electronic device 100 stores an updated kernel file, an updated rootfs file, an updated OEM file, and an updated subsystem firmware.

[0049] As described above, the present invention implements a complete firmware update procedure for an embedded electronic device with limited built-in memory space through multi-stage FOTA technology. Because the firmware update process for the subsystem module is implemented in the final stage, the additional available memory space provided by the built-in memory of the subsystem module can be utilized to support the memory space required to implement the complete firmware update procedure before updating the existing subsystem firmware.

[0050] The above describes the preferred embodiment of the present invention, but all equivalent modifications and variations based on the claims of the present invention belong to the scope of the present invention. [Explanation of symbols]

[0051] 100: Embedded electronic devices 110: Processing unit 120: Subsystem module 131: First storage unit 132: Second storage unit 140: User Interface 200~320: Step

Claims

1. 1. A method for performing a complete firmware update procedure on an embedded electronic device, comprising: A server splitting a complete firmware update file into a plurality of update data; The server divides the plurality of update data into a first sub-update file and a second sub-update file; The server creates a header file relating to the file size of each sub-update file; the server combining the header file, the first sub-update file, and the second sub-update file in this order as a complete firmware over-the-air (FOTA) file; the server uploading the complete FOTA file to the embedded electronic device; A processing unit of the embedded electronic device extracts content related to the first sub-update file from the complete FOTA file based on the header file, and stores the extracted first sub-update file in a first storage unit of the embedded electronic device; The processing unit erases a memory space of a second storage unit in a subsystem module of the embedded electronic device; The processing unit extracts content related to the second sub-update file from the complete FOTA file based on the header file, and stores the extracted second sub-update file in the second storage unit; the processing unit executes, at a first time, a firmware update process associated with the first sub-update file stored in the first storage unit; The processing unit copies the second sub-update file stored in the second storage unit to the first storage unit at a second time point that is later than the first time point; and executing, by the processing unit, a firmware update process associated with the second sub-update file stored in the first storage unit at a third time point that is later than the second time point; During an operation of the embedded electronic device, the first storage unit provides a first available memory space, and the second storage unit provides a second available memory space; A method according to claim 1, wherein a file size of the complete firmware update file is greater than the first available memory space and is less than or equal to a sum of the first available memory space and the second available memory space.

2. The complete firmware update file is divided into (M+N) update data pieces; The first sub-update file includes N pieces of update data; the second sub-update file includes M pieces of update data, the M pieces of update data including at least update data related to subsystem firmware; N and M are positive integers, The method of claim 1 , wherein a content of each piece of update data in the first sub-update file is different from a content of each piece of update data in the second sub-update file.

3. The N update data include kernel update data, root file system (rootfs) update data, or original equipment manufacturer (OEM) package update data; The method of claim 2 , wherein the M update data include update data that is not included in the N update data among the kernel update data, the root file system update data, and the OEM package update data.

4. The method of claim 1, further comprising the step of the server determining values ​​of M and N based on a ratio between the memory space of the first storage unit and the memory space of the second storage unit.

5. The step of the server creating the header file relating to a file size and a verification code of each sub-update file; After uploading the complete FOTA file to the embedded electronic device, the processing unit determines whether the complete FOTA file has been successfully verified based on the verification code in the header file; 2. The method of claim 1, further comprising: if it is determined that the validity verification is successful for the complete FOTA file, the processing unit extracts content related to the first sub-update file and content related to the second sub-update file from the complete FOTA file based on the header file.

6. After storing the extracted first sub-update file in the first storage unit, the processing unit determines whether the first sub-update file is complete; 2. The method of claim 1, further comprising: if the first sub-update file is determined to be complete, the processing unit reboots the embedded electronic device to execute a firmware update process associated with the first sub-update file stored in the first storage unit at the first time.

7. After copying the second sub-update file stored in the second storage unit at the second time to the first storage unit, the processing unit determines whether the second sub-update file is complete; 2. The method of claim 1, further comprising: if the second sub-update file is determined to be complete, the processing unit restarts the embedded electronic device to execute a firmware update process associated with the second sub-update file stored in the first storage unit at the third time point.

8. 8. The method of claim 5, further comprising the step of: the processing unit indicating that the firmware update has failed and terminating the complete firmware update procedure if it is determined that the complete FOTA file has not been successfully verified; if it is determined that the first sub-update file is not complete after storing the extracted first sub-update file in the first storage unit; and / or if it is determined that the second sub-update file stored in the second storage unit is not complete after copying the second sub-update file stored in the second storage unit to the first storage unit.

Citation Information

Patent Citations

  • Firmware over-the-air upgrading method, and terminal, server and system employing same

    CN111240722A

  • Heavy vehicle identification method based on multi-label target detection

    CN113642382A

  • Controller, storage device and firmware updating method of storage device

    CN114253570A

  • System and method for updating firmware of a baseboard management controller

    TW201222413A

  • Firmware updating method and electronic device using the same

    US11042365B2