CN102314364B - Method for automatically adapting to mobile terminal - Google Patents

Method for automatically adapting to mobile terminal Download PDF

Info

Publication number
CN102314364B
CN102314364B CN201110225832.XA CN201110225832A CN102314364B CN 102314364 B CN102314364 B CN 102314364B CN 201110225832 A CN201110225832 A CN 201110225832A CN 102314364 B CN102314364 B CN 102314364B
Authority
CN
China
Prior art keywords
file
parameter
register
mobile terminal
uuid
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.)
Expired - Fee Related
Application number
CN201110225832.XA
Other languages
Chinese (zh)
Other versions
CN102314364A (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.)
BEIJING MOBILEXP TECHNOLOGY Co Ltd
Original Assignee
BEIJING MOBILEXP TECHNOLOGY 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 BEIJING MOBILEXP TECHNOLOGY Co Ltd filed Critical BEIJING MOBILEXP TECHNOLOGY Co Ltd
Priority to CN201110225832.XA priority Critical patent/CN102314364B/en
Publication of CN102314364A publication Critical patent/CN102314364A/en
Application granted granted Critical
Publication of CN102314364B publication Critical patent/CN102314364B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for automatically adapting to a mobile terminal. The method comprises the following steps of: setting software change caused by user requirement change or hardware configuration change according to a microprocessor chip and an embedded operating system selected for the mobile terminal; forming a series of parameters and various parameter files, wherein the parameter files are independent of image files of the embedded operating system in the mobile terminal; and matching the image files with different parameter files to automatically adapt to software change caused by specific user requirement change or specific hardware configuration change, wherein the parameter files are independent of the publishing and/or updating of the image files, and the image files are not required to be updated when the software change occurs. The method contributes to further increasing the product research and development efficiencies, shortening the product research and development periods and better publishing products more quickly.

Description

