KR20080023841A - The method of firmware upgrade and automatic firmware recovery system - Google Patents

The method of firmware upgrade and automatic firmware recovery system Download PDF

Info

Publication number
KR20080023841A
KR20080023841A KR1020060087919A KR20060087919A KR20080023841A KR 20080023841 A KR20080023841 A KR 20080023841A KR 1020060087919 A KR1020060087919 A KR 1020060087919A KR 20060087919 A KR20060087919 A KR 20060087919A KR 20080023841 A KR20080023841 A KR 20080023841A
Authority
KR
South Korea
Prior art keywords
firmware
area
upgrade
temporary
copying
Prior art date
Application number
KR1020060087919A
Other languages
Korean (ko)
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 KR1020060087919A priority Critical patent/KR20080023841A/en
Publication of KR20080023841A publication Critical patent/KR20080023841A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2211/00Indexing scheme relating to details of data-processing equipment not covered by groups G06F3/00 - G06F13/00
    • G06F2211/10Indexing scheme relating to G06F11/10
    • G06F2211/1002Indexing scheme relating to G06F11/1076
    • G06F2211/109Sector level checksum or ECC, i.e. sector or stripe level checksum or ECC in addition to the RAID parity calculation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

A method and a system for upgrading firmware and recovering the damaged firmware automatically are provided to upgrade the firmware and automatically recover the firmware damaged during upgrade by dividing a non-volatile memory for storing the firmware into a firmware area and a temporary firmware area, storing the new firmware to the temporary firmware area, and copying again the new firmware to the firmware area when the firmware is upgraded. A non-volatile memory(20) comprises a boot loader area(21) storing a program for loading a system, a plurality of firmware areas(22) storing an OS(Operating System) and necessary applications, and a temporary firmware area(23). The temporary firmware area stores original or new firmware temporarily when the firmware stored in the firmware area is upgraded or recovered. A RAM enables a controller to execute the firmware by loading the firmware stored in the firmware area. The boot loader area includes a checksum of the firmware areas and integrity of the firmware area is checked by comparing the checksum stored in the boot loader area with the checksum stored in a predetermined area of the non-volatile memory.

Description

펌웨어 업그레이드와 손상된 펌웨어 자동 복구 시스템 및 방법{The method of firmware upgrade and automatic firmware recovery system}Firmware upgrade and automatic firmware recovery system and method

도 1은 본 발명에 따른 시스템의 구성을 나타낸 구성도,1 is a block diagram showing the configuration of a system according to the present invention,

도 2는 본 발명에 따른 시스템의 메모리부 구조를 나타낸 구성도,2 is a block diagram showing a structure of a memory unit of the system according to the present invention;

도 3은 본 발명에 따른 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법의 흐름을 개락적으로 나타낸 순서도,3 is a flowchart schematically showing the flow of firmware upgrade and damaged firmware automatic recovery method according to the present invention;

도 4는 본 발명에 따른 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법의 흐름을 상세히 나타낸 순서도,Figure 4 is a flow chart illustrating in detail the flow of firmware upgrade and damaged firmware automatic recovery method according to the present invention,

<도면의 주요 부호에 대한 부호의 설명><Explanation of symbols for major symbols in the drawings>

10 : 제어부 20 : 비휘발성 메모리부10: control unit 20: nonvolatile memory unit

21 : 부트로더 영역 22 : 펌웨어 영역21: boot loader area 22: firmware area

23 : 임시 펌웨어 영역 30 : 메모리(RAM)23: temporary firmware area 30: memory (RAM)

40 : 인터페이스40: interface

본 발명은 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법 및 시스템에 관한 것으로, 좀 더 상세하게는 펌웨어가 저장되어 있는 비휘발성 메모리부를 펌웨어 영역과 임시 펌웨어 영역으로 분할 구비되고 새로운 펌웨어를 업그레이드를 할 때 임시 펌웨어 영역에 먼저 저장한 후 펌웨어 영역으로 복사하는 방법과 펌웨어 업그레이드 도중 손상된 펌웨어를 자동으로 복구하기 위해서 먼저 펌웨어 영역의 무결성 확인과 복사가 완료되지 않은 펌웨어를 확인한 후 복사가 완료되지 않은 펌웨어가 존재하면 임시 펌웨어 영역에서 복사할 펌웨어가 존재하는지 확인하여 존재하면 펌웨어 영역으로 복사가 되지 않은 펌웨어를 복사한 후 시스템을 재부팅(Rebooting)하여 자동으로 손상된 펌웨어를 복구하는 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 시스템 및 방법에 관한 것이다.The present invention relates to a method and system for automatically upgrading firmware and automatically repairing a damaged firmware. More particularly, the present invention relates to a nonvolatile memory unit, in which firmware is stored, divided into a firmware area and a temporary firmware area. To save to the area first and then copy to the firmware area, and to automatically repair damaged firmware during the firmware upgrade, first check the integrity of the firmware area and the firmware that has not been copied. Firmware upgrade and damaged firmware recovery system which checks whether the firmware to be copied exists in the firmware area and if it exists, copy the firmware that has not been copied to the firmware area and then reboot the system to automatically repair the damaged firmware. And a method.

현재사회에 들어와서는 카메라, 휴대폰, MP3 Player 등과 같은 다양한 임베디드 시스템(embedded system)이 접목된 디지털기기들은 제어부(중앙처리장치 ; CPU)와 메모리부 및 상기 메모리부에 펌웨어(firmware)라 불리는 시스템 운영 프로그램이 내장하고 있다.In today's society, digital devices incorporating various embedded systems such as cameras, mobile phones, and MP3 players are referred to as a control unit (central processing unit; CPU), a memory unit, and a system called firmware (firmware). The operating program is built in.

