File loading method and computer-readable storage medium
By obtaining and modifying system configuration files, the problems of large UEFI R&D resource consumption and large modification limitations are solved, and flexible configuration parameter modification is achieved to meet the needs of different customers.
Patent Information
- Application Number
- CN202110869234.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-07-30
AI Technical Summary
In the existing technology, UEFI R&D and project testing occupy a lot of resources, and have large modification limitations, which cannot meet the personalized needs of different customers.
A file loading method is provided, which obtains the system configuration file, receives the modification instruction, modifies the configuration parameters, generates the updated system configuration file, and obtains the target system configuration file according to the user's needs, and supports modification after the user downloads it.
It reduces the waste of UEFI R&D and project testing resources, expands the opportunity for modification, ensures the operability of modification, and meets the personalized needs of different customers.
Smart Images

Figure CN113641419B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to file loading technology in the computer field, and in particular to a file loading method and a computer-readable storage medium. Background Art
[0002] At present, the Unified Extensible Firmware Interface (UEFI) has a set of default settings, and different customers require different default settings according to their own usage. In addition, some customers will require modification of the UEFI default values. In order to meet the above requirements, UEFI R&D personnel in related technologies need to develop different default client versions for different customers on the same project, or use out-of-band tools to modify the UEFI settings. However, the above solution occupies a large amount of UEFI R&D and project testing resources, and the default value can only be modified before the customer downloads the UEFI default value, and the modification is relatively limited. Summary of the Invention
[0003] To solve the above technical problems, the embodiments of the present application hope to provide a file loading method and a computer-readable storage medium, which solve the problem that the related technologies occupy a large amount of UEFI R&D and project testing resources and have large modification limitations.
[0004] The technical solution of this application is achieved as follows:
[0005] A file loading method, the method comprising:
[0006] Obtaining a system configuration file for configuration parameters of a boot system of an electronic device; wherein the system configuration file includes system configuration information of the configuration parameters; the system configuration file is a structured format file;
[0007] receiving a modification instruction for modifying the system configuration file;
[0008] Based on the modification instruction, modify the configuration information of the configuration parameters in the system configuration file to obtain an updated system configuration file;
[0009] An acquisition request for acquiring a target system configuration file is received, and the target system configuration file is acquired from the updated system configuration file based on the acquisition request.
[0010] In the above solution, before receiving the modification request for modifying the system configuration file, the method further includes:
[0011] Determining a target storage area in a target management module / target interface of the electronic device;
[0012] The system configuration file is stored in the target storage area of the target management module / target interface.
[0013] In the above solution, the step of modifying the configuration information of the configuration parameters in the system configuration file based on the modification instruction to obtain an updated system configuration file and saving the updated system configuration file includes:
[0014] Retrieving the system configuration file from the target storage area based on the modification instruction, and analyzing the modification instruction to determine target configuration information;
[0015] Based on the target configuration information, modify the configuration information of the target configuration parameters in the system configuration file that match the target configuration information to obtain the updated system configuration file;
[0016] The updated system configuration file is stored in the target storage area.
[0017] In the above solution, the method further includes:
[0018] Receive setting information for setting a file name of the updated system configuration file; wherein the setting information carries a target file name of the updated system configuration file;
[0019] Based on the setting information, setting the file name of the updated system configuration file as the target file name, and establishing an association relationship between the target file name and the updated system configuration file;
[0020] The target file name is stored in the target storage area.
[0021] In the above solution, the method further includes:
[0022] Determine a target sub-storage area in the target storage area of the target management module / target interface;
[0023] Accordingly, storing the target name in the target storage area includes:
[0024] The target file name is stored in the target sub-storage area of the target management module / target interface.
[0025] In the above solution, the method further includes:
[0026] In a case where the updated system configuration file includes multiple versions, setting a priority of each version of the updated system configuration file;
[0027] The priority of each version of the updated system configuration file is stored in the target sub-storage area.
[0028] In the above solution, each version of the updated system configuration file is stored in a different sub-area of the target storage area.
[0029] In the above solution, obtaining the target system configuration file from the updated system configuration file based on the acquisition request includes:
[0030] Acquire the priority and the target file name from the target sub-storage area based on the acquisition request;
[0031] The target system configuration file is acquired from the updated system configuration files stored in the target storage area based on the priority, the target file name, and the association relationship.
[0032] In the above solution, the target interface includes a communication interface of a boot system, and the target management module includes a baseboard management controller.
[0033] A computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the file loading method described above.
[0034] The file loading method and computer-readable storage medium provided in the embodiments of the present application obtain a system configuration file including system configuration information of the configuration parameters for the boot system of an electronic device. The system configuration file is a structured format file, receives a modification instruction for modifying the system configuration file, modifies the configuration information of the configuration parameters in the system configuration file based on the modification instruction, obtains an updated system configuration file, receives an acquisition request for obtaining a target system configuration file, and obtains the target system configuration file from the updated system configuration file based on the acquisition request. In this way, the system configuration file can be obtained first. When the user needs to modify his or her own system configuration file, the system configuration file can be modified according to his or her own modification requirements without the need to develop multiple system configuration files in the development phase. The configuration information of the configuration parameters can also be modified after the user downloads the system configuration file. It is not limited to the usage scenario, solves the problem that the UEFI R&D and project testing resources occupied in the related technology are large and the modification limitations are large, avoids waste of resources, and ensures the operability of the modification. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flowchart of a file loading method provided in an embodiment of the present application;
[0036] Figure 2A flowchart of another file loading method provided in an embodiment of the present application;
[0037] Figure 3 A flowchart of another file loading method provided in an embodiment of the present application;
[0038] Figure 4 A schematic diagram of a file loading device provided in an embodiment of the present application
[0039] Figure 5 A schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0041] The embodiment of the present application provides a file loading method, which is applied to an electronic device, referring to Figure 1 As shown, the method includes the following steps:
[0042] Step 101: Obtain a system configuration file of configuration parameters for a boot system of an electronic device.
[0043] The system configuration file includes system configuration information of configuration parameters; the system configuration file is a structured format file.
[0044] In an embodiment of the present application, a boot system may refer to a system used to boot an electronic device; in one feasible implementation, the boot system may include a UEFI system. A system configuration file may refer to a file that records configuration parameters of the UEFI system; system configuration information may refer to some default configuration information of the UEFI system; in one feasible implementation, system configuration information may refer to default configuration information; that is, a system configuration file is a file containing default configuration information for the UEFI system. It should be noted that the system configuration file may be a default configuration file for all users.
[0045] In other embodiments of the present application, the structured format file refers to a system configuration file that exists in a structured format; wherein the system configuration file can be set as a Structure format file. In a feasible implementation, the system configuration file can be set as a default.xml file.
[0046] Step 102: Receive a modification instruction for modifying a system configuration file.
[0047] The modification instruction can be generated by a user who needs to modify the system configuration file. Of course, the user who needs to modify the system configuration file can refer to a user who has the default configuration file of the UEFI system. In other words, different modification instructions can be received from different users in this embodiment of the application. It should be noted that the modification instruction can be generated and triggered by the user on his or her own local terminal.
[0048] Step 103: Based on the modification instruction, modify the configuration information of the configuration parameters in the system configuration file to obtain an updated system configuration file.
[0049] Among them, the modification instruction includes the configuration parameters of the system configuration file that the user wants to modify, and the modified configuration information corresponding to the configuration parameters that the user wants to modify; of course, the modification instruction can also include two instructions, the first instruction is to initiate a modification request to modify the configuration parameters, and the second instruction is the corresponding modified configuration information for specifically modifying the configuration information of the configuration parameters in the system configuration file; when the modification instruction includes two instructions, the user can first enter the first instruction, and then enter the second instruction; accordingly, the electronic device can first respond to the first instruction to download the system configuration file, and then respond to the second instruction to modify the configuration information of the configuration parameters in the system configuration file according to the information input by the user, thereby obtaining a modified and updated system configuration file; when the modification instruction includes one instruction, the electronic device directly responds to the modification instruction to download the system configuration file, and modifies the configuration information of the configuration parameters in the system configuration file according to the information input by the user.
[0050] Step 104: Receive an acquisition request for acquiring a target system configuration file, and acquire the target system configuration file from the updated system configuration file based on the acquisition request.
[0051] In an embodiment of the present application, a request for acquisition may be input to an electronic device after a user sends a modification instruction and the user's electronic device completes the modification of the configuration information of the configuration parameters in the system configuration file; this request for acquisition is used to obtain the target system configuration file required by the user in the current application scenario. In other words, after the user inputs the request for acquisition to the electronic device, the electronic device can respond to the request and determine the target system configuration file required by the user from the updated system configuration files. It should be noted that the updated system configuration file may include multiple system configuration files.
[0052] The file loading method provided in the embodiment of the present application obtains a system configuration file including system configuration information of the configuration parameters for the boot system of the electronic device. The system configuration file is a structured format file, receives a modification instruction for modifying the system configuration file, modifies the configuration information of the configuration parameters in the system configuration file based on the modification instruction, obtains an updated system configuration file, receives an acquisition request for obtaining a target system configuration file, and obtains the target system configuration file from the updated system configuration file based on the acquisition request. In this way, the system configuration file can be obtained first. When the user needs to modify his or her own system configuration file, the system configuration file can be modified according to his or her own modification requirements without the need to develop multiple system configuration files in the development phase. The configuration information of the configuration parameters can also be modified after the user downloads the system configuration file. It is not limited to the usage scenario, solves the problem that the UEFI R&D and project testing resources occupied in the related technology are large and the modification limitations are large, avoids waste of resources, and ensures the operability of the modification.
[0053] Based on the above embodiment, the embodiment of the present application provides a file loading method, referring to Figure 2 As shown, the method includes the following steps:
[0054] Step 201: The electronic device obtains a system configuration file of configuration parameters for a boot system of the electronic device.
[0055] The system configuration file includes system configuration information of configuration parameters; the system configuration file is a structured format file.
[0056] In an embodiment of the present application, configuration parameters may include item options and default information; wherein, the values of item options and default information are adjustable. It should be noted that developers can develop a system configuration file suitable for all users in advance and assign the system configuration file to their own users. In this way, when a user needs to modify his or her system configuration file, he or she can obtain the system configuration file through his or her own terminal (electronic device). In addition, because the system configuration file in the embodiment of the present application can be applied to all users, there is no need for developers to develop different versions of system configuration files for different users, which reduces resource consumption and reduces costs.
[0057] Step 202: The electronic device determines a target storage area in a target management module / target interface of the electronic device.
[0058] The target interface includes a communication interface of the boot system, and the target management module includes a baseboard management controller.
[0059] In the embodiment of the present application, the target interface may be a Serial Peripheral Interface (SPI) of the UEFI, and the target management module may be a Baseboard Management Controller (BMC); that is, the target storage area may be an area in the SPI Read-Only Memory (ROM) of the UEFI and / or a database of the BMC. In one feasible implementation, the target storage area may be a fixed area segment defined in the SPI ROM of the UEFI.
[0060] Step 203: The electronic device stores the system configuration file in the target storage area of the target management module / target interface.
[0061] The default file may be stored in a fixed area segment in the SPI ROM of the UEFI, or in a specific area of the database of the BMC, or both in a fixed area segment in the SPI ROM of the UEFI and in a specific area of the database of the BMC.
[0062] Step 204: The electronic device receives a modification instruction for modifying the system configuration file.
[0063] In an embodiment of the present application, the World Wide Web (WEB) user interface (UI) of the BMC of the electronic device can provide an interface for the user (i.e., the user) to download all the default.xml files provided by the developer to the user. In other words, the user can enter his or her own modification instructions through the interface provided on the WEB UI.
[0064] Step 205: The electronic device obtains the system configuration file from the target storage area based on the modification instruction, and analyzes the modification instruction to determine the target configuration information.
[0065] The modification instruction may carry the target configuration information that the user wants to modify, that is, the target configuration information may be obtained by the electronic device after parsing the modification instruction. Furthermore, the system configuration file may be obtained by the electronic device from an area in the SPI ROM of the local UEFI and / or an area in the database of the BMC after receiving the modification instruction input by the user; or it may be obtained from an area in the SPI ROM of the UEFI and / or an area in the database of the BMC on the server; if the system configuration file is obtained from the server, the electronic device may send a request to the server to obtain the system configuration file, so as to receive the system configuration file fed back by the server.
[0066] Step 206: The electronic device modifies the configuration information of the target configuration parameters that match the target configuration information in the system configuration file based on the target configuration information to obtain an updated system configuration file.
[0067] After obtaining the target configuration information, the electronic device may determine the target configuration parameters that match the target configuration information from the system configuration file, and modify the configuration information of the target configuration parameters to the target configuration information, thereby obtaining an updated system configuration file.
[0068] In a feasible implementation, the position of the symbol "<>" in the default file is modified as an example for explanation: the configuration information before and after the modification method can be as follows: Before the modification, the system configuration file is DevicesandIOPorts.Device_Slot9=Disable= <enable>=Auto, and the updated system configuration file is DevicesandIOPorts.Device_Slot9=Disable=Enable= <auto>.
[0069] Step 207: The electronic device stores the updated system configuration file in the target storage area.
[0070] After the electronic device obtains the updated system configuration file, it can upload and save the updated system configuration file through the BMC to save the new default settings. Of course, the electronic device can still store the updated system configuration in the area in the UEFI SPI ROM and / or the area in the BMC database.
[0071] Step 208: The electronic device receives an acquisition request for acquiring a target system configuration file, and acquires the target system configuration file from the updated system configuration files based on the acquisition request.
[0072] In the embodiment of the present application, users can input their own acquisition request through the interface provided on the WEB UI. In addition, in the present application, users can modify the configuration information of the screen configuration parameters in the system configuration file according to their own needs after obtaining (downloading) the system configuration file, rather than being limited to modifying it before downloading. This expands the opportunity for modification and thus ensures the operability of the modification. In addition, there is no need for researchers to modify the source code, and users can make changes quickly by themselves, which is more convenient and quick.
[0073] It should be noted that, for the description of the same steps and contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.
[0074] The file loading method provided in the embodiment of the present application can modify the system configuration file according to the user's modification requirements when the user needs to modify his or her system configuration file, without the need to develop multiple system configuration files during the development phase. The configuration information of the configuration parameters can also be modified after the user downloads the system configuration file. It is not limited to the usage scenario, solves the problem in the related technology that the UEFI R&D and project testing resources occupied are large and the modification limitations are large, avoids waste of resources, and ensures the operability of the modification.
[0075] Based on the above embodiment, the embodiment of the present application provides a file loading method, referring to Figure 3 As shown, the method includes the following steps:
[0076] Step 301: The electronic device obtains a system configuration file of configuration parameters for the boot system of the electronic device.
[0077] The system configuration file includes system configuration information of configuration parameters; the system configuration file is a structured format file.
[0078] Step 302: The electronic device determines a target storage area in a target management module / target interface of the electronic device.
[0079] Step 303: The electronic device stores the system configuration file to the target storage area of the target management module / target interface.
[0080] Step 304: The electronic device receives a modification instruction for modifying the system configuration file.
[0081] Step 305: The electronic device obtains the system configuration file from the target storage area based on the modification instruction, and analyzes the modification instruction to determine the target configuration information.
[0082] Step 306: The electronic device modifies the configuration information of the target configuration parameters that match the target configuration information in the system configuration file based on the target configuration information to obtain an updated system configuration file.
[0083] Step 307: The electronic device stores the updated system configuration file in the target storage area.
[0084] Each version of the updated system configuration file is stored in a different sub-area of the target storage area.
[0085] In the embodiment of the present application, the area in the UEFI SPI ROM and / or the area in the BMC Database can be subdivided into different sub-areas, and different updated system configuration (default.xml) files can be stored in different sub-areas. In other words, the updated system configuration file can include multiple versions.
[0086] Step 308: The electronic device receives setting information for setting a file name of an updated system configuration file.
[0087] The setting information carries the target file name of the updated system configuration file.
[0088] In the embodiment of the present application, the user can input setting information through the interface provided on the WEB UI.
[0089] Step 309: The electronic device sets the file name of the updated system configuration file as the target file name based on the setting information, and establishes an association relationship between the target file name and the updated system configuration file.
[0090] In the embodiments of the present application, the target file name is used to uniquely identify the updated system configuration file, so that the user can quickly find the updated system configuration file by entering the file name when subsequently obtaining the updated system configuration file they need. Therefore, there is a correspondence between the target file name and the updated system configuration file, and the target file name of each version of the updated system configuration file is different.
[0091] Step 310: The electronic device stores the target file name in the target storage area.
[0092] The target file name can be written to the area in the SPI ROM of the UEFI and / or the Database of the BMC.
[0093] It should be noted that step 310 can be implemented in the following ways:
[0094] Step 310a: The electronic device determines a target sub-storage area in the target storage area of the target management module / target interface.
[0095] The target sub-storage area refers to an area in the SPI ROM of the UEFI and / or a storage location at the beginning of the Database of the BMC.
[0096] Step 310b: The electronic device stores the target file name in the target sub-storage area of the target management module / target interface.
[0097] The electronic device can define a header in the UEFI SPI ROM area and / or the initial storage location in the BMC Database to store the target file name of all updated default.xml files. This allows the BMC and UEFI to obtain overall file information more quickly.
[0098] Step 311: When the updated system configuration file includes multiple versions, the electronic device sets a priority for each version of the updated system configuration file.
[0099] In the embodiment of the present application, the user can set the priority of each version of the updated system configuration file according to their needs; in a feasible implementation, the priority of each version of the updated system configuration file can be set as follows:
[0100] <Name="LegacyBootDefault">
[0101] <Priority=2>
[0102] <version="1.0"> .
[0103] Step 312: The electronic device stores the priority of each version of the updated system configuration file in the target sub-storage area.
[0104] It should be noted that the priority of each version of the updated default.xml file can be stored in the area in the UEFI SPI ROM and / or the header at the beginning of the storage location in the BMC Database, which allows the BMC and UEFI to obtain overall file information more quickly.
[0105] Step 313: The electronic device receives an acquisition request for acquiring a target system configuration file, and acquires a priority and a target file name from the target sub-storage area based on the acquisition request.
[0106] Step 314: The electronic device obtains the target system configuration file from the updated system configuration files stored in the target storage area based on the priority, the target file name, and the association relationship.
[0107] In an embodiment of the present application, when an electronic device executes a default operation to download an update through UEFI, it will retrieve the highest-priority file from the UEFI's SPI ROM area and / or the BMC's database, find the system file name of the highest-priority file from the target file name, and then download the updated default.xml file corresponding to the system file name to obtain the target system configuration file. Of course, it is not necessary to download the file with the highest priority; it is also possible to download any version of the updated default.xml file ranked in the top N priority levels based on user needs.
[0108] For the description of the same steps and contents in this embodiment as those in other embodiments, reference can be made to the descriptions in other embodiments and will not be repeated here.
[0109] The file loading method provided in the embodiment of the present application can modify the system configuration file according to the user's modification requirements when the user needs to modify his or her system configuration file, without the need to develop multiple system configuration files during the development phase. The configuration information of the configuration parameters can also be modified after the user downloads the system configuration file. It is not limited to the usage scenario, solves the problem in the related technology that the UEFI R&D and project testing resources occupied are large and the modification limitations are large, avoids waste of resources, and ensures the operability of the modification.
[0110] Based on the above embodiments, the embodiments of the present application provide a file loading device, which can be applied to Figures 1 to 3 In the file loading method provided in the corresponding embodiment, refer to Figure 4 As shown, the file loading device may include: an acquisition unit 41, a receiving unit 42, a modification unit 43 and a processing unit 44, wherein:
[0111] An acquiring unit 41 is configured to acquire a system configuration file of configuration parameters of a boot system of an electronic device;
[0112] The system configuration file includes system configuration information of configuration parameters; the system configuration file is a structured format file;
[0113] The receiving unit 42 is configured to receive a modification instruction for modifying a system configuration file;
[0114] A modifying unit 43 is configured to modify configuration information of configuration parameters in the system configuration file based on the modification instruction to obtain an updated system configuration file;
[0115] The processing unit 44 is configured to receive an acquisition request for acquiring a target system configuration file, and acquire the target system configuration file from the updated system configuration files based on the acquisition request.
[0116] In other embodiments of this application, refer to Figure 4 As shown, the file loading device may further include: a determination unit 45 and a storage unit 46, wherein:
[0117] a determination unit 45, configured to determine a target storage area in a target management module / target interface of the electronic device;
[0118] The storage unit 46 is configured to store the system configuration file in the target storage area of the target management module / target interface.
[0119] In other embodiments of the present application, the modifying unit 43 is further configured to perform the following steps:
[0120] Based on the modification instruction, obtain the system configuration file from the target storage area, and analyze the modification instruction to determine the target configuration information;
[0121] Based on the target configuration information, modify the configuration information of the target configuration parameters matching the target configuration information in the system configuration file to obtain an updated system configuration file;
[0122] Store the updated system configuration file to the target storage area.
[0123] In other embodiments of the present application, the receiving unit 43 is further configured to receive setting information for setting a file name of an updated system configuration file;
[0124] The setting information carries the target file name of the updated system configuration file;
[0125] The processing unit 44 is further configured to set the file name of the updated system configuration file as the target file name based on the setting information, and to establish an association relationship between the target file name and the updated system configuration file;
[0126] The storage unit 46 is further configured to store the target file name in the target storage area.
[0127] In other embodiments of the present application, the storage unit 46 is further configured to perform the following steps:
[0128] Determine a target sub-storage area in the target storage area of the target management module / target interface;
[0129] The target file name is stored in the target sub-storage area of the target management module / target interface.
[0130] In other embodiments of the present application, the processing unit 44 is further configured to set a priority of each version of the updated system configuration file when the updated system configuration file includes multiple versions;
[0131] The storage unit 46 is further configured to store the priority of each version of the updated system configuration file in the target sub-storage area.
[0132] In other embodiments of the present application, each version of the updated system configuration file is stored in a different sub-area of the target storage area.
[0133] In other embodiments of the present application, the processing unit 44 is further configured to perform the following steps:
[0134] Obtaining a priority and a target file name from the target sub-storage area based on the acquisition request;
[0135] A target system configuration file is obtained from updated system configuration files stored in a target storage area based on the priority, the target file name, and the association relationship.
[0136] In other embodiments of the present application, the target interface includes a communication interface of a boot system, and the target management module includes a baseboard management controller.
[0137] It should be noted that the interaction process between the various units in this embodiment can refer to Figures 1 to 3 The implementation process of the file loading method provided in the corresponding embodiment will not be repeated here.
[0138] The file loading device provided in the embodiment of the present application can modify the system configuration file according to the user's modification needs when the user needs to modify his or her system configuration file, without the need to develop multiple system configuration files during the development phase. The configuration information of the configuration parameters can also be modified after the user downloads the system configuration file. It is not limited to the usage scenario, solves the problem in the related technology that the UEFI R&D and project testing resources occupied are large and the modification limitations are large, avoids waste of resources, and ensures the operability of the modification.
[0139] Based on the above embodiments, the embodiments of the present application provide an electronic device which can be applied to Figures 1 to 3 In the file loading method provided in the corresponding embodiment, refer to Figure 5 As shown, the electronic device includes: a processor 51, a memory 52 and a communication bus 53, wherein:
[0140] The communication bus 53 is used to realize the communication connection between the processor 51 and the memory 52;
[0141] The processor 51 is configured to execute the file loading program stored in the memory 52 to implement the following steps:
[0142] Obtaining a system configuration file of configuration parameters for a boot system of an electronic device;
[0143] The system configuration file includes system configuration information of configuration parameters; the system configuration file is a structured format file;
[0144] Receive modification instructions for modifying system configuration files;
[0145] Based on the modification instruction, the configuration information of the configuration parameters in the system configuration file is modified to obtain an updated system configuration file;
[0146] An acquisition request for acquiring a target system configuration file is received, and the target system configuration file is acquired from the updated system configuration files based on the acquisition request.
[0147] In other embodiments of the present application, the processor 51 is configured to execute the file loading program stored in the memory 52, and may further implement the following steps:
[0148] Determining a target storage area in a target management module / target interface of the electronic device;
[0149] The system configuration file is stored in the target storage area of the target management module / target interface.
[0150] In other embodiments of the present application, the processor 51 is configured to execute configuration information stored in the memory 52 to modify configuration parameters in the system configuration file based on the modification instruction to obtain an updated system configuration file, so as to implement the following steps:
[0151] Based on the modification instruction, obtain the system configuration file from the target storage area, and analyze the modification instruction to determine the target configuration information;
[0152] Based on the target configuration information, modify the configuration information of the target configuration parameters matching the target configuration information in the system configuration file to obtain an updated system configuration file;
[0153] Store the updated system configuration file to the target storage area.
[0154] In other embodiments of the present application, the processor 51 is configured to execute the file loading program stored in the memory 52, and may further implement the following steps:
[0155] Receive setting information for setting a file name of an updated system configuration file;
[0156] The setting information carries the target file name of the updated system configuration file;
[0157] Based on the setting information, the file name of the updated system configuration file is set as the target file name, and an association relationship between the target file name and the updated system configuration file is established;
[0158] Store the target file name in the target storage area.
[0159] In other embodiments of the present application, the processor 51 is configured to execute the file loading program stored in the memory 52, and may further implement the following steps:
[0160] Determine a target sub-storage area in the target storage area of the target management module / target interface;
[0161] Accordingly, the processor 51 is configured to execute the storage target file name stored in the memory 52 to the target storage area, so as to implement the following steps:
[0162] The target file name is stored in the target sub-storage area of the target management module / target interface.
[0163] In other embodiments of the present application, the processor 51 is configured to execute the file loading program stored in the memory 52, and may further implement the following steps:
[0164] In the case where the updated system configuration file includes multiple versions, setting the priority of each version of the updated system configuration file;
[0165] The priority of each version of the updated system configuration file is stored in the target sub-storage area.
[0166] In other embodiments of the present application, each version of the updated system configuration file is stored in a different sub-area of the target storage area.
[0167] The processor 51 is configured to execute the steps stored in the memory 52 to obtain the target system configuration file from the updated system configuration file based on the acquisition request, so as to implement the following steps:
[0168] Obtaining a priority and a target file name from the target sub-storage area based on the acquisition request;
[0169] A target system configuration file is obtained from updated system configuration files stored in a target storage area based on the priority, the target file name, and the association relationship.
[0170] In other embodiments of the present application, the target interface includes a communication interface of a boot system, and the target management module includes a baseboard management controller.
[0171] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can be referred to Figures 1 to 3 The implementation process of the file loading method provided in the corresponding embodiment will not be repeated here.
[0172] The electronic device provided in the embodiment of the present application can modify the system configuration file according to the user's modification needs when the user needs to modify his or her system configuration file, without the need to develop multiple system configuration files during the development phase. The configuration information of the configuration parameters can also be modified after the user downloads the system configuration file, which is not limited to the usage scenario. It solves the problem in the related technology that the UEFI R&D and project testing resources occupied are large and the modification limitations are large, avoids waste of resources, and ensures the operability of the modification.
[0173] Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the following. Figures 1 to 3 The corresponding embodiment provides steps of the file loading method.
[0174] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.
[0175] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0176] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0178] The above description is merely a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application.< / auto> < / enable>
Claims
1. A file loading method, the method comprising: Obtaining a system configuration file for configuration parameters of a boot system of an electronic device; wherein the system configuration file includes system configuration information of the configuration parameters; the system configuration file is a structured format file; Determining a target storage area in a target management module or a target interface of the electronic device; the target management module includes a baseboard management controller, and the target interface includes a serial peripheral interface of a boot system; Storing the system configuration file in the target management module or the target storage area of the target interface; receiving a modification instruction for modifying the system configuration file; the modification instruction is input by a terminal of the electronic device; Retrieving the system configuration file from the target storage area based on the modification instruction, and analyzing the modification instruction to determine target configuration information; Based on the target configuration information, modify the configuration information of the target configuration parameters in the system configuration file that match the target configuration information to obtain an updated system configuration file; The updated system configuration file is stored in the target storage area.
2. The method according to claim 1, characterized in that The method further comprises: Receive setting information for setting a file name of the updated system configuration file; wherein the setting information carries a target file name of the updated system configuration file; Based on the setting information, setting the file name of the updated system configuration file as the target file name, and establishing an association relationship between the target file name and the updated system configuration file; The target file name is stored in the target storage area.
3. The method according to claim 2, characterized in that The method further comprises: Determine a target sub-storage area in the target storage area of the target management module or the target interface; Accordingly, storing the target name in the target storage area includes: The target file name is stored in the target management module or the target sub-storage area of the target interface.
4. The method according to claim 3, characterized in that The method further comprises: In a case where the updated system configuration file includes multiple versions, setting a priority of each version of the updated system configuration file; The priority of each version of the updated system configuration file is stored in the target sub-storage area.
5. The method according to claim 4, characterized in that Each version of the updated system configuration file is stored in a different sub-area of the target storage area.
6. The method according to claim 4, characterized in that The method further comprises: Acquire the priority and the target file name from the target sub-storage area based on the acquisition request; A target system configuration file is acquired from the updated system configuration file stored in the target storage area based on the priority, the target file name, and the association relationship.
7. The method according to claim 1, characterized in that The target interface includes a communication interface of a boot system.
8. A computer-readable storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the steps of the file loading method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Out-of-band altering method of configuration file of computer and computer
CN103399840A
Method and device for modifying of system configuration
CN104951321A