Abstract:
An apparatus and method for firmware upgrade in a portable terminal is provided. A memory access method for the firmware upgrade in the portable terminal includes the steps of receiving data and a write request signal of the data from an upper layer, compressing the data, and when the capacity of the compressed data is greater than that of a first area of a memory, separating and storing the data in the first area and a second area.

Description:
PRIORITY 
       [0001]    This application claims priority under 35 U.S.C. § 119 to an application filed in the Korean Intellectual Property Office on Jan. 3, 2007 and assigned Serial No. 2007-0000508, the contents of which are incorporated herein by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates generally to firmware upgrade, and in particular, to an apparatus and method that can compress and decompress data stored in a memory using a virtual driver to reduce a necessary capacity of the memory. 
         [0004]    2. Description of the Related Art 
         [0005]    As performance of a portable terminal is developed, software of the portable terminal becomes more and more complicated with the increase of their functions. Bug-free software is realistically impossible to achieve in the final stages of production of the portable terminal due to the complicated software. Accordingly, after a consumer buys the portable terminal, a manufacturer supplies patch software to upgrade firmware of the portable terminal. 
         [0006]    However, the consumer must take the portable terminal to an After Service (A/S) center in order to upgrade the firmware. Hence, it is difficult to ensure the timely upgrade of the firmware. To solve this problem, a standard for downloading a software binary for the upgrade through a network to safely upgrade the firmware has been established. This technology is called a “Firmware Over The Air (FOTA)”. FOTA technology is being introduced in an up-to-date portable terminal. 
         [0007]      FIG. 1  is a block diagram of a conventional firmware upgrade method. 
         [0008]    Referring to  FIG. 1 , a FOTA engine  110  accesses a memory  150  using a software driver  140  to upgrade firmware. 
         [0009]    FOTA technology uses a delta between two software binary values, i.e., a delta between a software binary value before performing upgrade and a software binary value after performing upgrade. That is, the delta is transmitted to a portable terminal through a network, and the portable terminal receives the delta to upgrade firmware thereof. 
         [0010]    To safely perform the upgrade, the delta must be transmitted through the network without any errors. In addition, spaces for temporarily storing the delta must be distributed in the portable terminal. A maximum value of the delta is limited by manufacturers. It is important to maintain the delta as small as possible when the upgrade is performed using FOTA technology. 
         [0011]    However, a limitation of FOTA technology is that an auxiliary memory for storing the delta is required. In the application of FOTA technology, an auxiliary space (also referred to as a “hole”) of about 10-15% of initial software binary is required in preparation for modification of the software binary. This method is applied when the first software binary is fabricated to increase a size of the software binary by about 10-15%. Therefore, the fabrication cost increases due to the increase in memory capacity. 
         [0012]    In addition, a further limitation of FOTA technology is that it is difficult to compress the software binary. Accordingly, the space occupied by the software binary decreases to reduce the fabrication cost, but the compression of the software binary is not considered. Even if the compression of the software binary is applied, the delta between two software binary values is greatly increased to the point where it lacks practicality. 
         [0013]    Since the memory capacity increases by about 10-15% and the compression of the software binary is applied for using FOTA technology, the memory capacity about twice as large as the compression of the software binary in which FOTA technology is not applied is required, thereby increasing the fabrication cost. 
       SUMMARY OF THE INVENTION 
       [0014]    An object of the present invention is to substantially solve at least the above problems and/or disadvantages and to provide at least the advantages below. Accordingly, an object of the present invention is to provide an apparatus and method for firmware upgrade. 
         [0015]    Another object of the present invention is to provide an apparatus and method for firmware upgrade in a portable terminal by improving a FOTA technology and applying compression to reduce memory capacity. 
         [0016]    According to one aspect of the present invention, a memory access method for firmware upgrade in the portable terminal includes receiving data and a write request signal of the data from an upper layer, compressing the data, and when the capacity of the compressed data is greater than that of a first area of a memory, separating and storing the data in the first area and a second area. 
         [0017]    According to another aspect of the present invention, a memory access method for firmware upgrade in a portable terminal includes receiving a read request signal of data from an upper layer, calculating a position of the data, loading the data corresponding to the calculated position into a first area and a second area, decompressing the loaded data, and transferring the decompressed data to the upper layer. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0018]    The above and other objects, features and advantages of the present invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which: 
           [0019]      FIG. 1  is a block diagram of a conventional firmware upgrade method; 
           [0020]      FIG. 2  is a block diagram of a firmware upgrade method according to an embodiment of the present invention; 
           [0021]      FIG. 3  is a flowchart of a writing procedure of a virtual driver when a firmware is upgraded according to an embodiment of the present invention; 
           [0022]      FIG. 4  is a flowchart of a reading procedure of a virtual driver when a firmware is upgraded according to an embodiment of the present invention; 
           [0023]      FIGS. 5A and 5B  are views of a virtual image of a storage unit provided by a virtual driver according to an embodiment of the present invention; and 
           [0024]      FIG. 6  is a block diagram of a portable terminal having a firmware upgrade function according to an embodiment of the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0025]    Preferred embodiments of the present invention will be described herein below with reference to the accompanying drawings. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail. 
         [0026]    A virtual driver performing a compression function and a decompression function is introduced to apply the compression function of a Firmware Over The Air (FOTA) technology. 
         [0027]      FIG. 2  is a block diagram of a firmware upgrade method according to an embodiment of the present invention. 
         [0028]    In general, a software driver  240  has been operated between a FOTA engine  210  and applications  220  which are an upper layer of the software driver  240  and a memory  250  to access the memory  250 . 
         [0029]    However, according to the present invention, a virtual driver  230  is disposed between the software driver  240  and the upper layer to compress a firmware. 
         [0030]    The virtual driver  230  loads its own driving code in the memory  250  to apply the compression function of a FOTA technology, but the virtual driver  230  does not have an influence on other functions. 
         [0031]    That is, a memory access operation for performing other functions is the same as a conventional memory access operation. The memory  250  includes a software image (binary) compressed for FOTA technology and a write reserved area. 
         [0032]    The write reserved area remains empty when an upgrade using FOTA technology is not performed, but the write reserved area stores changes of the software binary after the upgrade using FOTA technology is performed. The empty reserved area exists for preventing a shift operation in which all contents are shifted backwards after changing positions when a changed area is greater than an existing area in a compressed software binary area. 
         [0033]    An upgrade time greatly increases when much of the software binary is moved. In addition, robustness characteristics that can securely restore data at any time when power is turned off disappears. 
         [0034]    Generally, FOTA technology that deals with a uncompressed conventional software binary allocates vacant spaces, that is, holes in gaps of the uncompressed conventional software binary for buffering purpose. Hence, even if the changes are added to the uncompressed conventional software binary, the shift operation is prevented due to the holes. However, the holes do not exist in the compressed software binary to avoid the shift operation. 
         [0035]    The shift operation can be prevented in case that the write reserved area is independently defined to upgrade the changes in the write reserved area without directly reflecting the changes on the software binary. 
         [0036]    In this instance, an actual design of the virtual driver  230  is equal to that shown in  FIG. 5A , but a virtual design of the virtual driver  230  is equal to that shown in  FIG. 5B . To form the virtual driver  230 , a mapping process and compression/decompression conversion processes are performed. 
         [0037]    In a write operation, the software driver  240  intactly stores contents transferred by the virtual driver  230  in the memory  250 . However, before this process starts, the virtual driver  230  compresses the transferred contents to transfer the compressed contents with position information to the software driver  240 . After the compression process is finished, the virtual driver  230  determines whether information is stored only in the existing software binary or also the write reserved area. Then, the position information including the determined result is transferred to the software driver  240 . 
         [0038]    In a read operation, the software driver  240  intactly reads and transfers the contents contained in the memory  250  to the virtual driver  230 . But the virtual driver  230  decompresses the transferred contents to transfer the decompressed contents to the upper layer. In case that the contents of a sector to be read in the read operation are previously stored in the write reserved area, the software driver  240  reads the contents not in the compressed software binary but in the write reserved area. 
         [0039]    As described above, the software binary has been actually compressed, but it is considered that the software binary is not compressed in the upper layer due to the operations of the virtual driver  230 . Therefore, processes relative to the memory  250  can be performed by the virtual driver  230  regardless of the compression of the memory  250  in the upper layer. 
         [0040]      FIG. 3  is a flowchart of a writing procedure of a virtual driver when a firmware is upgraded according to an embodiment of the present invention. 
         [0041]    In step  310 , a virtual driver receives a read request signal of predetermined data from an upper layer. 
         [0042]    In step  320 , the virtual driver calculates a read position of data corresponding to the predetermined data in a storage unit (memory). The virtual driver determines whether the predetermined data exists only in software binary or also a write reserved area. 
         [0043]    In step  330 , the predetermined data is loaded in a compressed software image (or the software binary) or the write reserved area according to a calculated position. 
         [0044]    In step  340 , the loaded predetermined data is decompressed. 
         [0045]    In step  350 , the decompressed predetermined data is transferred to the upper layer. Thereafter, the process of the present invention is terminated. 
         [0046]      FIG. 4  is a flowchart of a reading procedure of a virtual driver when a firmware is upgraded according to an embodiment of the present invention. 
         [0047]    In step  410 , a virtual driver receives a predetermined data and a write request signal of the predetermined data from an upper layer. 
         [0048]    In step  420 , the predetermined data is compressed. 
         [0049]    In step  430 , the virtual driver calculates a write position of data corresponding to the predetermined data in a storage unit (memory). The virtual driver determines whether the predetermined data is written only in software binary or also a write reserved area. 
         [0050]    In step  440 , the compressed predetermined data is written in a compressed software image (or the software binary) or the write reserved area. Thereafter, the process of the present invention is terminated. 
         [0051]      FIG. 6  is a block diagram of a portable terminal having a firmware upgrade function according to an embodiment of the present invention. 
         [0052]    The portable terminal includes an interface module  610 , a control unit  620 , a storage unit  630 , and a virtual driver management unit  640 . 
         [0053]    The interface module  610  is a module for communicating with other nodes and includes an RF processor and a baseband processor. The RF processor converts a signal received through an antenna into a baseband signal to provide the converted signal to a baseband processor. In addition, the RF processor converts a baseband signal from the baseband processor into an RF signal, which can be transmitted over air, and transmits the converted baseband signal to the antenna. 
         [0054]    The control unit  620  processes and controls an overall operation of the portable terminal. For example, the control unit  620  processes and controls data communication. In addition to the general functions, the control unit  620  controls a virtual driver management unit  640  to apply a compression function of FOTA technology according to the present invention. 
         [0055]    The storage unit  630  stores a program for controlling the overall operation of the portable terminal and temporary data generated during the execution of the program. In particular, according to the present invention, the storage unit  630  stores a compressed software image (software binary) and a write reserved area. 
         [0056]    The virtual driver management unit  640  calculates a position according to a command and provided information of the control unit  620 , and then decompresses the compressed software image (software binary) of the storage unit  630  or information stored in the write reserved area to transfer the decompressed image or information to an upper layer. 
         [0057]    The virtual driver management unit  640  compresses information received from the upper layer to store the compressed information in the compressed software image (software binary) or the write reserved area. 
         [0058]    Although the virtual driver management unit  640  is provided separately, the control unit  620  may perform some or all of the functions of the virtual driver management unit  640 . 
         [0059]    The virtual driver applies the compression function to the firmware upgrade method using FOTA technology, in which the conventional compression function is not applied, to reduce the necessary capacity of the memory without influencing the process using FOTA technology or differences between before and after the upgrade and the robustness characteristics. 
         [0060]    Alternate embodiments of the present invention can also comprise computer readable codes on a computer readable medium. The computer readable medium includes any data storage device that can store data that can be read by a computer system. Examples of a computer readable medium include magnetic storage media (such as ROM, floppy disks, and hard disks, among others), optical recording media (such as CD-ROMs or DVDs), and storage mechanisms such as carrier waves (such as transmission through the Internet). The computer readable medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. Also, functional programs, codes, and code segments for accomplishing the present invention can be construed by programmers of ordinary skill in the art to which the present invention pertains. 
         [0061]    While the invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.