Parameter Configuration Method, Device, Equipment and Medium of Basic Input / Output System

By reconstructing BIOS code to define variable regions and sequences, and automatically writing custom parameters, the method addresses resource inefficiencies and human error in server configuration, enabling efficient multi-configuration support.

CN114138278BActive Publication Date: 2025-07-15LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111425748.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2025-07-15
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

The existing technology is difficult to implement server support for multiple configuration modes, resulting in waste of R&D resources, low production efficiency and high risks.

Method used

Refactor the code of the basic input and output system, adjust the variable storage rule code to the target rule code, build a custom variable configuration file, and update the firmware through the updated image file to automatically configure the parameter values of the target variable.

Benefits of technology

The server supports multiple configuration modes, improves production efficiency, reduces the risk of manual misoperation, and saves R&D resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114138278B_ABST
    Figure CN114138278B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, device and medium for parameter configuration of a basic input / output system, including: reconstructing the code of the basic input / output system to adjust the variable storage rule code to a target rule code; compiling the reconstructed code to obtain an updated image file; constructing a custom variable configuration file for recording custom parameter values of target variables, performing firmware update on the basic input / output system based on the updated image file, and then writing the custom parameter values into the target variable area to complete the parameter configuration of the target variables. When performing firmware update on the basic input / output system using the updated image file, the above solution writes the custom parameter values in the custom variable configuration file into the target variable area to complete the parameter configuration of the target variables, so as to achieve automated operation, improve production efficiency, reduce the risk caused by manual misoperation, and save R & D resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a basic input and output system parameter configuration method, device, equipment and medium. Background Art

[0002] BIOS (Basic Input Output System) is a set of programs embedded in a ROM (Read Only Memory image) chip on the computer's motherboard. It stores the computer's most important basic input and output programs, system settings, self-test programs after powering on, and system startup programs. It is also the first set of programs executed after the server is powered on, and plays an irreplaceable role in the stability of the entire computer.

[0003] With the rapid development of science and technology, various types of servers have been widely used in all aspects of life. In actual applications, different users have different configuration requirements for the same server. Some users require performance-first configuration, some users require power consumption-first configuration, and some users want to customize special configurations, which requires a server to support multiple configuration modes.

[0004] Currently, the following methods are generally used to support multiple configurations. The first method is to release different customized versions for different customers, but this method requires R&D personnel to manage multiple versions, and for the same bug (program vulnerability), the same solution needs to be imported synchronously in different versions. These operations are repetitive operations, resulting in a huge waste of R&D resources. The second method is for operators to manually configure the basic input and output system options when leaving the factory or deploying the environment, and configure them one by one. This method not only consumes a lot of manpower and time costs, but is also very error-prone, so the production efficiency is extremely low and the risk is high.

[0005] To sum up, how to make a server support multiple configuration modes and at the same time achieve automated operation, save R&D resources, improve production efficiency, and reduce the risks caused by manual errors is a problem that needs to be solved urgently. Summary of the invention

[0006] In view of this, the purpose of the present invention is to provide a parameter configuration scheme for a basic input and output system, which can realize a server supporting multiple configuration modes, and achieve the effect of realizing automatic operation, saving R&D resources, improving production efficiency, and reducing error risks. The specific scheme is as follows:

[0007] In a first aspect, the present application discloses a parameter configuration method of a basic input / output system, comprising:

[0008] Refactor the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to the target rule code; the target rule code is the code for specifying the target variable area for specifically storing target variables and the storage order of the target variables; the target variables are variables related to the setting function options of the basic input / output system.

[0009] Compile the refactored code of the basic input / output system to obtain the updated image file of the basic input / output system.

[0010] Construct a custom variable configuration file for recording the custom parameter values of the target variables, perform firmware update on the basic input / output system based on the updated image file, and then write the custom parameter values of the target variables into the target variable area to complete the parameter configuration of the target variables.

