KR20070038681A - Method and system for updating firmware - Google Patents

Method and system for updating firmware Download PDF

Info

Publication number
KR20070038681A
KR20070038681A KR20050093873A KR20050093873A KR20070038681A KR 20070038681 A KR20070038681 A KR 20070038681A KR 20050093873 A KR20050093873 A KR 20050093873A KR 20050093873 A KR20050093873 A KR 20050093873A KR 20070038681 A KR20070038681 A KR 20070038681A
Authority
KR
South Korea
Prior art keywords
firmware
terminal
block
patch
difference
Prior art date
Application number
KR20050093873A
Other languages
Korean (ko)
Other versions
KR100729525B1 (en
Inventor
김현수
Original Assignee
삼성에스디에스 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성에스디에스 주식회사 filed Critical 삼성에스디에스 주식회사
Priority to KR1020050093873A priority Critical patent/KR100729525B1/en
Publication of KR20070038681A publication Critical patent/KR20070038681A/en
Application granted granted Critical
Publication of KR100729525B1 publication Critical patent/KR100729525B1/en

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

본 발명은 펌웨어 업데이트 방법 및 시스템에 관한 것으로, 펌웨어의 업데이트된 차분을 제공하는 서버와 유무선으로 접속되는 단말기의 펌웨어 업데이트 방법은, (a) 'boot flag'를 '차분i 패치'로 설정하는 단계, (b) 단말기의 임시메모리에서 구버전의 펌웨어 블록i와 차분i에 대해 패치를 수행하는 단계, (c) 'boot flag'를 '패치i 반영'으로 설정하는 단계, (d) 상기 (b) 단계에서 패치된 신버전의 펌웨어 블록i를 구버전의 펌웨어 블록i에 겹쳐쓰기하는 단계, (e) i값을 1 증가시킨 후, i값이 펌웨어 블록개수 n 보다 큰가 판단하는 단계 및, (f) i값이 n 보다 크지 않은 경우 상기 (a) 단계로 이동하고, i값이 n 보다 큰 경우 'boot flag'를 '정상 부팅'으로 설정하는 단계를 포함하고, 펌웨어 업데이트 도중 단말기에 에러가 발생하여 재부팅되면, 'boot flag'의 설정상태에 따라 다음 단계의 업데이트가 계속하여 수행된다. The present invention relates to a method and a system for updating a firmware. The method for updating a firmware of a terminal connected to a server that provides an updated difference of firmware and wired or wirelessly comprises: (a) setting a 'boot flag' to a 'differential patch'; (b) patching the old firmware block i and the difference i in the temporary memory of the terminal, (c) setting the 'boot flag' to 'reflect patch i', and (d) the (b) Overwriting the new version of the firmware block i patched in the step with the old version of the firmware block i, (e) increasing the value of i by 1, determining whether the value of i is greater than the number of firmware blocks n, and (f) i If the value is not greater than n, go to step (a), and if the i value is greater than n, set the 'boot flag' to 'normal boot', and reboot the terminal due to an error during firmware update. Is set to 'boot flag' An update to the next step is to proceed.

Description

펌웨어 업데이트 방법 및 시스템{Method and system for updating firmware}Method and system for updating firmware

도 1은 본 발명의 바람직한 실시예에 따른 펌웨어 업데이트 방법을 설명하기 위한 개요도이다. 1 is a schematic diagram illustrating a firmware update method according to a preferred embodiment of the present invention.

도 2는 도 1에 도시된 서버에서 펌웨어의 분할 차분을 생성하는 것을 설명하기 위한 개념도이다. FIG. 2 is a conceptual diagram for describing generating a differential difference of firmware in a server illustrated in FIG. 1.

도 3은 단말기가 서버로부터 차분을 다운로드받아 차분 패치를 하기 전까지의 흐름을 설명하기 위한 흐름도이다. 3 is a flowchart illustrating a flow before the terminal downloads a difference from a server and performs a difference patch.

도 4는 단말기 메모리의 일반적인 구성을 설명하는 개요도이다. 4 is a schematic diagram illustrating a general configuration of a terminal memory.

도 5는 본 발명의 바람직한 실시예에 의한 펌웨어 업데이트 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating a firmware update method according to an embodiment of the present invention.

본 발명은 단말기의 펌웨어를 업데이트하는 것에 관한 것으로, 특히 단말기에서 펌웨어를 다운로드받아 저장할 때 갑작스런 전원차단의 경우에도 업데이트 상태를 확인하여 임시저장 공간에 저장된 패치를 재기록함으로써 완전한 업데이트를 가능하게 하는 펌웨어 업데이트 방법 및 시스템에 관한 것이다. The present invention relates to updating the firmware of the terminal, and in particular, when downloading and storing the firmware in the terminal, even in the case of a sudden power failure, the firmware update enables a complete update by rewriting a patch stored in a temporary storage space by checking the update status. It relates to a method and a system.

최근 휴대폰, MP3 플레이어, 디지털 카메라등과 같은 휴대 단말장비가 급속하게 보급되고 있다. 이러한 단말기들의 성능이 발전하면서, 단말기의 운영 소프트웨어인 펌웨어도 업데이트 필요성이 증가하고 있다. 펌웨어는 단말기 운용에 가장 기본적인 소프트웨어이기 때문에, 단말기에서 펌웨어를 업데이트하는 기능은 업데이트 도중에 발생할 수 있는 장애로부터 안전하도록 설계되어야 한다. Recently, portable terminal devices such as mobile phones, MP3 players, digital cameras, etc. are rapidly spreading. As the performance of these terminals has developed, the need for updating firmware, which is the operating software of the terminals, is increasing. Since the firmware is the most basic software for operating the terminal, the function of updating the firmware in the terminal should be designed to be safe from failures that may occur during the update.

그러나, 현재 업데이트 방식은 새로운 펌웨어의 전체 또는 신/구 펌웨어간의 차분을 단말기로 다운로드하는 방식으로서, 업데이트 도중에 전원공급이 차단되거나 통신이 두절되면 플래시램에 불완전한 펌웨어 이미지가 저장되어 정상적인 동작을 못하는 경우가 발생한다. 이러한 경우는 응급복구 모드로 단말기를 다시 재부팅하여 다시 처음부터 업데이트를 해야 하는 문제가 발생한다. However, the current update method is a method of downloading the entire new firmware or the difference between new and old firmware to the terminal. If the power supply is cut off or the communication is interrupted during the update, an incomplete firmware image is stored in the flash RAM to prevent normal operation. Occurs. In such a case, a problem arises in that the terminal needs to be updated again by rebooting the terminal in the emergency recovery mode.

따라서, 현재의 펌웨어 업데이트 방식은, 새 버전의 펌웨어를 모두 다운로드하는 경우 업데이트 시간이 매우 길고, 따라서 긴 업데이트 시간에 비례하여 장애 발생확률도 높아져서 통신 두절이나 전원공급의 차단등의 장애가 발생할 수 있다. Therefore, in the current firmware update method, when all new versions of firmware are downloaded, the update time is very long, and thus the probability of failure increases in proportion to the long update time, such that communication failure or interruption of power supply may occur.

또한, 펌웨어 업데이트 도중에 장애가 발생하는 경우, 응급복구 상태에서 처음부터 다시 업데이트를 해야 하므로 시간적 손실이 크고, 응급복구가 지원되지 않는 단말기의 경우에는 불완전하게 저장된 펌웨어로 인해 정상적인 동작이 되지 않는다는 문제점이 있었다. In addition, if a failure occurs during the firmware update, it is necessary to update again from the beginning in the emergency recovery state, so there is a problem that the time loss is large, and in the case of the terminal that is not supported for emergency recovery, the normal operation is not performed due to incompletely stored firmware. .

본 발명은 상기한 점을 감안하여 발명된 것으로, 펌웨어의 분할 차분 및 단말기의 임시메모리를 사용하고, 업데이트 상태를 설정하여 업데이트 도중에 통신 두절등의 에러가 발생하였을 경우 재부팅 이후에 중단 시점 이후부터 계속하여 업데이트가 진행될 수 있는 펌웨어 업데이트 방법 및 시스템을 제공함에 그 목적이 있다. The present invention has been invented in view of the above points, and if an error such as a communication interruption occurs during the update by setting the update state by using the partition difference of the firmware and the temporary memory of the terminal, it continues after the interruption point after the reboot. It is an object of the present invention to provide a firmware update method and a system in which an update can be performed.

상기 목적을 달성하기 위한 본 발명은, 펌웨어의 업데이트된 차분을 제공하는 서버와 유무선으로 접속되는 단말기의 펌웨어 업데이트 방법에 있어서, (a) 'boot flag'를 '차분i 패치'로 설정하는 단계, (b) 단말기의 임시메모리에서 구버전의 펌웨어 블록i와 차분i에 대해 패치를 수행하는 단계, (c) 'boot flag'를 '패치i 반영'으로 설정하는 단계, (d) 상기 (b) 단계에서 패치된 신버전의 펌웨어 블록i를 구버전의 펌웨어 블록i에 겹쳐쓰기하는 단계, (e) i값을 1 증가시킨 후, i값이 펌웨어 블록개수 n 보다 큰가 판단하는 단계 및, (f) i값이 n 보다 크지 않은 경우 상기 (a) 단계로 이동하고, i값이 n 보다 큰 경우 'boot flag'를 '정상 부팅'으로 설정하는 단계를 포함하고, 펌웨어 업데이트 도중 단말기에 에러가 발생하여 재부팅되면, 'boot flag'의 설정상태에 따라 다음 단계의 업데이트가 계속하여 수행되는 것을 특징으로 한다. In accordance with another aspect of the present invention, there is provided a firmware update method of a terminal connected to a server that provides an updated difference of firmware and a wired or wireless connection, the method comprising: (a) setting a 'boot flag' to a 'differential patch'; (b) patching the old firmware block i and the difference i in the temporary memory of the terminal, (c) setting the 'boot flag' to 'reflect patch i', and (d) step (b) Overwriting the new version of firmware block i patched in the old version of firmware block i, (e) increasing i value by 1, determining whether i value is greater than n number of firmware blocks, and (f) i value If the value is not greater than n, go to step (a), and if the value of i is greater than n, set the 'boot flag' to 'normal boot'. , depending on the 'boot flag' setting, It characterized in that the date will continue to perform.

본 발명에 의한 펌웨어 업데이트 방법에 있어서, 상기 (a) 단계 전에, 단말기가 업데이트 서버로부터 펌웨어의 n개의 차분, 차분의 개수 n, n개 차분의 크기에 대한 데이터를 다운로드받는 단계를 더 포함하는 것이 바람직하다. In the firmware update method according to the present invention, before the step (a), the terminal further comprises the step of downloading data for n differences, the number of differences n, the size of n differences of the firmware from the update server desirable.

이때, 펌웨어의 n개의 차분은, 구버전의 펌웨어 및 신버전의 펌웨어가 n개의 블록으로 분할되는 단계와, 구버전의 펌웨어 n개의 블록과 신버전의 펌웨어 n개의 블록을 각각 비교하여 n개의 블록 차분을 생성하는 단계에 의해 만들어진다. In this case, the n differences of the firmware are generated by dividing the old firmware and the new firmware into n blocks, and comparing the old firmware n blocks with the new firmware n blocks to generate n block differences, respectively. Is made by step.

본 발명에 의한 펌웨어 업데이트 방법에 있어서, 상기 (b) 단계는, 구버전의 펌웨어 블록i를 단말기의 임시메모리에 로딩하는 단계, 로딩된 구버전의 펌웨어 블록i와 차분i에 대해 임시메모리에서 패치를 수행하는 단계 및, 패치된 신버전의 펌웨어 블록i를 단말기의 비휘발성 메모리에 저장하는 단계를 포함할 수 있다. In the firmware update method according to the present invention, the step (b) includes the step of loading an old version of firmware block i into the temporary memory of the terminal, and performing a patch in the temporary memory for the loaded old version of firmware block i and the difference i. And storing the patched new version of the firmware block i in a nonvolatile memory of the terminal.

이때, 임시메모리는 SDRAM이고, 비휘발성 메모리는 플래시 램인 것이 바람직하고, 단말기의 비휘발성 메모리는, 펌웨어의 n개의 차분, 차분의 개수 n, n개 차분의 크기 및, 'boot flag'가 저장되는 제1저장영역 및, 구버전의 펌웨어 블록과 차분을 적용한 패치된 블록이 저장되는 제2저장영역을 갖는 것이 바람직하다. In this case, the temporary memory is SDRAM, and the nonvolatile memory is flash RAM, and the nonvolatile memory of the terminal stores n differences of firmware, n number of differences, size of n differences, and a 'boot flag' is stored. It is preferable to have a first storage area and a second storage area in which a patched block applied with a difference with an older version of the firmware block is stored.

상기 목적을 달성하기 위한 본 발명은, 펌웨어의 업데이트된 차분을 제공하는 서버와 유무선으로 접속되는 단말기의 펌웨어 업데이트 시스템에 있어서, 'boot flag'를 '차분i 패치'로 설정하는 수단, 단말기의 임시메모리에서 구버전의 펌웨어 블록i와 차분i에 대해 패치를 수행하는 수단, 'boot flag'를 '패치i 반영'으로 설정하는 수단, 상기 패치 수행 수단에서 패치된 신버전의 펌웨어 블록i를 구버전의 펌웨어 블록i에 겹쳐쓰기하는 수단 및, i값을 1 증가시키고, i값이 펌웨어 블록개수 n 보다 큰가 판단하는 수단을 구비하고, i값이 n 보다 크지 않으면 상기 (a) 수단에서 'boot flag'를 '차분i 패치'로 설정하고, i값이 n 보다 크면 'boot flag'를 '정상 부팅'으로 설정함으로써, 펌웨어 업데이트 도중 단말기에 에러가 발생하여 재부팅되면, 'boot flag'의 설정상태에 따라 다음 단계의 업데이트가 수행되는 것을 특징으로 한다. According to an aspect of the present invention, there is provided a firmware update system for a terminal that is connected to a server that provides an updated difference between firmware and a wired or wireless network. A means for patching the old firmware block i and the differential i in memory, a means for setting the 'boot flag' to 'reflect the patch i', and a new version of the firmware block i patched by the patch performing means means for overwriting i and increasing the value of i by 1 and determining whether the value of i is greater than the number of firmware blocks n; and if the value of i is not greater than n, the 'boot flag' is set by the means (a); 'Differential i patch' and if 'i' value is greater than n, 'boot flag' is set to 'normal boot'. The next step is characterized in that the update is performed.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세하게 설명하기로 한다. 그러나, 이하의 실시예는 이 기술분야에서 통상적인 지식을 가진 자에게 본 발명이 충분히 이해되도록 제공되는 것으로서 여러 가지 다른 형태로 변형될 수 있으며, 본 발명의 범위가 다음에 기술되는 실시예에 한정되는 것은 아니다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, the following embodiments are provided to those skilled in the art to fully understand the present invention, and may be modified in various forms, and the scope of the present invention is limited to the embodiments described below. It doesn't happen.

(실시예)(Example)

이하, 예시도면을 참조하여 본 발명에 따른 실시예를 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 바람직한 실시예에 따른 펌웨어 업데이트 방법을 설명하기 위한 개요도이다. 1 is a schematic diagram illustrating a firmware update method according to a preferred embodiment of the present invention.

이동 단말기의 펌웨어 등과 같은 소프트웨어를 업데이트하기 위해서는 업데이트 데이터를 제공하는 제공자(100)가 필요하다. 도 1을 참조하면, 단말기(104)와 업데이트 제공자(100)는 무선 또는 유선등의 방식으로 접속된다. 업데이트 제공자는 서버(102)를 구비하고 있는데, 서버는 단말기에게 필요한 펌웨어의 신/구간 차분을 생성하여 전송해주는 역할을 한다. In order to update software such as firmware of the mobile terminal, a provider 100 providing update data is required. Referring to FIG. 1, the terminal 104 and the update provider 100 are connected in a wireless or wired manner. The update provider includes a server 102, which serves to generate and transmit a new / segment difference of firmware required for the terminal.

도 2는 도 1에 도시된 서버에서 펌웨어의 분할 차분을 생성하는 것을 설명하기 위한 개념도이다. FIG. 2 is a conceptual diagram for describing generating a differential difference of firmware in a server illustrated in FIG. 1.

도 2를 참조하면, 구버전의 펌웨어(200) 및 신버전의 펌웨어(201)는 각각 분할모듈(203,204)에 의해 소정 크기로 분할되어 n개의 블록으로 된다. 즉, 구버전의 펌웨어(200)는 분할모듈(203)을 지나 구버전 펌웨어 블록1(205a), 구버전 펌웨어 블록2(205b), …, 구버전 펌웨어 블록n(205n)으로 되고, 신버전의 펌웨어(201)는 분할모듈(204)을 지나 신버전 펌웨어 블록1(206a), 신버전 펌웨어 블록2(206b), …, 신버전 펌웨어 블록n(206n)이 된다. 여기서 블록의 사이즈는 임의의 값이 될 수 있지만, 단말기 메모리의 입출력 블록 크기인 것이 바람직하다. Referring to FIG. 2, the old version of the firmware 200 and the new version of the firmware 201 are divided into predetermined blocks by the partitioning modules 203 and 204 to be n blocks. That is, the old firmware 200 passes through the splitting module 203, and the old firmware block 1 205a, the old firmware block 2 205b,... , Old version firmware block n (205n), and new version firmware 201 passes through division module 204, new version firmware block 1 (206a), new version firmware block 2 (206b),... Is the new version firmware block n (206n). Here, the size of the block may be any value, but preferably the size of the input / output block of the terminal memory.

이어서, 차분생성모듈(207)은 신버전의 펌웨어 n개의 블록(205a,205b,…,205n)과 구버전의 펌웨어 n개의 블록(206a,206b,…,206n)을 차례로 비교하여 n개의 블록 차분(207a,207b,…,207n)을 생성한다. n개의 블록 차분(207a,207b,…,207n)은 신/구 버전간의 차이점만에 관한 데이터이다. Subsequently, the difference generation module 207 sequentially compares n blocks of firmware 205a, 205b, ..., 205n of the new version and n blocks 206a, 206b, ..., 206n of the old version, in order, and compares n block differences 207a. , 207b, ..., 207n). The n block differences 207a, 207b, ..., 207n are data concerning only differences between the old and new versions.