A kind of method of automatic adaptation mobile terminal
Technical field
The present invention relates to the research and development of products technology of mobile terminal, for example, integrated and version issue of the bottom layer driving of mobile terminal, system loads, product etc., a kind of particularly method of automatic adaptation mobile terminal.The method of described automatic adaptation mobile terminal is by carrying out assembly by the image file of embedded OS in mobile terminal from the different Parameter File that is independent of this image file, change to adapt to different hardware configuration or user's request the software change bringing, thereby further improve research and development of products efficiency, shorten the research and development of products cycle, sooner, release product better.
Background technology
Under current embedded technology, a mobile terminal tends to adopt one to have SOC (system on a chip) (SOC, System On a Chip) microprocessor chip of technology, the SOC (system on a chip) of this chip has comprised more than one embedded type CPU/digital signal processor (DSP), clock circuit, timer, interruptable controller, serial-parallel interface, various peripheral control unit, I/O port are comprised, comprise mimic channel used in ADC, DAC, PLL and some high speed circuits, comprised the storeies such as volatile, non-volatile and Cache.Certainly, indispensablely a series of registers that can programme to chip are provided.Based on such microprocessor chip, can articulate various peripheral hardwares if display screen, touch-screen, camera, bluetooth, GPS, WiFi etc. are to realize various functions.On such mobile terminal, the final control of hardware device is all summed up as to the configuration to the register on microprocessor chip.
Embedded OS generally has the feature that kernel is little, specificity strong, system is simplified, real-time is high, and has certain customizability.The software systems of mobile terminal tend to adopt certain embedded OS, then complete the amendment of bottom layer driving based on specific hardware design, and according to user's demand, operating system are carried out to customization to a certain degree, and more integrated upper layer application.
In the performance history of mobile terminal, development company tends to based on certain selected microprocessor chip and certain selected embedded OS, and by collocation different peripheral and application, a series of different products are released in conversion configuration design.Like this, once grasp the technology of certain soft and hardware architecture combined, just can reduce the R&D cycle of subsequent product, release fast series of products.And in current informationized society, user's changes in demand is very frequently.The lifting of hardware technology makes the peripheral hardware chip of a lot of different manufacturers can accomplish the replacement of pin to pin, and hardware becomes and seems simply, and the response that user's request is changed has been embodied in software aspect more.
Under this development mode, traditional way is to focus on the modular design of code, adopts macro definition in code, strengthens the possibility of code reuse as far as possible.In the time that hardware design or user's request change, according to changing amendment code, generate new image (Image) file, issue new version.The problem that this traditional way is brought is: some changes has just brought local code to change, but will regenerate new image (Image) file, again filling.Just as we all know, the image of most embedded OSs (Image) file is all larger, in the time generating new image (Image) file, all will take a long time; Most mobile terminals also can be more loaded down with trivial details consuming time in the time carrying out complete image (Image) document upgrading.Therefore this traditional method has limited development efficiency, also makes version issue complicated.
Summary of the invention
The present invention is directed to the defect or the deficiency that in prior art, exist, a kind of method of automatic adaptation mobile terminal is provided.The method of described automatic adaptation mobile terminal is by carrying out assembly by the image file of embedded OS in mobile terminal from the different Parameter File that is independent of this image file, change to adapt to different hardware configuration or user's request the software change bringing, thereby further improve research and development of products efficiency, shorten the research and development of products cycle, sooner, release product better.
Technical scheme of the present invention is as follows:
A kind of method of automatic adaptation mobile terminal, it is characterized in that, according to being the selected microprocessor chip of mobile terminal and selected embedded OS, set user's request variation or hardware configuration and change the software change bringing, and form series of parameters and various Parameter File, described Parameter File is independent of the image file of embedded OS in mobile terminal, carry out assembly by described image file and different Parameter Files and change with the specific user's request variation of automatic adaptation or specific hardware configuration the software change being brought, described Parameter File is independent of described image file and issues and/or upgrade, when described software change occurs without upgrading described image file.
Described Parameter File comprises register parameters file, decision condition Parameter File, systems parameters document and/or customised regions configuration file and application.
Described Parameter File refers to register parameters file, comprise the following steps based on register parameters file configuration register: A. is provided by addressing and the functional characteristic of the register that described microprocessor chip provides, the information that need to provide when certain register of abstracting operating; B. analyze the operation to register in driver, sum up in the point that it is one group of register manipulation for a certain function; C. analyze according to A, B, consider the speed of retrieval simultaneously, abstract definition goes out applicable data structure, and the form of Parameter File; D. compiling generation, burning and the load mode of defined parameters file, and relevant software support is provided; E., a software module is provided, is responsible for analytic parameter file content and is also converted into concrete register manipulation, and provide configuration register unified interface for calling of other software module; The register manipulation that F. may need variation in extraction procedure, is converted to based on register parameters file and is configured, thereby reaches the configuration that just can revise register by amendment register parameters file.
Described Parameter File refers to decision condition Parameter File, comprises the following steps: the data layout of decision condition, the form of defined parameters file are expressed in A. definition based on decision condition Parameter File configuration decision condition; B. compiling generation, burning and the load mode of defined parameters file relevant software support is provided; C., a software module is provided, is responsible for analytic parameter file content and is converted into the discernible condition of general judgement statement, and configure decision condition unified interface for calling of other software module provides; D. extract and may need the decision condition of dynamically changing and be converted to based on decision condition Parameter File to judge, just can revise decision condition thereby reach by amendment decision condition Parameter File.
Described Parameter File refers to systems parameters document, starts the configuration file relying on and comprises the following steps: A. analyzes the feature of the configuration file of os starting dependence used, the Parameter File form that definition adapts with it based on systems parameters document amendment system; B. compiling generation, burning and the load mode of defined parameters file relevant software support is provided; C. the feature of analytic system start-up course, determines that renewal system starts the suitable opportunity of configuration file, and systematic parameter parsing module is provided, and is responsible for analytic parameter file content and is updated in configuration file; D. extract and may need the CONFIG.SYS content integration of amendment to Parameter File, just can revise system performance thereby reach by amendment systems parameters document.
Described Parameter File refers to customised regions configuration file and application, application based on customised regions configuration file and application choice installation appointment comprises the following steps: A. marks a region as customised regions on the storage medium of mobile terminal, for storing the installation kit of required application, specify with a configuration file application that needs installation simultaneously; This customised regions is invisible to user, and content wherein can be independent of image file and upgrade; B. in system, be equipped with a customised regions configuration file installation procedure, in system starting process, this program can load automatically, the application of specifying is installed according to the configuration file of customised regions, and only in uninstalled situation, installs.
The workflow of described configuration register unified interface comprises: 1. splitting suction parameter dwOperationID is module I D:ModuleID and register manipulation ID:RegOpID; 2. obtained the reference position of DRIVER_REG_TABLE tables of data by the region of memory of presetting; 3. locate in DRIVER_REG_TABLE tables of data by ModulID, obtain corresponding with it REGOP_TABLE tables of data reference position; 4. locate in REGOP_TABLE tables of data by RegOpID, obtain the reference position of corresponding with it REGCONFIG_TABLE tables of data; 5. read one by one every content of REGCONFIG_TABLE tables of data, carry out concrete operation according to the combinations of definitions of dwOperation and dwOperationConfig.
The workflow of described configuration decision condition unified interface comprises: (1) in the reference position of default region of memory, the quantity n of reading character string; (2) in that index entry, adopt dichotomy to retrieve successively its character string pointed, find the character string that call parameters provides; (3), if found, return to TRUE, otherwise return to FALSE.
The workflow of described systematic parameter parsing module comprises: step 1, from system registry, read the UUID_Last recording while renewal last time, and after upgrading system registry according to systems parameters document, corresponding UUID can be saved in registration table at every turn; Step 2, has judged whether UUID_Last, if can obtain a UUID value from registration table, thinks that UUID_Last exists, and can directly jump to step 7; Otherwise think that UUID_Last does not exist, continue execution step 3; Step 3, by the reference position of the region of memory acquisition system parameter table of presetting, system parameter table will be loaded into the region of memory that is allocated in advance it in bootloader, by corresponding pointer, just can read corresponding content; Step 4, content in reading system parameter list, be updated to one by one in the registration table of system, read foregoing <RegInfo> ... content in </RegInfo> label, the registry operations function then providing by operating system is updated in system registry; Step 5, is recorded to UUID the registration table of system, upgrading after system registry success, finally UUID corresponding system parameter table is also recorded in registration table, is used for identification renewal success, and as the foundation that judges whether next time again to upgrade; Step 6, preserves registration table to storage medium, and the flush operation of call operation system, forces system registry to be saved in storage medium, so that follow-up use; Step 7, restarts system, and the soft reboot interface of call operation system allows system restart according to the registration table after upgrading, and after startup, can re-execute step 11 above, finally carries out step 112; Step 8, by the reference position of the region of memory acquisition system parameter table of presetting, system parameter table will be loaded into the region of memory that is allocated in advance it in bootloader, by corresponding pointer, just can read corresponding content, identical with step 3; Step 9 reads its corresponding UUID from system parameter table; Step 10, judges that whether UUID_Last is consistent with UUID, directly compares the value of UUID_Last and UUID, if consistent, represent that current systematic parameter has been successfully updated in current system registry, system can continue normal operation, jumps to step 12; If inconsistent, represent to have used another part of systematic parameter in system registry, current systematic parameter is not also updated in registration table, continues to carry out step 11 below; Step 11, starts factory reset, restarts system, because system can only be determined to adding in current registration table or the content of amendment, can not determine and needs the content of deleting.So call the interface of factory reset, another part of systematic parameter removed completely.This can restart by initiating system, after startup, can re-execute step 1 above, upgrades operation, then carries out step 7; Step 12, finishes the operation of this module, and system is carried out conventional start-up course.
The workflow of described customised regions configuration file installation procedure comprises: (A) detect end mark file is installed, if existed, represent this time to start without application is installed directly termination routine, enter the normal use of system, otherwise order execution step (B); (B) read customised regions configuration file, read successively corresponding cab bag in customised regions according to the cab APMB package name of wherein listing, and the cab bag installation procedure that calling system provides attaches it to user area; (C) after installation, create in user area end mark file is installed; (D) restart system.
Technique effect of the present invention is as follows:
The present invention has provided a kind of method of automatic adaptation mobile terminal, hardware design or user's request are changed to the software change that may bring refines and concludes, abstract is series of parameters, be independent of image (Image) file distribution with the form of Parameter File, realized same set of image (Image) file be equipped with different Parameter Files can the different hardware product of simultaneous adaptation.The method comprises four large ingredients: based on register parameters file configuration register, based on decision condition Parameter File configuration decision condition, start the configuration file relying on based on systems parameters document amendment system, select to install the application of specifying based on customised regions configuration file.The present invention is directed to definition and the realization of type, formal definition, compiling generation, burning, loading and parsing that every part all provided relevant parameter file.The method providing based on the present invention, can realize that only some Parameter Files just can cover most hardware design and user's request changes the software change bringing by revising, thereby further improve research and development of products efficiency, shorten the research and development of products cycle, sooner, release product better.
Brief description of the drawings
Fig. 1 is the operational flowchart of systematic parameter parsing module.
Embodiment
The present invention relates to the technical fields such as the integrated and version issue of bottom layer driving, system loads, the product of mobile terminal.The inventive method changes by hardware design or user's request the software change that may bring and refines and conclude, abstract is series of parameters, be independent of image (Image) file distribution with the form of Parameter File, realized same set of image (Image) file be equipped with different Parameter Files can the different hardware product of simultaneous adaptation.Specifically comprise type, formal definition, compiling generation, burning, loading and the analysis mode etc. of Parameter File.
For the mobile terminal based on certain selected microprocessor chip and certain selected embedded OS, analysis user demand and hardware design change the software change bringing, and can be summarized as following several main aspects:
Need to revise the configuration of some register;
Need to revise some Rule of judgment, and this condition is to obtain from the status information of peripheral hardware chip, result that neither dynamic calculation, but some predetermined conditions (such as, whether need the reset that powers on, whether user needs a certain function etc.);
Need to use another driver: although be sometimes similar chip, difference as own in fruit chip is large, just has larger difference in driver realization, be not easy to realize in same driver, need the realization of different driver;
To optionally remove or add some function items that operating system carries;
Increase or remove some upper layer application: these application refer to default be with application when product is issued, not comprising the follow-up freely fitted application of user.
For above-mentioned change, the present invention has defined following several method, can in the time that above-mentioned change occurs, need not regenerate new image (Image) file, and revises and upgrade simple and convenient.
1. analyze addressing, the functional characteristic of the register that microprocessor system used provides based on register parameters file configuration register: A., the information that need to provide when certain register of abstracting operating; B. analyze the operation to register in driver, substantially can sum up in the point that it is one group of register manipulation for a certain function; C. the feature of analyzing according to A, B, the speed of consideration retrieval simultaneously, abstract definition goes out applicable data structure, and the form of Parameter File; D. compiling generation, burning, the load mode of defined parameters file, and relevant software support is provided; E., a software module is provided, is responsible for analytic parameter file content and is also converted into concrete register manipulation, and provide unified interface for calling of other software module; The register manipulation that F. may need variation in extraction procedure, is converted to based on register parameters file and is configured, and finally reaches the configuration that just can revise register by amendment register parameters file.
2. based on decision condition Parameter File configuration decision condition; A. the data layout of decision condition, the form of defined parameters file are expressed in definition; B. compiling generation, burning, the load mode of defined parameters file relevant software support is provided; C., a software module is provided, is responsible for analytic parameter file content and is also converted into the discernible condition of general judgement statement, and provide unified interface for calling of other software module; D. extract and may need the decision condition of dynamically changing and be converted to based on decision condition Parameter File to judge, finally reach by amendment decision condition Parameter File and just can revise decision condition.
3. start the feature that the configuration file of dependence: A. analyzes the configuration file of os starting dependence used based on systems parameters document amendment system, the Parameter File form that definition adapts with it; B. compiling generation, burning, the load mode of defined parameters file relevant software support is provided; C. the feature of analytic system start-up course, determines that renewal system starts the suitable opportunity of configuration file, and a software module is provided, and is responsible for analytic parameter file content and is updated in configuration file; D. extract and may need the CONFIG.SYS content integration of amendment to Parameter File, finally reach by amendment systems parameters document and just can revise system performance.
4. select the application of specifying is installed based on customised regions configuration file: A. marks a region as customised regions on the storage medium of mobile terminal, for storing the installation kit of required application, specify with a configuration file application that need to install simultaneously; This customised regions is invisible to user, and content wherein can be independent of image (Image) file update; B. in system, be equipped with a program, in system starting process, this program can load automatically, the application of specifying is installed according to the configuration file of customised regions, and only in uninstalled situation, installs.
The above method providing by realizing the present invention, in the exploitation of series of products, just can accomplish: only by revising, some Parameter Files just can cover most hardware design and user's request changes the software change bringing, thereby further improve research and development of products efficiency, shorten the research and development of products cycle, sooner, release product better.
A method for automatic adaptation mobile terminal, is characterized in that, comprises following four chief components:
Based on register parameters file configuration register;
Based on decision condition Parameter File configuration decision condition;
Start the configuration file relying on based on systems parameters document amendment system;
Select to install the application of specifying based on customised regions configuration file.
Described Parameter File (comprising register parameters file, decision condition Parameter File, systems parameters document and customised regions configuration file and application) all can be independent of image (Image) file distribution and renewal.
Described based on register parameters file configuration register, it is characterized in that, several ingredients are below further comprised: the data structure of register parameters file is abstract, source file definition, file destination definition, according to the Compilation Method of source file generating object file, file destination is burnt to the method for mobile terminal non-volatile memory medium presumptive area, register parameters on non-volatile memory medium is loaded into the method for default memory field, resolves and use the method for the register parameters of memory field.
Described register parameters file data structure abstract is the abstract of addressing based on register manipulation, functional characteristic, and its operation can expand to the operation of non-direct control register, with the characteristic of the tables of data that makes full use of; These operations are divided into groups by functional characteristic, distinguish to operate ID; Consider the requirement of location fast, and possible user is classified, take out module I D; Module I D is since 0 continuous programming code unique, and under some module I D, operation ID is since 0 continuous programming code unique.
The source file of described register parameters file and file destination, its content is made up of multistage tables of data that can consecutive retrieval, can be directly targeted to the position of the next stage tables of data being retrieved by module I D and operation ID.
The method of the register parameters of described parsing and use memory field, by providing operation-interface to call to make parameter to work to other module.
Described based on decision condition Parameter File configuration decision condition, it is characterized in that, several ingredients are below further comprised: the data abstraction of decision condition Parameter File, source file definition, file destination definition, according to the Compilation Method of source file generating object file, file destination is burnt to the method for mobile terminal non-volatile memory medium presumptive area, decision condition parameter on non-volatile memory medium is loaded into the method for default memory field, resolves and use the method for the decision condition parameter of memory field.
Whether the data abstraction of described decision condition Parameter File is character string, be present in parameter list and represent that whether its corresponding condition is as true taking character string.
The file destination definition of described decision condition Parameter File, its content is character string and the key thereof through sequence, the retrieval while being beneficial to resolve.
The method of the decision condition parameter of described parsing and use memory field, by providing operation-interface to call to make parameter to work to other module.
The described configuration file relying on that starts based on systems parameters document amendment system, it is characterized in that, several ingredients are below further comprised: the source file definition of systematic parameter, file destination definition, according to the Compilation Method of source file generating object file, file destination is burnt to the method for mobile terminal non-volatile memory medium presumptive area, the systematic parameter on non-volatile memory medium is loaded into the method for default memory field, resolve and use the method for the systematic parameter of memory field.
The source file of described systematic parameter and file destination definition, the feature of the operating system that its form and content should be used in conjunction with mobile terminal, starts according to system the configuration file relying on and considers.For Windows Mobile system, its content, taking registry entry as main, in conjunction with some versions and facility information, comprises the UUID of this systems parameters document version of mark.
The method of the systematic parameter of described parsing and use memory field, is systematic parameter to be updated to system start the configuration file relying on, and is finally to work by the configuration file of system.Whether only start for the first time in system or UUID upgrades while change, upgrade or no need to again renewal by identifying for No. UUID of record.
Described application of selecting to install appointment based on customised regions configuration file, it is characterized in that, several ingredients are below further comprised: the definition of customised regions configuration file, wait to select the document definition of the application of installing, file destination is burnt to the method for mobile terminal non-volatile memory medium presumptive area, resolve and use the method for customised regions configuration file, the installation method of application.
The described document definition of waiting to select the application of installing, the feature of the operating system that should use in conjunction with mobile terminal, if system provides the support to certain installation file form, can directly be used.For Windows Mobile system, provide with cab file layout.
The configuration file definition of described customised regions, its content is the filename list that needs the application of installing.
The described method that file destination is burnt to mobile terminal non-volatile memory medium presumptive area, the feature of the operating system that should use in conjunction with mobile terminal is determined; For Windows Mobile system, its storage area meets the requirement of the file system that operating system provides, and can directly access in file operation mode, is conducive to the application installation procedure that use system provides; In the ULDR system providing at Windows Mobile when burning, directly complete by file copy.
Introduce specific embodiment of the invention scheme below, in conjunction with specific embodiments the present invention is further elaborated.This specific embodiment is applicable to the microprocessor system based on ARM CPU and the Windows Mobile operating system of Samsung.
Four kinds of methods that the present embodiment is set forth for the present invention, are divided into four modules and specifically implement.
Module one, based on register parameters file configuration register
For the feature of register manipulation and the efficiency of data retrieval, the embodiment of this module has defined three data structures:
Wherein REGCONFIG_TABLE is the Data Structures relevant to register manipulation, and REGOP_TABLE is for class of operation and data retrieval, and DRIVER_REG_TABLE is mainly for data retrieval.Detailed description refers to form below:
From retrieval angle, all parameter distribution are three large tables of data: DRIVER_REG_TABLE tables of data, and after loading by Parameter File, core position, place can directly be located; Then the module I D importing into by operation-interface can index corresponding pRegOpTable, can navigate to concrete REGOP_TABLE tables of data; Can index navigate to again the REGCONFIG_TABLE tables of data of final use by operation ID.In order directly to carry out index by ID, it is tactic according to module I D requiring the data item in DRIVER_REG_TABLE tables of data, and the data item in REGOP_TABLE tables of data is tactic according to operation ID.
Based on these three data structures, just can define the source file of the register parameters of the present embodiment: the form with header file exists, content is a series of constant tables of data.Authoring tool software generates the object format of Parameter File so easily.
The file destination of the register parameters of the present embodiment is a binary data file, comprises file header, content of parameter and CRC check code, and file header is the demand that coordinates burning program, and CRC is for transfer check.File layout is as shown in the table:
The content in the data Data district of register parameters file is made up of three parts: DRIVER_REG_TABLE tables of data, REGOP_TABLE tables of data and REGCONFIG_TABLE tables of data.
The burning of register parameters file completes in the burning pattern of bootloader, can upgrade separately.Need to plan in advance a storage area, concrete position can be compiled in the ROM_START_BLOCK of file header.
The loading of register parameters also completes in bootloader start-up course, and be more early better the opportunity of loading, because these parameters also will be used in bootloader, early can use, and the configurable dirigibility of product is just higher.Register parameters is loaded into the region of memory of planning in advance, just can directly have access to these parameters like this for the software module of Parameter analysis of electrochemical.
Based on above-described basis, the embodiment of register parameters parsing module is as follows:
A main operation-interface is externally only provided:
BOOL?DRIVERREGOperation(DWORD?dwOperationID,PDWORD?pDynValue)
DwOperationID: the same with the dwRegOperationID implication of describing in data structure table above;
PDynValue: pointer variable, at READ, WREAD, BYREAD, GETVALUE, points to the variable for receiving return data in READTABLE operation; In other operation, and REG_DYN_VALUE is when designated, is used for importing into dynamic data.
The operating process concrete steps of this interface are described as follows:
1. splitting suction parameter dwOperationID is module I D:ModuleID and register manipulation ID:RegOpID;
2. obtained the reference position of DRIVER_REG_TABLE tables of data by the region of memory of presetting;
3. locate in DRIVER_REG_TABLE tables of data by ModulID, obtain corresponding with it REGOP_TABLE tables of data reference position;
4. locate in REGOP_TABLE tables of data by RegOpID, obtain the reference position of corresponding with it REGCONFIG_TABLE tables of data;
5. read one by one every content of REGCONFIG_TABLE tables of data, carry out concrete operation according to the combinations of definitions of dwOperation and dwOperationConfig.
Module two, based on decision condition Parameter File configuration decision condition
Whether first, the present embodiment is wanted the decision statement in routine analyzer code, in the time that comparison condition is constant, finds no matter be what situation, can be rewritten as certain variable for really expressing, and is evolved into a variable name by condition.As:
if(x>0)→if(xbigthan0),if(x==3)→if(xequalto3)
This is applicable to the present invention very much needs situation to be processed, expresses predetermined demand by Parameter File.
Based on so abstract, the present embodiment selects to adopt character string to express decision condition, and corresponding character string exists expression condition to meet, otherwise sufficient condition with thumb down.
The source file of the present embodiment definition decision condition parameter is .bat autoexec, and it is exactly setxxx=1 that a condition is set, and removing a condition is exactly set xxx=, with routine, an environmental variance is set in full accord.Such source file format is easy to editor, and also authoring tool software generates the object format of Parameter File easily.For further simplifying writing of tool software, the present embodiment requires the identical prefix that has of xxx, such as MBP_xxx, and the ranking function to environmental variance that so just can directly utilize desktop operating system to provide.
The form of the file destination of the present embodiment definition decision condition parameter is consistent with the form of described module one, the data content in Data district is made up of two parts: Part I is index information, be 4 bytes character string total quantity n+ four-byte character string 1 reference position+...+four-byte character string n reference position; Part II is character string information, is all 1 the string variables that are set to through sequence of having removed prefix, and the end mark (0x00) with character string between character string is cut apart.Parameter analysis module can facilitate to such an extent that use dichotomy by index area in processing parameter like this, carries out easily character string comparison operation.
The burning of decision condition Parameter File is consistent with the mode of described module one with loading, is that predefined storage area is different with region of memory.
The embodiment of the collector of decision condition parameter is as follows:
Based on above-described basis, the embodiment of decision condition Parameter analysis of electrochemical module is as follows:
A main operation-interface is externally only provided:
BOOL?CheckMbpMacro(const?char*pName)
PName: be a character pointer, point to the condition character string that will check.
The operating process of this interface is very simple, comprises the steps:
1. in the reference position of default region of memory, the quantity n of reading character string;
2. in that index entry, adopt dichotomy to retrieve successively its character string pointed, find the character string that call parameters provides;
If 3. found, return to TRUE, otherwise return to FALSE.
Module three, the configuration file that startup relies on based on systems parameters document amendment system
The definition of systems parameters document will have relation closely with the selected operating system of product, and the present embodiment is based on Windows Mobile operating system.Windows Mobile starts and follow-up system is in service all relies on registration table (Registry) in system, so the main contents of the systems parameters document of the present embodiment are exactly registry entry.
The source file of the present embodiment define system parameter is .xml file, and this both can conveniently add some version informations, was also convenient to compilation tool software and processed.File can comprise following tag entry, wherein the content between <RegInfo>...</Re gInfo> is registry entry, uses general registry entry document representation method in Windows Mobile operating system.
UUID is wherein used for identifying the uniqueness of a systems parameters document, in the time that content of parameter changes, should revise this UUID.In the time that systematic parameter is updated to the configuration file of system, this UUID can be recorded in registration table, only have and re-start renewal as the UUID Shi Caihui that changes.
The form of the file destination of the present embodiment define system parameter is consistent with the form of described module one, and the data content in Data district is exactly above-mentioned version relevant information and registry entry.
The burning of systems parameters document is consistent with the mode of described module one with loading, is that predefined storage area is different with region of memory.
The mode of the mode that systematic parameter works and aforementioned two modules is more different.Described module one and module two are all to go to default memory field to read parameter by Parameter analysis of electrochemical module during by other software transfer to reach application target, and systematic parameter must be updated in the configuration file of operating system, then use reformed configuration file to work by system.
The configuration information that systematic parameter parsing module is compiled in image (Image) file by setting loads automatically, and its Loading opportunity has certain being particular about: 1. file system, user memory area can be used; 2. the configuration file that can be modified can be used; 3. few driven unit of trying one's best is loaded, because before systematic parameter is updated to CONFIG.SYS, specifies the driven unit loading to have conflict with the actual hardware module using, and causes the generation of some indeterminacy phenomenons.
As shown in Figure 1, concrete steps are described as follows the operating process of systematic parameter parsing module:
Step 11 reads the UUID_Last of record while renewal last time from system registry
The UUID_Last is here exactly foregoing UUID, after upgrading system registry according to systems parameters document, corresponding UUID can be saved in registration table at every turn.
Step 12 has judged whether UUID_Last
If can obtain a UUID value from registration table, think that UUID_Last exists, and can directly jump to step 17; Otherwise think that UUID_Last does not exist, continue execution step 13.
Step 13 is obtained the reference position of system parameter table by the region of memory of presetting
System parameter table will be loaded into the region of memory that is allocated in advance it in bootloader, by corresponding pointer, just can read corresponding content.
Content in step 14 reading system parameter list, is updated in the registration table of system one by one
Read the content in foregoing <RegInfo>...</Re gInfo> label, the registry operations function then providing by operating system is updated in system registry.Here the operation relating to is many, but is all text, the registry operations of many use, does not just describe in detail at this.
Step 15 is recorded to UUID the registration table of system
Upgrading after system registry success, finally UUID corresponding system parameter table is also recorded in registration table, be used for identification renewal successfully, and as the foundation that judges whether next time again to upgrade.
Step 16 is preserved registration table to storage medium
The flush operation of call operation system, forces system registry to be saved in storage medium, so that follow-up use.
Step 17 is restarted system
The soft reboot interface of call operation system, allows system restart according to the registration table after upgrading.After startup, can re-execute step 11 above, finally carry out step 112.
Step 18 is obtained the reference position of system parameter table by the region of memory of presetting
System parameter table will be loaded into the region of memory that is allocated in advance it in bootloader, by corresponding pointer, just can read corresponding content.Identical with step 13.
Step 19 reads its corresponding UUID from system parameter table
Step 110 judges that whether UUID_Last is consistent with UUID
The value that directly compares UUID_Last and UUID, if consistent, represents that current systematic parameter has been successfully updated in current system registry, and system can continue normal operation, jumps to step 112; If inconsistent, represent to have used another part of systematic parameter in system registry, current systematic parameter is not also updated in registration table, continues to carry out step 111 below.
Step 111 starts factory reset, restarts system
Because system can only be determined to adding in current registration table or the content of amendment, can not determine and needs the content of deleting.So call the interface of factory reset, another part of systematic parameter removed completely.This can restart by initiating system, after startup, can re-execute step 11 above, upgrades operation, then carries out step 17.
Step 112 finishes the operation of this module
Stop the operation of this module, system is carried out conventional start-up course.
Module four, the application of selecting installation to specify based on customised regions configuration file
The specific embodiments of this module is comparatively different from aforementioned three modules, emphasis not in the definition of configuration file, but at it storage area as customised regions, in the design of burning mode.Be described as follows:
1. the application of needs being selected is made as the cab installation kit that Windows Mobile system is general, and customised regions configuration file just adopts simple text, has wherein listed the filename that needs the cab bag of installing;
2. above the region at described cab APMB package and configuration file place must be (instead of as above three modules are mode direct read/write with RAW data in bootloader) of the file system access that can provide by operating system, and this region is invisible to user;
3. in order to make the realization of burning relatively simple, the present embodiment is not chosen in the burning that realizes these files in bootloader, in the distinctive ULDR system of Windows Mobile system, upgrade these files and be selected at, the file system that so just can directly use operating system to carry, and a without realizing voluntarily again.So the selected operating system of product can determine that some realize details.In ULDR system, these files of direct copying, to predetermined storage area, are deleted original Installation Mark file (if this file exists) simultaneously in user file district;
4. realize an installation procedure, automatically load this program by the configuration information being compiled in image (Image) file in system starting process, Loading opportunity can be set in after other system component all loaded.The flow process of this program comprises following steps: A. detects end mark file (can be certain registry entry) is installed, if existed, represent this time to start without application is installed directly termination routine, enter the normal use of system, otherwise order performs step B; B. read customised regions configuration file, read successively corresponding cab bag in customised regions according to the cab APMB package name of wherein listing, and the cab bag installation procedure that calling system provides attaches it to user area; C. after installation, create in user area end mark file is installed; D. restart system.
Indicate at this, above narration contributes to those skilled in the art to understand the invention, but and the protection domain of unrestricted the invention.Any do not depart from the invention flesh and blood to being equal to replacement, modifying and improve and/or delete numerous conforming to the principle of simplicity and the enforcement carried out of above narration, all fall into the protection domain of the invention.