[0011] Optionally, during the process of refactoring the code of the basic input / output system, it further includes:

[0012] Set the storage form of the target variables and the parameter values of the target variables as key-value pairs, and set a unique identification number for each target variable.

[0013] Optionally, the constructing a custom variable configuration file for recording the custom parameter values of the target variables includes:

[0014] Determine the configuration template corresponding to the target variable according to the target rule code.

[0015] Obtain the custom parameter values of the target variables through a preset parameter custom interface, and use the custom parameter values to assign values to the corresponding target variables in the configuration template to obtain a custom variable configuration file.

[0016] Optionally, the performing firmware update on the basic input / output system based on the updated image file includes:

[0017] After the operating system starts, store the target refresh tool, the updated image file, and the custom variable configuration file in a preset directory.

[0018] Construct a target refresh command and execute the target refresh command to call the target refresh tool in the preset directory, then use the target refresh tool and the updated image file in the preset directory to perform firmware refresh on the basic input / output system, and compile the custom variable configuration file in the preset directory to generate a binary file to be written to the target variable area of the flash chip of the basic input / output system.

[0019] Optionally, the constructing a target refresh command and executing the target refresh command includes:

[0020] Construct a target refresh command; the target refresh command includes a first command parameter for designating the target refresh tool as the refresh tool for performing the refresh operation, a second command parameter for designating the updated image file as the image file to be refreshed, and a third command parameter for designating the custom variable configuration file as the configuration file to be refreshed.

[0021] Execute the target refresh command to call the target refresh tool in the preset directory according to the first command parameter, then use the target refresh tool and the updated image file in the preset directory determined based on the second command parameter to perform firmware refresh on the basic input / output system, and compile the custom variable configuration file in the preset directory determined based on the third command parameter to generate a binary file to be written to the target variable area of the flash chip of the basic input / output system.

[0022] Optionally, the writing the custom parameter value of the target variable to the target variable area to complete the parameter configuration of the target variable includes:

[0023] Erase the target variable area of the flash chip of the basic input / output system, and write the custom parameter value of the target variable in the binary file to the target variable area of the flash chip of the basic input / output system to complete the parameter configuration of the target variable.

[0024] Optionally, after writing the custom parameter value of the target variable to the target variable area to complete the parameter configuration of the target variable, it further includes:

[0025] Trigger and run an automatic restart instruction, and after automatic restart, control the basic input / output system to read the target variable area and update the default parameter value of the target variable in the setting function option with the custom parameter value of the target variable stored in the read target variable area.

[0026] Second aspect, the present application discloses a parameter configuration device for a basic input / output system, including:

[0027] A code refactoring module, configured to refactor the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to a target rule code; the target rule code is a code for specifying a target variable area for specifically storing target variables and specifying the storage order of the target variables; the target variable is a variable related to the setting function options of the basic input / output system;

[0028] An image update module, configured to compile the refactored code of the basic input / output system to obtain an updated image file of the basic input / output system;

[0029] A parameter configuration module, configured to construct a custom variable configuration file for recording custom parameter values of the target variables, perform firmware update on the basic input / output system based on the updated image file, and then write the custom parameter values of the target variables into the target variable area to complete the parameter configuration of the target variables.

[0030] Third aspect, the present application discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, the parameter configuration method of the basic input / output system disclosed above is implemented.

[0031] Fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the parameter configuration method of the basic input / output system disclosed above is implemented.

