CN101344854A - Method for upgrading embedded type Linux equipment through SD card - Google Patents

Method for upgrading embedded type Linux equipment through SD card Download PDF

Info

Publication number
CN101344854A
CN101344854A CNA200810304146XA CN200810304146A CN101344854A CN 101344854 A CN101344854 A CN 101344854A CN A200810304146X A CNA200810304146X A CN A200810304146XA CN 200810304146 A CN200810304146 A CN 200810304146A CN 101344854 A CN101344854 A CN 101344854A
Authority
CN
China
Prior art keywords
card
refresh routine
linux
equipment
upgrading
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CNA200810304146XA
Other languages
Chinese (zh)
Other versions
CN101344854B (en
Inventor
周晓
程远兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN200810304146XA priority Critical patent/CN101344854B/en
Publication of CN101344854A publication Critical patent/CN101344854A/en
Application granted granted Critical
Publication of CN101344854B publication Critical patent/CN101344854B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to an embedded equipment technology, which solves the shortcoming that software upgrade of embedded Linux handhold mobile terminal units needs an external RS232 serial debugging interface, and provides a method for upgrading embedded Linux devices through SD cards. The technical proposal is summarized as: the method for upgrading the embedded Linux device through the SD card is characterized by comprising the following procedures: a. getting a renewal instruction by cross compilation and saving the instruction into the SD card, which is used as the root file system for device startup; b. establishing a root file renewal list on the SD card and renewing the source program module; c. inserting the SD card into the device and starting renewal program through special operations; d. beginning upgrade; and e. ending upgrade. The technology of the invention can perform simple, rapid and safe software upgrade of embedded Linux devices through SD cards and be applied to embedded Linux handhold mobile terminal units based on MTD division.

Description

The method of embedded type Linux equipment being upgraded by the SD card
Technical field
The present invention relates to embedded device technology, particularly the embedded type Linux equipment technology of upgrading.
Background technology
In computing machine Embedded Application technical field, linux kernel relies on its outstanding performance and the route of increasing income, make increasing based on the embedded hand-held mobile terminal equipment of Linux, and in this type of embedded product R﹠D process, the real-time upgrading that how to adopt reliable and easy method to carry out system software and application software is a very crucial and important link, this direct relation the life cycle of product, maintenance cost, all many-sides such as perfect in shape and function and after sale service, at present based on adopting the serial ports environment to debug and software upgrading in the embedded product R﹠D process of Linux usually, so need the external RS232 serial debugging interface of product, the finished product model machine does not then often have this type of serial debugging interface, in the existing embedded type Linux equipment system based on MTD (Memory TechnologyDevices) subregion, generally comprise YAMON, linux kernel, the several modules of root file system, application program leaves in the root file system, wherein YAMON and linux kernel are arranged in NOR-Flash, must use flash_eraseall and flashcp order for the renewal of these two, root file system then can be placed on the Nandflash.
Summary of the invention
Technical matters to be solved by this invention, above-mentionedly to need the shortcoming of an external RS232 serial debugging interface in order solving exactly, a kind of method of embedded type Linux equipment being upgraded by SD card (Secure DigitalMemory Card) to be provided based on the embedded hand-held mobile terminal equipment software upgrading of Linux.
The present invention solves its technical matters, and the technical scheme of employing is that the method by the SD card is upgraded to embedded type Linux equipment is characterized in that, may further comprise the steps:
A. in local operation system environments with the GCC instrument of increasing income that meets this embedded type Linux equipment framework, the cross compile kit mtd-utils that increases income, obtain the MTD subregion update command of flash_eraseall these two Linux of flashcp, and be stored on the SD card that can be used as the device start root file system;
B. on the SD card, create the program module that the root file upgrades tabulation and conduct renewal source;
C. the equipment that the SD card inserted also starts refresh routine by the specific operation of terminal touch-screen, and specific operation is meant the upgrading triggering mode of determining on stream that passes through touch screen operation;
D. upgrade according to refresh routine;
E. upgrading is finished;
Further, the described refresh routine of step c comprises the refresh routine in the device product hardware and the refresh routine of SD card;
Concrete, step b is described to be created the tutorial message of refresh routine and comprises the renewal tutorial message of establishment application program or linux kernel or root file system or YAMON start-up routine and the program module that the source is upgraded in conduct thereof as the program module of upgrading the source on the SD card;
Further again, steps d may further comprise the steps:
D1. refresh routine is judged more new model according to the tabulation of the renewal on the SD card, then enter the f1 step if only need to upgrade application program, if need renewal kernel or YAMON then to enter the g1 step, if the MTD subregion content that needs to revise with a reading mode carry then enters the h1 step;
F1. the refresh routine standard killall order of calling linux stops the execution of current application program;
F2. refresh routine calls the cp order the new application copy on the SD card is arrived suitable position;
F3. refresh routine is created the primary application program after a new process operation is upgraded again, and enters the e step;
G1. refresh routine uses flash_eraseall on the SD card and flashcp order the new kernel file on the SD card or new YAMON file to be covered the MTD subregion of to the NOR-Flash linux kernel or YAMON file correspondence;
G2. restart system and enter the e step;
H1. refresh routine calls the renewal of the YAMON and the kernel of flash_eraseall on the SD card and flashcp order carrying out equipment;
H2. refresh routine ad-hoc location on the SD card is created the lastest imformation sign when restarting, and calls the reboot order and restart system;
H3. be after root file system is restarted with the SD card at equipment, refresh routine on the SD card partly can be according to the lastest imformation sign on the SD card, the MTD subregion that uses mount-o ro parameter command to carry out carry when normal the use is carried out the carry of mount-o rw parameter, and corresponding contents is wherein upgraded;
Refresh routine in h4.SD card part is called flash_eraseall and flashcp order YAMON and the linux kernel setting when device systems is returned to normal the execution once more;
H5. refresh routine calls reboot order once more and restarts the device systems after having finished all and upgrading and enter the e step.
The invention has the beneficial effects as follows, by above step can so that support the SD card and based on the MTD subregion based on the embedded hand-held mobile terminal equipment of Linux under the prerequisite that does not need external RS232 serial debugging interface, can stick into simple, quick, the safe software upgrading of row by SD, need not artificial control in the escalation process.
Description of drawings
Fig. 1 is the system flowchart of embodiment.
Embodiment
Below in conjunction with drawings and Examples, describe technical scheme of the present invention in detail.
The invention provides a kind of by the method for SD card to upgrading based on the built-in Linux hand-held mobile terminal equipment of MTD subregion, at first in local operation system environments with the GCC instrument of increasing income that meets this embedded type Linux equipment framework, the cross compile kit mtd-utils that increases income, obtain the MTD subregion update command of flash_eraseall these two Linux of flashcp, and be stored on the SD card that can be used as the device start root file system, on the SD card, create the tutorial message of refresh routine and the program module that the source is upgraded in conduct again, upgrade with SD card insertion equipment and by the specific operation startup refresh routine of terminal touch-screen at last.
Embodiment
It is a kind of by the method for SD card to upgrading based on the built-in Linux hand-held mobile terminal equipment of MTD subregion that this example provides, the automatic safe that comprises numerous software modules such as application program or linux kernel or root file system or YAMON start-up routine upgrades upgrading, its system flowchart such as Fig. 1.
At first, for built-in Linux hand-held mobile terminal equipment, refresh routine is made up of the refresh routine two parts in refresh routine in the hardware of device product and the SD card, trigger and start by consulting determined upgrading triggering mode with the Application developer on stream by touch screen operation, on a SD card that has enough spaces, create the Linux root file system of equipment then with linux ext3 file system format, thereby make this SD card successful guidance system to start, download flash_eraseall.c and the flashcp.c code of increasing income then, in local operation system environments with the GCC instrument of increasing income that meets this embedded type Linux equipment framework, the cross compile kit mtd-utils that increases income, obtain the MTD subregion update command of flash_eraseall these two Linux of flashcp, and it is copied on the SD card, for safe and reliable when using SD to stick into capable software upgrading, avoiding being not intended to operation causes refresh routine to be triggered, need in the SD Cavan part system that upgrading is used, reserve specific flag information, even this SD card becomes the special-purpose SD card of upgrading, need on the SD card, create the module list and the flag information that need carry out software upgrading simultaneously, in the normal operation of device systems, insert this SD card then, and by the refresh routine in the upgrading triggering mode startup hardware of touch screen operation, refresh routine at first judges by the update module in SD card tabulation whether system needs to upgrade YAMON and restart as root file system with the SD card, if have only primary application program in the update module on the SD card tabulation then do not need restart facility, the standard killall that refresh routine at first calls linux orders the execution that stops current application program, call again cp order with the new application copy on the SD card to suitable position, the primary application program created again after a new process operation is upgraded of refresh routine can allow equipment recover in the short time normally to move at the utmost point then; If comprise linux kernel or YAMON in the tabulation of the update module on the SD card, refresh routine directly uses flash_eraseall on the SD card and flashcp order that the MTD subregion that the new kernel file on the SD card or new YAMON file cover to the NOR-Flash linux kernel or YAMON correspondence is got final product, and its form is as follows:
flash_eraseall/dev/mtdX,flashcp?new_file/dev/mtdX;
Because linux kernel memory-resident always just after system start-up, so kernel needs restarting systems after upgrading, and YAMON also only can come into force after restarting system after being updated as the module of Bootstrap Loading root file system; When revising the content in the MTD subregion that is carried out carry with a reading mode if desired, then need in the SD card, at first deposit the YAMON program of SD card of using as boot, and the mmc direct compilation advances the kernel program of kernel, after the refresh routine in the hardware is triggered, it at first calls the renewal of the YAMON and the kernel of flash_eraseall on the SD card and flashcp order carrying out equipment, making can be with the SD card as root file system when system restarts, and has a linux kernel that mmc directly enrolls, refresh routine ad-hoc location on the SD card is created the lastest imformation sign when restarting subsequently, call the reboot order then and restart system, at equipment is after root file system is restarted with the SD card, refresh routine on the SD card partly can be according to the lastest imformation sign on the SD card, the MTD subregion that uses mount-o ro parameter command to carry out carry is carried out the carry of mount-o rw parameter when normally using, and corresponding contents wherein upgraded, refresh routine after finishing in SD card part can call flash_eraseall and flashcp order YAMON and the linux kernel setting when device systems is returned to normal the execution once more, and the final updating program is called the reboot order once more and restarted device systems after having finished all and upgrading.
In the SD card that begins to locate at first to guarantee inserting of refresh routine operation, have flash_eraseall and flashcp order simultaneously, and use flash_eraseall successively to occur in pairs in the whole process with flashcp, before carrying out the flash_erseall erase command, must guarantee to have on the SD card program module that the source is upgraded in up-to-date conduct earlier, for the program module mistake that prevents to upgrade the source and invalid, need use the test order of Linux to check to the timeliness of the program module of upgrading the source, in order to prevent that flash_eraseall and flashcp order from also existing at the normal root file system of equipment, the situation of avoiding can't carrying out the flashcp order again after having carried out the flash_eraseall order and causing system crash to recover automatically, refresh routine should use the absolute path of these two orders on the SD card when using these two orders.

Claims (4)

1. the method for embedded type Linux equipment being upgraded by the SD card is characterized in that, may further comprise the steps:
A. in local operation system environments with the GCC instrument of increasing income that meets this embedded type Linux equipment framework, the cross compile kit mtd-utils that increases income, obtain the MTD subregion update command of these two Linux of a flash eraseall flashcp, and be stored on the SD card that can be used as the device start root file system;
B. on the SD card, create the program module that the root file upgrades tabulation and conduct renewal source;
C. the equipment that the SD card inserted also starts refresh routine by the specific operation of terminal touch-screen, and specific operation is meant the upgrading triggering mode of determining on stream that passes through touch screen operation;
D. upgrade according to refresh routine;
E. upgrading is finished.
2. according to the described method of embedded type Linux equipment being upgraded of claim 1, it is characterized in that the described refresh routine of step c comprises the refresh routine in the device product hardware and the refresh routine of SD card by the SD card.
3. according to the described method of embedded type Linux equipment being upgraded of claim 1 by the SD card, it is characterized in that step b is described to be created the tutorial message of refresh routine and comprise the renewal tutorial message of establishment application program or linux kernel or root file system or YAMON start-up routine and the program module that the source is upgraded in conduct thereof as the program module of upgrading the source on the SD card.
4. according to claim 1,2 or 3 described methods of embedded type Linux equipment being upgraded, it is characterized in that steps d may further comprise the steps by the SD card:
D1. refresh routine is judged more new model according to the tabulation of the renewal on the SD card, then enter the f1 step if only need to upgrade application program, if need renewal kernel or YAMON then to enter the g1 step, if the MTD subregion content that needs to revise with a reading mode carry then enters the h1 step;
F1. the refresh routine standard killall order of calling linux stops the execution of current application program;
F2. refresh routine calls the cp order the new application copy on the SD card is arrived suitable position;
F3. refresh routine is created the primary application program after a new process operation is upgraded again, and enters the e step;
G1. refresh routine uses flash_eraseall on the SD card and flashcp order the new kernel file on the SD card or new YAMON file to be covered the MTD subregion of to the NOR-Flash linux kernel or YAMON file correspondence;
G2. restart system and enter the e step;
H1. refresh routine calls the renewal of the YAMON and the kernel of flash_eraseall on the SD card and flashcp order carrying out equipment;
H2. refresh routine ad-hoc location on the SD card is created the lastest imformation sign when restarting, and calls the reboot order and restart system;
H3. be after root file system is restarted with the SD card at equipment, refresh routine on the SD card partly can be according to the lastest imformation sign on the SD card, the MTD subregion that uses mount-o ro parameter command to carry out carry when normal the use is carried out the carry of mount-o rw parameter, and corresponding contents is wherein upgraded;
Refresh routine in h4.SD card part is called flash_eraseall and flashcp order YAMON and the linux kernel setting when device systems is returned to normal the execution once more;
H5. refresh routine calls reboot order once more and restarts the device systems after having finished all and upgrading and enter the e step.
CN200810304146XA 2008-08-22 2008-08-22 Method for upgrading embedded type Linux equipment through SD card Expired - Fee Related CN101344854B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810304146XA CN101344854B (en) 2008-08-22 2008-08-22 Method for upgrading embedded type Linux equipment through SD card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810304146XA CN101344854B (en) 2008-08-22 2008-08-22 Method for upgrading embedded type Linux equipment through SD card

Publications (2)

Publication Number Publication Date
CN101344854A true CN101344854A (en) 2009-01-14
CN101344854B CN101344854B (en) 2011-01-19

Family

ID=40246864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810304146XA Expired - Fee Related CN101344854B (en) 2008-08-22 2008-08-22 Method for upgrading embedded type Linux equipment through SD card

Country Status (1)

Country Link
CN (1) CN101344854B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101694621A (en) * 2009-10-22 2010-04-14 中兴通讯股份有限公司 Method for updating software of mobile terminal and mobile terminal
CN101986269A (en) * 2010-10-22 2011-03-16 福建鑫诺通讯技术有限公司 Method for implementing machine refreshing through network under Android platform
CN102043652A (en) * 2010-12-08 2011-05-04 苏州捷泰科信息技术有限公司 Processing system and method for embedded device root file system
CN102520981A (en) * 2011-11-24 2012-06-27 深圳市路畅科技有限公司 Production method of INAND/NAND-based multi-partition storage device
CN102629206A (en) * 2012-02-29 2012-08-08 深圳市赛格导航科技股份有限公司 Embedded system software upgrading method and system
CN102937907A (en) * 2012-11-05 2013-02-20 无敌科技(西安)有限公司 Method for utilizing secure digital (SD) card to perform licensed software installation and update
CN105468425A (en) * 2016-01-07 2016-04-06 云南民族大学 Manufacturing method of embedded Linux operating system starting SD card
CN106293916A (en) * 2016-08-09 2017-01-04 中国地质大学(武汉) A kind of camera for multinuclear embedded platform drives implantation method and system
CN103853496B (en) * 2012-11-28 2017-02-22 华为技术有限公司 Method and device for hooking various devices in same memory technology device partition
US9804832B2 (en) 2013-06-08 2017-10-31 Huawei Device Co., Ltd Method, apparatus, and communication device for updating firmware
CN107707467A (en) * 2017-10-23 2018-02-16 华东交通大学 Intelligent gateway device and its firmware upgrade method based on SD card upgrading
CN108572836A (en) * 2018-06-01 2018-09-25 珠海格力电器股份有限公司 Based on Embedded update method and device
CN109213510A (en) * 2018-09-21 2019-01-15 深圳市鼎阳科技有限公司 A kind of application program updating method and storage medium for embedded device
CN112799698A (en) * 2021-01-14 2021-05-14 陕西建工安装集团(河南)有限公司 SD card based automatic upgrading method under U-boot
CN112947979A (en) * 2021-04-07 2021-06-11 上海商米科技集团股份有限公司 Firmware patch loading mode of IPC equipment based on overlayFS

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103777982B (en) * 2014-01-15 2016-09-21 宇龙计算机通信科技(深圳)有限公司 Open root authority updates method and the mobile terminal thereof of system

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101694621A (en) * 2009-10-22 2010-04-14 中兴通讯股份有限公司 Method for updating software of mobile terminal and mobile terminal
CN101694621B (en) * 2009-10-22 2015-12-16 中兴通讯股份有限公司 A kind of method of update mobile terminal software and mobile terminal
CN101986269A (en) * 2010-10-22 2011-03-16 福建鑫诺通讯技术有限公司 Method for implementing machine refreshing through network under Android platform
CN102043652B (en) * 2010-12-08 2014-04-30 苏州捷泰科信息技术有限公司 Processing system and method for embedded device root file system
CN102043652A (en) * 2010-12-08 2011-05-04 苏州捷泰科信息技术有限公司 Processing system and method for embedded device root file system
CN102520981A (en) * 2011-11-24 2012-06-27 深圳市路畅科技有限公司 Production method of INAND/NAND-based multi-partition storage device
CN102629206A (en) * 2012-02-29 2012-08-08 深圳市赛格导航科技股份有限公司 Embedded system software upgrading method and system
CN102629206B (en) * 2012-02-29 2018-02-06 深圳市赛格导航科技股份有限公司 A kind of method for updating embedded system software and system
CN102937907A (en) * 2012-11-05 2013-02-20 无敌科技(西安)有限公司 Method for utilizing secure digital (SD) card to perform licensed software installation and update
CN102937907B (en) * 2012-11-05 2016-05-11 无敌科技(西安)有限公司 Utilize SD card to authorize software to install and upgrade the method using
CN103853496B (en) * 2012-11-28 2017-02-22 华为技术有限公司 Method and device for hooking various devices in same memory technology device partition
US9804832B2 (en) 2013-06-08 2017-10-31 Huawei Device Co., Ltd Method, apparatus, and communication device for updating firmware
CN105468425A (en) * 2016-01-07 2016-04-06 云南民族大学 Manufacturing method of embedded Linux operating system starting SD card
CN105468425B (en) * 2016-01-07 2018-10-23 云南民族大学 The production method that a kind of built-in Linux operating system starts SD card
CN106293916A (en) * 2016-08-09 2017-01-04 中国地质大学(武汉) A kind of camera for multinuclear embedded platform drives implantation method and system
CN107707467A (en) * 2017-10-23 2018-02-16 华东交通大学 Intelligent gateway device and its firmware upgrade method based on SD card upgrading
CN108572836A (en) * 2018-06-01 2018-09-25 珠海格力电器股份有限公司 Based on Embedded update method and device
CN109213510A (en) * 2018-09-21 2019-01-15 深圳市鼎阳科技有限公司 A kind of application program updating method and storage medium for embedded device
CN112799698A (en) * 2021-01-14 2021-05-14 陕西建工安装集团(河南)有限公司 SD card based automatic upgrading method under U-boot
CN112947979A (en) * 2021-04-07 2021-06-11 上海商米科技集团股份有限公司 Firmware patch loading mode of IPC equipment based on overlayFS
CN112947979B (en) * 2021-04-07 2024-04-02 上海商米科技集团股份有限公司 Firmware patch loading mode of IPC (IPC) equipment based on overlay FS (fs)

Also Published As

Publication number Publication date
CN101344854B (en) 2011-01-19

Similar Documents

Publication Publication Date Title
CN101344854B (en) Method for upgrading embedded type Linux equipment through SD card
CN101826027A (en) Embedded system and updating method thereof
CN102902556A (en) Multistage boot load method of embedded equipment
CN109933348A (en) The update method and device of Bootloader in a kind of electronic control unit
CN104123153A (en) Apparatus and method for firmware upgrade using USB
CN104360877A (en) ECU (electronic control unit) firmware updating method based on Bootloader self update
CN106020861A (en) FOTA upgrading method and system for smart watch
CN103761088A (en) Multiple operation system switching method applicable to ARM (advanced risc machine) framework mobile equipment
CN103577201A (en) Embedded dual system updating method and system
WO2012071852A1 (en) Method and apparatus for upgrading bootstrap program
EP3879399A1 (en) Method and apparatus for upgrading vehicle-mounted tbox, device, and storage medium
CN105739961A (en) Starting method and device of embedded system
CN108170480A (en) A kind of startup method based on u-boot guiding μ C/OS operating systems
CN113821235A (en) Operating system data updating method, operating system data updating apparatus, storage medium, and program product
CN102609290B (en) The method for upgrading software of electronic product
CN103092659A (en) Digital signal processor (DSP) software upgrading system and upgrading method separated from support environment of emulator
CN103997684A (en) Method and device for updating operating system
CN103853557A (en) Method for starting WinCE by utilizing Uboot network
CN111782246A (en) Embedded program upgrading method of multi-node equipment based on bus
CN105468420B (en) Operating system update method and apparatus
CN106528114A (en) Android firmware application, android firmware and firmware upgrading method
CN114996717A (en) Upgrade program design method for preventing error erasure
CN110659052B (en) Method and system for updating system software in network equipment and readable storage medium
CN101727333A (en) Method for updating firmware in microprocessor and firmware updating system
CN102460386B (en) For the method and apparatus of load document during bootup process

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110119

Termination date: 20210822

CF01 Termination of patent right due to non-payment of annual fee