Firmware wireless upgrading method and device, computer equipment and storage medium

Through the wireless upgrade method, the unified upgrade of the main system and module firmware of the vehicle equipment is achieved, solving the problems of inflexible and inefficient upgrade process in the existing technology, and improving system reliability and user experience.

CN119576367APending Publication Date: 2025-03-07SHENZHEN GENVICT TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411636278.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, there are problems of insufficient flexibility and efficiency in the firmware upgrade process of vehicle-mounted equipment, especially in multi-module systems, where the firmware update methods and tools of each module are inconsistent, resulting in complex and inconvenient upgrade process.

Method used

Using wireless upgrade method, by connecting to the system WiFi hotspot, uploading firmware packages using a browser, launching the background upgrade program, confirming the version and configuring the backup partition, and modifying the bootloader variable to achieve wireless upgrade of the main system. At the same time, restore the user's customized configuration, and judge the firmware update requirements of C-V2X module and 5G module, and perform corresponding flash and restart operations.

Benefits of technology

It improves the reliability and user experience of the system, simplifies the upgrade process, ensures the unity and consistency of the firmware updates of each module, and avoids system crashes caused by the failure of the upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576367A_ABST
    Figure CN119576367A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware wireless upgrading method and device, computer equipment and a storage medium. The method comprises the following steps: connecting a system WiFi hotspot, uploading a. Swu firmware package by using a browser, starting a background upgrading program, confirming a version, configuring a backup partition and modifying a bootloader variable so as to carry out wireless upgrading of a main system; restoring the user-defined configuration; and judging firmware updating requirements of the C-V2X module and the 5G module, respectively performing corresponding flashing and restarting operations, and restarting the equipment after the updating is successful. By means of the method, the firmware of the vehicle-mounted equipment can be upgraded in a wireless upgrading mode, the reliability of the system is improved, and the user experience in the upgrading process is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a vehicle-mounted device upgrading method, and more specifically to a firmware wireless upgrading method, device, computer equipment and storage medium. Background Art

[0003] In-vehicle devices usually integrate multiple modules to support a variety of basic functions and provide the necessary underlying functions for upper-level application development. When the system version needs to be updated, it is often necessary to upgrade the firmware of each module at the same time. These modules usually come from different manufacturers, so their firmware update methods and required tools are different. When performing a unified upgrade, the specific upgrade plan of each module and the actual usage scenario must be comprehensively considered to ensure safety and convenience.

[0004] Traditional firmware upgrade methods mostly use wired connections, which are limited by geographical location and physical connections, often resulting in the upgrade process being inflexible and inefficient.

[0005] Therefore, it is necessary to design a new method to upgrade the firmware of the vehicle-mounted equipment by wireless upgrade, improve the reliability of the system, and optimize the user experience during the upgrade process. Summary of the invention

[0007] The purpose of the present invention is to overcome the defects of the prior art and provide a firmware wireless upgrade method, device, computer equipment and storage medium.

[0008] To achieve the above object, the present invention adopts the following technical solution: a wireless firmware upgrade method, comprising: Connect to the system WiFi hotspot, upload the .swu firmware package using a browser, start the background upgrade program, confirm the version and configure the backup partition, and modify the bootloader variables to perform wireless upgrades of the main system; Restore user-defined configuration; Determine the firmware update requirements for the C-V2X module and 5G module, and perform the corresponding flash and restart operations respectively, ensuring that the update is successful before restarting the device.

[0009] The further technical solution is: by connecting to the system WiFi hotspot, using the browser to upload the .swu firmware package, starting the background upgrade program, confirming the version and configuring the backup partition, and modifying the bootloader variables, the main system can be wirelessly upgraded, including: When the device is started, the upgrade service is running in the background, and the external device is connected to the system WiFi hotspot, use the browser to open the specified IP: port; Insert the firmware upgrade package with the .swu suffix on the web page and trigger the system background upgrade program; Determine whether the specific variable identifier of the running program is preinst to determine the main system version; When the main system version is confirmed, obtain the module firmware version; Get the current partition, backup partition information and transfer parameters; Format the backup partition; Transfer and place the firmware in the .swu suffix file according to the sw-description file configuration, and modify the bootloder variable.

[0010] A further technical solution is: restoring the user-defined configuration includes: It is determined that the running program specific variable identifier is postinst to determine that the main system software update is completed, and the user-defined configuration is centrally backed up and restored.

[0011] A further technical solution is: the specific variable identification of the judging running program is postinst to determine that the main system software update is completed, and the user-defined configuration is centrally backed up and restored, including: When the parameter of the user-defined configuration is postinst, the user-defined configuration is stored centrally, and during the upgrade, a mount point is created, the root partition is determined, and related configurations are restored. The related configurations include WiFi, Bluetooth, Ethernet, 5G, CAN configurations, and app applications added by the user.

[0012] The further technical solution is: the determination of the firmware update requirements of the C-V2X module and the 5G module, respectively performing corresponding flashing and restarting operations, and restarting the device after ensuring the update is successful, including: Determine whether the C-V2X module firmware needs to be updated; If the C-V2X module firmware does not need to be updated, determine whether the 5G module firmware needs to be updated; If the 5G module firmware does not need to be updated, restart the device; If the C-V2X module firmware needs to be updated, when the C-V2X module firmware is 2k hardware, then flash the 2k firmware; when the C-V2X module firmware is not 2k hardware, then flash the 4k firmware; After flashing the C-V2X module firmware, restart the C-V2X module and execute the determination of whether the 5G module firmware needs to be updated; If the 5G module firmware needs to be updated, flash the 5G firmware, restart the 5G module firmware, and execute the restart device.