특히, 이러한 장치들은 시스템의 기능 확장과 문제 해결을 위해 펌웨어를 외부에서 업그레이드 할 수 있도록 하고 있다. 또한 일반 사용자에 의한 임베디드 기기의 펌웨어 업그레이드는 기기의 문제를 사용자 스스로 해결 하도록 함으로써 생산 업체의 유지 보수비용을 줄일 수 있는 장점이 있다.In particular, these devices allow the firmware to be upgraded externally for system expansion and troubleshooting. In addition, the firmware upgrade of the embedded device by the general user has the advantage of reducing the maintenance cost of the manufacturer by solving the problem of the device yourself.

그러나 펌웨어는 시스템 운영에 직접적인 영향을 미치는 프로그램이기 때문에 업그레이드하는 과정은 상당한 주의를 요하게 되며, 만약 실수나 사고로 인해 업그레이드를 마치지 못했을 경우 기기가 동작되지 않는 심각한 문제가 발생된다.    However, because the firmware is a program that directly affects the operation of the system, the upgrade process requires a great deal of attention. If the upgrade is not completed due to a mistake or an accident, a serious problem may occur in which the device does not operate.

실제로 펌웨어 업그레이드 문제로 인한 임베디드 시스템이 접목된 기기의 고장이 빈번하게 발생되기 때문에 많은 제품들이 사용자의 직접 업그레이드 조작을 권장하지 않거나 강한 경고를 하는 실정이다.In fact, because of the frequent upgrade of the embedded system due to the firmware upgrade problem, many products do not recommend the user directly upgrade operation or give a strong warning.

이러한 문제점을 해결하기 위한 대표적인 기술이 원본 펌웨어를 비휘발성 메모리에 따로 보관하고 있다가 문제가 발생할 경우 스위치 조작에 의해 원본 펌웨어를 사용하도록 하는 방법이 있다. 상술한 방법은 펌웨어 유실 시 응급조치로써 문제를 해결할 수 있는 장점은 있지만 스위치 조작에 의한 응급조치와 다시 펌웨어를 복구하기 위한 불편함으로 인해 일반 사용자가 조작하기 어려운 문제점이 있다.A typical technique to solve this problem is to store the original firmware in a nonvolatile memory, and when the problem occurs, there is a method of using the original firmware by operating a switch. The above-mentioned method has the advantage of solving the problem as an emergency action when the firmware is lost, but there is a problem that the general user is difficult to operate due to the inconvenience of the emergency action by the switch operation and the recovery of the firmware again.

또한, 이동통신 단말기에 펌웨어를 다운로드 도중에 끊겨 에러(Error)가 발생했을 경우 고가의 특수 장비인 JTAG(Joing Action Group)장비를 이용하여 복구해야만 했으나, JTAG 장비는 PCB와 IC등을 테스트하기 위한 장비로, 부가 기능으로 핀(Pin)대 핀(Pin)방식으로 강제로 데이터를 기록하는 기능을 가지고 있으며, 이 기능을 이용해 펌웨어를 이동통신 단말기의 메모리에 강제로 기록하여 복구한다. 그런데, JTAG 장비를 이용해 복구하는 방법은 그 절차가 매우 번거로운 뿐만 아니라 장비 자체도 매우 고가인 단점이 있었다. In addition, if an error occurred while downloading firmware to the mobile terminal, an error had to be recovered by using expensive special equipment such as JTAG (Joing Action Group) equipment. However, JTAG equipment is used to test PCB and IC. As an additional function, it has a function of forcibly writing data in a pin-to-pin manner. By using this function, the firmware is forcibly recorded in the memory of the mobile communication terminal and restored. However, the recovery method using JTAG equipment has a disadvantage that the procedure is very cumbersome and the equipment itself is very expensive.

상기와 같은 문제점을 해결하기 위한 본 발명은 펌웨어가 저장되는 비휘발성 메모리부를 펌웨어 영역과 임시 펌웨어 영역으로 분할하고, 펌웨어를 업그레이드 할 때 우선, 임시 펌웨어 영역으로 새로운 펌웨어를 저장한 후 다시 펌웨어 영역으로 복사하여 업그레이드 하는 방법과, 부트로더 로딩 및 시작 후 펌웨어 영역의 무결성 확인 및 복사가 완료되지 않은 펌웨어를 확인하여 오류가 발생하면 임시 펌웨어 영역에서 복사할 펌웨어의 존재여부를 확인한 후 존재하면 펌웨어 영역으로 펌웨어를 복사하고, 시스템을 재부팅시키는 손상된 펌웨어 자동 복구 방법 및 시스템을 제공하고자 하는데 그 목적이 있다.In order to solve the above problems, the present invention divides a nonvolatile memory unit in which firmware is stored into a firmware area and a temporary firmware area, and when upgrading firmware, first stores new firmware into a temporary firmware area and then returns to the firmware area. After copying and upgrading, check the integrity of the firmware area after loading and starting the boot loader, and check the firmware that has not been completed. If an error occurs, check the existence of the firmware to copy in the temporary firmware area. An object of the present invention is to provide a method and a system for automatically repairing a damaged firmware that copies a firmware and reboots the system.