도 3은 단말기가 서버로부터 차분을 다운로드받아 차분 패치를 하기 전까지의 흐름을 설명하기 위한 흐름도이다. 3 is a flowchart illustrating a flow before the terminal downloads a difference from a server and performs a difference patch.

먼저, 서버(102)와 단말기(104)는 유선 또는 무선으로 접속되고, 단말기는 서버로부터 펌웨어의 차분을 다운로드 받는다. 펌웨어의 차분이란 도 2에서 설명한 바와 같은 각 블록의 n개의 차분을 의미한다. 이때, 단말기는 차분 데이터와 함께 차분의 개수 n과, n개 차분의 크기도 같이 전송받아 단말기의 제1저장영역(후술함)에 저장한다(제301단계). First, the server 102 and the terminal 104 are connected by wire or wirelessly, and the terminal downloads the difference of firmware from the server. The difference of firmware means n differences of each block as described with reference to FIG. 2. In this case, the terminal receives the difference number n and the size of the n difference together with the difference data and stores the same in the first storage area (described later) of the terminal (step 301).

이어서, 단말기는 첫번째 차분의 패치를 시작하기 위해 최초의 'boot flag'를 '차분 1 패치'로 하여 제1저장영역에 저장한다(제302단계). Subsequently, the terminal stores the first 'boot flag' as the 'difference 1 patch' in the first storage area to start the first difference patch (step 302).

다음으로, 단말기는 실제로 패치 작업을 수행하기 위해 재부팅된다(제303단계). Next, the terminal is actually rebooted to perform the patch operation (step 303).

이와 같은 과정에서, 만약 차분 다운로드 중이나, 또는 'boot flag' 저장 중 에 전원 차단이나 통신 두절과 같은 에러가 발생할 경우에는, 아직 단말기의 펌웨어에 대한 겹쳐 쓰기가 실행되지 않았으므로, 다시 차분을 다운로드 받아 저장하는 과정을 되풀이하면 된다. In this process, if an error such as a power failure or communication failure occurs while downloading the difference or saving the 'boot flag', since the overwriting of the firmware of the terminal has not yet been executed, the difference is downloaded again. You can repeat the process of saving.

도 4는 단말기 메모리의 일반적인 구성을 설명하는 개요도이다. 4 is a schematic diagram illustrating a general configuration of a terminal memory.

단말기의 메모리는 정보를 저장하는 역할을 하는 곳으로, 일반적으로 비휘발성 메모리인 플래시 램이 사용된다. The memory of the terminal is used to store information. Generally, flash RAM, which is a nonvolatile memory, is used.

단말기의 메모리는 부트로더가 저장되는 영역(401), 커널 영역(402), 루트 파일 시스템이 저장되는 영역(403), 제1저장영역(404) 및, 제2저장영역(405)으로 구성될 수 있다. The memory of the terminal may include an area 401 in which a boot loader is stored, a kernel area 402, an area 403 in which a root file system is stored, a first storage area 404, and a second storage area 405. Can be.

이 중 제1저장영역(404)은 서버로부터 전송받은 차분, 차분의 개수, 차분의 크기, 'boot flag'를 저장하는 영역이고, 제2저장영역(405)은 단말기의 구버전 펌웨어 블록과 차분을 적용한 패치된 블록을 저장하는 영역이다. 제2저장영역(405)에 저장되는 패치된 블록은 구버전의 펌웨어 영역에 겹쳐쓰기 도중 단말기의 전원이 차단된다고 해도, 계속해서 구버전의 펌웨어 영역에 겹쳐쓰기를 하기 위해 사용된다. The first storage area 404 is an area for storing the difference, the number of differences, the size of the difference, and the 'boot flag' received from the server, and the second storage area 405 stores the difference with the old firmware block of the terminal. This area stores the applied patched block. The patched block stored in the second storage area 405 is used to continuously overwrite the old firmware area even if the terminal power is cut off while the old firmware area is overwritten.

이하, 도 5를 참조하여 펌웨어 업데이트 방법을 상세하게 설명한다. Hereinafter, the firmware update method will be described in detail with reference to FIG. 5.

도 5는 본 발명의 바람직한 실시예에 의한 펌웨어 업데이트 방법을 설명하기 위한 흐름도이다. 도 5에 도시된 차분 패치를 수행하여 펌웨어를 업데이트하는 단계(제501단계~제514단계)에서는, 사용자가 단말기에 임의로 입력하는 것을 방지하기 위해 단말기의 입력기능은 모두 차단된다. 그리고, 이미 차분이 모두 단말기의 메모리에 저장되었으므로, 서버와의 통신 연결은 필요 없어 통신두절로 인한 에러의 문제는 발생하지 않는다. 5 is a flowchart illustrating a firmware update method according to an embodiment of the present invention. In the step of updating the firmware by performing the differential patch shown in FIG. 5 (steps 501 to 514), all input functions of the terminal are blocked to prevent the user from arbitrarily inputting the terminal. In addition, since the differences are already stored in the memory of the terminal, communication connection with the server is not necessary, and thus the problem of error due to communication loss does not occur.

