CN1877550A - Method for implementing real-time hot-plug of USB memory under TV embedded Linux system - Google Patents
Method for implementing real-time hot-plug of USB memory under TV embedded Linux system Download PDFInfo
- Publication number
- CN1877550A CN1877550A CN 200610032841 CN200610032841A CN1877550A CN 1877550 A CN1877550 A CN 1877550A CN 200610032841 CN200610032841 CN 200610032841 CN 200610032841 A CN200610032841 A CN 200610032841A CN 1877550 A CN1877550 A CN 1877550A
- Authority
- CN
- China
- Prior art keywords
- memory device
- usb memory
- subregion
- carry
- situation
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention relates to a method for realizing hot plugging of USB storage device in the television embedded Linux system. The inventive method is characterized in that it can create a protection process between the core program and the application program to make the application program be aware of the connection status of the USB storage devices, and can perform partition automatic load or unload according to the plugging or unplugging status of the USB storage devices. The method has the advantages of being simple and having rapid response.
Description
Technical field
The present invention relates to the embedded OS field, especially relate to a kind of hot-swappable method of USB memory device of under the TV set embedded Linux system, carrying out in real time.
Background technology
Adopt the product of USB interface when it is worked, not carry out plug, particularly USB is moved storage device, may damage data wherein, just can reuse after generally having only format.In addition can not be at short notice frequent plug flash memory disk because after product was inserted USB interface, system needed certain hour, just can be reacted, and it be pulled up at once, then probably causes system mistake.
For embedded Linux system, this problem is especially outstanding.In built-in Linux, kernel and equipment support have all been deleted many; And in built-in Linux, do not have the complete hot-swappable and carry mechanism of a cover at the USB memory device.Set up such cover mechanism, can in kernel, make amendment, but it is bigger to revise technical difficulty like this, and can not guarantees kernel integrity.
Summary of the invention
The object of the present invention is to provide a kind of hot-swappable method of USB memory device of under the TV set embedded Linux system, carrying out in real time.
The objective of the invention is to be realized by following technical scheme: the USB memory device is realized hot-swappable method in real time under this TV set embedded Linux system, its improvements are to create a finger daemon between kernel program and application layer program, make the application layer program understand the connection situation of USB memory device in real time, this method comprises:
When finger daemon finds that the USB memory device inserts, check whether be memory device;
If check USB memory device subregion situation;
According to subregion situation carry subregion;
After carry is finished, send successfully letter to the application layer program;
When finger daemon found that the good USB memory device of carry is extracted, the information that gives a warning was given the application layer program;
Carry out the subregion unloading according to the USB memory device situation of extracting.
The USB memory device is realized hot-swappable method in real time under the above-mentioned TV set embedded Linux system, described finger daemon be independent of control terminal and periodically carry out certain task or etc. pending some event; Its monitoring point can be/ digital document under the proc/scsi/usb-storage catalogue, and concrete monitoring periods is set at a second level.
The USB memory device is realized hot-swappable method in real time under the above-mentioned TV set embedded Linux system, when carrying out the carry subregion according to the subregion situation, adopts the hanging method that writes synchronously.
It is hot-swappable to carry out the USB memory device in real time by this method under the TV set embedded Linux system, and the situation of loss of data can not occur.This method is simple and practical, do not destroy kernel integrity, and response speed is fast.Owing to do not revise kernel, safeguard that debugging cost reduces greatly.Simultaneously, improved the real-time of Linux.
Description of drawings
Fig. 1 is a method flow diagram of the present invention.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail:
See also shown in Figure 1, the present invention carries out the hot-swappable method of USB memory device in real time on TV set embedded Linux be to utilize finger daemon in the built-in Linux (Daemon) to monitor the plug situation of USB memory device, and feed back to the program of application layer, control the carry and the unloading of USB memory device by the application layer program, thereby realize real-time hot-swappable method.
At first create the finger daemon (Daemon) of a Linux, allow it constantly monitor plug situation of USB device.Finger daemon (Daemon) is a kind of special processing that operates in the backstage.It is independent of control terminal and periodically carry out certain task or etc. pending some event.Can its monitoring point be/proc/scsi/usb-storage-? digital document under the catalogue, concrete monitoring periods can be looked the application complexity and decide, and is set at a second level here.
When finger daemon finds to have USB device to insert, will check whether be memory device, if, the subregion situation of checkout facility then.Simultaneously, carry out the carry subregion according to the situation of subregion.After carry is finished, send a piece of news to other the program of application layer, so that other program is handled.When carrying out the carry subregion according to the subregion situation, this method has adopted the hanging method of " writing synchronously ", makes it write cache invalidation.Do some performances of meeting reduction like this, still, because USB memory device speed is fast, and buffer memory is still effective when reading, so its performance reduction is not obvious, but can significantly promote its stability, extracts the reliability that equal energy assurance writes in power down suddenly, ablation process.
When the finger daemon good USB device of finding that carry is arranged was extracted, the information that can give a warning was immediately given the program of application layer, and deletes mount point from system.Because adopt synchronous writing mode during carry, unexpected not extracting can bring any harm to system.
Claims (3)
1, the USB memory device is realized hot-swappable method in real time under a kind of TV set embedded Linux system, it is characterized in that between kernel program and application layer program, creating a finger daemon, make the application layer program understand the connection situation of USB memory device in real time, this method comprises:
When finger daemon finds that the USB memory device inserts, check whether be memory device;
If check USB memory device subregion situation;
According to subregion situation carry subregion;
After carry is finished, send into function signal to the application layer program;
When finger daemon found that the good USB memory device of carry is extracted, the information that gives a warning was given the application layer program;
Carry out the subregion unloading according to the USB memory device situation of extracting.
2, the USB memory device is realized hot-swappable method in real time under a kind of TV set embedded Linux according to claim 1 system, it is characterized in that described finger daemon be independent of control terminal and periodically carry out certain task or etc. pending some event; Its monitoring point can be/ digital document under the proc/scsi/usb-storage catalogue, and concrete monitoring periods is set at a second level.
3, the USB memory device is realized hot-swappable method in real time under a kind of TV set embedded Linux according to claim 1 system, when it is characterized in that carrying out the carry subregion according to the subregion situation, adopts the hanging method that writes synchronously.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100328416A CN100481040C (en) | 2006-01-13 | 2006-01-13 | Method for implementing real-time hot-plug of USB memory under TV embedded Linux system |
HK07103716.0A HK1096176A1 (en) | 2006-01-13 | 2007-04-10 | A real-time plug in/out method of a usb device in an embedded linux system of a television |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100328416A CN100481040C (en) | 2006-01-13 | 2006-01-13 | Method for implementing real-time hot-plug of USB memory under TV embedded Linux system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1877550A true CN1877550A (en) | 2006-12-13 |
CN100481040C CN100481040C (en) | 2009-04-22 |
Family
ID=37509991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006100328416A Expired - Fee Related CN100481040C (en) | 2006-01-13 | 2006-01-13 | Method for implementing real-time hot-plug of USB memory under TV embedded Linux system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN100481040C (en) |
HK (1) | HK1096176A1 (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101790052A (en) * | 2010-03-16 | 2010-07-28 | 青岛海信电器股份有限公司 | Method for realizing television USB Widget and television |
CN101847101A (en) * | 2009-03-24 | 2010-09-29 | Tcl集团股份有限公司 | Method for automatically mounting USB storage device under embedded Linux |
WO2011032453A1 (en) * | 2009-09-16 | 2011-03-24 | 研祥智能科技股份有限公司 | Compact peripheral component interconnection(cpci) hot swap system |
US7970974B2 (en) | 2007-11-29 | 2011-06-28 | International Business Machines Corporation | Method and system for adding or removing a logical unit of a USB mass storage device |
CN102411554A (en) * | 2011-08-09 | 2012-04-11 | Tcl集团股份有限公司 | Hot-plugging method, apparatus and terminal device for USB (universal serial bus) storage devices |
CN102455981A (en) * | 2010-10-19 | 2012-05-16 | 康佳集团股份有限公司 | Hot-plug implementation method of universal serial bus (USB) equipment based on Qt/embedded (QTE) environment |
CN102866964A (en) * | 2012-09-18 | 2013-01-09 | 北京奇虎科技有限公司 | Method and device for protecting data on storage equipment |
CN103530124A (en) * | 2013-10-18 | 2014-01-22 | 中安消技术有限公司 | Method and device for sharing hot plug device in Linux system |
CN104461489A (en) * | 2013-09-22 | 2015-03-25 | 安一恒通(北京)科技有限公司 | Method and device for quickly popping up removable device and user device |
CN104700048A (en) * | 2012-09-18 | 2015-06-10 | 北京奇虎科技有限公司 | Method and device for protecting data on storage equipment |
CN104734979A (en) * | 2015-04-07 | 2015-06-24 | 北京极科极客科技有限公司 | Control method for storage device externally connected with router |
CN105589657A (en) * | 2014-10-23 | 2016-05-18 | 中兴通讯股份有限公司 | Method and device for realizing mounting of mobile storage |
CN106598798A (en) * | 2016-12-19 | 2017-04-26 | 四川长虹电器股份有限公司 | Method of Android intelligent device to detect USB device |
CN107831534A (en) * | 2017-12-15 | 2018-03-23 | 合肥国为电子有限公司 | Untethered memory-type seismic detector data acquisition device and method based on USB flash disk interaction |
-
2006
- 2006-01-13 CN CNB2006100328416A patent/CN100481040C/en not_active Expired - Fee Related
-
2007
- 2007-04-10 HK HK07103716.0A patent/HK1096176A1/en not_active IP Right Cessation
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7970974B2 (en) | 2007-11-29 | 2011-06-28 | International Business Machines Corporation | Method and system for adding or removing a logical unit of a USB mass storage device |
CN101847101A (en) * | 2009-03-24 | 2010-09-29 | Tcl集团股份有限公司 | Method for automatically mounting USB storage device under embedded Linux |
WO2011032453A1 (en) * | 2009-09-16 | 2011-03-24 | 研祥智能科技股份有限公司 | Compact peripheral component interconnection(cpci) hot swap system |
CN101790052A (en) * | 2010-03-16 | 2010-07-28 | 青岛海信电器股份有限公司 | Method for realizing television USB Widget and television |
CN102455981A (en) * | 2010-10-19 | 2012-05-16 | 康佳集团股份有限公司 | Hot-plug implementation method of universal serial bus (USB) equipment based on Qt/embedded (QTE) environment |
CN102411554A (en) * | 2011-08-09 | 2012-04-11 | Tcl集团股份有限公司 | Hot-plugging method, apparatus and terminal device for USB (universal serial bus) storage devices |
CN102411554B (en) * | 2011-08-09 | 2015-04-29 | Tcl集团股份有限公司 | Hot-plugging method, apparatus and terminal device for USB (universal serial bus) storage devices |
CN104700048A (en) * | 2012-09-18 | 2015-06-10 | 北京奇虎科技有限公司 | Method and device for protecting data on storage equipment |
CN102866964A (en) * | 2012-09-18 | 2013-01-09 | 北京奇虎科技有限公司 | Method and device for protecting data on storage equipment |
CN104700048B (en) * | 2012-09-18 | 2018-03-16 | 北京奇虎科技有限公司 | The method and device of data in a kind of protection storage device |
CN102866964B (en) * | 2012-09-18 | 2015-06-03 | 北京奇虎科技有限公司 | Method and device for protecting data on storage equipment |
CN104461489A (en) * | 2013-09-22 | 2015-03-25 | 安一恒通(北京)科技有限公司 | Method and device for quickly popping up removable device and user device |
CN103530124B (en) * | 2013-10-18 | 2017-01-25 | 中安消技术有限公司 | Method and device for sharing hot plug device in Linux system |
CN103530124A (en) * | 2013-10-18 | 2014-01-22 | 中安消技术有限公司 | Method and device for sharing hot plug device in Linux system |
CN105589657A (en) * | 2014-10-23 | 2016-05-18 | 中兴通讯股份有限公司 | Method and device for realizing mounting of mobile storage |
CN104734979A (en) * | 2015-04-07 | 2015-06-24 | 北京极科极客科技有限公司 | Control method for storage device externally connected with router |
CN106598798A (en) * | 2016-12-19 | 2017-04-26 | 四川长虹电器股份有限公司 | Method of Android intelligent device to detect USB device |
CN106598798B (en) * | 2016-12-19 | 2019-11-19 | 四川长虹电器股份有限公司 | The method of Android intelligent equipment detection USB device |
CN107831534A (en) * | 2017-12-15 | 2018-03-23 | 合肥国为电子有限公司 | Untethered memory-type seismic detector data acquisition device and method based on USB flash disk interaction |
Also Published As
Publication number | Publication date |
---|---|
HK1096176A1 (en) | 2007-05-25 |
CN100481040C (en) | 2009-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100481040C (en) | Method for implementing real-time hot-plug of USB memory under TV embedded Linux system | |
CN101354715B (en) | For system, the method and computer program product of operating data processing system | |
US8380678B2 (en) | Tracking files which have been processed by a backup or a restore operation | |
CN101627373A (en) | Memory device performance enhancement through pre-erase mechanism | |
CN102541475A (en) | Data storage method and data storage device | |
CN104838365A (en) | Methods and systems for provisioning bootable image on to external drive | |
US8266371B2 (en) | Non-volatile storage device, host device, non-volatile storage system, data recording method, and program | |
CN103761165A (en) | Log backup method and log backup device | |
CN102819442A (en) | Method and system for programming programs into embedded equipment program | |
CN109800181B (en) | Disk-based data writing method, data writing device and terminal equipment | |
CN103034592A (en) | Data processing method and device | |
WO2020077534A1 (en) | Disk management method, disk management apparatus, and electronic device | |
CN1873632A (en) | Identification system and method for hot plug peripheral unit | |
CN203260027U (en) | Backup device and data backup system | |
CN114579055A (en) | Disk storage method, device, equipment and medium | |
CN103617053A (en) | Method and device for upgrading software | |
CN102722430B (en) | Method and device for detecting hot plug of secure digital card | |
CN111475334A (en) | TiDB database maintenance method and device, computer equipment and storage medium | |
CN104239245A (en) | Electronic system and operating method | |
US6907506B2 (en) | Security device for a mass storage | |
US7231643B1 (en) | Image rescue system including direct communication between an application program and a device driver | |
CN102023906B (en) | Microprocessor of portable terminal as well as portable terminal and repair method thereof | |
CN103064762A (en) | Method and device for recovering deleted backup data | |
CN108062281B (en) | Method for solving disconnection of data copying between mass storage device and PC terminal | |
CN101436153A (en) | Method and apparatus for restoring solid storage hard disk data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1096176 Country of ref document: HK |
|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: GR Ref document number: 1096176 Country of ref document: HK |
|
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090422 Termination date: 20160113 |
|
CF01 | Termination of patent right due to non-payment of annual fee |