상기와 같은 목적을 달성하기 위한 본 발명은 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법에 있어서, 시스템 부팅으로 부트로더가 로딩 및 시작된 후 펌웨어 영역의 무결성 확인 및 복사가 완료되지 않는 펌웨어 확인단계; 상기 펌웨어 확인단계에서 복사가 완료되지 않은 펌웨어 영역이 확인되면 임시 펌웨어 영역에서 복사되지 않은 펌웨어가 존재하는지 확인하는 단계; 상기 임시 펌웨어 영역에서 복사할 펌웨어가 존재하면 복사시킬 펌웨어를 임시 펌웨어 영역에서 펌웨어 영역으로 복사하는 제 1복사단계; 및 상기 제 1복사단계 완료 후 시스템을 재부팅시키는 단계로 이루어져 손상된 펌웨어를 자동 복구시키고,In order to achieve the above object, the present invention provides a method for automatically upgrading a firmware and automatically repairing a damaged firmware, the method comprising: checking a firmware integrity and copying of a firmware region after a boot loader is loaded and started as a system boot; If the firmware area in which the copy is not completed is identified in the firmware checking step, checking whether there is firmware that is not copied in the temporary firmware area; A first copying step of copying the firmware to be copied from the temporary firmware area to the firmware area if there is firmware to be copied in the temporary firmware area; And rebooting the system after completing the first copying step to automatically recover the damaged firmware.

상기 펌웨어 확인단계에서 오류가 발생되지 않아 펌웨어가 로딩되어 실행되고, 펌웨어 업그레이드가 필요하면 외부장치로부터 새로운 펌웨어를 업로드 받아 비휘발성 메모리부의 임시 펌웨어 영역에 저장하는 단계; 및 상기 임시 펌웨어 영 역에 저장된 새로운 펌웨어를 펌웨어 영역으로 복사하는 제 2복사단계로 이루어져 펌웨어를 업그레이드 하는 것을 특징으로 한다.Firmware is loaded and executed because no error occurs in the firmware checking step, and if firmware upgrade is required, new firmware is uploaded from an external device and stored in a temporary firmware area of the nonvolatile memory unit; And a second copying step of copying new firmware stored in the temporary firmware area into a firmware area.

본 발명에 따른 바람직한 한 특징으로는, 상기 제 1복사단계 전에는, 새로운 펌웨어가 복사될 펌웨어 영역에 대해 상기 비휘발성 메모리부의 특정영역에 시작점을 기록하는 단계와, 상기 제 1복사단계 후에는, 펌웨어의 무결성을 확인 할 수 있는 체크섬(Checksum)을 계산 한 후 복사가 완료된 펌웨어 영역에 대해 상기 비휘발성 메모리부의 특정영역에 체크섬과 함께 종료점을 기록하는 단계를 더 포함하는 것을 특징으로 한다.According to a preferred feature of the present invention, before the first copying step, writing a starting point in a specific area of the nonvolatile memory unit for a firmware area to which new firmware is to be copied, and after the first copying step, firmware And calculating an end point together with a checksum in a specific area of the nonvolatile memory unit for the copy-completed firmware area after calculating a checksum capable of confirming the integrity of the checksum.

본 발명에 따른 바람직한 다른 특징으로는, 상기 제 2복사단계 전에는, 새로운 펌웨어가 복사될 펌웨어 영역에 대해 상기 비휘발성 메모리부의 특정영역에 시작점을 기록하는 단계와, 상기 제 2복사단계 후에는, 펌웨어의 무결성을 확인 할 수 있는 체크섬(Checksum)을 계산 한 후 복사가 완료된 펌웨어 영역에 대해 상기 비휘발성 메모리부의 특정영역에 체크섬과 함께 종료점을 기록하는 단계를 더 포함하는 것을 특징으로 한다.According to another preferred aspect of the present invention, before the second copying step, writing a starting point in a specific area of the nonvolatile memory unit for a firmware area to which new firmware is to be copied, and after the second copying step, firmware And calculating an end point together with a checksum in a specific area of the nonvolatile memory unit for the copy-completed firmware area after calculating a checksum capable of confirming the integrity of the checksum.

본 발명에 따른 바람직한 또 다른 특징으로는, 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 시스템에 있어서, 시스템을 전반적으로 제어하는 제어부; 시스템을 로딩하기 위한 프로그램이 저장된 부트로더 영역과, 시스템을 운영하기 위한 운영체제(OS) 및 필수 어플리케이션(Application)들이 저장되어 있는 다수의 펌웨어 영역과, 상기 펌웨어 영역에 저장된 펌웨어를 업그레이드 또는 복구시킬 때, 원본 또는 새로운 펌웨어가 저장되어 있는 임시 펌웨어 영역을 포함하여 구성되어 있는 비휘발성 메모리부 및 상기 펌웨어 영역에 저장된 펌웨어를 상기 제어부가 복사시켜 펌웨어를 실행하기 위한 램(RAM)으로 구성된 것을 특징으로 한다.According to another preferred aspect of the present invention, there is provided a firmware upgrade and a damaged firmware automatic recovery system, comprising: a control unit for controlling the system as a whole; When upgrading or restoring a boot loader area in which a program for loading a system is stored, a plurality of firmware areas in which an operating system (OS) and essential applications for operating a system are stored, and firmware stored in the firmware area. And a nonvolatile memory unit including a temporary firmware area in which original or new firmware is stored, and a RAM for executing the firmware by copying the firmware stored in the firmware area. .

본 발명에 따른 바람직한 또 다른 특징으로는, 상기 부트로더 영역은, 다수의 펌웨어 영역에 대한 체크섬(Checksum)을 구비하고, 이를 상기 비휘발성 메모리부의 특정영역에 구비된 체크섬(Checksum)과 비교하여 펌웨어 영역의 무결성을 확인하는 것을 특징으로 한다.According to another preferred aspect of the present invention, the boot loader region includes a checksum for a plurality of firmware regions, and compares the firmware with a checksum provided in a specific region of the nonvolatile memory unit. It is characterized by checking the integrity of the area.

