Nothing Special   »   [go: up one dir, main page]

CN117075921A - BIOS image file generation method and device and electronic equipment - Google Patents

BIOS image file generation method and device and electronic equipment Download PDF

Info

Publication number
CN117075921A
CN117075921A CN202310914161.0A CN202310914161A CN117075921A CN 117075921 A CN117075921 A CN 117075921A CN 202310914161 A CN202310914161 A CN 202310914161A CN 117075921 A CN117075921 A CN 117075921A
Authority
CN
China
Prior art keywords
bios
parameter
data
parameters
image file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310914161.0A
Other languages
Chinese (zh)
Inventor
冯思远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Loongson Zhongke Chengdu Technology Co ltd
Original Assignee
Loongson Zhongke Chengdu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Loongson Zhongke Chengdu Technology Co ltd filed Critical Loongson Zhongke Chengdu Technology Co ltd
Priority to CN202310914161.0A priority Critical patent/CN117075921A/en
Publication of CN117075921A publication Critical patent/CN117075921A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a method and a device for generating a BIOS image file and electronic equipment, and relates to the technical field of electronic equipment. The method for generating the BIOS image file comprises the following steps: acquiring and displaying a target configuration template; the target configuration template corresponds to the model of the device to be refreshed with the BIOS image file and is used for storing hardware parameters of the device and software function parameters corresponding to the hardware parameters, wherein the software function parameters are used for indicating the corresponding hardware-supported software functions described by the hardware parameters; receiving data of each parameter on the target configuration template input by a user; the parameters include the hardware parameters and the software function parameters; writing the data into the target configuration templates respectively to generate BIOS configuration information; and generating a BIOS image file based on the BIOS configuration information. The method reduces the writing difficulty of the BIOS image file and improves the generating efficiency of the BIOS image file.

Description