Claims (8)

1. the method for an automatic adaptation mobile terminal, it is characterized in that, according to being the selected microprocessor chip of mobile terminal and selected embedded OS, set user's request variation or hardware configuration and change the software change bringing, and form series of parameters and various Parameter File, described Parameter File is independent of the image file of embedded OS in mobile terminal, carry out assembly by described image file and different Parameter Files and change with the specific user's request variation of automatic adaptation or specific hardware configuration the software change being brought, described Parameter File is independent of described image file and issues and/or upgrade, when described software change occurs without upgrading described image file,
Described Parameter File comprises systems parameters document, starts the configuration file relying on and comprises the following steps: A. analyzes the feature of the configuration file of os starting dependence used, the Parameter File form that definition adapts with it based on systems parameters document amendment system; B. compiling generation, burning and the load mode of defined parameters file relevant software support is provided; C. the feature of analytic system start-up course, determines that renewal system starts the suitable opportunity of configuration file, and systematic parameter parsing module is provided, and is responsible for analytic parameter file content and is updated in configuration file; D. extract and may need the CONFIG.SYS content integration of amendment to Parameter File, just can revise system performance thereby reach by amendment systems parameters document.
2. the method for automatic adaptation mobile terminal according to claim 1, it is characterized in that, described Parameter File comprises register parameters file, comprise the following steps based on register parameters file configuration register: A. is provided by addressing and the functional characteristic of the register that described microprocessor chip provides, the information that need to provide when certain register of abstracting operating; B. analyze the operation to register in driver, sum up in the point that it is one group of register manipulation for a certain function; C. analyze according to A, B, consider the speed of retrieval simultaneously, abstract definition goes out applicable data structure, and the form of Parameter File; D. compiling generation, burning and the load mode of defined parameters file, and relevant software support is provided; E., a software module is provided, is responsible for analytic parameter file content and is also converted into concrete register manipulation, and provide configuration register unified interface for calling of other software module; The register manipulation that F. may need variation in extraction procedure, is converted to based on register parameters file and is configured, thereby reaches the configuration that just can revise register by amendment register parameters file.
3. the method for automatic adaptation mobile terminal according to claim 1, it is characterized in that, described Parameter File comprises decision condition Parameter File, comprise the following steps based on decision condition Parameter File configuration decision condition: the data layout of decision condition, the form of defined parameters file are expressed in A. definition; B. compiling generation, burning and the load mode of defined parameters file relevant software support is provided; C., a software module is provided, is responsible for analytic parameter file content and is converted into the discernible condition of general judgement statement, and configure decision condition unified interface for calling of other software module provides; D. extract and may need the decision condition of dynamically changing and be converted to based on decision condition Parameter File to judge, just can revise decision condition thereby reach by amendment decision condition Parameter File.
4. the method for automatic adaptation mobile terminal according to claim 1, it is characterized in that, described Parameter File comprises customised regions configuration file and application, application based on customised regions configuration file and application choice installation appointment comprises the following steps: A. marks a region as customised regions on the storage medium of mobile terminal, for storing the installation kit of required application, specify with a configuration file application that needs installation simultaneously; This customised regions is invisible to user, and content wherein can be independent of image file and upgrade; B. in system, be equipped with a customised regions configuration file installation procedure, in system starting process, this program can load automatically, the application of specifying is installed according to the configuration file of customised regions, and only in uninstalled situation, installs.
5. the method for automatic adaptation mobile terminal according to claim 2, it is characterized in that, the workflow of described configuration register unified interface comprises: 1. splitting suction parameter dwOperationID is module I D:ModuleID and register manipulation ID:RegOpID; 2. obtained the reference position of DRIVER_REG_TABLE tables of data by the region of memory of presetting; 3. locate in DRIVER_REG_TABLE tables of data by ModulID, obtain corresponding with it REGOP_TABLE tables of data reference position; 4. locate in REGOP_TABLE tables of data by RegOpID, obtain the reference position of corresponding with it REGCONFIG_TABLE tables of data; 5. read one by one every content of REGCONFIG_TABLE tables of data, carry out concrete operation according to the combinations of definitions of dwOperation and dwOperationConfig.
6. the method for automatic adaptation mobile terminal according to claim 3, is characterized in that, the workflow of described configuration decision condition unified interface comprises: (1) in the reference position of default region of memory, and the quantity n of reading character string; (2) in index entry, adopt dichotomy to retrieve successively its character string pointed, find the character string that call parameters provides; If (3) found, return to TRUE, otherwise return to FALSE.
7. the method for automatic adaptation mobile terminal according to claim 1, it is characterized in that, the workflow of described systematic parameter parsing module comprises: step 1, from system registry, read the UUID_Last of record while renewal last time, after upgrading system registry according to systems parameters document, corresponding UUID can be saved in registration table at every turn; Step 2, has judged whether UUID_Last, if can obtain a UUID value from registration table, thinks that UUID_Last exists, and can directly jump to step 7; Otherwise think that UUID_Last does not exist, continue execution step 3; Step 3, by the reference position of the region of memory acquisition system parameter table of presetting, system parameter table will be loaded into the region of memory that is allocated in advance it in bootloader, by corresponding pointer, just can read corresponding content; Step 4, content in reading system parameter list, be updated to one by one in the registration table of system, read <RegInfo> ... content in </RegInfo> label, the registry operations function then providing by operating system is updated in system registry; Step 5, is recorded to UUID the registration table of system, upgrading after system registry success, finally UUID corresponding system parameter table is also recorded in registration table, is used for identification renewal success, and as the foundation that judges whether next time again to upgrade; Step 6, preserves registration table to storage medium, and the flush operation of call operation system, forces system registry to be saved in storage medium, so that follow-up use; Step 7, restarts system, and the soft reboot interface of call operation system allows system restart according to the registration table after upgrading, and after startup, can re-execute step 1 above, finally carries out step 12; Step 8, by the reference position of the region of memory acquisition system parameter table of presetting, system parameter table will be loaded into the region of memory that is allocated in advance it in bootloader, by corresponding pointer, just can read corresponding content, identical with step 3; Step 9 reads its corresponding UUID from system parameter table; Step 10, judges that whether UUID_Last is consistent with UUID, directly compares the value of UUID_Last and UUID, if consistent, represent that current systematic parameter has been successfully updated in current system registry, system can continue normal operation, jumps to step 12; If inconsistent, represent to have used another part of systematic parameter in system registry, current systematic parameter is not also updated in registration table, continues to carry out step 11 below; Step 11, starts factory reset, restarts system, because system can only be determined to adding in current registration table or the content of amendment, can not determine and needs the content of deleting; So call the interface of factory reset, another part of systematic parameter removed completely; This can restart by initiating system, after startup, can re-execute step 1 above, upgrades operation, then carries out step 7; Step 12, finishes the operation of this module, and system is carried out conventional start-up course.
8. the method for automatic adaptation mobile terminal according to claim 4, it is characterized in that, the workflow of described customised regions configuration file installation procedure comprises: (A) detect end mark file is installed, if existed, represent this time to start without application is installed, directly termination routine, enters the normal use of system, otherwise sequentially performs step (B); (B) read customised regions configuration file, read successively corresponding cab bag in customised regions according to the cab APMB package name of wherein listing, and the cab bag installation procedure that calling system provides attaches it to user area; (C) after installation, create in user area end mark file is installed; (D) restart system.
CN201110225832.XA 2011-08-08 2011-08-08 Method for automatically adapting to mobile terminal Expired - Fee Related CN102314364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110225832.XA CN102314364B (en) 2011-08-08 2011-08-08 Method for automatically adapting to mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110225832.XA CN102314364B (en) 2011-08-08 2011-08-08 Method for automatically adapting to mobile terminal

