Mirror image burning method, hardware testing system and computer program product
By using Raw format image files and dd hard flashing, combined with partition expansion and random number identifier updates, the consistency and storage space waste problems in traditional image burning methods are solved, ensuring the reliability of hardware testing and the uniqueness of partitions.
Patent Information
- Application Number
- CN202510968514.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-11-11
AI Technical Summary
Traditional image burning methods cannot guarantee that the operating system burned each time is completely consistent, resulting in unreliable hardware test results. Furthermore, the burning process wastes storage space and the indistinguishability of images due to identical partition identifiers.
The image file is copied one-to-one using the Raw format image file and the dd hard flashing method. After the burning is completed, the partition of the medium to be burned is expanded and the random number identifier is updated to ensure the consistency of the image and the uniqueness of the partition.
It achieves image consistency in hardware testing, avoids test interference and storage space waste, and ensures that the operating system can recognize partitions of different hardware.
Smart Images

Figure CN120929094A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer hardware testing technology, specifically to image burning technology in the field of computer hardware testing technology, and more specifically to an image burning method, a hardware testing system, and a computer program product. Background Technology
[0002] In the development of computer hardware (such as processors and peripherals), testing is typically required to verify hardware functionality, performance, and reliability. Testing necessitates configuring a runnable operating system for the hardware under test to verify its performance and reliability in normal use. In this application scenario, system images obtained through traditional image burning methods are often insufficient to meet testing requirements. Summary of the Invention
[0003] This specification provides an image burning method, a hardware testing system, and a computer program product to achieve the purpose of burning a target image that meets hardware testing requirements onto a medium to be burned.
[0004] To achieve the above technical objectives, the embodiments of this specification provide the following technical solutions:
[0005] Firstly, one embodiment of this specification provides a mirror burning method applied to a target device, wherein the target device is used to connect a medium to be burned, and the medium to be burned is used to install into target hardware for testing the target hardware. The mirror burning method includes:
[0006] The data in the target image file is written sequentially into the medium to be burned, so as to burn the target image onto the medium; the data in the target image file is stored in the original order and state of the data in the target image.
[0007] Mount the medium to be burned and expand the user partition of the mounted medium to be burned;
[0008] The identity of the target partition of the mounted burning medium is updated using a random number. The target partition includes the user partition and / or the boot partition of the burning medium. The identity of the target partition is used to uniquely identify the target partition.
[0009] Secondly, one embodiment of this specification provides a hardware testing system, comprising: an offline programming device, target hardware, and a programming medium; wherein...
[0010] The offline burning device is configured to burn a target image onto the medium to be burned according to the image burning method described above.
[0011] The target hardware is configured to be tested using the medium to be burned with the target image.
[0012] Thirdly, one embodiment of this specification also provides a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image burning method described above.
[0013] Fourthly, one embodiment of this specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the image burning method described above.
[0014] Fifthly, embodiments of this specification provide a computer program product or computer program, the computer program product including a computer program stored in a computer-readable storage medium; the processor of the computer device reads the computer program from the computer-readable storage medium, and when the processor executes the computer program, it implements the steps of the above-described image burning method. Optionally, the computer program may be stored in a computer-readable storage medium or in the cloud; the processor of the computer device reads the computer program from the readable storage medium or in the cloud.
[0015] As can be seen from the above technical solution, the image burning method provided in this specification is based on the target device. When the medium to be burned is connected to the target device, the data in the target image file can be written sequentially into the medium to burn the target image. The data in the target image file is stored according to the original order and state of the data in the target image. This ensures the consistency of the target image burned into the medium and avoids interference with the testing of the target hardware caused by differences in the target image. After that, the medium to be burned can be mounted on the target device to connect the medium to be burned to the file hierarchy of the target device's operating system, so that the operating system of the target device can operate on the partitions in the medium to be burned. After the medium to be burned is mounted, the user partition of the mounted medium to be burned can be expanded to avoid the problem of wasting the storage space of the medium to be burned. Finally, the identity of the target partition of the mounted medium to be burned is updated using a random number to avoid the problem of the operating system being unable to recognize the target partitions of different mediums to be burned if the identity of the target partitions of different mediums to be burned is the same. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this specification. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 A schematic flowchart illustrating an image burning method provided for one embodiment of this specification;
[0018] Figure 2 A schematic diagram of a hardware testing system provided for one embodiment of this specification;
[0019] Figure 3 This is a schematic diagram of the structure of a computing device provided for one embodiment of this specification. Detailed Implementation
[0020] Unless otherwise defined, the technical or scientific terms used in the embodiments of this specification shall have the ordinary meaning understood by one of ordinary skill in the art to which this specification pertains. The terms "first," "second," and similar terms used in the embodiments of this specification do not indicate any order, quantity, or importance, but are merely used to avoid confusion of constituent elements.
[0021] Unless the context otherwise requires, throughout this specification, "a plurality of" means "at least two," and "including" is interpreted as open-ended or encompassing, that is, "including, but not limited to." In the description of this specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "example," "specific example," or "some examples" are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this specification. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example.
[0022] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0023] Overview
[0024] During the development of hardware such as processors and computer peripherals, standard operating systems can be used to conduct multiple tests to verify the hardware's performance, reliability, and other parameters within the standard operating system environment, guiding subsequent development or improvement efforts. To ensure the uniqueness of variables in each test and avoid unexpected variables affecting the reliability of the test results, the standard operating system must be completely consistent in each test. This prevents unexpected variables due to differences in operating system versions, data, etc., from influencing the test results and potentially leading to unreliable test results for the hardware under test.
[0025] Traditional image burning methods have two main drawbacks. First, they cannot guarantee that the burned operating system will be completely consistent each time. Second, they require the hardware to be burning the image to be in normal working order. Specifically, traditional image burning methods require the hardware to be in good working order and capable of running an operating system. In this case, an ISO (International Organization for Standardization) format file of the image to be burned can be set in the hardware, and running the ISO file will burn the image to the hardware. However, traditional image burning methods require the computer hardware under test to be functional (i.e., burning itself), because burning is also a software function that depends on the hardware's proper functioning. In other words, this process requires both that the hardware to be burning the image be in good working order and capable of running ISO format files. Furthermore, the ISO format image may adaptively configure itself according to the actual hardware conditions during the burning process, resulting in slight differences in the burned image. Alternatively, differences in network connectivity may lead to different software versions in the image burned to the hardware. These differences can all potentially lead to unreliable hardware test results.
[0026] To address the potential discrepancies between images obtained from burning the same image file, a Raw (Raw Image Format) image can be used. A hard flash (dd) method is then employed to copy the image one-to-one to the hardware to be burned. Since the Raw format image file copies the original image data byte-by-byte, it stores the original image data in its original order and format without adding any complex file system information or compression algorithms. Combined with the dd hard flash method, this ensures that the image burned to the hardware is consistent with the original image, resolving the issue of inconsistent images obtained with each burning operation.
[0027] However, the above-mentioned burning method still has problems. Specifically, after the burning is completed, the image capacity is also restored 1:1. That is, after the burning is completed, the boot partition and user partition in the storage medium of the image to be burned are completely consistent with the original image. If the storage space of the hardware of the image to be burned is larger than the partition space of the original image, the extra storage space cannot be used, resulting in a waste of storage space. In addition, in the scenario of batch burning, the identity identifiers of the user partition and boot partition in all successfully burned images are the same as the identity identifiers of the user partition and boot partition in the original image. This leads to the problem of not being able to distinguish the images when verifying the images burned in the hardware of multiple images to be burned. For example, suppose two hardware devices, A and B, are simultaneously image-burned. The boot partition and user partition of the image burned to hardware A are identified by identifier 1 and identifier 2, respectively. The boot partition and user partition of the image burned to hardware B are also identified by identifier 1 and identifier 2, respectively. Then, when performing an integrity test on the images in hardware A and hardware B to verify whether the image burning was successful, the operating system cannot recognize the different partitions of the images in different hardware devices because the boot partition identifier and user partition identifier are the same in both devices, resulting in the inability to verify.
[0028] To address the aforementioned issues, the inventors proposed a mirror burning method. This method involves connecting a target device to a medium to be burned and performing mirror burning on the medium. After the mirror burning on the medium is complete, the medium is installed in the target hardware, enabling the target hardware to be tested based on the burned mirror image without requiring the target hardware to be in a normal state. When the medium to be burned is connected to the target device, the data in the target image file can be written sequentially into the medium to burn the target image. The data in the target image file is stored according to the original order and state of the data in the target image, thus ensuring the consistency of the target image burned into the medium and avoiding interference with the testing of the target hardware due to differences in the target image. Afterwards, the medium to be burned can be mounted onto the target device to connect the medium to the file hierarchy of the target device's operating system, allowing the target device's operating system to operate on the partitions in the medium. After the medium is mounted, the user partition of the mounted medium can be expanded to avoid wasting storage space. Finally, the identity of the target partition of the mounted medium is updated using a random number to avoid the problem of the operating system being unable to recognize the target partitions of different mediums having the same identity. Furthermore, the above method is helpful for ensuring consistency and reference value in multiple tests of a single hardware device, and also facilitates the comparison of single tests on batches of identical hardware, identifying the potential impact of hardware differences on various test indicators. In summary, the image burning method provided in this specification is an offline burning solution (i.e., for the target device, it's about burning an image to another device (the burning medium)). It only requires placing the burning medium (with the system already burned on the target device) on the hardware under test and booting it directly; the functionality of the burning medium is not required as a prerequisite for normal operation.
[0029] Based on the above concept, this specification provides an image burning method. The image burning method provided in this specification will be described exemplarily below with reference to the accompanying drawings.
[0030] Exemplary methods
[0031] This specification provides a method for image burning, applied to a target device. The target device is used to connect a medium to be burned, and the medium to be burned is used to install into target hardware for testing the target hardware. Figure 1 As shown, the image burning method includes:
[0032] S101: The data in the target image file is sequentially written into the medium to be burned, so as to burn the target image onto the medium to be burned; the data in the target image file is stored in the original order and state of the data in the target image.
[0033] S102: Mount the medium to be burned and expand the user partition of the mounted medium to be burned;
[0034] S103: Update the identity of the target partition of the mounted medium to be burned using a random number. The target partition includes the user partition and / or the boot partition of the medium to be burned. The identity of the target partition is used to uniquely identify the target partition.
[0035] Burning refers to the process of writing data (such as program code, system image, etc.) into the medium to be burned. Burning can directly write to the sectors of the medium to be burned, overwriting the original data. It is a relatively low-level data writing operation that does not depend on the existing operating system or file system on the medium to be burned.
[0036] The medium to be burned can be hardware with storage function and storage space, such as a hard drive or USB flash drive. This manual does not limit this, and the specific choice depends on the actual situation. Since the image burning method provided in this manual burns the target image onto the medium to be burned, it is not required that the target hardware be in a normal state, that is, it is not required that the target hardware be capable of image burning.
[0037] The target image file can be an image file of a specific format to meet the requirement of storing data in the original order and state of the target image, thereby ensuring that the target image burned to the burning medium is identical to the original image after burning is completed. In some implementations, the target image file can be a Raw format image file. The target hardware can refer to the hardware to be tested (e.g., processor, peripherals, etc.). The target hardware can be fully developed hardware with complete functions, or it can be a semi-finished hardware at a certain stage of development. This specification does not limit this; it depends on the specific circumstances.
[0038] In some implementations, a feasible process for sequentially writing data from the target image file into the medium to be burned can be through hard flashing (dd), which sequentially writes the data from the target image file into the medium to be burned, thereby achieving the goal of restoring the target image one-to-one in the medium to be burned.
[0039] Mounting is a file system operation that connects a device (in this embodiment, the medium to be burned) or a partition on a device to the file hierarchy of the operating system. In this embodiment, mounting the medium to be burned can mean that the target device mounts the target image to be burned from the medium to be burned as an accessible file system to the target device's file system, so that further partition detection and corresponding operations can be performed on the mounted target image.
[0040] Expansion can refer to increasing the storage space of a certain partition (such as a user partition). Expanding the user partition of the mounted medium to be burned can refer to allocating the unused storage space in the medium to be burned to the user partition after completing step S101, thereby increasing the storage space of the user partition. This can avoid the situation where the storage space of the medium to be burned is wasted because the size of the user partition and the boot partition of the medium to be burned is fixed after step S101 is completed.
[0041] In step S101, the data in the target image file is sequentially written into the medium to be burned, achieving the goal of burning the target image to the medium one-to-one. However, this also results in the identity identifiers of the boot partition and user partition of the target image written into the medium to be burned being consistent with the identity identifiers of the boot partition and user partition of the original image. If the target images in multiple mediums to be burned are verified after burning is completed, the problem of not being able to distinguish the target images in different mediums to be burned will occur. Therefore, in step S103, the identity identifier of the target partition of the mounted medium to be burned is updated using a random number. That is, a random number is used as the identity identifier of the boot partition of the medium to be burned, and a random number is also used as the identity identifier of the user partition of the medium to be burned, in order to solve the above problem.
[0042] In summary, the image burning method provided in this specification is based on a target device. When the medium to be burned is connected to the target device, the data in the target image file can be sequentially written into the medium to burn the target image. The data in the target image file is stored according to the original order and state of the data in the target image, thus ensuring the consistency of the target image burned into the medium and avoiding interference with the testing of the target hardware caused by differences in the target image. Afterward, the medium to be burned can be mounted onto the target device to connect it to the file hierarchy of the target device's operating system, allowing the target device's operating system to operate on the partitions in the medium to be burned. After mounting the medium, the user partition of the mounted medium can be expanded to avoid wasting storage space. Finally, a random number is used to update the identity of the target partition of the mounted medium to avoid the operating system being unable to recognize the target partitions of different media.
[0043] In one implementation, a feasible method for updating the identity of a target partition is provided. Specifically, updating the identity of the target partition of the mounted recording medium using a random number includes:
[0044] Using a random number as the preset identity identifier of the target partition of the medium to be burned, the preset identity identifier of the target partition is updated in the corresponding partition file of the medium to be burned, so as to update the identity identifier of the target partition of the medium to be burned.
[0045] Partition files refer to a collective term for a series of files related to the operating system. These files constitute the operating system's runtime environment and data storage area. Partition files may include operating system kernel files, system configuration files, application files, and user data files, etc. In this embodiment, a random number is first used as the preset identity identifier for the target partition of the medium to be burned. Then, the preset identity identifier of the target partition is updated in the partition file corresponding to the medium to be burned, so as to update the identity identifier of the target partition to the preset identity identifier and avoid the problem of not being able to distinguish the target partitions of different mediums due to the same identity identifier of the target partitions of different mediums to be burned. In one embodiment, the identity identifier can be a UUID (Universally Unique Identifier).
[0046] In one feasible implementation, using a random number as the preset identifier for the target partition of the medium to be burned includes:
[0047] The first random number is used as the preset identity identifier of the boot partition of the medium to be burned;
[0048] The first random number is different from the second random number.
[0049] To avoid the boot partition and user partition having the same default identity, a first random number and a second random number can be used as the default identity for these two partitions, respectively, thus avoiding anomalies caused by the default identity of the boot partition and user partition.
[0050] To fully utilize the storage space of the medium to be burned and avoid wasting storage space, in one embodiment, expanding the user partition of the mounted medium to be burned includes:
[0051] Expand the user partition of the mounted medium to be burned to the remaining storage space of the medium to be burned, the remaining storage space including the storage space other than the user partition and the boot partition.
[0052] In this embodiment, the user partition can be extended to the remaining storage space of the medium to be burned, that is, the remaining storage space of the medium to be burned is added to the user partition, so as to avoid the situation where the remaining storage space of the medium to be burned cannot be used and improve the utilization rate of the storage space of the medium to be burned.
[0053] In one embodiment, before expanding the user partition of the mounted medium to be burned, the method further includes:
[0054] Obtain a first identifier and a second identifier from the target image file, wherein the first identifier includes a boot partition type identifier and the second identifier includes a user partition type identifier;
[0055] If the first identifier and the second identifier are obtained, the user partition and the boot partition in the medium to be burned are determined according to the first identifier and the second identifier.
[0056] In this embodiment, before expanding the capacity, a first identifier and a second identifier can be obtained from the target image file. If the acquisition fails, the image burning process can be stopped. If the acquisition is successful, the user partition and boot partition in the medium to be burned can be determined based on the first identifier and the second identifier. In some embodiments, the first identifier and the second identifier can be GUIDs (Globally Unique Identifiers), which can be used to characterize the specific type of the partition.
[0057] Optionally, in one embodiment, determining the user partition and boot partition in the medium to be burned based on the first identifier and the second identifier includes:
[0058] The program detects the medium to be burned. If the type identifier of the partition in the medium to be burned matches the first identifier, it is marked as a boot partition. If the type identifier of the partition in the medium to be burned matches the second identifier, it is marked as a user partition.
[0059] The type identifier can accurately and quickly identify the boot partition and user partition in the medium to be burned, laying the foundation for subsequent expansion and other operations.
[0060] In one embodiment, before sequentially writing the data from the target image file into the medium to be burned, the method further includes:
[0061] If the burning conditions are met, the step of sequentially writing the data from the target image file into the medium to be burned is performed.
[0062] If the burning conditions are not met, the burning process will be terminated.
[0063] The burning conditions include: the storage capacity of the medium to be burned is greater than the size of the target image and the target image file contains a first identifier and a second identifier, wherein the first identifier includes a boot partition type identifier and the second identifier includes a user partition type identifier.
[0064] In this embodiment, before performing image burning, the burning conditions are first determined to avoid possible abnormalities that may occur if the burning process is performed under conditions that do not meet the burning requirements.
[0065] In one embodiment, the number of the medium to be programmed is multiple;
[0066] The process of mounting the medium to be burned and expanding the user partition of the mounted medium to be burned includes:
[0067] Multiple media to be burned are mounted, and the user partitions of the multiple mounted media to be burned are expanded.
[0068] After the expansion is completed, the step of updating the identity of the target partition of the mounted medium to be burned using random numbers can be performed on each of the multiple mounted mediums to be burned, so as to meet the need for parallel burning of multiple different storage media.
[0069] In this embodiment, multi-threaded burning operations are allowed, which can perform image burning, user partition expansion and identity update operations on multiple media to be burned in parallel, thereby improving the execution efficiency of the method.
[0070] Exemplary System
[0071] Accordingly, this specification also provides a hardware testing system, such as... Figure 2 As shown, it includes: an offline programming device, target hardware, and a programming medium; wherein,
[0072] The offline burning device is configured to burn a target image onto the medium to be burned according to the image burning method described in any of the above embodiments.
[0073] The target hardware is configured to be tested using the medium to be burned with the target image.
[0074] In this embodiment, when the medium to be burned is connected to the offline burning device, the data in the target image file can be sequentially written into the medium to burn the target image. The data in the target image file is stored according to the original order and state of the data in the target image, thus ensuring the consistency of the target image burned into the medium and avoiding interference with the testing of the target hardware caused by differences in the target image. Then, the medium to be burned can be mounted onto the offline burning device, connecting it to the file hierarchy of the operating system of the offline burning device. This allows the operating system of the offline burning device to operate on the partitions in the medium to be burned. After mounting the medium, the user partition of the mounted medium can be expanded to avoid wasting storage space. Finally, a random number is used to update the identity of the target partition of the mounted medium to avoid the problem of the operating system being unable to recognize the target partitions of different mediums having the same identity.
[0075] Exemplary device
[0076] In one exemplary embodiment of this specification, a mirror burning apparatus is also provided, applied to a target device, the target device being used to connect a medium to be burned, the medium to be burned being used to install into target hardware for testing the target hardware, the mirror burning apparatus comprising:
[0077] The data writing module is used to sequentially write the data in the target image file into the medium to be burned, so as to burn the target image onto the medium to be burned; the data in the target image file is stored according to the original order and state of the data in the target image;
[0078] The partition expansion module is used to mount the medium to be burned and expand the user partition of the mounted medium to be burned.
[0079] The identifier update module is used to update the identity identifier of the target partition of the mounted burning medium using a random number. The target partition includes the user partition and / or the boot partition of the burning medium. The identity identifier of the target partition is used to uniquely identify the target partition.
[0080] For specific limitations regarding the image burning device, please refer to the limitations regarding the image burning method above, which will not be repeated here. Each module in the aforementioned image burning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0081] Exemplary computing device
[0082] Another embodiment of this application also proposes a computing device, see [link to relevant documentation] Figure 3 As shown, an exemplary embodiment of this specification also provides a computing device, including: a memory and a processor, the memory storing a computer program, the processor executing the computer program and performing the steps of the image burning method according to various embodiments of this specification described above.
[0083] The internal structure of the computing device can be as follows: Figure 3 As shown, the computing device includes a processor, memory, network interface, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it follows the steps of the image burning method according to various embodiments of this specification described in the above embodiments.
[0084] The processor may include the main processor, as well as baseband chips, modems, etc.
[0085] It is understood that the processor in the embodiments of this specification can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0086] It is understood that the memory in the embodiments of this specification may be non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0087] Input devices may include devices that receive data and information input by the user, such as keyboards, mice, cameras, scanners, light pens, voice input devices, touch screens, pedometers, or gravity sensors.
[0088] Output devices may include devices that allow information to be output to the user, such as displays, printers, speakers, etc.
[0089] The communication interface may include any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
[0090] The computing device may also include a display component and a voice component. The display component may be a liquid crystal display screen or an e-ink display screen. The input device of the computing device may be a touch layer covering the display component, or a button, trackball or touchpad set on the casing of the computing device, or an external keyboard, touchpad or mouse, etc.
[0091] Those skilled in the art will understand that Figure 3 The structures shown are merely block diagrams of some structures related to the solutions in this specification and do not constitute a limitation on the computing devices on which the solutions in this specification are applied. Specific computing devices may include more or fewer components than those shown in the figures, or combine certain components, or have different component arrangements.
[0092] Exemplary computer program products and storage media
[0093] In addition to the methods and devices described above, the image burning method provided in the embodiments of this specification can also be a computer program product, which includes computer program instructions that, when executed by a processor, cause the processor to perform the steps in the image burning method according to various embodiments of this specification as described in the "Exemplary Methods" section above.
[0094] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0095] The computer program product described herein can be written in any combination of one or more programming languages to perform the operations of the embodiments described herein. These programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0096] Furthermore, embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor of the steps in the image burning methods according to various embodiments of this specification as described in the "Exemplary Methods" section above.
[0097] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this specification can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0098] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0099] The embodiments described above are merely illustrative of several implementation methods outlined in this specification. While the descriptions are specific and detailed, they should not be construed as limiting the scope of the solutions provided in this specification. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this specification, and these all fall within the scope of protection of this specification. Therefore, the scope of protection for this patent should be determined by the appended claims.
Claims
1. A method for burning an image, characterized in that, Applied to a target device, the target device is used to connect a medium to be programmed, and the medium to be programmed is used to install into target hardware for testing the target hardware. The image programming method includes: The data in the target image file is written sequentially into the medium to be burned, so as to burn the target image onto the medium; the data in the target image file is stored in the original order and state of the data in the target image. Mount the medium to be burned and expand the user partition of the mounted medium to be burned; The identity of the target partition of the mounted burning medium is updated using a random number. The target partition includes the user partition and / or the boot partition of the burning medium. The identity of the target partition is used to uniquely identify the target partition.
2. The method according to claim 1, characterized in that, The step of updating the identity of the target partition of the mounted medium to be burned using a random number includes: Using a random number as the preset identity identifier of the target partition of the medium to be burned, the preset identity identifier of the target partition is updated in the corresponding partition file of the medium to be burned, so as to update the identity identifier of the target partition of the medium to be burned.
3. The method according to claim 2, characterized in that, The use of random numbers as the preset identity identifier for the target partition of the medium to be burned includes: The first random number is used as the preset identity identifier of the boot partition of the medium to be burned; The first random number is different from the second random number.
4. The method according to claim 1, characterized in that, Expanding the user partition of the mounted medium to be burned includes: Expand the user partition of the mounted medium to be burned to the remaining storage space of the medium to be burned, the remaining storage space including the storage space other than the user partition and the boot partition.
5. The method according to claim 1, characterized in that, Before expanding the user partition of the mounted medium to be burned, the method further includes: Obtain a first identifier and a second identifier from the target image file, wherein the first identifier includes a boot partition type identifier and the second identifier includes a user partition type identifier; If the first identifier and the second identifier are obtained, the user partition and the boot partition in the medium to be burned are determined according to the first identifier and the second identifier.
6. The method according to claim 5, characterized in that, The step of determining the user partition and boot partition in the medium to be burned based on the first identifier and the second identifier includes: The program detects the medium to be burned. If the type identifier of the partition in the medium to be burned matches the first identifier, it is marked as a boot partition. If the type identifier of the partition in the medium to be burned matches the second identifier, it is marked as a user partition.
7. The method according to any one of claims 1 to 6, characterized in that, Before sequentially writing the data from the target image file into the medium to be burned, the method further includes: If the burning conditions are met, the step of sequentially writing the data from the target image file into the medium to be burned is performed. If the burning conditions are not met, the burning process will be terminated. The burning conditions include: the storage capacity of the medium to be burned is greater than the size of the target image and the target image file contains a first identifier and a second identifier, wherein the first identifier includes a boot partition type identifier and the second identifier includes a user partition type identifier.
8. The method according to any one of claims 1 to 6, characterized in that, The number of media to be burned is multiple; The process of mounting the medium to be burned and expanding the user partition of the mounted medium to be burned includes: Multiple media to be burned are mounted, and the user partitions of the multiple mounted media to be burned are expanded.
9. A hardware testing system, characterized in that, include: Offline programming device, target hardware, and programming medium; among which, The offline burning device is configured to burn a target image onto the medium to be burned according to any one of claims 1 to 8; The target hardware is configured to be tested using the medium to be burned with the target image.
10. A computer program product, characterized in that, The computer program product includes a computer program, which, when executed by a processor, implements the image burning method as described in any one of claims 1 to 8.