[0032] It can be seen that the present application reconstructs the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to the target rule code; the target rule code is the code for specifying the target variable area for specifically storing target variables and the storage order of the target variables; the target variables are variables related to the setting function options of the basic input / output system; the reconstructed code of the basic input / output system is compiled to obtain the updated image file of the basic input / output system; a custom variable configuration file for recording the custom parameter values of the target variables is constructed, and the basic input / output system is updated with the firmware based on the updated image file, and then the custom parameter values of the target variables are written into the target variable area to complete the parameter configuration of the target variables. Thus, it can be seen that when the present application updates the firmware of the basic input / output system using the updated image file, the custom parameter values of the target variables are written into the target variable area to complete the parameter configuration of the target variables; among them, the custom parameter values can be changed, thereby enabling a server to support multiple configuration modes; in addition, this solution does not require manual processing, realizes automated operation, improves production efficiency, reduces the risk caused by manual misoperation, and saves R & D resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0034] Figure 1 It is a flowchart of a method for parameter configuration of a basic input / output system provided by the present application;

[0035] Figure 2 It is a flowchart of a specific method for parameter configuration of a basic input / output system provided by the present application;

[0036] Figure 3 It is a flowchart of a method for parameter configuration of a basic input / output system provided by the present application;

[0037] Figure 4 It is a flowchart of a specific method for parameter configuration of a basic input / output system provided by the present application;

[0038] Figure 5 It is a flowchart of a specific method for parameter configuration of a basic input / output system provided by the present application;

[0039] Figure 6Schematic diagram of the structure of a parameter configuration device for a basic input / output system provided by this application;

[0040] Figure 7 Structural diagram of an electronic device provided by this application. Detailed implementation manners

[0041] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0042] Currently, the method of implementing a server to support multiple configuration modes has problems such as wasting R & D resources, extremely low production efficiency, high risks, and inability to operate automatically. To overcome the above problems, this application provides a parameter configuration solution for a basic input / output system, which can enable a server to support multiple configuration modes, and at the same time achieve automatic operation, save R & D resources, improve production efficiency, reduce the risks brought by manual misoperations, and achieve the effect of automatic operation.

[0043] Refer to Figure 1 As shown, the embodiments of this application disclose a parameter configuration method for a basic input / output system. The method includes:

[0044] Step S11: Refactor the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to a target rule code; the target rule code is the code for specifying a target variable area for specifically storing target variables and the storage order of the target variables; the target variables are variables related to the setting function options of the basic input / output system.

[0045] In this embodiment, since the basic input / output system is a set of programs solidified on a ROM chip on the main board of a computer, when customizing the basic input / output system, it is necessary to refactor the code of the basic input / output system. The purpose of the refactoring is to adjust the variable storage rule code of the basic input / output system to a target rule code; it can be understood that the effects achieved after refactoring the code of the basic input / output system include re-layouting the flash memory chip of the basic input / output system, that is, determining the target variable area from the flash memory chip of the basic input / output system; among them, the target variable area can be the area between 0x00010000 and 0x00020000.

[0046] Specifically, after adjusting the variable storage rule code of the basic input / output system to the target rule code, a target variable area for specifically storing target variables is defined, the storage order of the target variables is defined, and the types of the target variables are also defined. That is, the target variables must be variables related to the BIOS Setup (the setup function of the basic input / output system) options. The target variable area is only used to store variables related to the setup function options of the basic input / output system, and other data cannot be written into this area. Moreover, the variables related to the setup function options of the basic input / output system must be stored in the target variable area in the pre-set storage order.

[0047] It should be noted that when storing the target variables and the parameter values of the target variables into the target variable area, they must be stored in the form of key-value pairs. And, in order to facilitate the differentiation and identification of the target variables, a unique identity identification number needs to be set for each of the target variables.

[0048] Step S12: Compile the code of the reconstructed basic input / output system to obtain the updated image file of the basic input / output system.

[0049] In this embodiment, the variable storage rule code of the reconstructed basic input / output system becomes the target rule code. Therefore, after compiling the code of the reconstructed basic input / output system, an updated image file that meets the custom configuration environment can be obtained, and this updated image file can be used for firmware update.

[0050] Step S13: Build a custom variable configuration file for recording the custom parameter values of the target variables, perform firmware update on the basic input / output system based on the updated image file, and then write the custom parameter values of the target variables into the target variable area to complete the parameter configuration of the target variables.