Publications (2)

Publication Number Publication Date
CN102314364A CN102314364A (en) 2012-01-11
CN102314364B true CN102314364B (en) 2014-08-20

Family

ID=45427557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110225832.XA Expired - Fee Related CN102314364B (en) 2011-08-08 2011-08-08 Method for automatically adapting to mobile terminal

Country Status (1)

Country Link
CN (1) CN102314364B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103796193B (en) * 2014-01-16 2018-05-25 Tcl通讯(宁波)有限公司 The PRI parameter automatic configuration methods and system of a kind of cdma mobile terminal
CN105320499A (en) * 2014-06-04 2016-02-10 中国移动通信集团广西有限公司 Adaptive method and related device of application program
CN105204995B (en) * 2015-09-21 2017-12-22 上海斐讯数据通信技术有限公司 A kind of method and system of the dynamic debugging key parameter based on cell phone platform
CN105607941A (en) * 2015-11-25 2016-05-25 上海斐讯数据通信技术有限公司 Apparatus and method for compiling configuration in android project
CN106484469B (en) * 2016-09-29 2019-07-02 广州芯德通信科技股份有限公司 A kind of embedded system data processing method and its device
CN108399084B (en) * 2017-02-08 2021-02-12 中科创达软件股份有限公司 Application program running method and system
JP6723941B2 (en) * 2017-02-15 2020-07-15 株式会社デンソーテン Control device and control program updating method
CN107678755B (en) * 2017-09-13 2021-01-26 北京京东尚科信息技术有限公司 Installation package packaging method and device, electronic equipment and computer readable medium
CN108664276B (en) * 2018-05-15 2021-11-09 福建升腾资讯有限公司 Method for configuring hardware information through text
CN109544141A (en) * 2018-11-28 2019-03-29 艾体威尔电子技术(北京)有限公司 A kind of hardware adapting method of payment terminal
CN109918121B (en) * 2019-02-22 2022-08-30 深圳市酷开网络科技股份有限公司 Configuration method based on different chip schemes, intelligent terminal and storage medium
CN111694807B (en) * 2020-06-15 2022-08-16 展讯通信(上海)有限公司 Processing method, system, equipment and storage medium of nonvolatile storage file
CN112083963B (en) * 2020-09-04 2024-04-16 深圳市视美泰技术股份有限公司 System function configuration method based on external storage medium and related equipment
CN114924806B (en) * 2022-04-07 2024-03-26 南京慧尔视软件科技有限公司 Dynamic synchronization method, device, equipment and medium for configuration information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431559A (en) * 2007-11-09 2009-05-13 中国移动通信集团公司 Self-adapting regulation method for mobile terminal and mobile terminal thereof
CN101907997A (en) * 2010-08-11 2010-12-08 深圳市共进电子有限公司 Method for generally starting embedded equipment
CN101976198A (en) * 2010-10-27 2011-02-16 中兴通讯股份有限公司 Method and device for controlling startup of application program in embedded system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4911079B2 (en) * 2008-03-06 2012-04-04 日本電気株式会社 System component management support system, method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431559A (en) * 2007-11-09 2009-05-13 中国移动通信集团公司 Self-adapting regulation method for mobile terminal and mobile terminal thereof
CN101907997A (en) * 2010-08-11 2010-12-08 深圳市共进电子有限公司 Method for generally starting embedded equipment
CN101976198A (en) * 2010-10-27 2011-02-16 中兴通讯股份有限公司 Method and device for controlling startup of application program in embedded system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2009-211615A 2009.09.17