도 3에 도시된 흐름을 거쳐 단말기가 재부팅되면, 먼저 메모리의 'boot flag'를 검사한다. When the terminal is rebooted through the flow shown in FIG. 3, first, the 'boot flag' of the memory is checked.

'boot flag'가 '차분1 반영'에서 '차분 n 반영'인지를 판단하여, '차분1 반영'에서 '차분 n 반영'인 경우라면, 패치 i를 반영하는 제509단계로 이동한다. 만약, 'boot flag'가 '차분1 반영'에서 '차분 n 반영'인 경우가 아니라면, 제502단계로 이동한다. If the 'boot flag' is determined to reflect 'difference n' in 'Difference 1 reflected', and if 'Difference n reflected' in 'Difference 1 reflected', the flow proceeds to step 509 in which the patch i is reflected. If the 'boot flag' is not 'differential n reflected' in 'differential 1 reflected', the flow proceeds to step 502.

제502단계에서, 'boot flag'가 '차분1 패치'에서 '차분 n 패치'인지를 판단하여, '차분1 패치'에서 '차분 n 패치'가 아닌 경우에는 단말기가 정상적으로 부팅되는 상태이므로 제503단계로 이동하여 단말기를 정상부팅한다. In step 502, it is determined whether the 'boot flag' is 'differential n patch' from 'differential 1 patch', and if the difference is not 'differential n patch' from 'differential 1 patch', the terminal is normally booted. Go to the step to boot the terminal normally.

만약, 'boot flag'가 '차분1 패치'에서 '차분 n 패치'라면, 차분i를 패치한다(제504단계). If the 'boot flag' is 'difference n patch' in 'difference 1 patch', difference i is patched (step 504).

차분i에 대한 패치는 단말기의 패치 모듈에서 수행되는데, i번째 블록의 구버전 펌웨어를 임시 메모리에 로딩하고, 저장된 차분i와 구버전 펌웨어 i번째 블록을 임시 메모리에서 패치를 수행한다. 임시 메모리는 단말기의 휘발성 메모리를 사용하는 것이며, SDRAM 등이 이에 해당한다. 펌웨어 블록의 패치는 펌웨어 구버전 블록에 차분 블록을 적용하여 신버전 블록을 만드는 과정을 의미한다. The patch for the difference i is performed in the patch module of the terminal. The old version firmware of the i-th block is loaded into the temporary memory, and the stored difference i and the old version firmware i-th block are patched from the temporary memory. Temporary memory uses a volatile memory of the terminal, such as SDRAM. The patch of the firmware block refers to a process of creating a new version block by applying a differential block to an old firmware block.

도 3에서 설명한 바와 같은 펌웨어 다운로드 후에 단말기가 재부팅이 된 경우라면, 'boot flag'가 '차분1 패치'로 설정되어 있으므로, 'i=1'이 된다. If the terminal is rebooted after downloading the firmware as described in FIG. 3, since 'boot flag' is set to 'differential 1 patch', 'i = 1'.

이어서, 메모리의 제2저장영역에 패치된 결과를 저장한다(제506단계). Subsequently, the patched result is stored in the second storage area of the memory (step 506).

만약, 차분i를 패치하는 단계와 패치된 결과를 저장하는 단계에서 단말기의 전원차단이 발생하면(제505단계,제507단계), 'boot flag'가 여전히 '차분i 패치'이므로, 다시 제504단계 이전으로 이동하여 차분 패치를 수행하면 된다. If a power cutoff of the terminal occurs in the step of patching the difference i and storing the patched result (steps 505 and 507), since the boot flag is still a difference patch, it is again performed. Go ahead and perform the differential patch.

이어서, 'boot flag'를 '패치i 반영'으로 지정한다(제508단계). Subsequently, the 'boot flag' is designated as 'patch i reflection' (step 508).

생성된 패치를 구버전의 i번째 블록의 펌웨어 영역에 겹쳐 쓰기를 하는 패치i 반영 모듈을 실행한다(제509단계). In operation 509, the patchi reflection module for overwriting the generated patch with the firmware area of the i-th block of the old version is executed.