[0013] The further technical solution is: when the C-V2X module firmware is 2k hardware, 2k firmware is flashed, and when the C-V2X module firmware is not 2k hardware, 4k firmware is flashed, including: Stop services related to C-V2X module firmware; Mount it on the backup partition and copy the C-V2X module firmware from the backup partition to the specified path of the current partition; Unzip the copied C-V2X module firmware; Obtain the C-V2X module firmware hardware information, determine the upgrade package to be used based on whether the hardware information belongs to 2k hardware or 4k hardware, and enter the specified path of the current partition; Restart the C-V2X module firmware and enter fastboot mode; Clear and flash the C-V2X module firmware in fastboot mode, and confirm the version after the update is complete.

[0014] The further technical solution is: flashing the 5G firmware and restarting the 5G module firmware includes: Stop services related to 5G module firmware; Copy the 5G module firmware from the backup partition to the specified path of the current partition; Unzip the copied 5G module firmware; Upgrade the 5G module firmware through the system's built-in qdl tool and the XML file in the firmware package; After the upgrade is complete, restart the 5G module firmware and confirm the version after the update is complete.

[0015] The present invention also provides a firmware wireless upgrade device, comprising: The main system upgrade unit is used to connect to the system WiFi hotspot, upload the .swu firmware package using a browser, start the background upgrade program, confirm the version and configure the backup partition, and modify the bootloader variables to wirelessly upgrade the main system; A restore unit, used to restore user-defined configuration; The firmware update unit is used to determine the firmware update requirements of the C-V2X module and 5G module, and perform corresponding flashing and restart operations respectively to ensure that the device is restarted after the update is successful.

[0016] The present invention further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.

[0017] The present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0018] The beneficial effect of the present invention compared with the prior art is that the present invention can upload the .swu firmware package in the browser and start the background upgrade program by connecting to the system's WiFi hotspot. The system will confirm the version and configure the backup partition, and modify the bootloader variables to achieve wireless upgrade of the main system. After the main system upgrade is completed, the user-defined configuration will be restored. Then, the firmware update requirements of the C-V2X module and the 5G module are determined, and the flash and restart operations are performed respectively. Finally, the device is restarted after ensuring that the update is successful, thereby improving the reliability of the system and optimizing the user experience.

[0019] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0022] Figure 1 A schematic diagram of a firmware wireless upgrade method according to an embodiment of the present invention; Figure 2 A schematic diagram of a sub-process of a wireless firmware upgrade method provided by an embodiment of the present invention; Figure 3 A schematic diagram of a sub-process of a wireless firmware upgrade method provided by an embodiment of the present invention; Figure 4 A schematic diagram of a sub-process of a wireless firmware upgrade method provided by an embodiment of the present invention; Figure 5 A schematic diagram of a sub-process of a wireless firmware upgrade method provided by an embodiment of the present invention; Figure 6 A schematic block diagram of a firmware wireless upgrade device provided by an embodiment of the present invention; Figure 7 A schematic block diagram of a main system upgrade unit of a wireless firmware upgrade device provided in an embodiment of the present invention; Figure 8 A schematic block diagram of a firmware update unit of a firmware wireless upgrade device provided in an embodiment of the present invention; Fig. 9 A schematic block diagram of a first flashing subunit of a firmware wireless upgrade device provided in an embodiment of the present invention; Fig.10 A schematic block diagram of a second flashing subunit of a firmware wireless upgrade device provided in an embodiment of the present invention; Fig.11A schematic block diagram of a computer device provided for an embodiment of the present invention; Fig.12 A schematic diagram of a boot program loading a primary partition provided by an embodiment of the present invention; Fig.13 A schematic diagram of a boot program loading a backup partition provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0025] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0026] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0027] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0028] See also Figure 1 , Figure 1 A schematic flow chart of a firmware wireless upgrade method provided in an embodiment of the present invention. The method is mainly used in the control terminal of the vehicle-mounted device. Specifically, the firmware that needs to be updated in the vehicle-mounted device includes the main chip system firmware, the C-V2X module firmware and the 5G module firmware. The main chip system version is tightly bound to the C-V2X system version. If the versions do not match, it will cause functional abnormalities, while the 5G module firmware has no strong dependencies and can be updated with the firmware version as needed.

[0029] The main chip system adopts A / B partition structure, which can refresh the firmware and import the user-defined configuration backup to another partition without affecting the system operation, and mount another partition when restarting to achieve firmware update. The packaging and transmission of firmware can be achieved by combining the integrated tool swupdate with the device's own WiFi wireless network.

[0030] The firmware update of the C-V2X module and the 5G module is limited by the update method and can only be transmitted through the interface bus with the main chip, so it cannot be refreshed at the same time as the main chip. In the early stage of firmware transmission, the firmware of the two modules needs to be imported into the corresponding backup path of the current partition. After the backup partition updates the image, before restarting the system, the communication bus interface of the currently mounted partition is used in combination with the systemd service function of the main chip system to obtain and compare the firmware versions of the two modules to determine whether they need to be updated and mark them. After completing these tasks, the upgrade program will enter the restart process.