이하, 첨부된 도면을 참조하여 본 발명에 따른 펌웨어 업그레이드와 업그레이드 도중 손상된 펌웨어 자동 복구 시스템 및 방법에 대한 일실시예를 상세히 설명하면 다음과 같다.Hereinafter, an embodiment of a system and method for automatically recovering a damaged firmware during firmware upgrade and upgrade according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 시스템의 구성을 나타낸 구성도, 도 2는 본 발명에 따른 시스템의 메모리부 구조를 나타낸 구성도, 도 3은 본 발명에 따른 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법의 흐름을 개락적으로 나타낸 순서도, 도 4는 본 발명에 따른 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법의 흐름을 상세히 나타낸 순서도이다.1 is a block diagram showing the configuration of the system according to the present invention, Figure 2 is a block diagram showing the structure of the memory unit of the system according to the present invention, Figure 3 is a flow diagram of the firmware upgrade and damaged firmware automatic recovery method according to the present invention 4 is a flowchart schematically showing the flow of the firmware upgrade and damaged firmware automatic recovery method according to the present invention in detail.

우선, 도 1 및 도 2를 참조하면 본 발명에 따른 시스템의 구성은 임베디드 장치(100)에 있어서 시스템을 전체적으로 제어하는 제어부(중앙처리장치 ; 10)와, 펌웨어를 저장하고 있는 비휘발성 메모리부(20) 및 상기 제어부(10)의 제어를 받아 상기 메모리부에 저장된 펌웨어를 복사하여 프로그램을 동작시키는 램(RAM ; 30)으로 크게 구성된다.First, referring to FIGS. 1 and 2, the system according to the present invention includes a control unit (central processing unit) 10 that controls the system as a whole in the embedded device 100, and a nonvolatile memory unit that stores firmware. 20) and a RAM (30) which operates a program by copying firmware stored in the memory unit under the control of the controller 10.

새로 업그레이드될 펌웨어(Firmware)는 다양한 외부기기와 연결되어 펌웨어를 업로드는 받기 위한 인터페이스(40)를 통해 통신장치(Ethernet, USB)에 의한 업그레이드 또는 무선통신망을 이용한 업그레이드등 다양한 방법을 통하여 새로운 펌웨어를 업로드 받을 수 있다.The newly upgraded firmware can be connected to various external devices and upload new firmware through various methods such as an upgrade by a communication device (Ethernet, USB) or an upgrade using a wireless communication network through an interface 40 for receiving firmware upload. You can upload.

상기 비휘발성 메모리부(20)는 일반적으로 펌웨어를 저장시킬 수 있는 임베디드 시스템에서 많이 채용되는 비휘발성 메모리인 플래쉬 메모리(Flash memory)로 사용된다.The nonvolatile memory unit 20 is generally used as a flash memory, which is a nonvolatile memory that is widely used in an embedded system capable of storing firmware.

상기 비휘발성 메모리부(20)는 도 2에 도시된 바와 같이 부트로더 영역(21)과, 다수의 펌웨어 영역(22) 및 임시 펌웨어 영역(23)을 분할하여 별도로 더 구성되어 있다.As shown in FIG. 2, the nonvolatile memory unit 20 is further configured by dividing the boot loader region 21, the plurality of firmware regions 22, and the temporary firmware region 23.

임베디드 기기(100)의 시스템이 부팅되면 시스템을 로딩하기 위해 상기 부트로더 영역(21)을 통하여 시스템이 부팅되고, 또한 상기 펌웨어 영역(22)의 무결성을 확인하기 위한 체크섬(Checksum)을 구비하고 있다.When the system of the embedded device 100 is booted, the system is booted through the boot loader region 21 to load the system, and also has a checksum for checking the integrity of the firmware region 22. .

상기 펌웨어 영역(22)은 상기 임베디드 기기(100)의 기능을 동작시키기 위한 운영체제(OS)나 동작프로그램을 저장하고 있는 것으로, 다양한 각각의 기능을 동작시키기 위한 여러 펌웨어를 저장하기 위해 상기 펌웨어 영역(22)을 다수개 형성시킨다.The firmware area 22 stores an operating system (OS) or an operation program for operating a function of the embedded device 100. The firmware area 22 stores a plurality of firmware for operating various functions. A plurality of 22) is formed.

상기 임시 펌웨어 영역(23)은 펌웨어를 업그레이드 할 때 또는 펌웨어를 복수시킬 때 새로운 펌웨어를 임시적으로 저장하는 곳이다.The temporary firmware area 23 is a place for temporarily storing new firmware when upgrading firmware or plural firmware.

외부장치로부터 새로운 펌웨어를 업로드 받으면 제어부(10)는 펌웨어 실행에 사용되는 상기 펌웨어 영역(22)에 저장하지 않고, 상기 임시 펌웨어 영역(23) 우선 저장을 하였다가 상기 펌웨어 영역(22)으로 저장하게 되는 것이다.When the new firmware is uploaded from an external device, the controller 10 does not store the temporary firmware area 23 in the firmware area 22 used for executing the firmware, but stores the temporary firmware area 23 in the firmware area 22. Will be.