Also Published As

Publication number Publication date
CN102314364A (en) 2012-01-11

Similar Documents

Publication Publication Date Title
CN102314364B (en) Method for automatically adapting to mobile terminal
CN104182255A (en) Method and terminal for upgrading library files of system application
US7237238B2 (en) Method and apparatus for automated operating systems upgrade
JP5208350B2 (en) Self-describing software image update component
US7669201B2 (en) System and method for common file installation
CN107506219A (en) A kind of general version upgrade method based on android system
US8966236B2 (en) Dynamically redirecting boot to another operating system
KR20070049095A (en) Servicing a component-base software product
CN101770375A (en) Method for realizing automatic update of software as well as system and device therefor
CN102567053A (en) Method and device for downgrading software version
CN102999349B (en) A kind of method for upgrading software
CN101833464A (en) Method and device for sectionally loading application programs by mobile terminal
US20040103172A1 (en) Method of updating an operation system
CN100465891C (en) Method for renewing hand-held device operation function through insert-and-use storage device
CN111694585A (en) Method, system, terminal and storage medium for replacing system partition file
CN1755628B (en) Method of automatically installing software during operation system startup
CN109976754B (en) Information display method and terminal thereof
KR100834676B1 (en) Method for building software project
CN103677933A (en) Patching method and system for smart card
CN106980516A (en) Information processor and method for managing resource
CN100388197C (en) Computer system with two operating systems capable of automatically downloading and updating data and method therefor
CN110308959A (en) Content displaying method and device, electronic equipment and readable storage medium storing program for executing
KR100959560B1 (en) System for Installing Driver and Method thereof
JP2000293377A (en) Coexistence environment structuring method and recording medium where coexistence environment structuring program is recorded
CN115774561A (en) Application program upgrading method, electronic equipment, chip and readable storage medium

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: 20140820

Termination date: 20160808

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