[0031] The A / B partition design effectively prevents errors or interruptions during the main system firmware upgrade process that may cause system crashes. At the same time, when updating module firmware, related functions inevitably need to be temporarily suspended. The systemd service functions involved in the module firmware upgrade can be temporarily shut down, and the system can be restarted after the firmware update is completed to automatically restore the normal startup of the functional services.

[0032] The method of this embodiment implements upgrading the firmware of the vehicle-mounted device by wireless upgrading, thereby improving the reliability of the system and optimizing the user experience during the upgrading process.

[0033] Figure 1 FIG. 1 is a flow chart of a firmware wireless upgrade method provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S130.

[0034] S110. Connect to the system WiFi hotspot, use the browser to upload the .swu firmware package, start the background upgrade program, confirm the version and configure the backup partition, and modify the bootloader variables to perform wireless upgrade of the main system.

[0035] In one embodiment, see Figure 2 The above-mentioned step S110 may include steps S111~S117.

[0036] S111. When the device is started, the upgrade service runs in the background, and the external device is connected to the system WiFi hotspot, use the browser to open the specified IP: port; S112, insert the firmware upgrade package with the .swu suffix into the web page, and trigger the system background upgrade program; S113, judging whether the specific variable identifier of the running program is preinst, so as to determine the main system version; S114, when the main system version is confirmed, obtain the module firmware version; S115, obtaining current partition and backup partition information and transmitting parameters; S116, formatting the backup partition; S117. Transfer and place the firmware in the .swu suffix file according to the sw-description file configuration, and modify the bootloder variable.

[0037] For the above steps S111 to S117, the main system adopts an A / B partition architecture, where the two partitions store the kernel and the root file system respectively. The key to this architecture is: Partition A: The currently running partition, providing a stable system environment.

[0038] B partition: backup partition, used when upgrading the system.

[0039] At startup, the bootloader will load the currently running partition to ensure that the system works properly. When upgrading the system, the currently running partition remains unchanged, while the backup partition is reformatted and updated with data. This mechanism ensures high availability and flexibility of the system. The loading process of partition A and partition B is as follows Fig.12 and Fig.13 shown.

[0040] The upgrade details include: Startup and partition mounting: When the bootloader boots the system, it mounts the currently running partition (for example, A), loads its kernel and file system, and ensures the normal operation of the system.

[0041] Upgrade: When a system upgrade is required, keep the current partition running (A) while formatting and updating the data in another partition (B).

[0042] After the data update is complete, the bootloader variables are set to notify that the new image has been successfully installed.

[0043] Restart and switch partitions: When you restart the device, the bootloader will boot to the updated partition (B) to ensure that the latest firmware and system are used.

[0044] Fault recovery mechanism: If the backup partition data fails to update or the upgrade is interrupted, the bootloader will not modify the boot program variables. At this time, the system will still run on the currently mounted partition (A), avoiding system unavailability due to upgrade failure.

[0045] The upgrade tool includes: swupdate tool: This upgrade is mainly implemented using the swupdate tool, which has powerful configuration and customization capabilities.

[0046] In the sw-description file, define the software and hardware versions, partition configuration, firmware package transfer path, and execution script (such as manualop.sh).

[0047] Web page trigger upgrade: When the external device is connected to the main device via WiFi and accesses the specific IP and port, it can enter the upgrade web page.

[0048] The user uploads the firmware upgrade package with the .swu suffix on the web page to trigger the swupdate program.

[0049] The upgrade process nodes include: System version confirmation: Verify the compatibility of the current system version and firmware.

[0050] Firmware package transfer: Transfer the firmware package to the device via the network.

[0051] Execute the manualop.sh script to perform necessary system settings or file operations.

[0052] Modify identification parameters: Update system status and version identification.

[0053] Reboot System: Reboot the device after the upgrade is complete to apply the new firmware.

[0054] The main system upgrade step of this embodiment adopts the A / B partition architecture to ensure that the system is still available even if a failure occurs during the upgrade process, avoiding the risk of system crash. Firmware upload and upgrade through the web page simplifies user operations and improves user experience. The current running partition is not modified during the upgrade process, and a rollback mechanism is provided to ensure system security and reliability. The automated process of system version confirmation and script execution reduces manual intervention and improves maintenance efficiency. By configuring the file transfer size limit, it is possible to flexibly respond to the upgrade requirements of large files and avoid upgrade failures.

[0055] In summary, the A / B partition upgrade process combined with the swupdate tool provides a high-availability, secure, and convenient system upgrade solution.

[0056] S120. Restore the user-defined configuration.

[0057] In this embodiment, it is determined that the running program specific variable identifier is postinst to determine that the main system software update is completed, and the user-defined configuration is centrally backed up and restored.

[0058] Specifically, when the parameter of the user-defined configuration is postinst, the user-defined configuration is stored centrally, and during the upgrade, a mount point is created, the root partition is determined, and related configurations are restored. The related configurations include WiFi, Bluetooth, Ethernet, 5G, CAN configurations, and app applications added by the user.

[0059] The entire restore includes backup and recovery, as follows: Detect the current root partition: When the script starts, check / proc / cmdline to determine whether the current root partition (curroot) is / dev / mmcblk0p2 or / dev / mmcblk0p4. Set the backup partition (slotB) based on the current root partition.

[0060] Mount the backup partition: Use the mount command to mount the backup partition to / mnt / slotB for subsequent operations.

[0061] Back up WiFi configuration: Check whether the / etc / wifi directory exists. If so, do the following: Clear the WiFi configuration content in the current backup partition ( / mnt / slotB / etc / wifi).