만약, 이때 전원차단이 발생하여 재부팅이 된다면, 'boot flag'는 '패치i 반영' 상태이므로, 제501단계에서 바로 제509단계로 진행된다. 즉, 이 경우는 패치i 반영 모듈 수행중에 전원차단이 발생하여 재부팅된 경우이기 때문에, 이미 메모리의 제2저장영역에 패치된 블록이 있으므로, 이것을 로딩하여 패치i 반영 모듈을 실행한다. In this case, if the power is cut off and rebooted, since the 'boot flag' is in the 'patch i reflected' state, the process proceeds directly to step 509. That is, in this case, since the power is cut off and rebooted during the execution of the patchi reflection module, there is a block that is already patched in the second storage area of the memory. Therefore, the patchi reflection module is loaded and executed.

제509단계 후에, 패치 반영이 완료되면, i 값을 1 증가한다(제510단계). 이어서, i 값이 블록 개수 n 보다 큰가를 판단하여(제511단계) 크지 않다면, 'boot flag'를 '차분i 패치'로 설정하고(제512단계), 차분 패치를 계속 진행하기 위해 제504단계로 이동한다. After patch 509 is completed, the i value is increased by 1 (step 510). Subsequently, if it is determined that the value of i is greater than the number n of blocks (step 511), if it is not large, the boot flag is set to the difference i patch (step 512), and step 504 is performed to continue the differential patch. Go to.

만일, 제511단계에서 i 값이 블록 개수 n 보다 크다면 모든 차분 패치가 완료된 것이므로, 'boot flag'를 '정상 부팅'으로 설정한다(제513단계). 단말기의 'boot flag'가 '정상 부팅'으로 설정된 상태에서 단말기가 재부팅되면(제514단계), 펌웨어 업데이트가 완성된 상태에서 단말기가 정상적으로 부팅된다. If the i value is greater than the number n of blocks in step 511, all differential patches are completed, and thus the 'boot flag' is set to 'normal boot' (step 513). If the terminal is rebooted while the 'boot flag' of the terminal is set to 'normal boot' (step 514), the terminal is normally booted in the state where the firmware update is completed.

이하, 본 발명을 MP3 플레이어의 펌웨어 업데이트에 적용한 예를 설명한다. An example in which the present invention is applied to firmware update of an MP3 player will be described.

먼저 서버로 사용될 PC에 MP3 플레이어의 구버전의 펌웨어와 신버전의 펌웨어를 저장한다. 그리고, 도 2를 참조하여 상기에서 설명한 것 처럼, 리눅스의 공개 유틸리티인 'split'를 사용하여 MP3 플레이어의 플래시 램 블록 사이즈인 128 kbyte의 크기로 신/구버전의 펌웨어를 분할한 후, 공개 유틸리티인 'diff'를 사용하여 각 블록의 차분을 생성한다.First, save the old and new versions of the MP3 player's firmware on the PC that will be used as the server. As described above with reference to FIG. 2, after splitting the firmware of the new / old version into a size of 128 kbytes, which is the flash RAM block size of the MP3 player, using the Linux public utility 'split', 'diff' is used to generate the difference of each block.

MP3 플레이어의 플래시 램에 본 발명에 의한 펌웨어 업데이트 방법을 수행하는 프로그램을 미리 설치해 놓고, PC와 MP3 플레이어를 USB 케이블로 연결한다. 이어서 PC에 저장된 차분을 MP3 플레이어로 전송하고 MP3 플레이어의 프로그램은 차분을 플래시 램의 제1저장영역에 저장한다. 전송이 완료되면 MP3 플레이어가 재부팅되고 도 5를 참조하여 설명한 흐름에 따라 차분 패치 작업이 수행되어 구버전의 펌웨어를 신버전으로 패치하게 된다. The program for performing the firmware update method according to the present invention is pre-installed in the flash RAM of the MP3 player, and the PC and the MP3 player are connected with a USB cable. Subsequently, the difference stored in the PC is transferred to the MP3 player, and the program of the MP3 player stores the difference in the first storage area of the flash RAM. When the transmission is completed, the MP3 player is rebooted and differential patching is performed according to the flow described with reference to FIG. 5 to patch the old firmware to the new version.

MP3 플레이어 패치 도중 전원이 차단되고 재부팅이 되면, 이전에 패치작업 중이던 블록부터 작업이 계속된다. 모든 작업이 완료되고 다시 재부팅이 되면 신버전의 펌웨어가 적용된다.If the power is shut down and rebooted during the MP3 player patch, the block will continue from the previous patch. When everything is done and rebooted, the new version of firmware will be applied.

상기한 바와 같이 본 발명에 의하면, 단말기의 펌웨어 업데이트 도중 에러가 발생하였을 경우 재부팅 이후에 중단 시점 이후부터 계속하여 업데이트가 진행될 수 있으므로, 업데이트 기능의 안정성을 확보할 수 있고, 완전한 펌웨어가 저장되는 것을 보장할 수 있으며, 업데이트 시간을 최소화할 수 있는 효과가 있다. As described above, according to the present invention, if an error occurs during the firmware update of the terminal, since the update can be continued after the interruption point after the reboot, it is possible to ensure the stability of the update function, and that the complete firmware is stored. This can be guaranteed, and the update time can be minimized.

이상, 본 발명의 바람직한 실시예를 들어 상세하게 설명하였으나, 본 발명은 상기 실시예에 한정되는 것은 아니며, 본 발명의 기술적 사상의 범위내에서 당 분야에서 통상의 지식을 가진 자에 의하여 여러 가지 변형이 가능하다.As mentioned above, although preferred embodiment of this invention was described in detail, this invention is not limited to the said embodiment, A various deformation | transformation by a person of ordinary skill in the art within the scope of the technical idea of this invention is carried out. This is possible.

Claims (8)

펌웨어의 업데이트된 차분을 제공하는 서버와 유무선으로 접속되는 단말기의 펌웨어 업데이트 방법에 있어서, In the firmware update method of the terminal connected to the server providing a difference between the firmware and the wired or wireless, (a) 'boot flag'를 '차분i 패치'로 설정하는 단계;(a) setting the 'boot flag' to 'differential patch'; (b) 단말기의 임시메모리에서 구버전의 펌웨어 블록i와 차분i에 대해 패치를 수행하는 단계;(b) performing a patch on the old firmware block i and the difference i in the temporary memory of the terminal; (c) 'boot flag'를 '패치i 반영'으로 설정하는 단계;(c) setting the 'boot flag' to 'reflect patch'; (d) 상기 (b) 단계에서 패치된 신버전의 펌웨어 블록i를 구버전의 펌웨어 블록i에 겹쳐쓰기하는 단계;(d) overwriting the new version of firmware block i patched in step (b) with the old version of firmware block i; (e) i값을 1 증가시킨 후, i값이 펌웨어 블록개수 n 보다 큰가 판단하는 단계 및;(e) increasing the value of i by one and determining whether the value of i is greater than the number of firmware blocks n; (f) i값이 n 보다 크지 않은 경우 상기 (a) 단계로 이동하고, i값이 n 보다 큰 경우 'boot flag'를 '정상 부팅'으로 설정하는 단계를 포함하고, (f) moving to step (a) if i is not greater than n, and setting 'boot flag' to 'normal boot' if i is greater than n, 펌웨어 업데이트 도중 단말기에 에러가 발생하여 재부팅되면, 'boot flag'의 설정상태에 따라 다음 단계의 업데이트가 계속하여 수행되는 것을 특징으로 하는 펌웨어 업데이트 방법.If an error occurs in the terminal during the firmware update, the reboot, firmware update method characterized in that the next step of the update continues according to the setting state of the 'boot flag'. 제1항에 있어서, 상기 (a) 단계 전에, According to claim 1, Before the step (a), 단말기가 업데이트 서버로부터 펌웨어의 n개의 차분, 차분의 개수 n, n개 차 분의 크기에 대한 데이터를 다운로드받는 단계를 더 포함하는 것을 특징으로 하는 펌웨어 업데이트 방법.And downloading, by the terminal, data about n differences, number of differences n, and size of n differences of firmware from the update server. 제2항에 있어서, 상기 펌웨어의 n개의 차분은, The method of claim 2, wherein the n differences of the firmware are: 구버전의 펌웨어 및 신버전의 펌웨어가 n개의 블록으로 분할되는 단계 및;Dividing the old firmware and the new firmware into n blocks; 구버전의 펌웨어 n개의 블록과 신버전의 펌웨어 n개의 블록을 각각 비교하여 n개의 블록 차분을 생성하는 단계에 의해 만들어지는 것을 특징으로 하는 펌웨어 업데이트 방법.And generating n block differences by comparing the old firmware n blocks and the new firmware n blocks, respectively. 제1항에 있어서, 상기 (b) 단계는,According to claim 1, wherein step (b), 구버전의 펌웨어 블록i를 단말기의 임시메모리에 로딩하는 단계;Loading an old version of firmware block i into the temporary memory of the terminal; 로딩된 구버전의 펌웨어 블록i와 차분i에 대해 임시메모리에서 패치를 수행하는 단계 및;Performing a patch in the temporary memory on the loaded firmware block i and the difference i; 패치된 신버전의 펌웨어 블록i를 단말기의 비휘발성 메모리에 저장하는 단계를 포함하는 것을 특징으로 하는 펌웨어 업데이트 방법.And storing the patched version of the firmware block i in the nonvolatile memory of the terminal. 제4항에 있어서, The method of claim 4, wherein 상기 임시메모리는 SDRAM이고, 상기 비휘발성 메모리는 플래시 램인 것을 특징으로 하는 펌웨어 업데이트 방법.Wherein the temporary memory is SDRAM, and the nonvolatile memory is flash RAM. 제4항에 있어서, 단말기의 상기 비휘발성 메모리는, The method of claim 4, wherein the nonvolatile memory of the terminal, 펌웨어의 n개의 차분, 차분의 개수 n, n개 차분의 크기 및, 'boot flag'가 저장되는 제1저장영역 및;A first storage area storing n differences of firmware, n number of differences, size of n differences, and a 'boot flag'; 구버전의 펌웨어 블록과 차분을 적용한 패치된 블록이 저장되는 제2저장영역을 갖는 것을 특징으로 하는 펌웨어 업데이트 방법.And a second storage area for storing a patched block applying a difference from an old firmware block. 제1항에 있어서, 업데이트 도중에는 단말기의 입력기능이 모두 차단되는 것을 특징으로 하는 펌웨어 업데이트 방법.The method of claim 1, wherein all input functions of the terminal are blocked during the update. 펌웨어의 업데이트된 차분을 제공하는 서버와 유무선으로 접속되는 단말기의 펌웨어 업데이트 시스템에 있어서, In the firmware update system of a terminal connected to a server providing an updated difference of the firmware in a wired or wireless manner, 'boot flag'를 '차분i 패치'로 설정하는 수단;means for setting the 'boot flag' to the 'differential patch'; 단말기의 임시메모리에서 구버전의 펌웨어 블록i와 차분i에 대해 패치를 수행하는 수단;Means for performing a patch on the old firmware block i and the difference i in the temporary memory of the terminal; 'boot flag'를 '패치i 반영'으로 설정하는 수단;means for setting the 'boot flag' to 'reflect patch'; 상기 패치 수행 수단에서 패치된 신버전의 펌웨어 블록i를 구버전의 펌웨어 블록i에 겹쳐쓰기하는 수단 및;Means for overwriting a new version of firmware block i fetched by the patch performing means with an old version of firmware block i; i값을 1 증가시키고, i값이 펌웨어 블록개수 n 보다 큰가 판단하는 수단을 구비하고, means for increasing the value of i by one and determining whether the value of i is greater than the number of firmware blocks n; i값이 n 보다 크지 않으면 상기 (a) 수단에서 'boot flag'를 '차분i 패치'로 설정하고, i값이 n 보다 크면 'boot flag'를 '정상 부팅'으로 설정함으로써, 펌웨어 업데이트 도중 단말기에 에러가 발생하여 재부팅되면, 'boot flag'의 설정상태에 따라 다음 단계의 업데이트가 수행되는 것을 특징으로 하는 펌웨어 업데이트 시스템.If the i value is not greater than n, the (a) means sets the 'boot flag' to 'differential i patch', and if the i value is greater than n, the 'boot flag' is set to 'normal boot', thereby updating the terminal. If an error occurs and reboots, the firmware update system of the next step according to the setting state of the 'boot flag' is performed.
KR1020050093873A 2005-10-06 2005-10-06 Method and system for updating firmware KR100729525B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050093873A KR100729525B1 (en) 2005-10-06 2005-10-06 Method and system for updating firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050093873A KR100729525B1 (en) 2005-10-06 2005-10-06 Method and system for updating firmware