또한, 상기 메모리부(20)에 별도로 구성된 각각의 영역(21, 22, 23)외에 영역(이하 '특정영역')에는 상기 임시 펌웨어 영역(22)에 저장된 펌웨어를 상기 펌웨어 영역(21)으로 복사를 시작할 때나 복사를 완료할 때 복사될 실제 펌웨어 영역(22)에 대한 시작점(Start marking)과 종료점(End marking)을 기록하고, 복사가 수행된 펌웨어에 대한 체크섬(Checksum)을 계산하여 기록하게 되는 것이다.In addition to the regions 21, 22, and 23 separately configured in the memory unit 20, the region (hereinafter, the 'specific region') is copied to the firmware region 21 in the firmware stored in the temporary firmware region 22. Start marking and end marking of the actual firmware area 22 to be copied at the start of the copy or at the completion of the copy, and the checksum of the copying firmware is calculated and recorded. will be.

다음으로 본 발명에 따른 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법에 대한 동작순서를 첨부된 도면 3, 4를 참조하여 상세히 설명하면 다음과 같다.Next, the operation procedure for the firmware upgrade and the damaged firmware automatic recovery method according to the present invention will be described in detail with reference to the accompanying drawings 3 and 4 as follows.

휴대폰, MP3등과 같은 다양한 임베디드 시스템이 접목된 다양한 기기들은 각종 기능을 동작시켜주는 운영 소프트웨어인 펌웨어를 저장하고 있으며, 이 펌웨어는 필요시에 따른 업그레이드를 실시하여야 한다.Various devices incorporating various embedded systems, such as mobile phones and MP3s, store firmware, operating software that operates various functions. This firmware should be upgraded as needed.

우선 임베디드 기기(100)로 전원이 공급되면 시스템이 부팅되면서 부트로더 로딩 및 시작(S100)된다. 이때 부트로더는 각 펌웨어 영역(22)에 해당하는 체크섬(Checksum)을 구비하고 있으며, 이 체크섬을 비휘발성 메모리부(20)의 특정영역에 존재하는 체크섬과 비교하여 무결성을 확인하고, 이후 시작점과 종료점을 확인하여 복사가 되지 않은 펌웨어 영역이 있는지 확인한다(S110).First, when power is supplied to the embedded device 100, the system is booted and the boot loader is loaded and started (S100). In this case, the boot loader includes a checksum corresponding to each firmware region 22. The boot loader compares the checksum with a checksum existing in a specific region of the nonvolatile memory unit 20 to verify integrity, and then the start point and Check the end point to see if there is a firmware area that is not copied (S110).

상기 확인단계(S110)에서 복사되지 않은 펌웨어 영역이 발견되지 않으면 정상적으로 펌웨어가 로딩 및 시작(S120)되면서 펌웨어가 실행된다.If the firmware area is not found in the check step (S110), the firmware is normally loaded and started (S120) and the firmware is executed.

하지만, 상기 확인단계(S110)에서 복사되지 않은 펌웨어 영역이 존재한다면 비휘발성 메모리부(20)의 임시 펌웨어 영역(23)에 복사되지 않은 펌웨어가 존재하는지 확인하고(S130) 존재하지 않으면 시스템은 종료된다.However, if there is a firmware area that is not copied in the checking step (S110), it is checked whether there is a firmware that is not copied in the temporary firmware area 23 of the nonvolatile memory unit 20 (S130). do.

상기 임시 펌웨어 영역(20)에 복사되지 않은 펌웨어가 존재한다면 계속 기록시켜야할 펌웨어 영역(22)을 확인(S140)한 후, 비휘발성 메모리부(20)의 특정영역에 펌웨어 복사가 시작됨을 기록하는 시작점(Start marking)을 기록한다(S150).If the non-copied firmware exists in the temporary firmware area 20 (S140), the firmware area 22 to be continuously recorded is checked (S140), and the firmware copy is started in a specific area of the nonvolatile memory unit 20. Record the starting marking (Start marking) (S150).

시작점 기록이 완료되면 상기 임시 펌웨어 영역(23)에 저장된 복사되지 않은 펌웨어를 복사시킬 펌웨어 영역(22)로 제 1복사단계가 진행된다(S160).When the start point recording is completed, the first copying step proceeds to the firmware area 22 to copy the non-copied firmware stored in the temporary firmware area 23 (S160).

상기 제 1복사단계(S160)가 완료되면 계산된 체크섬과 종료점(End marking)을 상기 비휘발성 메모리부(20)의 특정영역에 저장하고(S170), 시스템을 재부팅(Rebooting)시키는 단계(S180)를 수행하여 시스템을 다시 가동시킴으로써, 손상된 펌웨어를 자동으로 복구시키게 되는 것이다.When the first copying step S160 is completed, storing the calculated checksum and end marking in a specific area of the nonvolatile memory unit 20 (S170), and rebooting the system (S180). By restarting the system, the system will automatically repair the damaged firmware.

다음은, 상기 펌웨어 영역 확인단계(S110)에서 복사되지 않은 펌웨어가 존재하지 않는다면 펌웨어가 로딩 및 시작(S120)되게 되는데, 펌웨어가 동작하게 되면 필요에 따라 펌웨어 업그레이드가 진행되는 것으로 펌웨어 업그레이드 과정에 대해 설명하면 다음과 같다.Next, if there is no firmware that is not copied in the firmware region check step (S110), the firmware is loaded and started (S120). When the firmware is operated, the firmware upgrade is performed as necessary. The explanation is as follows.

우선, 부트로더 로딩 후 펌웨어 영역의 무결성 및 복사되지 않은 펌웨어 확인결과 미복사된 펌웨어가 존재하지 않으면 펌웨어가 로딩된다.First of all, after loading the boot loader, if the integrity of the firmware area and the unchecked firmware are not found, the firmware is loaded.

펌웨어 초기화 단계(S200), 펌웨어 로딩 및 시작단계(S210)를 거쳐 펌웨어가 실행(S220)되게 되는데, 일반적인 펌웨어 업그레이드는 동작중인 어플리케이션(application) 내에서 특정 메뉴 또는 절차에 의해 시작되는 것으로, 업그레이드 할 펌웨어는 일반적으로 통신장치(Ethernet, USB), ODD와 같은 기록매체, 무선통신등 다양한 방법으로 새로운 펌웨어를 업로드 받을 수 있다.The firmware is executed through the firmware initialization step (S200), the firmware loading and starting step (S210) (S220), and the general firmware upgrade is started by a specific menu or procedure in the running application. Firmware can be uploaded with new firmware in various ways such as communication devices (Ethernet, USB), recording media such as ODD, and wireless communication.

이러한 외부장치나 통신망을 통해 새로운 펌웨어를 다운받게 되면 우선, 새로운 펌웨어는 상기 비휘발성 메모리부(20)의 임시 펌웨어 영역(23)에 저장된다. 상기 임시 펌웨어 영역(23)에 저장된 새로운 펌웨어는 상술한 과정(S150)과 동일하게 비휘발성 메모리부(20)의 특정영역에 복사가 시작될 펌웨어 영역(22)에 대한 시작점을 기록하고(S250) 상기 펌웨어 영역(22)로 펌웨어 복사를 실시하는 제 2복사단계를 진행한다(S260).When new firmware is downloaded through such an external device or a communication network, first, the new firmware is stored in the temporary firmware area 23 of the nonvolatile memory unit 20. The new firmware stored in the temporary firmware area 23 records the starting point of the firmware area 22 to start copying in a specific area of the nonvolatile memory unit 20 in the same manner as the above-described step S150 (S250). A second copy step of copying the firmware to the firmware area 22 is performed (S260).

상기 제 2복사단계(S260)가 완료되면 상기 (S170)단계와 같이 계산된 체크섬을 계산하고(S270), 계산된 체크섬과 종료점(End marking)을 상기 비휘발성 메모리부(20)의 특정영역에 저장(S280)하면 펌웨어 업그레이드가 완료되고 업그레이드된 펌웨어가 실행된다.When the second copying step S260 is completed, the checksum calculated as in step S170 is calculated (S270), and the calculated checksum and end marking are transferred to a specific region of the nonvolatile memory unit 20. In operation S280, the firmware upgrade is completed and the upgraded firmware is executed.

다시 업그레이드 할 새로운 펌웨어가 있다면 상기 (S23) 내지 (S280)의 단계를 반복적으로 수행하게 되는 것이다.If there is a new firmware to be upgraded again, the steps S23 to S280 are repeatedly performed.

이와 같이 구성되고 작용되는 본 발명은 임베디드 기기를 동작시켜 주기 위한 펌웨어를 안전적으로 업그레이드 시키거나 업그레이드 도중 펌웨어가 손상되었을 자동적으로 복구시킴에 따라 다양한 임베디드 기기의 효율성을 높일 수 있는 이 점이 있다.The present invention constructed and operated as described above has the advantage of increasing the efficiency of various embedded devices by safely upgrading firmware for operating the embedded device or automatically recovering firmware that is damaged during the upgrade.

이상, 본 발명의 원리를 예시하기 위한 바람직한 실시예와 관련하여 설명하고 도시하였지만, 본 발명은 그와 같이 도시되고 설명된 그대로의 구성 및 작용으로 한정되는 것이 아니다. While the invention has been described and illustrated in connection with a preferred embodiment for illustrating the principles of the invention, the invention is not limited to the construction and operation as shown and described.

오히려, 첨부된 청구범위의 사상 및 범주를 일탈함이 없이 본 발명에 대한 다수의 변경 및 수정이 가능함을 당업자들은 잘 이해할 수 있을 것이다. 따라서 그러한 모든 적절한 변경 및 수정과 균등물들도 본 발명의 범위에 속하는 것으로 간주되어야 할 것이다.Rather, it will be apparent to those skilled in the art that many changes and modifications to the present invention are possible without departing from the spirit and scope of the appended claims. Accordingly, all such suitable changes and modifications and equivalents should be considered to be within the scope of the present invention.

상기와 같이 구성되고 작용되는 본 발명은 임베디드 시스템의 펌웨어를 안전하게 업그레이드 할 수 있고, 펌웨어 업그레이드 실수에 기인한 제품 고장의 빈도를 줄여 결과적으로 제품의 유지 보수에 대한 효율성을 높이고 비용을 절감시킬 수 있는 이점이 있다.The present invention configured and operated as described above can safely upgrade the firmware of an embedded system, reduce the frequency of product failures caused by firmware upgrade mistakes, and consequently increase the efficiency of product maintenance and reduce costs. There is an advantage.

Claims (5)

펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법에 있어서,In the firmware upgrade and damaged firmware automatic recovery method, 시스템 부팅으로 부트로더가 로딩 및 시작된 후 펌웨어 영역의 무결성 확인 및 복사가 완료되지 않는 펌웨어 확인단계;A firmware verification step in which the integrity checking and copying of the firmware area is not completed after the boot loader is loaded and started by system booting; 상기 펌웨어 확인단계에서 복사가 완료되지 않은 펌웨어 영역이 확인되면 임시 펌웨어 영역에서 복사되지 않은 펌웨어가 존재하는지 확인하는 단계;If the firmware area in which the copy is not completed is identified in the firmware checking step, checking whether there is firmware that is not copied in the temporary firmware area; 상기 임시 펌웨어 영역에서 복사할 펌웨어가 존재하면 복사시킬 펌웨어를 임시 펌웨어 영역에서 펌웨어 영역으로 복사하는 제 1복사단계; 및A first copying step of copying the firmware to be copied from the temporary firmware area to the firmware area if there is firmware to be copied in the temporary firmware area; And 상기 제 1복사단계 완료 후 시스템을 재부팅시키는 단계로 이루어져 손상된 펌웨어를 자동 복구시키고,Rebooting the system after the completion of the first copy step consists of automatically recovering the damaged firmware, 상기 펌웨어 확인단계에서 오류가 발생되지 않아 펌웨어가 로딩되어 실행되고, 펌웨어 업그레이드가 필요하면 외부장치로부터 새로운 펌웨어를 업로드 받아 비휘발성 메모리부의 임시 펌웨어 영역에 저장하는 단계; 및Firmware is loaded and executed because no error occurs in the firmware checking step, and if firmware upgrade is required, new firmware is uploaded from an external device and stored in a temporary firmware area of the nonvolatile memory unit; And 상기 임시 펌웨어 영역에 저장된 새로운 펌웨어를 펌웨어 영역으로 복사하는 제 2복사단계로 이루어져 펌웨어를 업그레이드 하는 것을 특징으로 하는 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법.And a second copying step of copying the new firmware stored in the temporary firmware area to the firmware area to upgrade the firmware. 제 1항에 있어서, 상기 제 1복사단계 전에는,The method of claim 1, wherein before the first copying step, 새로운 펌웨어가 복사될 펌웨어 영역에 대해 상기 비휘발성 메모리부의 특정 영역에 시작점을 기록하는 단계와,Recording a starting point in a specific area of the nonvolatile memory unit for a firmware area to which new firmware is to be copied; 상기 제 1복사단계 후에는, 펌웨어의 무결성을 확인 할 수 있는 체크섬(Checksum)을 계산 한 후 복사가 완료된 펌웨어 영역에 대해 상기 비휘발성 메모리부의 특정영역에 체크섬과 함께 종료점을 기록하는 단계를 더 포함하는 것을 특징으로 하는 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법.After the first copying step, the method further includes calculating a checksum for checking the integrity of the firmware and writing an end point together with a checksum in a specific area of the non-volatile memory unit for the copied firmware area. The firmware upgrade and damaged firmware automatic recovery method characterized in that. 제 1항에 있어서, 상기 제 2복사단계 전에는,The method of claim 1, wherein before the second copying step, 새로운 펌웨어가 복사될 펌웨어 영역에 대해 상기 비휘발성 메모리부의 특정영역에 시작점을 기록하는 단계와,Recording a starting point in a specific area of the nonvolatile memory unit for a firmware area to which new firmware is to be copied; 상기 제 2복사단계 후에는, 펌웨어의 무결성을 확인 할 수 있는 체크섬(Checksum)을 계산 한 후 복사가 완료된 펌웨어 영역에 대해 상기 비휘발성 메모리부의 특정영역에 체크섬과 함께 종료점을 기록하는 단계를 더 포함하는 것을 특징으로 하는 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 방법.After the second copying step, the method further includes calculating a checksum for checking the integrity of the firmware and writing an end point together with a checksum in a specific area of the nonvolatile memory unit for the copyed firmware area. The firmware upgrade and damaged firmware automatic recovery method characterized in that. 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 시스템에 있어서,In the firmware upgrade and damaged firmware automatic recovery system, 시스템을 전반적으로 제어하는 제어부;A controller for overall control of the system; 시스템을 로딩하기 위한 프로그램이 저장된 부트로더 영역과, 시스템을 운영하기 위한 운영체제(OS) 및 필수 어플리케이션(Application)들이 저장되어 있는 다수의 펌웨어 영역과, 상기 펌웨어 영역에 저장된 펌웨어를 업그레이드 또는 복구시킬 때, 원본 또는 새로운 펌웨어가 저장되어 있는 임시 펌웨어 영역을 포함하여 구 성되어 있는 비휘발성 메모리부; 및When upgrading or restoring a boot loader area in which a program for loading a system is stored, a plurality of firmware areas in which an operating system (OS) and essential applications for operating a system are stored, and firmware stored in the firmware area. A nonvolatile memory unit including a temporary firmware area in which original or new firmware is stored; And 상기 펌웨어 영역에 저장된 펌웨어를 상기 제어부가 복사시켜 펌웨어를 실행하기 위한 램(RAM)으로 구성된 것을 특징으로 하는 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 시스템.Firmware upgraded and damaged firmware automatic recovery system, characterized in that configured to the RAM (RAM) for executing the firmware by copying the firmware stored in the firmware area. 제 4항에 있어서, 상기 부트로더 영역은,The method of claim 4, wherein the boot loader region, 다수의 펌웨어 영역에 대한 체크섬(Checksum)을 구비하고, 이를 상기 비휘발성 메모리부의 특정영역에 구비된 체크섬(Checksum)과 비교하여 펌웨어 영역의 무결성을 확인하는 것을 특징으로 하는 펌웨어 업그레이드와 손상된 펌웨어 자동 복구 시스템.A firmware upgrade and a damaged firmware automatic recovery comprising checksums for a plurality of firmware regions and comparing the checksums with a checksum provided in a specific region of the nonvolatile memory unit to check the integrity of the firmware region. system.
KR1020060087919A 2006-09-12 2006-09-12 The method of firmware upgrade and automatic firmware recovery system KR20080023841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060087919A KR20080023841A (en) 2006-09-12 2006-09-12 The method of firmware upgrade and automatic firmware recovery system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060087919A KR20080023841A (en) 2006-09-12 2006-09-12 The method of firmware upgrade and automatic firmware recovery system