BIOS image file generation method and device and electronic equipment
Technical Field
The present application relates to the field of electronic devices, and in particular, to a method and an apparatus for generating a Basic Input/output system (Basic Input OutputSystem, BIOS) image file, and an electronic device.
Background
As computer technology has evolved, a wide variety of computing devices have become increasingly popular. Computing devices typically include a hardware system, a BIOS, and an operating system. The BIOS is a set of programs solidified on a Read Only Memory (ROM) chip, and can provide a bottommost and most direct hardware setting or control interface for an operating system, so that the operating system can control the hardware system through the BIOS, and various functions of the computing device are realized.
The current BIOS image file is usually a file that a software engineer writes BIOS code based on hardware configuration requirements and software function requirements of a device and compiles the BIOS code. However, the code structure of BIOS code is often complex and the code assembly language involved is complex. Therefore, the writing difficulty of the BIOS image file is high, BIOS configuration errors are easy to occur, so that the generating efficiency of the BIOS image file is low, and the debugging complexity of BIOS writing according to the BIOS image file is high.
Disclosure of Invention
In view of the above problems, embodiments of the present application are provided to provide a method, an apparatus, and an electronic device for generating a BIOS image file to overcome the above problems or at least partially solve the above problems, so as to reduce writing difficulty of the BIOS image file and improve efficiency of generating the BIOS image file.
In order to solve the above problems, an embodiment of the present application discloses a method for generating a BIOS image file, where the method includes:
acquiring and displaying a target configuration template; the target configuration template corresponds to the model of the device to be refreshed with the BIOS image file and is used for storing hardware parameters of the device and software function parameters corresponding to the hardware parameters, wherein the software function parameters are used for indicating the corresponding hardware-supported software functions described by the hardware parameters;
receiving data of each parameter on the target configuration template input by a user; the parameters include the hardware parameters and the software function parameters;
writing the data into the target configuration templates respectively to generate BIOS configuration information;
and generating a BIOS image file based on the BIOS configuration information.
The embodiment of the application also discloses a device for generating the BIOS image file, which comprises the following steps:
the display module is used for acquiring and displaying the target configuration template; the target configuration template corresponds to the model of the device to be refreshed with the BIOS image file and is used for storing hardware parameters of the device and software function parameters corresponding to the hardware parameters, wherein the software function parameters are used for indicating the corresponding hardware-supported software functions described by the hardware parameters;
The receiving module is used for receiving data of each parameter on the target configuration template input by a user; the parameters include the hardware parameters and the software function parameters;
the generating module is used for writing the data into the target configuration templates respectively to generate BIOS configuration information; and generating a BIOS image file based on the BIOS configuration information.
The embodiment of the application also discloses an electronic device, which comprises: a processor, a memory, and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method for generating a BIOS image according to any one of the preceding aspects.
The embodiment of the application also discloses a computer readable storage medium, wherein the computer readable storage medium is stored with a computer program, and the computer program realizes the steps of the method for generating the BIOS image file in any one of the first aspect when being executed by a processor.
The embodiment of the application has the following advantages:
in the embodiment of the application, after the target configuration template corresponding to the model of the device for refreshing the BIOS image file is displayed, the data input by the user to the hardware parameters and the software function parameters on the target configuration template can be written into the target configuration template to generate BIOS configuration information, and the BIOS image file is generated based on the BIOS configuration information. In the technical scheme, after a target configuration template corresponding to the model of the device for refreshing the BIOS image file is selected, a user only needs to input data of each parameter according to the hardware parameters specified on the target configuration template and the software function parameters corresponding to the hardware parameters, and the BIOS image file can be generated. Compared with the related art, the user can generate the BIOS image file without knowing professional information such as the code structure of the BIOS code, the code assembly language and the like, so that the writing difficulty of the BIOS image file is reduced, the generating efficiency of the BIOS image file is improved, and the debugging complexity of BIOS writing according to the BIOS image file is further reduced.
Drawings
FIG. 1 shows a flowchart of a method for generating a BIOS image file according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another method for generating a BIOS image file according to an embodiment of the present application;
FIG. 3 is a block diagram of a device for generating a BIOS image file according to an embodiment of the present application;
fig. 4 shows a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the application will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 1, a flowchart of a method for generating a BIOS image file according to an embodiment of the present application is shown. The method for generating the BIOS image file can be applied to the computing device. Alternatively, the computing device may be a computer, a mobile phone, a tablet, or the like. As shown in fig. 1, the method for generating the BIOS image file includes:
step 101, acquiring and displaying a target configuration template. The target configuration template corresponds to the model of the device to be swiped through the BIOS image.
In embodiments of the application, a computing device may store a plurality of target configuration templates. The target configuration templates are in one-to-one correspondence with the model numbers of the devices. Each target configuration template correspondingly stores hardware parameters and software function parameters of equipment of a corresponding model. Alternatively, the target configuration template may be a form template or a text template. For example, the target configuration template is an Excel form template.
The target configuration template corresponds to the hardware parameters of the storage device and the software function parameters corresponding to the hardware parameters. The software function parameter is used for indicating a hardware-supported software function of a hardware parameter description corresponding to the software function parameter.
Optionally, the hardware parameters include at least one of the following information: hardware device information of a device to be refreshed with a BIOS image file, a pin multiplexing mode of the device, a device parameter of a peripheral device to be connected with the device, a bus connection mode of the peripheral device and the device, a control mode and a control time sequence parameter of a General-purpose input/output (GPIO) interface, a SATA interface parameter, a video graphics array (Video Graphics Array, VGA) port parameter, a universal serial bus (Universal Serial Bus, USB) interface parameter, a PCIE interface parameter and a NAND interface parameter. Wherein the hardware device information includes at least one of: model number of device, hardware version number. The device parameters of the peripheral include at least one of the following information: peripheral model number, device version number. For example, the peripheral is a memory. The peripheral device parameters include: memory type, particle model, particle number, memory reset inversion parameters. The memory reset reverse parameter indicates whether a reverse reset interface of the memory reset signal is supported.
For example, PCIE interface parameters include: PCIE interface function parameters, PCIE lane flip parameters. The PCIE interface function parameter indicates whether the device supports a PCIE interface. The PCIE lane rollover parameter indicates whether the device supports a PCIE lane rollover interface. Therein, SATA is collectively referred to as Serial Advanced Technology Attachment, which is a serial hardware driver interface set based on industry standards. The whole PCIE is Peripheral Component Interconnect Express, and the PCIE interface is an interface under the high-speed serial computer expansion bus standard. The NAND interface is a data interface to connect NAND FLASH memory.
Further optionally, the hardware parameter is a USB port parameter, and the software function parameter corresponding to the hardware parameter includes at least one of the following information: USB storage parameters, USB network card parameters and USB keyboard parameters. The USB storage parameter indicates whether or not the storage device is supported to be connected by a USB connection mode. The USB network card parameter indicates whether the network card is supported to be connected by adopting a USB connection mode. The USB keyboard parameter indicates whether or not the keyboard is supported to be connected by a USB connection mode. The hardware parameters are PCIE interface parameters, and the software function parameters corresponding to the hardware parameters include: PCIE network card parameters. The PCI network card parameter indicates whether the PCI connection mode is supported for connecting the network card. The hardware parameters are NAND interface parameters, and the software function parameters corresponding to the hardware parameters comprise at least one of the following information: chip select parameters, file system parameters. The chip select parameter is chip select data of NAND FLASH memory connected to the NAND interface. The file system parameters indicate the file system types supported by the device.
In an alternative application scenario, the device may be a central processing unit (Central Processing Unit, CPU). The computing equipment stores target configuration templates corresponding to the CPUs of the multiple models respectively.
Step 102, receiving data of each parameter on a target configuration template input by a user. The parameters include hardware parameters and software function parameters.
In the embodiment of the application, the user can input the data of the hardware parameters and the data of the software function parameters on the computing device according to the hardware parameters and the software function parameters on the displayed target configuration template and the requirements of the BIOS to be refreshed. Alternatively, the user may manually enter hardware parameters and software function parameters on the computing device. For example, in the case of a board, a user may manually fill in data of hardware parameters on a computing device according to a schematic diagram of the board, and manually fill in software function parameters on the computing device according to software requirements of each hardware of the device. In particular, for example, a hardware engineer may fill in data of hardware parameters on a target configuration template displayed by a computing device according to a schematic diagram of the tile. The software engineer fills in the data of the software function parameters on the target configuration template displayed by the computing device according to the software requirements of each piece of hardware of the device, so that the computing device receives the data of each parameter on the target configuration template input by the user.
Illustratively, assume that the device is a board card. The target configuration template comprises: hardware parameters: multiplexing mode of each pin of the board card; PCIE interface parameters; USB port parameters; NAND interface parameters; software function parameters corresponding to USB port parameters: USB storage parameters, USB network card parameters and USB keyboard parameters; software function parameters corresponding to PCIE interface parameters: PCIE network card parameters.
The user manually enters data for each parameter as shown in table 1 on the displayed target configuration template. As shown in table 1, the multiplexing mode data of each pin of the board card is manually input by the user: the data of the first pin is: CAN interface and GPIO interface; the data of the second pin is: an ANAD interface and a GPIO interface. The data of the first pin indicates that the first pin may be a CAN interface and a GPIO interface. The data of the second pin indicates that the second pin may be an ANAD interface and a GPIO interface. The user manually inputs that the data of the PCIE interface function parameters in the PCIE interface parameters is YES, and the data indicate that the equipment supports the PCIE interface. The user manually enters the data of the PCEI lane flip parameter as NO, which indicates that the device does not support the PCEI lane flip interface. The user manually inputs the data of the PCIE network card parameters as YES, which indicates that the PCIE connection mode is supported to connect the network card. The data of the USB port parameter manually entered by the user is YES, which indicates that the device supports the USB interface. The data of the parameters of the USB network card manually input by the user is YES, and the indicating equipment supports the connection of the network card by adopting a USB connection mode. The data of the parameters of the USB keyboard manually input by the user is YES, and the indicating equipment supports the connection of the keyboard in a USB connection mode. The user manually inputs the data of the USB storage parameters as YES, and the data indicate that the equipment supports the connection of the storage equipment in a USB connection mode.
TABLE 1
And 103, writing the data into a target configuration template to generate BIOS configuration information.
In the embodiment of the application, the computing equipment sequentially writes the data of each parameter input by the user into the target configuration template to generate BIOS configuration information. Based on the difference of preset formats of the BIOS configuration information, the process of writing data into the target configuration template to generate the BIOS configuration information is also different. Embodiments of the present application are schematically illustrated in the following several alternative scenarios.
In a first alternative implementation, the BIOS configuration information stores hardware parameters of the device, data of the hardware parameters, software function parameters corresponding to the hardware parameters, and data corresponding to the software function parameters. The computing device may write the received data input by the user into the target configuration module, and generate a written target configuration template to obtain BIOS configuration information.
In a second alternative implementation manner, the BIOS configuration information stores a target configuration template, where the target configuration template stores each parameter and data corresponding to the parameter, and the data is a BIOS code identifier and data corresponding to a hardware parameter of the valid data, or a BIOS code identifier and data corresponding to a software function parameter. Wherein the valid data refers to data reflecting the BIOS components described by the device support parameters. The BIOS code identification indicates BIOS code blocks in the BIOS code block library. The BIOS code block indicated by the BIOS code identification is used to implement the BIOS component described by the parameter corresponding to the BIOS code identification at run-time.
For example, the BIOS code blocks indicated by the BIOS code identifiers corresponding to the hardware parameters are used to implement BIOS components described by the hardware parameters at runtime. The BIOS code block indicated by the BIOS code identification corresponding to the software functional parameter is used to implement the BIOS component having the software functional parameter at runtime.
The process of the computing device writing data to the target configuration templates, respectively, and generating BIOS configuration information may include the following steps 1031A to 1033A.
In step 1031A, the data are written into the target configuration templates, respectively, to obtain the written target configuration templates.
And the computing equipment sequentially writes the data of each parameter input by the user into the target configuration template to obtain the written target configuration template. For example, the written target configuration template is the target configuration template shown in the foregoing table 1.
In step 1032A, for each parameter in the written target configuration template, if the data of the parameter is valid data, based on the correspondence between the hardware parameter and the BIOS code identifier and the correspondence between the software function parameter and the BIOS code identifier, the BIOS code identifier corresponding to the parameter is determined, and the BIOS code identifier corresponding to each parameter is obtained.
Optionally, the computing device stores a correspondence between hardware parameters and BIOS code identifiers, and a correspondence between software function parameters and BIOS code identifiers. The computing device determines, for each parameter in the written target configuration template, whether the data of the parameter is valid data, so as to determine whether the device needs to support the BIOS component described by the parameter.
In the event that the data is not valid data, i.e., the data is invalid data, the computing device may not process the data. Under the condition that the data is effective data, the computing device can determine the BIOS code identification corresponding to the parameter based on the corresponding relation between the hardware parameter and the BIOS code identification and the corresponding relation between the software function parameter and the BIOS code identification, and further obtain the BIOS code identification corresponding to each parameter in the written target configuration template.
Wherein the computing device may store invalid data for each parameter in the target configuration template. And judging whether the data of the parameter input by the user is valid data or not by comparing whether the data of the parameter input by the user is consistent with invalid data of the parameter.
In an alternative implementation, the invalid data for each parameter may be none or NO. The computing device determines whether the data of each parameter is valid data by determining whether the data of each parameter in the written target configuration template is invalid data. In another alternative implementation, the invalid data for each parameter may be none or NO. The computing device determines whether the data of the hardware parameter and the data of the software function parameter corresponding to the hardware parameter are valid data by judging whether the data of the hardware parameter in the written target configuration template are invalid data or not under the condition that the hardware parameter is invalid data. And under the condition that the hardware parameters are effective data, judging whether the data of the software function parameters corresponding to the hardware parameters in the written target configuration template are effective data or not by judging whether the data of the software function parameters are ineffective data or not.
In some embodiments of the present application, the target configuration template may be a form template. And under the condition that the target configuration template is a table template, the computing equipment sequentially writes the data of each parameter input by the user into a table corresponding to the parameter in the target configuration template to obtain the written target configuration template. For example, the written target configuration template is the target configuration template shown in the foregoing table 1.
Correspondingly, when the data of the parameters is effective data, the computing device determines the BIOS code identifier corresponding to the parameters based on the corresponding relation between the hardware parameters and the BIOS code identifiers and the corresponding relation between the software function parameters and the BIOS code identifiers, and the process of obtaining the BIOS code identifiers corresponding to each parameter respectively may include:
and reading the data of each parameter in the written target configuration template. And under the condition that the data of the parameters are effective data, determining the BIOS code identifications corresponding to the row and column positions of the data according to the corresponding relation between the row and column positions of the table in the target configuration module and the BIOS code identifications, and obtaining the BIOS code identifications corresponding to the parameters so as to obtain the BIOS code identifications corresponding to each parameter respectively.
Optionally, the computing device stores a correspondence between column and row locations of the table in the target configuration module and BIOS code identifiers. The computing equipment sequentially reads the data of each parameter in the written target configuration template, and judges whether the data of the parameter is valid data according to each parameter in the written target configuration template so as to judge whether the equipment needs to support the BIOS component described by the parameter. In the event that the data is not valid data, i.e., the data is invalid data, the computing device may not process the data.
Under the condition that the data is effective data, the computing device can determine the BIOS code identification corresponding to the row and column position of the table where the data of the parameter is located as the BIOS code identification corresponding to the parameter based on the corresponding relation between the row and column position of the table in the target configuration module and the BIOS code identification, and further obtain the BIOS code identification corresponding to each parameter in the written target configuration module.
For example, the correspondence between the row and column positions of the table in the target configuration module and the BIOS code identifier may be: (x 1, y 1) corresponds to a first BIOS code identification, (x 2, y 2) corresponds to a second BIOS code identification, and (x 3, y 3) corresponds to a third BIOS code identification. x1, x2, and x3 represent row locations in the target configuration module. y1, y2, and y3 represent column positions in the target configuration module.
In step 1033A, BIOS configuration information is generated. The BIOS configuration information records BIOS code identifiers corresponding to each parameter in the written target configuration template respectively.
Optionally, the computing device records a BIOS code identifier and data corresponding to each parameter in the written target configuration template, and generates BIOS configuration information.
For example, the BIOS configuration information generated based on the target configuration template shown in the foregoing table 1 is:
mod_Pin Multiplexing(CAN;GPIO;ANAD;GPIO)
mod_PCIE
mod_PCIE_ohci
mod_usb
mod_usb_storage
mod_usb_ohci
mod_usb_kbd。
wherein, the hardware parameters: the BIOS code identifier corresponding to the Multiplexing mode of each Pin of the board card is mod_Pin Multiplexing. The BIOS code identifier corresponding to the PCIE interface function parameter is mod_pcie. The BIOS code corresponding to the USB port parameter is identified as mod_usb.
Software functional parameters: the BIOS code identifier corresponding to the PCIE network card parameter is mod_pcie_ohci. The BIOS code corresponding to the USB keyboard parameter is identified as mod_usb_ kbd. The BIOS code identifier corresponding to the USB network card parameter is mod_usb_ohci. The BIOS code corresponding to the USB storage parameter is identified as mod_usb_storage.
In a third alternative implementation, the BIOS configuration information storage device includes a BIOS code identifier corresponding to each hardware parameter that the BIOS of the BIOS configuration information storage device can support, a BIOS code identifier corresponding to each software function parameter, and a selection identifier of each BIOS code identifier.
The selecting identification comprises the following steps: selected identifications and unselected identifications.
The selected identifier is used for indicating that the BIOS code indicated by the corresponding BIOS code identifier is selected, namely the data of the parameter corresponding to the selected identifier in the target configuration template is valid data.
The unselected identifier is used for indicating that the BIOS code indicated by the corresponding BIOS code identifier is unselected, that is, the data of the parameter corresponding to the selected identifier in the target configuration template is invalid data, or the parameter corresponding to the selected identifier is not available in the target configuration template, or the data corresponding to each parameter is available.
The computing device writes the data to the target configuration templates, respectively, and the process of generating BIOS configuration information may include the following steps 1031B to 1033B.
In step 1031B, the data are written into the target configuration templates, respectively, to obtain the written target configuration templates.
The explanation and implementation of this step may refer to the explanation and implementation of the foregoing step 1031A, which is not described in detail in the embodiments of the present application.
In step 1032B, for each parameter in the written target configuration template, if the data of the parameter is valid data, based on the correspondence between the hardware parameter and the BIOS code identifier and the correspondence between the software function parameter and the BIOS code identifier, the BIOS code identifier corresponding to the parameter is determined, and the BIOS code identifier corresponding to each parameter is obtained.
The explanation and implementation of this step may refer to the explanation and implementation of step 1032A, which is not described in detail in the embodiments of the present application.
In step 1033B, the selected identifier corresponding to the target BIOS code identifier in the initial BIOS configuration information is modified to be the selected identifier, so as to obtain BIOS configuration information. The target BIOS code identifier is a BIOS code identifier corresponding to each parameter in the written target configuration template respectively.
The initial BIOS configuration information corresponds to a BIOS code identifier corresponding to each hardware parameter which can be supported by the BIOS of the storage device, a BIOS code identifier corresponding to each software function parameter, and a selection identifier of each BIOS code identifier.
For example, the initial target configuration template is:
select mod_Pin Multiplexing
select mod_PCIE
select mod_PCIE_ohci
select mod_usb
select mod_usb_storage
select mod_usb_uhci
select mod_usb_ohci
select mod_usb_ehci
select mod_kbd。
wherein select is the selected identifier.
The BIOS configuration information generated based on the target configuration template shown in the foregoing table 1 is:
select mod_Pin Multiplexing(CAN;GPIO;ANAD;GPIO)
select mod_PCIE
select mod_PCIE_ohci
select mod_PCIE
select mod_usb
select mod usb_storage
#select mod_usb_uhci
select mod_ohci
#select mod_usb_ehci
select mod_usb_kbd。
wherein select is the selected identifier; select is the unselected flag.
Step 104, generating a BIOS image file based on the BIOS configuration information.
In some embodiments of the present application, the process of generating the BIOS image file by the computing device based on the BIOS configuration information may include the following steps 1041 and 1042.
In step 1041, at least one target BIOS code block conforming to the BIOS configuration information is selected from the BIOS code block library. Each BIOS code block in the BIOS code block library has adapted hardware parameters and software function parameters.
For the first alternative implementation manner, the BIOS configuration information stores a hardware parameter of the device, data of the hardware parameter, a software function parameter corresponding to the hardware parameter, and data corresponding to the software function parameter.
Correspondingly, the computing device selects the BIOS code block which accords with the hardware parameters and the software function parameters recorded by the BIOS configuration information from the BIOS code block base based on the hardware parameters and the software function parameters which are adapted by each BIOS code block in the BIOS code block base, and obtains the target BIOS code block.
For the second optional implementation manner, the BIOS configuration information stores, in each parameter and data stored in the target configuration template, a BIOS code identifier and data corresponding to a hardware parameter of the valid data, and a BIOS code identifier and data corresponding to a software function parameter of the valid data.
Accordingly, the computing device may select the BIOS code block indicated by the BIOS code identifier recorded in the BIOS configuration information from the BIOS code block library, to obtain the target BIOS code block.
In an alternative application scenario, the BIOS code block library includes a plurality of c files, and the code recorded in each c file is referred to as a BIOS code block. Accordingly, the BIOS code identification indicates a BIOS code block may be understood as the BIOS code identification indicates a file path of the c-file. The target BIOS code block obtained by the computing device is a target c file determined by the computing device according to the BIOS code identification indication file path.
Illustratively, the BIOS configuration information is recorded with:
mod_usb
mod_usb_storage
mod_usb_ohci
mod_usb_ kbd. Wherein:
the file path indicated by mod_usb is file sys/dev/usb/usb.c.
The file path indicated by mod_usb_store is file sys/dev/usb/usb_store. C.
The file path indicated by mod_usb_ohci is file sys/dev/usb/usb-ohci.c.
The file path indicated by mod_usb_ kbd is file sys/dev/usb/usb-kbd.c.
The computer equipment selects the target BIOS code block from the BIOS code block library as follows: usb.c, usb_storage.c, usb-ohci.c, and usb-kbd.c.
For the aforementioned third optional implementation manner, the BIOS configuration information storage device includes a BIOS code identifier corresponding to each hardware parameter that the BIOS of the BIOS configuration information storage device can support, a BIOS code identifier corresponding to each software function parameter, and a selection identifier of each BIOS code identifier.
Correspondingly, the computing device may select a BIOS code block indicated by the BIOS code identifier corresponding to the selected identifier in the BIOS configuration information from the BIOS code block library, to obtain the target BIOS code block.
Illustratively, the BIOS configuration information is recorded with:
select mod_usb
select mod_usb_storage
#select mod_usb_uhci
select mod_ohci
#select mod_usb_ehci
select mod_usb_kbd
wherein mod_usb_uhci and mod_usb_ehci are not selected, the BIOS code blocks indicated by mod_usb_uhci and mod_usb_ehci will not be selected from the BIOS code block library.
The computer equipment selects the target BIOS code block from the BIOS code block library as follows: usb.c, usb_storage.c, usb-ohci.c, and usb-kbd.c.
In step 1042, the target BIOS code blocks are compiled to generate BIOS image files.
In the embodiment of the application, the computing device can respectively compile the target BIOS code blocks by adopting the BIOS code editor to generate the BIOS image file.
In summary, in the method for generating a BIOS image file according to the embodiment of the present application, after displaying the target configuration template corresponding to the type of the device to be refreshed with the BIOS image file, the data input by the user to the hardware parameter and the software function parameter on the target configuration template is used to write the data input by the user into the target configuration template to generate the BIOS configuration information, and then the BIOS image file is generated based on the BIOS configuration information. In the technical scheme, after a target configuration template corresponding to the model of the device for refreshing the BIOS image file is selected, a user only needs to input data of each parameter according to the hardware parameters specified on the target configuration template and the software function parameters corresponding to the hardware parameters, and the BIOS image file can be generated. Compared with the related art, the user can generate the BIOS image file without knowing professional information such as the code structure of the BIOS code, the code assembly language and the like, so that the writing difficulty of the BIOS image file is reduced, the generating efficiency of the BIOS image file is improved, and the debugging complexity of BIOS writing according to the BIOS image file is further reduced.
Referring to fig. 2, a flowchart of a method for generating a BIOS image file according to an embodiment of the present application is shown. The method for generating the BIOS image file can be applied to the computing device. Alternatively, the computing device may be a computer, a mobile phone, a tablet, or the like. As shown in fig. 2, the method for generating the BIOS image file includes:
step 201, a target configuration template is acquired and displayed. The target configuration template corresponds to the model of the device to be swiped through the BIOS image.
The explanation and implementation of this step may refer to the explanation and implementation of step 101, which is not described in detail in the embodiment of the present application.
Step 202, receiving data of each parameter on a target configuration template input by a user. The parameters include hardware parameters and software function parameters.
The explanation and implementation of this step may refer to the explanation and implementation of step 102, which is not described in detail in the embodiments of the present application.
And 203, writing the data into the target configuration templates respectively to generate BIOS configuration information.
The explanation and implementation of this step may refer to the explanation and implementation of step 103, which is not described in detail in the embodiments of the present application.
In some embodiments, writing data to the target configuration templates, respectively, and generating BIOS configuration information may further include: and carrying out compliance verification corresponding to the parameters on the data of each parameter. And writing the verified data into a target configuration template to generate BIOS configuration information.
Optionally, the computing device may obtain a compliance verification rule corresponding to each parameter on the target configuration template. And judging whether the data of each parameter input by the user accords with the compliance verification rule corresponding to the parameter. And under the condition that the data of the parameters accords with the compliance verification rule corresponding to the parameters, determining that the data passes verification, and writing the data into the target configuration template. Correspondingly, under the condition that the data of the parameter does not accord with the compliance verification rule corresponding to the parameter, determining that the data does not pass the verification. The computing device may output data problem warning information. The data problem early warning information can be used for prompting that the data input by the user does not accord with the compliance verification rule corresponding to the parameter and prompting the user to modify the data of the parameter.
The compliance checking rule is used for judging whether the data corresponding to the parameters accords with the target rule. The target rule may define a range of values, a data type, etc. of the data corresponding to the parameter. The target rule may be a manually set rule or a parameter performance decision rule. For example, the target rule of the software function parameter USB network card defines that the data of the USB network card can only be YES or NO. The target rule of the granule data in the hardware function parameter memory limits the value range of the granule data to (2,4,8,12) and the like.
The step of writing the data into the target configuration templates to obtain written target configuration templates, and the step of writing the verified data into the target configuration templates to obtain written target configuration templates by the computing device.
And 204, carrying out compliance verification corresponding to the parameters on the data of each parameter in the BIOS configuration information.
The explanation and implementation of this step may refer to the explanation and implementation of step 104, which is not described in detail in the embodiments of the present application.
Step 205, downloading the BIOS image file to the device, so that the device uses the BIOS image file to perform BIOS refreshing.
Step 206, reading the running state of the BIOS of the device. The BIOS running state comprises a BIOS refreshing state and the running state of the BIOS of the device after the refreshing is completed.
Optionally, after the computing device downloads the BIOS image file to the device, a debugging program may be run to cause the device to return debugging output information. The debugger may be used to test whether the device's BIOS is properly flushed and whether the device's BIOS is properly running after the flush is completed. Accordingly, the debug output information may record the boot state of the BIOS of the device and the BIOS flush state.
For example, debug output information, abbreviated as output information, may be transmitted between a computing device and a device via a test interface. The debug output information may be recorded with a plurality of strings to indicate the boot state of the BIOS of the device and the BIOS swipe state. For example, the first string indicates that the BIOS is flushing an exception, i.e., that the BIOS image file is always performing exception handling. The second string indicates that the BIOS of the device is normally booted. The third string indicates that the BIOS of the device is not normally booted.
Further alternatively, the computing device may be connected to the device via one or more serial ports. The debugger may be used to test whether the serial port of the device is functioning properly. The serial port of the device may be a serial port for brushing BIOS, or the serial port of the device may be a serial port for connecting with the computing device in the BIOS for brushing the BIOS image file. The debug output information may include a fourth string. The fourth string indicates that the BIOS of the device is normally started but the serial port is abnormally output.
In one alternative implementation, the state types of the exception state include: the BIOS of the device is not normally started, the BIOS is abnormally written by brushing, the BIOS of the device is normally started, and the serial port is abnormally output. The process of the computing device reading the BIOS run state of the device may include: and reading the serial port log and/or the output information of the debugging interface of the equipment, and determining the running state of the BIOS. The serial port log may record operational status data of the serial port of the device. The operational status data may indicate whether there is an abnormal output from the serial port. The output information may record the boot state of the BIOS of the device and the BIOS swipe state. The startup state of the BIOS may indicate whether the BIOS is startup normally. The BIOS flush status may indicate whether there is an exception to the BIOS flush.
Step 207, outputting abnormal alarm information when the BIOS running state is abnormal.
In the embodiment of the application, the abnormality warning information is used for prompting a user to write the BIOS abnormality based on the BIOS image file. Alternatively, the computing device may output, to the terminal of the debugger, the abnormality alert information corresponding to the state type of the abnormal state in the case where the BIOS running state is the abnormal state. The abnormal alarm information can prompt the user that the BIOS is written abnormally, the BIOS is not normally started or the BIOS is normally started but the serial port is abnormally output, and the like.
Optionally, in the case that the BIOS running state is an abnormal state, the computing device may further search for a solution corresponding to the state type of the abnormal state in the abnormal solution library. The abnormal solution library stores solutions corresponding to various abnormal states.
If the abnormal solution library stores the solutions corresponding to the state types of the abnormal states, outputting abnormal alarm information comprising the solutions. For example, the computing device outputs the abnormality warning information including the solution to the terminal of the debugger by means of instant messaging, mail, or the like.
If the abnormal solution library does not store the solution corresponding to the state type, outputting abnormal alarm information. For example, the computing device may send the abnormal alert information to the terminals of the debugger and the developer in an instant messaging, mail, or other manner. The abnormal alarm information may include debug information, so that a developer refers to the debug information to solve the abnormal situation indicated by the abnormal alarm information. The debug information may include debug output information and/or serial logs.
In summary, in the method for generating a BIOS image file according to the embodiment of the present application, after displaying the target configuration template corresponding to the type of the device to be refreshed with the BIOS image file, the data input by the user to the hardware parameter and the software function parameter on the target configuration template is used to write the data input by the user into the target configuration template to generate the BIOS configuration information, and then the BIOS image file is generated based on the BIOS configuration information. In the technical scheme, after a target configuration template corresponding to the model of the device for refreshing the BIOS image file is selected, a user only needs to input data of each parameter according to the hardware parameters specified on the target configuration template and the software function parameters corresponding to the hardware parameters, and the BIOS image file can be generated. Compared with the related art, the user can generate the BIOS image file without knowing professional information such as the code structure of the BIOS code, the code assembly language and the like, so that the writing difficulty of the BIOS image file is reduced, the generating efficiency of the BIOS image file is improved, and the debugging complexity of BIOS writing according to the BIOS image file is further reduced.
Referring to fig. 3, a block diagram of a device for generating a BIOS image file according to an embodiment of the present application is shown. As shown in fig. 3, the BIOS image file generating device 300 includes: a display module 301, a receiving module 302 and a generating module 303.
A display module 301, configured to acquire and display a target configuration template; the target configuration template corresponds to the model of the device to be refreshed with the BIOS image file, and is used for storing hardware parameters of the device and software function parameters corresponding to the hardware parameters, wherein the software function parameters are used for indicating the software functions supported by hardware described by the corresponding hardware parameters;
a receiving module 302, configured to receive data of each parameter on the target configuration template input by a user; the parameters include hardware parameters and software function parameters;
the generating module 303 is configured to write data into the target configuration templates respectively, and generate BIOS configuration information; and is further configured to generate a BIOS image file based on the BIOS configuration information.
Optionally, the generating module 303 is further configured to:
carrying out compliance verification corresponding to the parameters on the data of each parameter;
and writing the verified data into a target configuration template to generate BIOS configuration information.
Optionally, the generating module 303 is further configured to:
selecting at least one target BIOS code block conforming to BIOS configuration information from a BIOS code block library, wherein each BIOS code block in the BIOS code block library is provided with an adaptive hardware parameter and/or a software function parameter;
and compiling the target BIOS code blocks respectively to generate a BIOS image file.
Optionally, the generating module 303 is further configured to:
writing the data into the target configuration templates respectively to obtain written target configuration templates;
aiming at each parameter in the written target configuration template, under the condition that the data of the parameter is effective data, acquiring a BIOS code identifier corresponding to each parameter based on the corresponding relation between the hardware parameter and the BIOS code identifier and the corresponding relation between the software function parameter and the BIOS code identifier; the BIOS code identifier is used for indicating a BIOS code block in the BIOS code block library, and the BIOS code block is used for realizing the BIOS component described by the parameter corresponding to the BIOS code identifier when running;
generating BIOS configuration information based on the BIOS code identification; the BIOS configuration information records BIOS code identifiers respectively corresponding to each parameter in the written target configuration template;
selecting at least one target BIOS code block conforming to BIOS configuration information from the BIOS code block library comprises:
and selecting the BIOS code block indicated by the BIOS code identifier recorded by the BIOS configuration information from the BIOS code block library to obtain a target BIOS code block.
Optionally, the target configuration template is a form template; optionally, the generating module 303 is further configured to read the data of each parameter in the written target configuration template, and determine, according to the correspondence between the row and column positions of the table in the target configuration module and the BIOS code identifiers, the BIOS code identifier corresponding to the parameter when the data of the parameter is valid data, so as to obtain the BIOS code identifier corresponding to each parameter respectively.
Optionally, the generating device 300 of the BIOS image file further includes: the device comprises a downloading module, a reading module and an output module.
The downloading module is used for downloading the BIOS image file to the equipment so that the equipment adopts the BIOS image file to carry out BIOS refreshing;
the reading module is used for reading the BIOS running state of the equipment, wherein the BIOS running state comprises a BIOS refreshing state and the running state of the BIOS of the equipment after the refreshing is finished;
and the output module is used for outputting abnormal alarm information under the condition that the BIOS running state is abnormal.
Optionally, the output module is further configured to:
under the condition that the BIOS running state is an abnormal state, if the abnormal solution library stores solutions corresponding to the state types of the abnormal states, outputting abnormal alarm information comprising the solutions, wherein the abnormal solution library stores solutions corresponding to a plurality of abnormal states;
if the abnormal solution library does not store the solution corresponding to the state type, outputting abnormal alarm information.
Optionally, the reading module is further configured to:
reading the output information of a serial port log and/or a debugging interface of the equipment, determining the running state of the BIOS, wherein the serial port log records running state data of the serial port of the equipment, and the output information records the starting state and the BIOS refreshing state of the BIOS of the equipment;
The state types of the abnormal state include: the BIOS of the device is not normally started, the BIOS is abnormally written by brushing, the BIOS of the device is normally started, and the serial port is abnormally output.
In summary, according to the generating device of the BIOS image file provided by the embodiment of the present application, after displaying the target configuration template corresponding to the type of the device to be refreshed with the BIOS image file, the data input by the user to the hardware parameter and the software function parameter on the target configuration template is used to write the data input by the user into the target configuration template to generate the BIOS configuration information, and further, the BIOS image file is generated based on the BIOS configuration information. In the technical scheme, after a target configuration template corresponding to the model of the device for refreshing the BIOS image file is selected, a user only needs to input data of each parameter according to the hardware parameters specified on the target configuration template and the software function parameters corresponding to the hardware parameters, and the BIOS image file can be generated. Compared with the related art, the user can generate the BIOS image file without knowing professional information such as the code structure of the BIOS code, the code assembly language and the like, so that the writing difficulty of the BIOS image file is reduced, the generating efficiency of the BIOS image file is improved, and the debugging complexity of BIOS writing according to the BIOS image file is further reduced.
Fig. 4 is a block diagram of an electronic device, according to an example embodiment. For example, electronic device 400 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 4, an electronic device 400 may include one or more of the following components: a processing component 402, a memory 404, a power supply component 406, a multimedia component 408, an audio component 410, an input/output (I/O) interface 412, a sensor component 414, and a communication component 416.
The processing component 402 generally controls overall operation of the electronic device 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 402 may include one or more processors 920 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the electronic device 400. Examples of such data include instructions for any application or method operating on electronic device 400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 404 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 406 provides power to the various components of the electronic device 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 400.
The multimedia component 408 includes a screen between the electronic device 400 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and/or a rear camera. When the electronic device 400 is in an operational mode, such as a shooting mode or a video mode, the front-facing camera and/or the rear-facing camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 further includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 414 includes one or more sensors for providing status assessment of various aspects of the electronic device 400. For example, the sensor assembly 414 may detect an on/off state of the electronic device 400, a relative positioning of the components, such as a display and keypad of the electronic device 400, the sensor assembly 414 may also detect a change in position of the electronic device 400 or a component of the electronic device 400, the presence or absence of a user's contact with the electronic device 400, an orientation or acceleration/deceleration of the electronic device 400, and a change in temperature of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate communication between the electronic device 400 and other devices, either wired or wireless. The electronic device 400 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, electronic device 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital signal processing circuits (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements.
In this embodiment, the electronic device further includes a chip provided by the embodiment of the present application.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail a current source module and apparatus, an electronic device and a storage medium according to the present application, and specific examples have been provided herein to illustrate the principles and embodiments of the present application, the above examples being provided only to assist in understanding the method of the present application and its core ideas; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (11)