Publications (2)

Publication Number Publication Date
KR20070038681A true KR20070038681A (en) 2007-04-11
KR100729525B1 KR100729525B1 (en) 2007-06-15

Family

ID=38159888

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050093873A KR100729525B1 (en) 2005-10-06 2005-10-06 Method and system for updating firmware

Country Status (1)

Country Link
KR (1) KR100729525B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101123685B1 (en) * 2009-07-02 2012-03-20 (주)세븐코아 System and method for upgrading program in terminal with dynamic software upgrade technology
KR101462282B1 (en) * 2008-08-12 2014-11-14 주식회사 엘지유플러스 Apparatus and method of updating mobile communication terminal
KR20220086230A (en) * 2020-12-16 2022-06-23 현대오토에버 주식회사 Difference update method for vehicullr control unit and difference update roll back method

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015068220A1 (en) * 2013-11-06 2015-05-14 三菱電機株式会社 Software update device, and software update program
KR102275140B1 (en) * 2019-11-26 2021-07-08 현대오트론 주식회사 Method for updating vehicular control unit
US11650811B2 (en) 2019-11-26 2023-05-16 Hyundai Autoever Corp. Method of updating control unit for vehicle

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040008007A (en) * 2002-07-15 2004-01-28 에임텍 주식회사 Method of upgrading firmware for wireless terminal
KR20040037976A (en) * 2002-10-31 2004-05-08 엘지전자 주식회사 Method for updating firmware in mobile communication terminal
KR20050080504A (en) * 2004-02-10 2005-08-17 (주)씨앤에스 테크놀로지 Upgrade firmware system of internet video phone and method for employing as the same
KR100762618B1 (en) * 2004-03-18 2007-10-01 삼성전자주식회사 The method and system of upgrading firmware upgrade engine of mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101462282B1 (en) * 2008-08-12 2014-11-14 주식회사 엘지유플러스 Apparatus and method of updating mobile communication terminal
KR101123685B1 (en) * 2009-07-02 2012-03-20 (주)세븐코아 System and method for upgrading program in terminal with dynamic software upgrade technology
KR20220086230A (en) * 2020-12-16 2022-06-23 현대오토에버 주식회사 Difference update method for vehicullr control unit and difference update roll back method

Also Published As

Publication number Publication date
KR100729525B1 (en) 2007-06-15

Similar Documents

Publication Publication Date Title
US7275153B2 (en) Booting and boot code update system using boot strapper code to select between a loader and a duplicate backup loader
KR101003888B1 (en) Tri-phase boot process in electronic devices
US8539471B2 (en) Updating firmware of an electronic device
US8364942B2 (en) Electronic device having an alterable configuration and methods of manufacturing and configuring the same
US7584379B2 (en) Mobile terminal and software update method
KR100584338B1 (en) Method and system for updating software
RU2419839C2 (en) Software update system and method for portable ota supporting mobile terminal
WO2022007656A1 (en) Bootloader software updating method and apparatus, embedded controller, and storage medium
CN112416406B (en) Terminal equipment upgrading method, device, terminal equipment and medium
WO2019062703A1 (en) Update method, and embedded system
KR100729525B1 (en) Method and system for updating firmware
WO2013117039A1 (en) Software upgrading method and device
CN112667265A (en) Method and device for updating bootstrap program
JP2010044574A (en) Portable terminal, portable terminal control method and portable terminal control program
CN101384063A (en) Method and system for terminal equipment repairing and updating, system manufacturing method
KR20050088193A (en) Mobile handset with a fault tolerant update agent
JP2009009391A (en) Updating software self-update method and portable terminal device
CA2539897C (en) An electronic device having an alterable configuration and methods of manufacturing and configuring the same
US20210326125A1 (en) Installing application program code on a vehicle control system
KR100876748B1 (en) Method for updating boot code
CN117527779A (en) Method for issuing upgrade package, server, terminal and storage medium
CN118012475A (en) Dual-CPU dual-system program upgrading method
KR20050119035A (en) Method for upgrading binary data of mobile communication terminal
KR20050060494A (en) Method for upgrading executable code of mobile communication terminal

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
G170 Publication of correction
FPAY Annual fee payment

Payment date: 20120404

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20130408

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20150305

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20160330

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee