Summary of the invention
The present invention is intended to solve at least one of technical matters that exists in prior art.
For this reason, one aspect of the present invention proposes a kind of DMI information storage means, comprises the following steps: host computer generates DMI information; Described host computer transforms to generate the DMI file with described DMI information; Described host computer is downloaded to boot-loader in first memory in embedded device; Described boot-loader sends the kernel initialization requests to described host computer, and the kernel that described host computer is sent downloads in internal memory; The second memory of checking described embedded device in described formats subregion; Described kernel sends the image file download request to described host computer; Described host computer is sent to described kernel with described DMI file, and described kernel is stored to described second memory with described DMI file.
DMI information storage means according to the embodiment of the present invention, by before system image is burnt to embedded device, complete the write operation of DMI data to embedded device, the limitation that makes up the Android DMI of system storage and show, make the developer when maneuvering device DMI information, can complete flexibly, rapidly the customization task.
For this reason, the present invention also proposes a kind of DMI information storage system on the other hand, comprise host computer and embedded device, wherein said embedded device comprises first memory, kernel, internal memory and second memory, described host computer generates DMI information, and described DMI information is transformed to generate the DMI file, and boot-loader is downloaded in the first memory of described embedded device; Described boot-loader sends the kernel initialization requests to described host computer; Described kernel receives the kernel file that described host computer sends according to described kernel initialization requests, and described kernel file is downloaded in internal memory, and the second memory of described embedded device is formatd subregion, and send the image file download request to described host computer; Described host computer is sent to described kernel with described DMI file, and described kernel is stored to described second memory with described DMI file.
DMI information storage system according to the embodiment of the present invention, by before system image is burnt to embedded device, complete the write operation of DMI data to embedded device, the limitation that makes up the Android DMI of system storage and show, make the developer when maneuvering device DMI information, can complete flexibly, rapidly the customization task.
Additional aspect of the present invention and advantage part in the following description provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Embodiment
The below describes embodiments of the invention in detail, and the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or the element with identical or similar functions from start to finish.Be exemplary below by the embodiment that is described with reference to the drawings, only be used for explaining the present invention, and can not be interpreted as limitation of the present invention.
In description of the invention, unless otherwise prescribed and limit, need to prove, term " installation ", " being connected ", " connection " should be done broad understanding, for example, can be mechanical connection or electrical connection, can be also the connection of two element internals, can be directly to be connected, and also can indirectly be connected by intermediary, for the ordinary skill in the art, can understand as the case may be the concrete meaning of above-mentioned term.
Fig. 1 is the process flow diagram of the DMI information storage means of one embodiment of the invention.Fig. 2 is the schematic flow sheet of the DMI information storage means of one embodiment of the invention.As depicted in figs. 1 and 2, these DMI information storage means comprise the following steps:
Step S101, host computer generates DMI information.
Be different from PC (Personal Computer, personal computer) equipment, three phases mainly passes through at the normal start-up and operation of embedded device in the Android system: (1) uses the firmware burning instrument that system image is burnt to flash memory; (2) boot-loader guiding linux kernel; (3) kernel loads Android file system and startup.In the present invention, before the phase one begins, complete the write operation of DMI data to flash memory.
Particularly, be provided with a cover for the mirror image replication tool of Android platform device in host computer, this replication tool can be based on the Linux operating environment, also can be based on the Windows operating platform.Replication tool uses UTP (Universal Transfer Protocol, the general transmission agreement) as means of communication, host computer and embedded device are by USB (Universal Serial Bus, USB (universal serial bus)) line carries out data interaction, but carry out wanting before subsequent action the erecting equipment driving, embedded device is mounted to host computer with the form of exterior storage.
At first host computer starts replication tool, generates DMI information according to predetermined algorithm.Wherein, predetermined algorithm can for the DMI Information generation algorithm of prior art, be not described in detail herein.
Step S102, host computer transforms to generate the DMI file with DMI information.
In one embodiment of the invention, the DMI file is the binary file of ASCII fromat coding.Those of ordinary skill in the art writes DMI information in the binary file of ASCII fromat coding according to the right form of key/value by programming, and check information is put into the fixed byte position of this DMI top of file.In file, every record is as a DMI attribute, and the differentiation mode between different attribute depends on user's programmed method.
Step S103, host computer is downloaded to boot-loader in first memory in embedded device.
In one embodiment of the present of invention, first memory is SDRAM (synchronous static memory).Replication tool downloads to the Boot loader that can be used for Boot Dernel under the built-in Linux environment in the SDRAM at embedded device CPU place by the usb data line, and the entry address of Boot loader is passed to CPU, afterwards, Boot loader obtains the control of embedded device.
Step S104, boot-loader sends the kernel initialization requests to host computer, and the kernel that host computer is sent downloads in internal memory.
According to an example of the present invention, Boot loader begins to carry out, initialization internal memory and necessary peripherals.Afterwards, send the request obtain kernel file to host computer, receive the kernel file that host computer sends, and it is loaded into the internal memory appointed area, afterwards system's control of embedded device is given kernel.
Step S105, in check embedded device second memory format subregion.
In one embodiment of the invention, second memory is flash memory, for example nand flash memory chip.Nand flash memory chip has that price is low, capacity is large, carry out data writing operation and the fast characteristics of obliterated data speed.
According to an example of the present invention, after kernel brings into operation, at first flash memory is formatd division operation, then the apparatus for establishing node, be used for carry operating system mirror image, the initialization system environmental variance.
Step S106, kernel sends the image file download request to host computer.
According to an example of the present invention, after device node created successfully, kernel sent the image file download request to host computer.
Step S107, host computer is sent to kernel with the DMI file, and kernel is stored to the DMI file in second memory.
According to one embodiment of present invention, the DMI top of file has check information, after kernel receives the DMI data, first carries out file verification according to check information, to judge whether information has change or whether information dropout arranged, and verification by after the DMI file is stored to second memory.Then, host computer can be sent to kernel with corresponding image file, and kernel is stored to image file in second memory again.
In another embodiment of the present invention, corresponding image file can comprise the system file system mirror image, recover the file that other equipment such as mirror image, upgrade image work and system is recovered, upgrading is required.
After kernel is completed the read-write of DMI data, report this event to host computer.The user can receive report after, disconnect the physical connection relation between embedded device and host computer.After the embedded device boot system starts, the DMI data by auto-initiation to a certain zone of internal memory.
DMI information storage means according to the embodiment of the present invention, by before system image is burnt to embedded device, complete the write operation of DMI data to embedded device, the limitation that makes up the Android DMI of system storage and show, make the developer when maneuvering device DMI information, can complete flexibly, rapidly the customization task.
Fig. 3 is the structured flowchart of the DMI information storage system of one embodiment of the invention.As shown in Figure 3, this DMI information storage system comprises host computer 10 and embedded device 20.Embedded device 20 comprises first memory 210, kernel 220, internal memory 230 and second memory 240.
Host computer 10 generates DMI information, and DMI information is transformed to generate the DMI file, and boot-loader is downloaded in the first memory 210 of embedded device.In an example of the present invention, the DMI file is the binary file of ASCII fromat coding.Boot-loader sends the kernel initialization requests to host computer 10.Kernel 220 receives the kernel file that host computer 10 sends according to the kernel initialization requests, and kernel file is downloaded in internal memory 230, and the second memory 240 of embedded device is formatd subregion, and send the image file download request to host computer 10.Host computer 10 is sent to kernel 220 with the DMI file, and kernel 220 is stored to second memory 240 with the DMI file.
In another embodiment of the present invention, host computer 10 can also be after kernel 220 be stored to second memory 240 with the DMI file, corresponding image file is sent to kernel 220, as system file system mirror image, recovery mirror image, upgrade image etc., kernel 220 is stored to image file in second memory 240 again.
In one embodiment of the invention, host computer 10 is connected with embedded device by the connection of USB line.
According to an example of the present invention, first memory is SDRAM, and second memory is flash memory.More specifically, flash memory can be enable nand gate.
In one embodiment of the invention, the top of file of DMI file has check information, wherein, kernel 220 carries out verification according to check information after receiving the DMI file, and verification by after the DMI file is stored to second memory 240.
DMI information storage system according to the embodiment of the present invention, by before system image is burnt to embedded device, complete the write operation of DMI data to embedded device, the limitation that makes up the Android DMI of system storage and show, make the developer when maneuvering device DMI information, can complete flexibly, rapidly the customization task.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the characteristics of this embodiment or example description.In this manual, the schematic statement of above-mentioned term not necessarily referred to identical embodiment or example.And the specific features of description, structure, material or characteristics can be with suitable mode combinations in any one or more embodiment or example.
Although illustrated and described embodiments of the invention, those having ordinary skill in the art will appreciate that: in the situation that do not break away from principle of the present invention and aim can be carried out multiple variation, modification, replacement and modification to these embodiment, scope of the present invention is limited by claim and equivalent thereof.