1. A method for generating a BIOS image file, the method comprising:
acquiring and displaying a target configuration template; the target configuration template corresponds to the model of the device to be refreshed with the BIOS image file and is used for storing hardware parameters of the device and software function parameters corresponding to the hardware parameters, wherein the software function parameters are used for indicating the corresponding hardware-supported software functions described by the hardware parameters;
receiving data of each parameter on the target configuration template input by a user; the parameters include the hardware parameters and the software function parameters;
writing the data into the target configuration templates respectively to generate BIOS configuration information;
and generating a BIOS image file based on the BIOS configuration information.
2. The method of claim 1, wherein writing the data to the target configuration templates, respectively, generates BIOS configuration information, comprising:
carrying out compliance verification corresponding to the parameters on the data of each parameter;
and writing the data which passes the verification into the target configuration template to generate BIOS configuration information.
3. The method of claim 2, wherein generating a BIOS image file based on the BIOS configuration information comprises:
Selecting at least one target BIOS code block conforming to the BIOS configuration information from a BIOS code block library, wherein each BIOS code block in the BIOS code block library is provided with an adaptive hardware parameter and/or a software function parameter;
and compiling the target BIOS code blocks respectively to generate a BIOS image file.
4. The method of claim 3, wherein the writing the data to the target configuration templates, respectively, generates BIOS configuration information, comprising:
writing the data into the target configuration templates respectively to obtain written target configuration templates;
aiming at each parameter in the written target configuration template, under the condition that the data of the parameter is effective data, acquiring a BIOS code identifier corresponding to each parameter based on the corresponding relation between the hardware parameter and the BIOS code identifier and the corresponding relation between the software function parameter and the BIOS code identifier; the BIOS code identification is used for indicating the BIOS code blocks in the BIOS code block library;
generating the BIOS configuration information based on the BIOS code identification; the BIOS configuration information records BIOS code identifiers respectively corresponding to each parameter in the written target configuration template;
The selecting at least one target BIOS code block from the BIOS code block library, which accords with the BIOS configuration information, includes:
and selecting the BIOS code block indicated by the BIOS code identifier recorded by the BIOS configuration information from a BIOS code block library to obtain the target BIOS code block.
5. The method of claim 4, wherein the target configuration template is a form template; the obtaining the BIOS code identifier corresponding to each parameter based on the corresponding relation between the hardware parameter and the BIOS code identifier and the corresponding relation between the software function parameter and the BIOS code identifier includes:
and reading the data of each parameter in the written target configuration template, and determining the BIOS code identification corresponding to the parameter according to the corresponding relation between the row and column positions of the table in the target configuration module and the BIOS code identification under the condition that the data of the parameter is effective data, so as to obtain the BIOS code identification corresponding to each parameter respectively.
6. The method according to claim 1, wherein the method further comprises:
downloading the BIOS image file to the equipment so that the equipment adopts the BIOS image file to carry out BIOS refreshing;
Reading the BIOS running state of the equipment, wherein the BIOS running state comprises a BIOS refreshing state and the running state of the BIOS of the equipment after the refreshing is finished;
and under the condition that the BIOS running state is abnormal, outputting abnormal alarm information.
7. The method of claim 6, wherein outputting the exception alert message if the BIOS run state is an exception state comprises:
if the BIOS running state is an abnormal state, if a solution corresponding to the state type of the abnormal state is stored in an abnormal solution library, outputting abnormal alarm information comprising the solution, wherein solutions corresponding to various abnormal states are stored in the abnormal solution library;
and if the solution corresponding to the state type is not stored in the abnormal solution library, outputting abnormal alarm information.
8. The method of claim 6 or 7, wherein the reading the BIOS run state of the device comprises:
reading the output information of a serial port log and/or a debugging interface of the equipment, and determining the BIOS running state, wherein the serial port log records running state data of the serial port of the equipment, and the output information records the starting state and the BIOS refreshing state of the BIOS of the equipment;
The state types of the abnormal state include: the BIOS of the device is not normally started, the BIOS is abnormally written, and the BIOS of the device is normally started but the serial port is abnormally output.
9. A device for generating a BIOS image file, the device comprising:
the display module is used for acquiring and displaying the target configuration template; the target configuration template corresponds to the model of the device to be refreshed with the BIOS image file and is used for storing hardware parameters of the device and software function parameters corresponding to the hardware parameters, wherein the software function parameters are used for indicating the corresponding hardware-supported software functions described by the hardware parameters;
the receiving module is used for receiving data of each parameter on the target configuration template input by a user; the parameters include the hardware parameters and the software function parameters;
the generating module is used for writing the data into the target configuration templates respectively to generate BIOS configuration information; and generating a BIOS image file based on the BIOS configuration information.
10. An electronic device, comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method of generating a BIOS image file as claimed in any one of claims 1 to 8.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of generating a BIOS image file according to any one of claims 1 to 8.
CN202310914161.0A 2023-07-24 2023-07-24 BIOS image file generation method and device and electronic equipment Pending CN117075921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310914161.0A CN117075921A (en) 2023-07-24 2023-07-24 BIOS image file generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310914161.0A CN117075921A (en) 2023-07-24 2023-07-24 BIOS image file generation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117075921A true CN117075921A (en) 2023-11-17

Family

ID=88708841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310914161.0A Pending CN117075921A (en) 2023-07-24 2023-07-24 BIOS image file generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117075921A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118227142A (en) * 2024-05-24 2024-06-21 湖南华自信息技术有限公司 Automatic compiling method for server and firmware

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547668A (en) * 2015-09-21 2017-03-29 龙芯中科技术有限公司 Computer system fault alarming method, apparatus and system
US20190163908A1 (en) * 2017-11-30 2019-05-30 Siemens Aktiengesellschaft Control method and unit of mobile storage devices, and storage medium
CN110187872A (en) * 2019-05-30 2019-08-30 浪潮商用机器有限公司 A kind of BIOS development approach, system and electronic equipment and storage medium
CN111026404A (en) * 2019-12-13 2020-04-17 上海米哈游天命科技有限公司 Method and device for generating parameter configuration code, electronic product and storage medium
CN115934616A (en) * 2022-11-18 2023-04-07 苏州浪潮智能科技有限公司 Serial port information storage method and device, server, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547668A (en) * 2015-09-21 2017-03-29 龙芯中科技术有限公司 Computer system fault alarming method, apparatus and system
US20190163908A1 (en) * 2017-11-30 2019-05-30 Siemens Aktiengesellschaft Control method and unit of mobile storage devices, and storage medium
CN110187872A (en) * 2019-05-30 2019-08-30 浪潮商用机器有限公司 A kind of BIOS development approach, system and electronic equipment and storage medium
CN111026404A (en) * 2019-12-13 2020-04-17 上海米哈游天命科技有限公司 Method and device for generating parameter configuration code, electronic product and storage medium
CN115934616A (en) * 2022-11-18 2023-04-07 苏州浪潮智能科技有限公司 Serial port information storage method and device, server, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118227142A (en) * 2024-05-24 2024-06-21 湖南华自信息技术有限公司 Automatic compiling method for server and firmware

Similar Documents

Publication Publication Date Title
CN107291626B (en) Data storage method and device
CN113377370B (en) File processing method and device, electronic equipment and storage medium
CN117075921A (en) BIOS image file generation method and device and electronic equipment
CN109426504B (en) Program processing method, program processing device, electronic device and storage medium
CN111538574B (en) Task stack management method, device, terminal and storage medium
CN113160873B (en) Memory testing method and device, electronic equipment and storage medium
CN106293683B (en) Project compiling method and device
CN112631695B (en) Data verification method and device, electronic equipment and storage medium
CN113836069B (en) Chip, pin operation method, readable storage medium and electronic device
CN114661606A (en) Program debugging method and device, electronic equipment and storage medium
CN110569037B (en) Data writing method and device
CN116257290A (en) Startup display method and device, electronic equipment and storage medium
CN106713902A (en) Camera module fault detection method and apparatus, and terminal
CN114816974A (en) System generation method and device, electronic equipment and storage medium
CN116737329A (en) Interrupt setting method and device, electronic equipment and storage medium
CN117667241B (en) Device loading method and device, electronic device and storage medium
CN117555605B (en) Operating system starting method and device, electronic equipment and readable storage medium
CN113296720B (en) Display mode switching method and device, electronic equipment and storage medium
CN115344309A (en) Memory parameter modification method and device, electronic equipment and storage medium
CN113535183B (en) Code processing method, device, electronic equipment and storage medium
CN116450534B (en) Method, device, equipment and medium for generating mobile terminal application program
CN112650594B (en) Resource processing method and device
CN115756614A (en) Drive loading method, drive loading device and storage medium
CN111596949B (en) Method and device for developing application program
CN110990068B (en) Display method, display device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination