The present disclosure generally relates to the field of computer technologies and, more particularly, to a method and a device for upgrading firmware.
Generally, firmware of a chip in a device can be upgraded with a newer version, for the purpose of improving the function and stability of the device. Such chip may be a Micro Control Unit (MCU), a MCU-like chip, or a non-MCU chip (e.g., WiFi chip, Bluetooth chip, etc.). In a smart device, firmware upgrade may be needed for multiple chips. Conventionally, firmware in each of these chips is individually upgraded, which may waste resources of the smart device.
According to a first aspect of the present disclosure, there is provided a method for upgrading firmware in a device, comprising: when firmware of a first chip in the device needs to be upgraded, identifying a first partition of a flash memory in a second chip in the device, the first partition being a backup partition for downloading firmware of the second chip; downloading new firmware of the first chip to the first partition of the flash memory in the second chip; and copying the new firmware of the first chip from the first partition of the flash memory in the second chip to an effective region in the first chip.
According to a second aspect of the present disclosure, there is provided a device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: when firmware of a first chip in the device needs to be upgraded, identify a first partition of a flash memory in a second chip in the device, the first partition being a backup partition for downloading firmware of the second chip; download new firmware of the first chip to the first partition of the flash memory in the second chip; and copy the new firmware of the first chip from the first partition of the flash memory in the second chip to an effective region in the first chip.
According to a third aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing instructions that, when executed by one or more processors of a device, cause the device to perform a method for upgrading firmware, the method comprising: when firmware of a first chip in the device needs to be upgraded, identifying a first partition of a flash memory in a second chip in the device, the first partition being a backup partition for downloading firmware of the second chip; downloading new firmware of the first chip to the first partition of the flash memory in the second chip; and copying the new firmware of the first chip from the first partition of the flash memory in the second chip to an effective region in the first chip.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and, together with the description, serve to explain the principles of the present disclosure.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise represented. The implementations set forth in the following description of exemplary embodiments do not represent all implementations consistent with the invention. Instead, they are merely examples of apparatuses and methods consistent with aspects related to the invention as recited in the appended claims.
In step S102, when determining that firmware of the first chip needs to be upgraded, the smart device identifies a first partition of a flash memory in the second chip. For example, the first partition is a backup partition for downloading firmware of the second chip.
In exemplary embodiments, the firmware of the first chip is triggered to be upgraded by remote control or by triggering a button on the smart device.
In exemplary embodiments, the first and second chips can be any types of chips, and at least the second chip includes a flash memory. For example, the first chip may be a non-MCU chip, such as a Bluetooth chip or a WiFi chip, and the second chip may be a MCU chip or a MCU-like chip. For another example, the first chip may be a MCU chip, and the second chip may be a non-MCU chip.
In exemplary embodiments, the flash memory in the second chip also includes a second partition. The second partition is an active partition for storing firmware currently used by the second chip.
In step S104, the smart device downloads new firmware of the first chip to the first partition of the flash memory in the second chip.
In exemplary embodiments, the smart device may download the new firmware of the first chip via the Internet.
In step S106, the smart device copies the new firmware of the first chip from the first partition of the flash memory in the second chip to an effective region in the first chip.
In exemplary embodiments, the smart device may determine the effective region in the first chip according to a type of the new firmware.
In one exemplary embodiment, when determining that the firmware of the second chip needs to be upgraded, the smart device downloads new firmware of the second chip to the first partition. The smart device activates the first partition to be the active partition for storing firmware used by the second chip. The smart device also sets the second partition of the flash memory to be the backup partition for downloading firmware of the second chip.
In some embodiments, step S102 may further include the following sub-steps.
In a first sub-step, the smart device acquires partition information regarding the flash memory in the second chip.
In a second sub-step, the smart device identifies the first partition of the flash memory in the second chip, according to the partition information.
In some embodiments, the method 100 may further include verifying the new firmware of the first chip after it is downloaded to the first partition of the flash memory in the second chip.
The method 100 avoids conflicts caused by upgrading firmware of multiple chips simultaneously, and therefore can improve the reliability of firmware upgrade. Moreover, by using the flash memory in the second chip for upgrading the firmware of the first chip, the method 100 avoids additional control logic during firmware upgrade, and therefore can save resources of the smart device.
In step S202, when determining that the firmware of the second chip needs to be upgraded, the smart device acquires partition information regarding the flash memory in the second chip.
In exemplary embodiments, similar to step S102 (
In step S204, the smart device identifies the first partition of the flash memory in the second chip being the backup partition, according to the partition information.
In step S206, the smart device downloads new firmware of the second chip to the first partition.
In step S208, the smart device verifies new firmware of the second chip after the new firmware of the second chip is downloaded to the first partition.
In exemplary embodiments, the new firmware of the second chip may be downloaded similar to step 104 (
In step S210, the smart device activates the first partition to be an active partition for storing firmware used by the second chip.
In step S212, the smart device sets the second partition to be a backup partition for downloading firmware of the second chip.
In step S302, when determining that firmware of the second chip needs to be upgraded, the smart device acquires partition information regarding the flash memory in the second chip.
In exemplary embodiments, similar to step S102 (
In step S304, the smart device identifies the first partition of the flash memory in the second chip being the backup partition, according to the partition information.
In step S306, the smart device downloads new firmware of the second chip to the first partition.
In step S308, the smart device verifies the downloaded new firmware of the second chip.
In step S310, the smart device activates the first partition to be an active partition for storing firmware used by the second chip.
In step S312, the smart device sets the second partition to be the backup partition for downloading firmware of the second chip.
In exemplary embodiments, steps S302-S312 are similar to steps S202-S212 (
In step S314, when determining that the firmware of the first chip needs to be upgraded, the smart device downloads new firmware of the first chip to the second partition of the flash memory of the second chip that has been set to the backup partition.
In step S316, the smart device copies the new firmware of the first chip from the second partition of the flash memory of the second chip to an effective region in the first chip.
Referring to
Referring to
Referring to
The identifying module 510 is configured to identify a first partition of the flash memory in the second chip, when it is determined that firmware of the first chip needs to be upgraded. For example, the first partition is a backup partition for downloading firmware of the second chip.
The first downloading module 520 is configured to download new firmware of the first chip to the first partition.
The copying module 530 is configured to copy the downloaded new firmware of the first chip from the first partition to an effective region in the first chip.
The identifying module 610, the first downloading module 620, and the copying module 630 are similar to the identifying module 510, the first downloading module 520, and the copying module 530 (
The second downloading module 640 is configured to download new firmware of the second chip to a first partition identified by the identifying module 610, when it is determined that firmware of the second chip needs to be upgraded. For example, the first partition is a backup partition for downloading firmware of the second chip.
The activating module 650 is configured to activate the first partition to be an active partition for storing firmware to be used by the second chip, after the second downloading module 640 downloads the new firmware of the second chip.
The setting module 560 is configured to set a second partition of the flash memory to be a backup partition for downloading firmware of the second ship, after the activating module 650 activates the first partition. This way, next time when firmware of the first chip needs to be upgraded, the identifying module 610 may identify the backup partition for storing new firmware.
In some embodiments, referring to
In some embodiments, referring to
Referring to
The processing component 702 typically controls overall operations of the device 700, such as the operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or part of the steps in the above-described methods. Moreover, the processing component 702 may include one or more modules which facilitate the interaction between the processing component 702 and other components. For instance, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support the operations of the device 700. Examples of such data include instructions for any applications or methods operated on the device 700, contact data, phonebook data, messages, pictures, videos, etc. The memory 704 may be implemented by using any type of volatile or non-volatile memory devices or combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.
The power component 706 provides power to various components of the device 700. The power component 706 may include a power management system, one or more power sources, and other components associated with the generation, management, and distribution of power for the device 700.
The multimedia component 708 includes a screen providing an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may not only sense a boundary of a touch or swipe action, but also sense a duration of time and a pressure associated with the touch or swipe action. In some embodiments, the multimedia component 708 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data while the device 700 is in an operation mode, such as a photographing mode or a video mode. Each of the front camera and the rear camera may be a fixed optical lens system or have focus and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a microphone configured to receive external audio signals when the device 700 is in an operation mode, such as a call mode, a recording mode and a voice recognition mode. The received audio signal may be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker to output audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, such as a keyboard, a click wheel, buttons, and the like. The buttons may include, but not limited to, a home page button, a volume button, a starting button, and a locking button.
The sensor component 714 includes one or more sensors to provide status assessments of various aspects of the device 700. For instance, the sensor component 714 may detect an open/closed status of the device 700, relative position of components, e.g., the display and the keyboard, of the device 700, a change in position of the device 700 or a component of the device 700, a presence or absence of an user contact with the device 700, an orientation or an acceleration/deceleration of the device 700, and a change in temperature of the device 700. The sensor component 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 714 may further include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 714 may further include an accelerometer sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate communication, in a wire or wireless manner, between the device 700 and other devices. The device 700 may access a wireless network according to a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a near field communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented according to a radio frequency identification (RFID) technology, an infrared data association (IrDA) technology, an ultra-bandwidth (UWB) technology, a Bluetooth (BT) technology, and other technologies.
In exemplary embodiments, the device 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components, for performing the above-described methods.
In exemplary embodiments, there is also provided a non-transitory computer-readable storage medium including instructions, such as included in the memory 704, executable by the processor 720 in the device 700, for performing the above-described methods. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, an optical data storage device, and the like.
One of ordinary skill in the art will understand that the above-described modules can each be implemented by hardware, or software, or a combination of hardware and software. One of ordinary skill in the art will also understand that multiple ones of the above-described modules may be combined as one module, and each of the above-described modules may be further divided into a plurality of sub-modules.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure as coming within known or customary practice in the art. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It should be understood that the present disclosure is not limited to the exact constructions that are described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. It is intended that the scope of the present disclosure only be limited by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2014 1 0751727 | Dec 2014 | CN | national |
The present application is a continuation of International Application No. PCT/CN2015/077855, filed Apr. 29, 2015, which is based upon and claims priority to Chinese Patent Application No. 201410751727.3, filed Dec. 9, 2014, the entire contents of all of which are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5859911 | Angelo | Jan 1999 | A |
5974528 | Tsai | Oct 1999 | A |
6154838 | Le | Nov 2000 | A |
6594757 | Martinez | Jul 2003 | B1 |
6725178 | Cheston | Apr 2004 | B2 |
6732267 | Wu | May 2004 | B1 |
6757838 | Chaiken | Jun 2004 | B1 |
6971095 | Hirai | Nov 2005 | B2 |
6990577 | Autry | Jan 2006 | B2 |
7000101 | Wu | Feb 2006 | B2 |
7111203 | Hu | Sep 2006 | B2 |
7305567 | Hussain | Dec 2007 | B1 |
7571156 | Gupta | Aug 2009 | B1 |
7698698 | Skan | Apr 2010 | B2 |
7827348 | Lee | Nov 2010 | B2 |
8108663 | Cho | Jan 2012 | B2 |
8181007 | Liu | May 2012 | B2 |
8320302 | Richeson | Nov 2012 | B2 |
8429640 | Yin | Apr 2013 | B2 |
8499295 | Selvam | Jul 2013 | B2 |
8554748 | Kamity | Oct 2013 | B1 |
8719810 | Oh | May 2014 | B2 |
8745614 | Banerjee | Jun 2014 | B2 |
9219617 | Newton | Dec 2015 | B2 |
9495178 | Futami | Nov 2016 | B2 |
9684684 | Mottupalli | Jun 2017 | B2 |
20040215755 | O'Neill | Oct 2004 | A1 |
20050055595 | Frazer et al. | Mar 2005 | A1 |
20050268296 | Marolia | Dec 2005 | A1 |
20070294685 | Oh | Dec 2007 | A1 |
20070294686 | Oh | Dec 2007 | A1 |
20080028385 | Brown | Jan 2008 | A1 |
20080216066 | Oh | Sep 2008 | A1 |
20080307157 | Jang | Dec 2008 | A1 |
20100268867 | Gyl | Oct 2010 | A1 |
20100313191 | Yin et al. | Dec 2010 | A1 |
20110055844 | Nguyen | Mar 2011 | A1 |
20110179407 | Minegishi | Jul 2011 | A1 |
20120047499 | Krzystofczyk | Feb 2012 | A1 |
20120143873 | Saadat | Jun 2012 | A1 |
20130125107 | Bandakka | May 2013 | A1 |
20140007071 | Chang et al. | Jan 2014 | A1 |
20140173579 | McDonald | Jun 2014 | A1 |
20140173580 | McDonald | Jun 2014 | A1 |
20140229707 | Futami | Aug 2014 | A1 |
20140237461 | Kamity | Aug 2014 | A1 |
Number | Date | Country |
---|---|---|
102945174 | Feb 2013 | CN |
103116502 | May 2013 | CN |
104484200 | Apr 2015 | CN |
2008-104036 | May 2008 | JP |
2014-153964 | Aug 2014 | JP |
2014-194682 | Oct 2014 | JP |
10-2010-0066576 | Jun 2010 | KR |
10-2014-0059604 | May 2014 | KR |
2388045 | Apr 2010 | RU |
2419839 | May 2011 | RU |
Entry |
---|
International Search Report of PCT/CN2015/077855, mailed from the State Intellectual Property Office of China dated Aug. 28, 2015. |
English version of International Search Report of PCT/CN2015/077855, mailed from the State Intellectual Property Office of China on Aug. 28, 2015. |
Extended European Search Report of European Patent Application No. 15193088.0, from the European Patent Office, dated Apr. 11, 2016. |
Office Action for Russian Application No. 2015131124/08(047967), dated Apr. 10, 2017. |
Number | Date | Country | |
---|---|---|---|
20160162284 A1 | Jun 2016 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2015/077855 | Apr 2015 | US |
Child | 14841911 | US |