[0051] In this embodiment, the custom variable configuration file stores the target variables specified by the user and the parameter values corresponding to the target variables. The basic input / output system needs to perform parameter configuration according to the target variables and the parameter values. It can be understood that to obtain the custom variable configuration file, first, it is necessary to determine the configuration template corresponding to the target variable according to the target rule code, then obtain the custom parameter values of the target variable through the preset parameter custom interface, and use the custom parameter values to assign values to the corresponding target variables in the configuration template to obtain the custom variable configuration file. Specifically, since the custom parameter values are provided by the user, the configuration template needs to be sent to the user. The user determines the custom parameter values according to the requirements and then fills them into the configuration template. The operating system thus obtains the custom variable configuration file.

[0052] In this embodiment, after obtaining the custom variable configuration file and booting into the operating system, the firmware of the basic input / output system is updated based on the updated image file, and then the custom parameter values of the target variables are written into the target variable area to complete the parameter configuration of the target variables.

[0053] It should be noted that after completing the parameter configuration of the target variables, the basic input / output system should also read the target variables and the parameter values of the target variables in the target variable area. The specific method is as follows: trigger and run the automatic restart instruction, and after the automatic restart, control the basic input / output system to read the target variable area and use the custom parameter values of the target variables stored in the read target variable area to update the default parameter values of the target variables in the setting function options.

[0054] It can be seen that the present application reconstructs the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to the target rule code; the target rule code is the code for specifying the target variable area dedicated to storing the target variable and the storage order of the target variable; the target variable is a variable related to the setting function option of the basic input / output system; compiles the reconstructed code of the basic input / output system to obtain the updated image file of the basic input / output system; constructs a custom variable configuration file for recording the custom parameter values of the target variable, and performs firmware update on the basic input / output system based on the updated image file, and then writes the custom parameter values of the target variable into the target variable area to complete the parameter configuration of the target variable. Thus, it can be seen that when the present application performs firmware update on the basic input / output system using the updated image file, it writes the custom parameter values of the target variable into the target variable area to complete the parameter configuration of the target variable; wherein, the custom parameter values can be changed, thereby enabling a server to support multiple configuration modes; in addition, this solution does not require manual processing, realizes automated operation, improves production efficiency, reduces the risk brought by manual misoperation, and saves R & D resources.

[0055] See Figure 2 As shown, the embodiment of the present application discloses a specific parameter configuration method for a basic input / output system, and the method includes:

[0056] Step S21: Reconstruct the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to the target rule code; the target rule code is the code for specifying the target variable area dedicated to storing the target variable and the storage order of the target variable; the target variable is a variable related to the setting function option of the basic input / output system.

[0057] Among them, for a more specific processing procedure of step S21, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.

[0058] Step S22: Compile the reconstructed code of the basic input / output system to obtain the updated image file of the basic input / output system.

[0059] For a more specific processing procedure of the above step S22, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.

[0060] Step S23: Construct a custom variable configuration file for recording the custom parameter values of the target variable.

[0061] Among them, for a more specific processing procedure of step S23, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.

[0062] Step S24: After the operating system is started, store the target refresh tool, the updated image file, and the custom variable configuration file in a preset directory.

[0063] In this embodiment, after the target refresh tool, the updated image file, and the custom variable configuration file are stored in the preset directory after the operating system is started, the custom variable configuration file can be refreshed by using the target refresh tool, and the firmware of the basic input / output system can be refreshed based on the updated image file.

[0064] Step S25: Construct a target refresh command and execute the target refresh command to call the target refresh tool in the preset directory, and then use the updated image file in the preset directory through the target refresh tool to perform firmware refresh on the basic input / output system, and compile the custom variable configuration file in the preset directory to generate a binary file to be written to the target variable area of the flash chip of the basic input / output system.

[0065] In this embodiment, after the target refresh tool, the updated image file, and the custom variable configuration file are stored in the preset directory, a target refresh command needs to be constructed; among them, the target refresh command includes a first command parameter for designating the target refresh tool as the refresh tool for performing the refresh operation, a second command parameter for designating the updated image file as the image file to be refreshed, and a third command parameter for designating the custom variable configuration file as the configuration file to be refreshed. After the target refresh command is constructed, execute the target refresh command to perform the refresh process.

[0066] It should be noted that when the target refresh command is executed, the target refresh tool in the preset directory is called according to the first command parameter, and then the firmware of the basic input / output system is refreshed by using the updated image file in the preset directory determined according to the second command parameter through the target refresh tool, and the custom variable configuration file in the preset directory determined according to the third command parameter is compiled to generate a binary file to be written to the target variable area of the flash chip of the basic input / output system.

[0067] In this embodiment, if the target refresh command does not have the third command parameter for designating the custom variable configuration file as the configuration file to be refreshed, when executing the target refresh command, only call the target refresh tool in the preset directory according to the first command parameter, and then use the updated image file in the preset directory determined based on the second command parameter through the target refresh tool to perform firmware refresh on the basic input / output system.

[0068] Step S26: Erase the target variable area of the basic input / output system flash chip, and write the custom parameter value of the target variable in the binary file into the target variable area of the basic input / output system flash chip to complete the parameter configuration of the target variable.

[0069] In this embodiment, erase the original content in the target variable area of the basic input / output system flash chip, so as to write the custom parameter value of the target variable in the binary file into the target variable area of the basic input / output system flash chip and complete the parameter configuration of the target variable.

[0070] In this embodiment, if the target refresh command does not have the third command parameter for designating the custom variable configuration file as the configuration file to be refreshed, do not perform the erasing process, and directly use the variable parameter value in the target variable area of the basic input / output system flash chip to complete the parameter configuration of the target variable.

[0071] In this embodiment, after completing the parameter configuration of the target variable, trigger and run the automatic restart instruction, and after automatic restart, control the basic input / output system to read the target variable area and update the default parameter value of the target variable in the setting function option by using the custom parameter value of the target variable stored in the read target variable area.

[0072] It can be seen that the present application reconstructs the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to a target rule code; the target rule code is code for specifying a target variable area for specifically storing target variables and specifying the storage order of the target variables; the target variables are variables related to the setting function options of the basic input / output system; the reconstructed code of the basic input / output system is compiled to obtain an updated image file of the basic input / output system; a custom variable configuration file for recording the custom parameter values of the target variables is constructed; after the operating system is started, a target refresh tool, the updated image file, and the custom variable configuration file are stored in a preset directory, a target refresh command is constructed, and the target refresh command is executed to call the target refresh tool in the preset directory, and then the firmware of the basic input / output system is refreshed by the target refresh tool and using the updated image file in the preset directory, and the custom variable configuration file in the preset directory is compiled to generate a binary file to be written to the target variable area of the flash chip of the basic input / output system; then the target variable area of the flash chip of the basic input / output system is erased, and the custom parameter values of the target variables in the binary file are written to the target variable area of the flash chip of the basic input / output system to complete the parameter configuration of the target variables. It can be seen that when the present application performs firmware update on the basic input / output system using the updated image file, the custom parameter values of the target variables are written to the target variable area to complete the parameter configuration of the target variables; among them, the custom parameter values can be changed, thereby enabling a server to support multiple configuration modes; in addition, this solution does not require manual processing, realizes automated operation, improves production efficiency, reduces the risk brought by manual misoperation, and saves R & D resources.

[0073] See Figure 3 As shown, a simple process for parameter configuration of the basic input / output system is presented, including: Step S30: Modify the BIOS code architecture to generate a BIOS image. Step S40: When refreshing the BIOS under the OS (operating system), import the configuration file and autonomously configure the BIOS default values.