Publications (1)

Publication Number Publication Date
KR20080023841A true KR20080023841A (en) 2008-03-17

Family

ID=39412401

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060087919A KR20080023841A (en) 2006-09-12 2006-09-12 The method of firmware upgrade and automatic firmware recovery system

Country Status (1)

Country Link
KR (1) KR20080023841A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101457086B1 (en) * 2012-11-30 2014-11-12 한국전자통신연구원 Apparatus for integrity verification of firmware of embedded system and method thereof
US9015459B2 (en) 2011-08-10 2015-04-21 Samsung Electronics Co., Ltd. Method of initializing operation of a memory system
KR20150078644A (en) * 2013-12-31 2015-07-08 에릭슨엘지엔터프라이즈 주식회사 Method and apparatus for duplexing of software image
WO2017075852A1 (en) * 2015-11-05 2017-05-11 邦彦技术股份有限公司 Method and system for protecting working program of mcu
US9826335B2 (en) 2008-01-18 2017-11-21 Interdigital Patent Holdings, Inc. Method and apparatus for enabling machine to machine communication
US9924366B2 (en) 2009-03-06 2018-03-20 Interdigital Patent Holdings, Inc. Platform validation and management of wireless devices
CN111324497A (en) * 2020-02-20 2020-06-23 杭州涂鸦信息技术有限公司 Linux system partition self-checking method and system
CN111367541A (en) * 2018-12-25 2020-07-03 北京兆易创新科技股份有限公司 eMMC and eMMC upgrading method
CN113127252A (en) * 2021-05-14 2021-07-16 江苏华存电子科技有限公司 Intelligent firmware repairing method in memory device
US11526363B2 (en) 2019-07-04 2022-12-13 Samsung Electronics Co., Ltd. Electronic apparatus and control method thereof

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9826335B2 (en) 2008-01-18 2017-11-21 Interdigital Patent Holdings, Inc. Method and apparatus for enabling machine to machine communication
US9924366B2 (en) 2009-03-06 2018-03-20 Interdigital Patent Holdings, Inc. Platform validation and management of wireless devices
US9015459B2 (en) 2011-08-10 2015-04-21 Samsung Electronics Co., Ltd. Method of initializing operation of a memory system
KR101457086B1 (en) * 2012-11-30 2014-11-12 한국전자통신연구원 Apparatus for integrity verification of firmware of embedded system and method thereof
US9021609B2 (en) 2012-11-30 2015-04-28 Electronics And Telecommunications Research Institute Apparatus and method for verifying integrity of firmware of embedded system
KR20150078644A (en) * 2013-12-31 2015-07-08 에릭슨엘지엔터프라이즈 주식회사 Method and apparatus for duplexing of software image
WO2017075852A1 (en) * 2015-11-05 2017-05-11 邦彦技术股份有限公司 Method and system for protecting working program of mcu
CN111367541A (en) * 2018-12-25 2020-07-03 北京兆易创新科技股份有限公司 eMMC and eMMC upgrading method
US11526363B2 (en) 2019-07-04 2022-12-13 Samsung Electronics Co., Ltd. Electronic apparatus and control method thereof
CN111324497A (en) * 2020-02-20 2020-06-23 杭州涂鸦信息技术有限公司 Linux system partition self-checking method and system
CN111324497B (en) * 2020-02-20 2023-10-27 杭州涂鸦信息技术有限公司 Partition self-checking method and system for linux system
CN113127252A (en) * 2021-05-14 2021-07-16 江苏华存电子科技有限公司 Intelligent firmware repairing method in memory device

Similar Documents

Publication Publication Date Title
KR20080023841A (en) The method of firmware upgrade and automatic firmware recovery system
US8539471B2 (en) Updating firmware of an electronic device
CN101281469B (en) Embedded type system and start-up load application method
US8136108B2 (en) Updating firmware with multiple processors
CN104572206A (en) Application program self updating and backup recovery method
CN110333891A (en) The method of enhanced OTA upgrading based on Internet of Things
CN103299276A (en) Software updating process for an embedded device
CN106775610B (en) Electronic equipment starting method and electronic equipment
KR100952585B1 (en) Method and system for automatic recovery of an embedded operating system
CN113254048B (en) Method, device and equipment for updating boot program and computer readable medium
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN112015447B (en) System updating method and device of electronic equipment, electronic equipment and storage medium
CN106775874B (en) System upgrading method of terminal equipment
CN110908722B (en) Method and device applied to starting of operating system, electronic equipment and storage medium
KR100832269B1 (en) Program update method and system for wireless communication terminal
WO2021012170A1 (en) Firmware booting method and device, and computer-readable storage medium
JP2005284902A (en) Terminal device, control method and control program thereof, host device, control method and control program thereof, and method, system, and program for remote updating
CN114995852A (en) Equipment upgrading method, equipment and computer readable storage medium
KR101415761B1 (en) Apparatus and method for performing data backup in portable terminal
JP3632572B2 (en) Electronic switch control device
WO2020043361A1 (en) Installing application program code on a vehicle control system
KR100591813B1 (en) Mobile phone had a function of recovery for the firmware download errors and Recovering method for the firmware download errors of a mobile phone
CN112395130A (en) System backup method and device
JP2974311B1 (en) Wireless base station device
KR100588199B1 (en) Method for recovering download mode in program download fail state of portable terminal, and portable terminal employing it

Legal Events

Date Code Title Description
A201 Request for examination
N231 Notification of change of applicant
E902 Notification of reason for refusal
E601 Decision to refuse application
J201 Request for trial against refusal decision
J501 Disposition of invalidation of trial