[0062] Copy the WiFi configuration of the current partition ( / etc / wifi) to the backup partition.

[0063] Continue to back up other configuration items: The backup process can be expanded to include other user-defined configuration items such as Bluetooth, Ethernet, CAN, 5G, etc.

[0064] Complete backup: After completing the backup of all configuration items, ensure data integrity and consistency and improve system reliability.

[0065] This step centrally manages user-defined configuration items, making it easier for technical support staff to maintain and update them, thus improving work efficiency. Users do not need to manually back up and restore configuration items, as automated system processing reduces human errors. When the system is upgraded, configuration items can be quickly restored, reducing the risk of the upgrade and ensuring that the system runs normally under the new firmware. By cleaning up old configurations and backing up current configurations, data security is ensured to avoid configuration conflicts and loss. Users can quickly switch configurations based on their needs, which improves the flexibility and customizability of the system and adapts to different usage scenarios.

[0066] In summary, automated backup and recovery steps not only improve the system maintainability and user experience, but also ensure system stability and data security during the upgrade process.

[0067] S130: Determine the firmware update requirements for the C-V2X module and the 5G module, and perform corresponding flashing and restart operations respectively to ensure that the device is restarted after the update is successful.

[0068] In one embodiment, see Figure 3 The above-mentioned step S130 may include steps S131~S135.

[0069] S131. Determine whether the C-V2X module firmware needs to be updated; S132. If the C-V2X module firmware does not need to be updated, determine whether the 5G module firmware needs to be updated; S133. If the 5G module firmware does not need to be updated, restart the device.

[0070] In this embodiment, to determine whether the module firmware needs to be updated, whether it is the C-V2X module firmware or the 5G module firmware, the current firmware version information of the C-V2X and 5G modules can be obtained using relevant commands or API interfaces. Get the latest firmware version information from the backup partition. This usually involves querying a version control file or API. Compare the current firmware version with the latest firmware version. The following methods can be used: Version number comparison: If the current version number is lower than the latest version number, you need to update it.

[0071] Feature comparison: If the new version has new features or fixes known issues in the current version, it can also be determined that an update is needed.

[0072] Other factors may also be considered, such as: Security: If the new version fixes a security vulnerability, then you should update. Compatibility: If the new version is incompatible with other parts of your device, then you may also need to update.

[0073] Based on the comparison result, the following logic is executed: The module firmware version is bound to the entire system version. If the versions do not match, the realization of the module functions may be affected. Therefore, the update logic is to determine whether it is consistent with the module firmware version in the upgrade package. If it is inconsistent, it will be refreshed. This involves the situation of downgrading the version. If the old system version is flashed, the module firmware will also be downgraded to the firmware version corresponding to the corresponding system version to adapt. However, the module firmware update frequency is not high, and sometimes several system versions are bound to the same module firmware version.

[0074] S134. If the C-V2X module firmware needs to be updated, when the C-V2X module firmware is 2k hardware, 2k firmware is flashed; when the C-V2X module firmware is not 2k hardware, 4k firmware is flashed.

[0075] In one embodiment, see Figure 4The above-mentioned step S134 may include steps S1341~S1346.

[0076] S1341. Stop services related to the C-V2X module firmware.

[0077] In this embodiment, the systemctl command is used to stop services related to the C-V2X firmware.

[0078] Stopping the service during the update process can avoid data conflicts and inconsistencies, ensuring the security of the firmware update.

[0079] S1342. Mount the backup partition and copy the C-V2X module firmware from the backup partition to the specified path of the current partition.

[0080] In this embodiment, the backup partition is mounted to the specified path of the current partition to obtain the C-V2X firmware.

[0081] Ensure you have the latest and complete firmware package by accessing the backup partition.

[0082] S1343. Decompress the copied C-V2X module firmware.

[0083] In this embodiment, the firmware package is copied from the backup partition to the upgrade path of the current partition, which simplifies the firmware access path and facilitates subsequent operations.

[0084] Unzip the firmware package to prepare for flashing. After unzipping, you can directly access the firmware file to ensure that you are using the correct file when flashing.

[0085] S1344. Obtain the C-V2X module firmware hardware information, determine the upgrade package to be used based on whether the hardware information belongs to 2k hardware or 4k hardware, and enter the specified path of the current partition.

[0086] In this embodiment, the hardware information of the module is obtained through the adb command to determine the upgrade package to be used.

[0087] Make sure to only flash firmware that is compatible with your hardware to avoid potential damage.

[0088] S1345. Restart the C-V2X module firmware and enter fastboot mode; In this embodiment, the adb command is used to enter the fastboot mode to prepare for flashing the firmware.

[0089] Fastboot mode provides a safe and efficient flashing environment.

[0090] S1346. Clear and rewrite the C-V2X module firmware in fastboot mode, and confirm the version after the update is complete.

[0091] In this embodiment, a series of fastboot commands are used to perform firmware clearing and flashing operations.

[0092] By erasing and flashing firmware partitions one by one, you can ensure that every part of the system is updated without missing any.

[0093] After the flashing is complete, restart the module and confirm the C-V2X firmware version through commands.

[0094] Ensures successful firmware updates and can detect issues quickly.

[0095] S135, restarting the C-V2X module after flashing the C-V2X module firmware, and executing step S132; S136. If the 5G module firmware needs to be updated, flash the 5G firmware, restart the 5G module firmware, and execute step S133.

[0096] In one embodiment, see Figure 5 The above-mentioned step S135 may include steps S1361~S1365.

[0097] S1361. Stop services related to 5G module firmware.

[0098] In this embodiment, the systemctl command is also used to stop services related to the 5G module.

[0099] Prevents the operation of 5G services from interfering with firmware updates and ensures data integrity.

[0100] S1362. Copy the 5G module firmware from the backup partition to the specified path of the current partition.

[0101] In this embodiment, the backup partition is mounted to a specified path to obtain the 5G module firmware package, ensuring that the latest 5G firmware is obtained.

[0102] S1363. Decompress the copied 5G module firmware.

[0103] In this embodiment, the 5G module firmware package in the backup partition is copied to the current partition.

[0104] The file access process is simplified to facilitate subsequent operations.

[0105] Unzip the firmware package to prepare for subsequent upgrade operations.

[0106] After decompression, you can directly access the firmware to ensure smooth subsequent operations.

[0107] S1364. Use the system's own qdl tool and the XML file in the firmware package to upgrade the 5G module firmware.

[0108] In this embodiment, the 5G firmware is upgraded using the system's built-in qdl tool and the xml file in the firmware package.

[0109] The qdl tool provides an efficient and reliable way to perform firmware upgrades, simplifying operations.

[0110] S1365. Restart the 5G module firmware after the upgrade is complete, and confirm the version after the update is complete.

[0111] In this embodiment, the module is restarted after the upgrade is completed, and it is confirmed that the communication channel connected to the 5G module is initialized normally.

[0112] Ensure that the 5G module works normally and detect and solve possible problems in time.

[0113] The method of this embodiment facilitates the upgrade process of embedded devices based on the Linux operating system in multiple firmware systems. By simplifying the operation steps, such as driver installation, device disassembly, DIP switch adjustment, hardware interface confirmation and cable connection, it can effectively reduce maintenance time and significantly reduce the difficulty and error probability of upgrading multiple firmware at the same time. This method not only provides convenience for technical support personnel, but also allows the solution to be quickly synchronized to the customer's device after the problem is solved, thereby reducing equipment maintenance and labor costs.

[0114] At the same time, the use of WiFi encrypted connection can prevent unauthorized personnel from logging in, and the specific format of the upgrade firmware package and the setting of A / B partitions can avoid upgrade failures and system crashes caused by incorrect firmware package transmission. Therefore, no matter what type of vehicle-mounted equipment, wireless upgrade has become a trend and an essential basic function of vehicle-mounted equipment.

[0115] The above firmware wireless upgrade method allows users to upload the .swu firmware package in the browser and start the background upgrade program by connecting to the system's WiFi hotspot. The system will confirm the version and configure the backup partition, and modify the bootloader variables to achieve wireless upgrade of the main system. After the main system upgrade is completed, the user-defined configuration will be restored. Next, determine the firmware update requirements of the C-V2X module and 5G module, and perform flash and restart operations respectively. Finally, ensure that the update is successful before restarting the device to improve system reliability and optimize user experience.

[0116] Figure 6 is a schematic block diagram of a firmware wireless upgrade device 300 provided in an embodiment of the present invention. Figure 6As shown, corresponding to the above firmware wireless upgrade method, the present invention also provides a firmware wireless upgrade device 300. The firmware wireless upgrade device 300 includes a unit for executing the above firmware wireless upgrade method, and the device can be configured in a vehicle-mounted device. Figure 6 The wireless firmware upgrade device 300 includes a main system upgrade unit 301 , a restoration unit 302 and a firmware update unit 303 .

[0117] The main system upgrade unit 301 is used to connect to the system WiFi hotspot, upload the .swu firmware package using a browser, start the background upgrade program, confirm the version and configure the backup partition, and modify the bootloader variables to perform wireless upgrades of the main system; the restore unit 302 is used to restore the user-defined configuration; the firmware update unit 303 is used to determine the firmware update requirements of the C-V2X module and 5G module, and perform corresponding flashing and restart operations respectively to ensure that the device is restarted after the update is successful.

[0118] In one embodiment, if Figure 7 As shown, the main system upgrade unit 301 includes a port opening subunit 3031 , a triggering subunit 3032 , an identification subunit 3033 , a version acquisition subunit 3034 , a parameter transmission subunit 3035 , a formatting subunit 3036 and a modification subunit 3037 .

[0119] The port opening subunit 3031 is used to use the browser to open the specified IP: port when the device is started, the upgrade service runs in the background, and the external device is connected to the system WiFi hotspot; the triggering subunit 3032 is used to put the firmware upgrade package with the .swu suffix on the web page and trigger the system background upgrade program; the identification subunit 3033 is used to determine whether the specific variable identifier of the running program is preinst to determine the main system version; the version acquisition subunit 3034 is used to obtain the module firmware version when the main system version is confirmed; the parameter transmission subunit 3035 is used to obtain the current partition and backup partition information and transmit parameters; the formatting subunit 3036 is used to format the backup partition; the modification subunit 3037 is used to transfer and place the firmware in the .swu suffix file according to the sw-description file configuration, and modify the bootloder variable.

[0120] In one embodiment, the restoration unit 302 is used to determine that the specific variable identifier of the running program is postinst, so as to determine that the main system software update is completed, and to centrally back up and restore the user-defined configuration. Specifically, when the parameter of the user-defined configuration is postinst, the user-defined configuration is centrally stored, and a mount point is created, a root partition is determined, and related configurations are restored during the upgrade, wherein the related configurations include WiFi, Bluetooth, Ethernet, 5G, CAN configurations, and app applications added by the user.

[0121] In one embodiment, if Figure 8 As shown, the firmware update unit 303 includes a first judgment subunit 3031, a second judgment subunit 3032, a device restart subunit 3033, a first flashing subunit 3034, a first restarting subunit 3035 and a second flashing subunit 3036.

[0122] The first judgment subunit 3031 is used to judge whether the C-V2X module firmware needs to be updated; the second judgment subunit 3032 is used to judge whether the 5G module firmware needs to be updated if the C-V2X module firmware does not need to be updated; the device restart subunit 3033 is used to restart the device if the 5G module firmware does not need to be updated; the first flash subunit 3034 is used to flash the 2k firmware when the C-V2X module firmware is 2k hardware if the C-V2X module firmware needs to be updated, and to flash the 4k firmware when the C-V2X module firmware is not 2k hardware; the first restart subunit 3035 is used to restart the C-V2X module after flashing the C-V2X module firmware, and execute the judgment whether the 5G module firmware needs to be updated; the second flash subunit 3036 is used to flash the 5G firmware if the 5G module firmware needs to be updated, restart the 5G module firmware, and execute the restart device.

[0123] In one embodiment, if Fig. 9 As shown, the first flashing subunit 3034 includes a first stop module 30341 , a first copy module 30342 , a first decompression module 30343 , an upgrade package acquisition module 30344 , a restart module 30345 and a flashing module 30346 .

[0124] The first stop module 30341 is used to stop the services related to the C-V2X module firmware; the first copy module 30342 is used to hang on the backup partition and copy the C-V2X module firmware from the backup partition to the specified path of the current partition; the first decompression module 30343 is used to decompress the copied C-V2X module firmware; the upgrade package acquisition module 30344 is used to obtain the hardware information of the C-V2X module firmware, determine the upgrade package to be used according to whether the hardware information belongs to 2k hardware or 4k hardware, and enter the specified path of the current partition; the restart module 30345 is used to restart the C-V2X module firmware and enter the fastboot mode; the flashing module 30346 is used to clear and flash the C-V2X module firmware in the fastboot mode, and confirm the version after the update is completed.

[0125] In one embodiment, if Fig.10 As shown, the second flash sub-unit 3036 includes: a second stop module 30361, a second copy module 30362, a second decompression module 30363, an upgrade module 30364 and a firmware restart module 30365.

[0126] The second stop module 30361 is used to stop the services related to the 5G module firmware; the second copy module 30362 is used to copy the 5G module firmware from the backup partition to the specified path of the current partition; the second decompression module 30363 is used to decompress the copied 5G module firmware; the upgrade module 30364 is used to upgrade the 5G module firmware through the system's own qdl tool and the XML file in the firmware package; the firmware restart module 30365 is used to restart the 5G module firmware after the upgrade is completed, and to confirm the version after the update is completed.

[0127] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned wireless firmware upgrade device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0128] The above-mentioned firmware wireless upgrade device 300 can be implemented in the form of a computer program. The computer program can be Fig.11 Runs on the computer device shown.

[0129] See also Fig.11 , Fig.11 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.

[0130] See also Fig.11The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0131] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a firmware wireless upgrade method.

[0132] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0133] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a firmware wireless upgrade method.

[0134] The network interface 505 is used to communicate with other devices over the network. Fig.11 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0135] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps: Connect to the system WiFi hotspot, use the browser to upload the .swu firmware package, start the background upgrade program, confirm the version and configure the backup partition, modify the bootloader variables to perform wireless upgrades of the main system; restore user-defined configurations; determine the firmware update requirements for the C-V2X module and 5G module, perform the corresponding flashing and restart operations respectively, and restart the device after ensuring that the update is successful.

[0136] In one embodiment, the processor 502 specifically implements the following steps when implementing the steps of connecting to the system WiFi hotspot, uploading the .swu firmware package using a browser, starting the background upgrade program, confirming the version and configuring the backup partition, and modifying the bootloader variable to perform the wireless upgrade of the main system: When the device starts, the upgrade service runs in the background, and the external device connects to the system WiFi hotspot, use the browser to open the specified IP: port; put the firmware upgrade package with the .swu suffix on the web page, and trigger the system background upgrade program; determine whether the specific variable identifier of the running program is preinst to determine the main system version; when the main system version is confirmed, obtain the module firmware version; obtain the current partition and backup partition information and transfer parameters; format the backup partition; transfer and place the firmware in the .swu suffix file according to the sw-description file configuration, and modify the bootloder variable.

[0137] In one embodiment, when implementing the step of restoring the user-defined configuration, the processor 502 specifically implements the following steps: It is determined that the running program specific variable identifier is postinst to determine that the main system software update is completed, and the user-defined configuration is centrally backed up and restored.

[0138] In one embodiment, when the processor 502 implements the step of determining that the specific variable identifier of the running program is postinst to determine that the main system software update is completed and performing the backup and restore steps for the user-defined configuration, the processor 502 specifically implements the following steps: When the parameter of the user-defined configuration is postinst, the user-defined configuration is stored centrally, and during the upgrade, a mount point is created, the root partition is determined, and related configurations are restored. The related configurations include WiFi, Bluetooth, Ethernet, 5G, CAN configurations, and app applications added by the user.