[0074] It should be noted that, see Figure 4As shown, step S30 includes the following steps. Step S31: Define and divide a specified area of the BIOS's Flash chip (Basic Input / Output System Flash chip) into a variable area VAR_AREA. Specifically, it is to re-layout the BIOS's Flash chip and define the area between 0x00010000 and 0x00020000 as the variable area VAR_AREA, which is only used to store variables related to all options under BIOS Setup (Basic Input / Output System Function Setup), preventing other data from being written to this area. Step S32: Refactor the BIOS code to store all variables in the variable area VAR_AREA. Specifically, it is to overall refactor the BIOS code and store all variables related to options under BIOS Setup in the variable area VAR_AREA in a fixed order. Each variable and its value are stored in the form of key-value pairs. In addition, for each variable, a unique VAR_ID is formulated for distinction and identification, that is, a unique identity number. Step S33: Compile the BIOS code to produce an image. Specifically, after refactoring the BIOS code, re-compile it to produce a new BIOS image BIOS.bin for firmware update.

[0075] It should be noted that referring to Figure 5As shown, step S40 includes the following steps. Step S41: The user provides a var.txt file with custom configuration according to the requirements. Specifically, the user is provided with a BIOS option configuration template, and each variable is distinguished by the specified VAR_ID in the configuration template. The user needs to provide a var.txt file with custom configuration according to the configuration template. Step S42: Execute the command FlashUpdate -f BIOS.bin -cfg var.txt under the OS to update the BIOS. Specifically, after entering the operating system, place the update tool FlashUpdate, the BIOS image BIOS.bin, and the user's custom configuration file var.txt in the same directory, and then execute the command FlashUpdate -f BIOS.bin -cfg var.txt under the operating system to perform an online update of the BIOS. In the update command, -f refers to the BIOS image file to be flashed, and -cfg refers to the user's custom configuration file to be imported. If -cfg var.txt is not specified in the command, the BIOS uses the default value in the code. If -cfg var.txt is specified in the command, the BIOS uses the default value in the configuration file. Step S43: Use the update tool to compile var.txt to generate a binary file Var.bin. Specifically, when using the BIOS image to perform an update under the operating system, the update tool first compiles the var.txt file to generate a binary file Var.bin that can be written into the BIOS Flash chip. Step S44: Rewrite Var.bin into the variable area VAR_AREA in the Flash. Specifically, after the BIOS image update is completed, when FlashUpdate detects Var.bin, it erases the VAR_AREA area in the Flash, and then rewrites Var.bin into the specified area VAR_AREA in the Flash. The hard write operation of the default value is achieved by overwriting the physical area of the BIOS Flash. Step S45: After the update is completed, the machine automatically restarts. Specifically, after the BIOS image and the user's custom configuration file are updated, the machine will automatically restart. After the operating system restarts, the BIOS automatically reads the variables and the values of related variables stored in the VAR_AREA area, thus meeting the user's requirement for independently configuring the default values of BIOS options.

[0076] It can be understood that from the perspective of the BIOS architecture, the present application optimizes the storage area and design method of BIOS variables. When the BIOS needs to be batch-refreshed in the server production or deployment and operation and maintenance environment, the requirement of automatically setting different configurations at different customer sites is realized by synchronously writing user-defined configuration files under the OS. By writing this method, not only the work efficiency of R & D and production is improved, but also the risk brought by manual misoperation is greatly reduced. It has the advantages of low risk, high efficiency, and automated operation, and truly meets the actual needs of the customer site. Therefore, this method is practical, simple, convenient, safe, and efficient.

[0077] See Figure 6 As shown, an embodiment of the present application discloses a parameter configuration device for a basic input / output system, including:

[0078] A code refactoring module 11, configured to refactor the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to a target rule code; the target rule code is a code for specifying a target variable area for specifically storing target variables and specifying the storage order of the target variables; the target variables are variables related to the setting function options of the basic input / output system;

[0079] An image update module 12, configured to compile the refactored code of the basic input / output system to obtain an updated image file of the basic input / output system;

