Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The embodiment provides a method for upgrading firmware of a television terminal, which is applied to an intelligent television terminal, where the intelligent television terminal, as shown in fig. 3, mainly includes: the system-level chip, the embedded eMMC memory, the double-rate synchronous dynamic random DDR memory, a communication module, a functional module, an interface module, a frame frequency control chip, a FLASH chip, a central control board and a backlight driving board.
The firmware upgrade of the method is performed in the television boot state, as shown in fig. 1, and includes:
step 101, through communication with a server, when a new firmware version file is detected, downloading the new firmware version file from the server and storing the new firmware version file in a preset storage area;
the firmware is a program that can be upgraded by a user through a specific refresh program, and refers to a device driver stored in the device, and is generally stored in an electrically erasable read-only memory EEPROM or a FLASH chip in the device. In this embodiment, the firmware refers specifically to module firmware other than the main program of the system-on-chip.
The system-on-chip integrates the CPU, analog IP core, digital signal processor DSP module, and embedded memory (or off-chip memory control interface) on a single chip, which is an integrated circuit with dedicated targets, containing the complete system and having all the contents of the embedded software.
The television terminal comprises a wireless network communication module and can perform information interaction with the server.
When the firmware is upgraded after the television is started, the firmware upgrading thread is newly established, the firmware upgrading can be carried out under the independent thread, and the execution of other threads is not influenced.
The firmware upgrading thread inquires whether the server has a new firmware version file through the wireless network communication module;
and if the new firmware file is inquired, judging whether the firmware needs to be upgraded, and if the existing module firmware version is lower than the new firmware file, downloading the new firmware file from the server by adopting an over-the-air technology OTA and storing the new firmware file in a preset storage area.
Optionally, the preset storage area may be, but is not limited to, a main board flash memory area;
and after the system-level chip stores the new version of the firmware file into the flash memory area of the mainboard, the system-level chip performs cyclic redundancy CRC (cyclic redundancy check) on the new version of the firmware file.
The new firmware version file has a new firmware version upgrading program.
The over-the-air downloading technology downloads the upgrading data packet through the mobile communication network, and the upgrading system is a standard software upgrading mode provided by the android system.
Cyclic redundancy check is a data transmission error detection function, which performs polynomial calculation on data, attaches the obtained result to the back of a frame, and the receiving device also executes a similar algorithm to ensure the correctness and integrity of data transmission.
Step 102, reading the new firmware version file from the preset storage area when the module firmware is started to be upgraded;
when the module firmware is started to be upgraded, a new version firmware file which passes the verification in a flash memory area of a mainboard is sent to the module firmware through a system-level chip;
after the verification is passed, the system-on-chip sends an upgrade instruction to the module firmware corresponding to the new firmware file through the integrated circuit bus I2C and sends the new firmware file.
And after an upgrading instruction is sent to the module firmware, judging whether the module firmware applies for a cache region in the RAM, if so, sending a new firmware file to the cache region of the module firmware applying in the RAM.
And 103, upgrading the module firmware by using the read new version firmware file.
After the module firmware receives the upgrading instruction, applying for a cache region in the RAM, and storing the received new firmware version file into the RAM by the module firmware;
performing cyclic redundancy CRC (cyclic redundancy check) on a new version firmware file in a Random Access Memory (RAM) through the module firmware;
and upgrading the module firmware by reading the new version firmware file in the RAM.
And the module firmware reads a new version firmware file in the RAM and stores the new version firmware file in a flash memory area corresponding to the module firmware through the SPI.
SPI is a synchronous serial peripheral interface that allows the mcu to communicate with various peripherals in a serial manner to exchange information.
The module firmware corresponds to a main flash memory area and a backup flash memory area, the main flash memory area is a flash memory area used by the module firmware in the current operation, a new version firmware file in a Random Access Memory (RAM) is read and stored in the flash memory area corresponding to the module firmware, and the method comprises the following steps:
and reading the new version firmware file in the RAM and storing the new version firmware file in a backup flash memory area corresponding to the module firmware. For example, the module firmware is started from the main flash memory area, the new version firmware file is written into the backup flash memory area when the upgrading requirement exists, the starting flag bit is changed after the upgrading is successful, and the module firmware is started from the backup flash memory area when the computer is started next time.
And reading the new firmware file from the corresponding flash memory area through the module firmware to update the firmware.
The system-level chip and the module firmware can be operated in a multithreading mode, the firmware updating can be finished in the background in the normal use process of the television by adopting the mode of transferring the new version firmware file by the RAM, and the normal television watching of a user is not influenced.
The over-the-air technology upgrading function of the smart television is based on an Android backup Android recovery mode, wherein the recovery mode refers to a mode capable of modifying data or systems inside an Android system, in the mode, only partition data of eMMC used by a system-level chip can be updated and modified, FLASH of module firmware is separated from the eMMC, and therefore the recovery mode cannot update module firmware FLASH except a main program of the system-level chip. The above scheme can only be adopted to realize the firmware upgrade by the over-the-air technology.
Taking the frame rate control chip FRC as an example, as shown in fig. 2, the frame rate control chip FRC includes a system-on-chip flow and a frame rate control chip flow.
The system-on-chip flow includes:
2101, after the system is determined to be started, a wireless network communication module is used for inquiring whether a server has a new firmware file, if yes, the server is executed 2102;
2102, downloading a new firmware version file from the server by adopting an over-the-air technology OTA, and storing the new firmware version file to a main board eMMC;
2103, performing Cyclic Redundancy Check (CRC) on the new version firmware file in the eMMC; if the verification fails, the upgrading fails, and if the verification succeeds, the execution is 2104;
2104, sending an upgrade instruction to the FRC informing the FRC to prepare for upgrade, so that the FRC applies for a cache in the random access memory RAM;
2105, acquiring whether the state of the FRC is ready for upgrading, if not, the upgrading fails, and if so, executing 2106;
2106, the new version firmware file is sent via the I2C bus to a cache area that FRC applies for in random access memory RAM.
The frame rate control chip side flow comprises the following steps:
2201, FRC is started from flash partition bank 0;
2202, I2C initializes the system on chip to send new firmware files over I2C bus;
2203, after receiving the upgrade instruction sent by the system-on-chip, the FRC applies for a cache area in the RAM for storing a new version firmware file sent by the system-on-chip;
2204, detecting whether the FRC is ready for upgrading, if not, failing to upgrade, if so, executing 2205;
2205, storing the new firmware file sent by the system-on-chip into a cache area applied in the RAM;
2206, performing cyclic redundancy CRC (cyclic redundancy check) on the new version firmware file in the RAM, failing to upgrade if the CRC is unsuccessful, and executing 2207 if the verification is successful;
2207, reading the new version firmware file successfully checked in the RAM, and storing the new version firmware file in the flash partition bank1 through the SPI, wherein if the storage is successful, the upgrade is successful, and if the storage is failed, the upgrade is failed.
And after the upgrade is successful, the starting flag bit is changed, and when the computer is started next time, the module firmware is started from the flash partition bank 1.
Example two
The present embodiment is a device for upgrading firmware of a television terminal, and the principle of the device for solving the problem is similar to that of the method described above, so the implementation of the device may refer to the implementation of the method, and repeated details are not described again.
The embodiment further provides a device for upgrading firmware of a television terminal, which includes a memory and a processor, where the processor is configured to:
through communication with a server, when a new firmware version file is detected, downloading the new firmware version file from the server and storing the new firmware version file in a preset storage area;
when the firmware of the starting module is upgraded, reading the new version firmware file from the preset storage area;
and upgrading the module firmware by using the read new version firmware file.
The processor is specifically configured to:
when the module firmware is started to be upgraded, a new version firmware file of a mainboard flash memory area is sent to the module firmware through a system level chip;
using the read new version firmware file to perform module firmware upgrade, including:
storing the received new firmware version file into a read Random Access Memory (RAM);
and upgrading the module firmware by reading the new version firmware file in the RAM.
Reading a new version firmware file in a Random Access Memory (RAM) and storing the new version firmware file in a flash memory area corresponding to the module firmware;
and reading the new firmware file from the corresponding flash memory area to update the module firmware.
The processor is further configured to:
and performing cyclic redundancy CRC (cyclic redundancy check) on the new firmware file in the main flash memory area.
The processor is further configured to:
and performing cyclic redundancy CRC (cyclic redundancy check) on the new version firmware file in the RAM through the module firmware.
The processor is configured to:
and downloading the new version firmware file from the server by adopting an over-the-air technology OTA and storing the new version firmware file in a preset storage area.
EXAMPLE III
This embodiment provides an apparatus for upgrading firmware of a television terminal, as shown in fig. 4, the apparatus includes:
a firmware file obtaining unit 401, configured to, when a new firmware file is detected through communication with a server, download the new firmware file from the server and store the new firmware file in a preset storage area;
a firmware upgrade starting unit 402, configured to read the new firmware version file from the preset storage area when a module firmware upgrade is started;
a firmware upgrading unit 403, configured to upgrade module firmware by using the read new version firmware file.
The preset storage area is a mainboard flash memory area used for storing the system upgrade file.
The firmware upgrade starting unit 402 is specifically configured to:
when the module firmware is started to be upgraded, a new version firmware file of a mainboard flash memory area is sent to the module firmware through a system level chip;
using the read new version firmware file to perform module firmware upgrade, including:
storing the received new firmware version file into a read Random Access Memory (RAM);
and upgrading the module firmware by reading the new version firmware file in the RAM.
The flash memory module is used for reading a new version firmware file in the RAM and storing the new version firmware file in the flash memory area corresponding to the firmware module;
and the method is used for reading the new firmware file from the corresponding flash memory area to carry out firmware upgrade.
The firmware upgrade starting unit 402 is further specifically configured to:
and performing cyclic redundancy CRC (cyclic redundancy check) on the new firmware file in the main flash memory area.
The firmware upgrade starting unit 402 is further specifically configured to:
and performing cyclic redundancy CRC (cyclic redundancy check) on the new version firmware file in the RAM (random access memory).
The firmware file obtaining unit 401 is specifically configured to download the new firmware file from the server and store the new firmware file in the preset storage area by using an over-the-air technology OTA.
Example four
The present embodiment is a computer storage medium, which stores a computer program that implements the contents of any one of the first to third embodiments when executed.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.