[0139] In one embodiment, the processor 502 implements the following steps when determining the firmware update requirements of the C-V2X module and the 5G module, performing corresponding flashing and restarting operations respectively, and restarting the device after ensuring the update is successful: Determine whether the C-V2X module firmware needs to be updated; if the C-V2X module firmware does not need to be updated, determine whether the 5G module firmware needs to be updated; if the 5G module firmware does not need to be updated, restart the device; if the C-V2X module firmware needs to be updated, when the C-V2X module firmware is 2k hardware, flash the 2k firmware, and when the C-V2X module firmware is not 2k hardware, flash the 4k firmware; after flashing the C-V2X module firmware, restart the C-V2X module and execute the determination whether the 5G module firmware needs to be updated; if the 5G module firmware needs to be updated, flash the 5G firmware, restart the 5G module firmware, and execute the restart device.

[0140] In one embodiment, when the processor 502 implements the step of flashing 2k firmware when the C-V2X module firmware is 2k hardware and flashing 4k firmware when the C-V2X module firmware is not 2k hardware, the following steps are specifically implemented: Stop services related to the C-V2X module firmware; mount it in the backup partition, and copy the C-V2X module firmware from the backup partition to the specified path of the current partition; decompress the copied C-V2X module firmware; obtain the hardware information of the C-V2X module firmware, determine the upgrade package to be used based on whether the hardware information belongs to 2k hardware or 4k hardware, and enter the specified path of the current partition; restart the C-V2X module firmware and enter the fastboot mode; clear and flash the C-V2X module firmware in the fastboot mode, and confirm the version after the update is completed.

[0141] In one embodiment, when the processor 502 implements the steps of flashing the 5G firmware and restarting the 5G module firmware, the processor 502 specifically implements the following steps: Stop services related to the 5G module firmware; copy the 5G module firmware from the backup partition to the specified path of the current partition; decompress the copied 5G module firmware; upgrade the 5G module firmware using the system's built-in qdl tool and the XML file in the firmware package; restart the 5G module firmware after the upgrade is complete, and confirm the version after the update is complete.

[0142] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0143] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0144] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps: Connect to the system WiFi hotspot, use the browser to upload the .swu firmware package, start the background upgrade program, confirm the version and configure the backup partition, modify the bootloader variables to perform wireless upgrades of the main system; restore user-defined configurations; determine the firmware update requirements for the C-V2X module and 5G module, perform the corresponding flashing and restart operations respectively, and restart the device after ensuring that the update is successful.

[0145] In one embodiment, when the processor executes the computer program to implement the steps of connecting to the system WiFi hotspot, uploading the .swu firmware package using a browser, starting the background upgrade program, confirming the version and configuring the backup partition, and modifying the bootloader variable to perform the wireless upgrade of the main system, the following steps are specifically implemented: When the device starts, the upgrade service runs in the background, and the external device connects to the system WiFi hotspot, use the browser to open the specified IP: port; put the firmware upgrade package with the .swu suffix on the web page, and trigger the system background upgrade program; determine whether the specific variable identifier of the running program is preinst to determine the main system version; when the main system version is confirmed, obtain the module firmware version; obtain the current partition and backup partition information and transfer parameters; format the backup partition; transfer and place the firmware in the .swu suffix file according to the sw-description file configuration, and modify the bootloder variable.

[0146] In one embodiment, when the processor executes the computer program to implement the step of restoring the user-defined configuration, the processor specifically implements the following steps: It is determined that the running program specific variable identifier is postinst to determine that the main system software update is completed, and the user-defined configuration is centrally backed up and restored.

[0147] In one embodiment, when the processor executes the computer program and implements the determination that the specific variable of the running program is identified as postinst to determine that the main system software update is completed and performs the backup and restore steps for the user-defined configuration, the following steps are specifically implemented: When the parameter of the user-defined configuration is postinst, the user-defined configuration is stored centrally, and during the upgrade, a mount point is created, the root partition is determined, and related configurations are restored. The related configurations include WiFi, Bluetooth, Ethernet, 5G, CAN configurations, and app applications added by the user.

[0148] In one embodiment, when the processor executes the computer program to implement the step of determining the firmware update requirements of the C-V2X module and the 5G module, performing corresponding flashing and restarting operations respectively, and restarting the device after ensuring the update is successful, the following steps are specifically implemented: Determine whether the C-V2X module firmware needs to be updated; if the C-V2X module firmware does not need to be updated, determine whether the 5G module firmware needs to be updated; if the 5G module firmware does not need to be updated, restart the device; if the C-V2X module firmware needs to be updated, when the C-V2X module firmware is 2k hardware, flash the 2k firmware, and when the C-V2X module firmware is not 2k hardware, flash the 4k firmware; after flashing the C-V2X module firmware, restart the C-V2X module and execute the determination whether the 5G module firmware needs to be updated; if the 5G module firmware needs to be updated, flash the 5G firmware, restart the 5G module firmware, and execute the restart device.

[0149] In one embodiment, when the processor executes the computer program to implement the step of flashing 2k firmware when the C-V2X module firmware is 2k hardware, and flashing 4k firmware when the C-V2X module firmware is not 2k hardware, the following steps are specifically implemented: Stop services related to the C-V2X module firmware; mount it in the backup partition, and copy the C-V2X module firmware from the backup partition to the specified path of the current partition; decompress the copied C-V2X module firmware; obtain the hardware information of the C-V2X module firmware, determine the upgrade package to be used based on whether the hardware information belongs to 2k hardware or 4k hardware, and enter the specified path of the current partition; restart the C-V2X module firmware and enter the fastboot mode; clear and flash the C-V2X module firmware in the fastboot mode, and confirm the version after the update is completed.