[0080] A parameter configuration module 13, configured to construct a custom variable configuration file for recording custom parameter values of the target variables, perform firmware update on the basic input / output system based on the updated image file, and then write the custom parameter values of the target variables into the target variable area to complete the parameter configuration of the target variables.

[0081] Among them, for the more specific working processes of the above various modules, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.

[0082] It can be seen that the present application reconstructs the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to the target rule code; the target rule code is the code for specifying the target variable area for specifically storing target variables and the storage order of the target variables; the target variables are variables related to the setting function options of the basic input / output system; the reconstructed code of the basic input / output system is compiled to obtain the updated image file of the basic input / output system; a custom variable configuration file for recording the custom parameter values of the target variables is constructed, and the basic input / output system is updated with the firmware based on the updated image file, and then the custom parameter values of the target variables are written into the target variable area to complete the parameter configuration of the target variables. Thus, it can be seen that when the present application updates the firmware of the basic input / output system using the updated image file, the custom parameter values of the target variables are written into the target variable area to complete the parameter configuration of the target variables; among them, the custom parameter values can be changed, thereby enabling a server to support multiple configuration modes; in addition, this solution does not require manual processing, realizes automated operation, improves production efficiency, reduces the risks brought by human misoperation, and saves R & D resources.

[0083] Furthermore, an embodiment of the present application further provides an electronic device. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, an input / output interface 24, a communication interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps of the parameter configuration method of the basic input / output system disclosed in any of the foregoing embodiments.

[0084] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed thereon here.

[0085] In addition, the memory 22, which may include a random access memory as the operating memory and a non-volatile memory for external memory storage purposes, has storage resources thereon including an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.

[0086] Among them, the operating system 221 is used to manage and control each hardware device and computer program 222 on the electronic device 20 of the source host. The operating system 221 may be Windows, Unix, Linux, etc. In addition to the computer program that can be used to complete the parameter configuration method of the basic input / output system executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program that can be used to complete other specific tasks.

[0087] In this embodiment, the input / output interface 24 may specifically include, but is not limited to, a USB interface, a hard disk reading interface, a serial interface, a voice input interface, a fingerprint input interface, etc.

[0088] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium. The computer-readable storage medium mentioned here includes a random access memory (Random Access Memory, RAM), a memory, a read-only memory (Read-Only Memory, ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk, or an optical disk, or any other form of storage medium well-known in the technical field. Among them, when the computer program is executed by a processor, it implements the parameter configuration method of the foregoing basic input / output system. For the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.

[0089] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts between the various embodiments, reference can be made to each other. For the device disclosed in the embodiment, since it corresponds to the parameter configuration method of the basic input / output system disclosed in the embodiment, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part.

[0090] The steps of the training task resource scheduling or algorithm described in combination with the embodiments disclosed in this article can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium well-known in the technical field.

[0091] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0092] The above has introduced in detail a method, apparatus, device and medium for parameter configuration of a basic input / output system provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for parameter configuration of a basic input / output system, characterized in that, Including: Refactoring the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to a target rule code; the target rule code is code for specifying a target variable area for specifically storing target variables and specifying the storage order of the target variables; The target variables are variables related to the setting function options of the basic input / output system; Compiling the refactored code of the basic input / output system to obtain an updated image file of the basic input / output system; Constructing a custom variable configuration file for recording the custom parameter values of the target variables, performing firmware update on the basic input / output system based on the updated image file, and then writing the custom parameter values of the target variables into the target variable area to complete the parameter configuration of the target variables; The performing firmware update on the basic input / output system based on the updated image file includes: after the operating system starts, storing a target refresh tool, the updated image file, and the custom variable configuration file in a preset directory; Constructing a target refresh command and executing the target refresh command to call the target refresh tool in the preset directory, and then performing firmware refresh on the basic input / output system by using the target refresh tool and the updated image file in the preset directory, and compiling the custom variable configuration file in the preset directory to generate a binary file to be written into the target variable area of the flash chip of the basic input / output system.

2. The parameter configuration method of the basic input / output system according to claim 1, wherein During the process of refactoring the code of the basic input / output system, it further includes: Setting the storage forms of the target variables and the parameter values of the target variables as key-value pairs, and setting a unique identification number for each target variable.

3. The parameter configuration method for the basic input / output system according to claim 1, wherein The constructing a custom variable configuration file for recording the custom parameter values of the target variables includes: Determining a configuration template corresponding to the target variable according to the target rule code; Obtaining the custom parameter values of the target variables through a preset parameter customization interface, and using the custom parameter values to assign values to the corresponding target variables in the configuration template to obtain a custom variable configuration file.

4. The parameter configuration method of the basic input / output system according to claim 1, characterized in that The constructing a target refresh command and executing the target refresh command includes: Constructing a target refresh command; the target refresh command includes a first command parameter for specifying the target refresh tool as the refresh tool for performing the refresh operation, a second command parameter for specifying the updated image file as the image file to be refreshed, and a third command parameter for specifying the custom variable configuration file as the configuration file to be refreshed. Execute the target refresh command to call the target refresh tool in the preset directory according to the first command parameter, then perform firmware refresh on the basic input / output system through the target refresh tool and using the updated image file in the preset directory determined based on the second command parameter, and compile the custom variable configuration file in the preset directory determined based on the third command parameter to generate a binary file to be written to the target variable area of the flash chip of the basic input / output system.

5. The parameter configuration method of the basic input / output system according to claim 4, characterized in that Writing the custom parameter value of the target variable to the target variable area to complete the parameter configuration of the target variable includes: Erasing the target variable area of the flash chip of the basic input / output system, and writing the custom parameter value of the target variable in the binary file to the target variable area of the flash chip of the basic input / output system to complete the parameter configuration of the target variable.

6. The method for parameter configuration of the basic input / output system according to any one of claims 1 to 5, characterized in that, After writing the custom parameter value of the target variable to the target variable area to complete the parameter configuration of the target variable, it further includes: Triggering and running an automatic restart instruction, and after automatic restart, controlling the basic input / output system to read the target variable area and updating the default parameter value of the target variable in the setting function option using the custom parameter value of the target variable stored in the read target variable area.

7. A parameter configuration device for a basic input / output system, characterized in that, Including: A code refactoring module for refactoring the code of the basic input / output system to adjust the variable storage rule code of the basic input / output system to a target rule code; the target rule code is code for specifying a target variable area for specifically storing target variables and specifying the storage order of the target variables; the target variables are variables related to the setting function options of the basic input / output system; An image update module for compiling the refactored code of the basic input / output system to obtain an updated image file of the basic input / output system; A parameter configuration module for constructing a custom variable configuration file for recording the custom parameter values of the target variables, performing firmware update on the basic input / output system based on the updated image file, and then writing the custom parameter values of the target variables to the target variable area to complete the parameter configuration of the target variables; The parameter configuration module is specifically used to, after the operating system starts, store the target refresh tool, the updated image file, and the custom variable configuration file in a preset directory; construct a target refresh command and execute the target refresh command to call the target refresh tool in the preset directory, then perform firmware refresh on the basic input / output system through the target refresh tool and using the updated image file in the preset directory, and compile the custom variable configuration file in the preset directory to generate a binary file to be written to the target variable area of the flash chip of the basic input / output system.

8. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes the computer program stored in the memory, it implements the parameter configuration method of the basic input / output system according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It is used to store a computer program; wherein, when the computer program is executed by a processor, it implements the parameter configuration method of the basic input / output system according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • BIOS configuration saving method and device

    CN106155716A

  • Startup method for leading [Mu]C / OS (Operating System) on the basis of u-boot

    CN108170480A