[0150] In one embodiment, when the processor executes the computer program to implement the steps of flashing the 5G firmware and restarting the 5G module firmware, the processor specifically implements the following steps: Stop services related to the 5G module firmware; copy the 5G module firmware from the backup partition to the specified path of the current partition; decompress the copied 5G module firmware; upgrade the 5G module firmware using the system's built-in qdl tool and the XML file in the firmware package; restart the 5G module firmware after the upgrade is complete, and confirm the version after the update is complete.

[0151] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0152] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0153] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0154] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0156] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A wireless firmware upgrade method, characterized in that: include: Connect to the system WiFi hotspot, upload the .swu firmware package using a browser, start the background upgrade program, confirm the version and configure the backup partition, and modify the bootloader variables to perform wireless upgrades of the main system; Restore user-defined configuration; Determine the firmware update requirements for the C-V2X module and 5G module, and perform the corresponding flash and restart operations respectively, ensuring that the update is successful before restarting the device.

2. The firmware wireless upgrade method according to claim 1, characterized in that: The method of wirelessly upgrading the main system by connecting to the system WiFi hotspot, uploading the .swu firmware package using a browser, starting the background upgrade program, confirming the version and configuring the backup partition, and modifying the bootloader variables includes: When the device is started, the upgrade service is running in the background, and the external device is connected to the system WiFi hotspot, use the browser to open the specified IP: port; Insert the firmware upgrade package with the .swu suffix on the web page and trigger the system background upgrade program; Determine whether the specific variable identifier of the running program is preinst to determine the main system version; When the main system version is confirmed, obtain the module firmware version; Get the current partition, backup partition information and transfer parameters; Format the backup partition; Transfer and place the firmware in the .swu suffix file according to the sw-description file configuration, and modify the bootloder variable.

3. The firmware wireless upgrade method according to claim 1, characterized in that: The restoring of the user-defined configuration includes: It is determined that the running program specific variable identifier is postinst to determine that the main system software update is completed, and the user-defined configuration is centrally backed up and restored.

4. The firmware wireless upgrade method according to claim 3, characterized in that: The specific variable identification of the running program is determined to be postinst, so as to determine that the main system software update is completed, and the user-defined configuration is centrally backed up and restored, including: When the parameter of the user-defined configuration is postinst, the user-defined configuration is stored centrally, and during the upgrade, a mount point is created, the root partition is determined, and related configurations are restored. The related configurations include WiFi, Bluetooth, Ethernet, 5G, CAN configurations, and app applications added by the user.

5. The firmware wireless upgrade method according to claim 1, characterized in that: The determination of the firmware update requirements for the C-V2X module and the 5G module, respectively performing corresponding flashing and restarting operations, and restarting the device after ensuring that the update is successful, includes: Determine whether the C-V2X module firmware needs to be updated; If the C-V2X module firmware does not need to be updated, determine whether the 5G module firmware needs to be updated; If the 5G module firmware does not need to be updated, restart the device; If the C-V2X module firmware needs to be updated, when the C-V2X module firmware is 2k hardware, then flash the 2k firmware; when the C-V2X module firmware is not 2k hardware, then flash the 4k firmware; After flashing the C-V2X module firmware, restart the C-V2X module and execute the determination of whether the 5G module firmware needs to be updated; If the 5G module firmware needs to be updated, flash the 5G firmware, restart the 5G module firmware, and execute the restart device.

6. The firmware wireless upgrade method according to claim 5, characterized in that: When the C-V2X module firmware is 2k hardware, 2k firmware is flashed, and when the C-V2X module firmware is not 2k hardware, 4k firmware is flashed, including: Stop services related to C-V2X module firmware; Mount it on the backup partition and copy the C-V2X module firmware from the backup partition to the specified path of the current partition; Unzip the copied C-V2X module firmware; Obtain the C-V2X module firmware hardware information, determine the upgrade package to be used based on whether the hardware information belongs to 2k hardware or 4k hardware, and enter the specified path of the current partition; Restart the C-V2X module firmware and enter fastboot mode; Clear and flash the C-V2X module firmware in fastboot mode, and confirm the version after the update is complete.

7. The firmware wireless upgrade method according to claim 5, characterized in that: The flashing of the 5G firmware and restarting of the 5G module firmware include: Stop services related to 5G module firmware; Copy the 5G module firmware from the backup partition to the specified path of the current partition; Unzip the copied 5G module firmware; Upgrade the 5G module firmware through the system's built-in qdl tool and the XML file in the firmware package; After the upgrade is complete, restart the 5G module firmware and confirm the version after the update is complete.

8. A firmware wireless upgrade device, characterized in that: include: The main system upgrade unit is used to connect to the system WiFi hotspot, upload the .swu firmware package using a browser, start the background upgrade program, confirm the version and configure the backup partition, and modify the bootloader variables to wirelessly upgrade the main system; A restore unit, used to restore user-defined configuration; The firmware update unit is used to determine the firmware update requirements of the C-V2X module and 5G module, and perform corresponding flashing and restart operations respectively to ensure that the device is restarted after the update is successful.

9. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.