Firmware configuration method, system, equipment and medium
Through digital twin technology, simulate the operating environment of BMC, simulate the operation and function verification of modular compiled code, solve the problems of inefficient BMC firmware configuration and high hardware resource cost, and realize intelligent configuration and resource optimization.
Patent Information
- Application Number
- CN202411215571.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-13
AI Technical Summary
In the prior art, the firmware configuration of the substrate management controller (BMC) is inefficient, and the reliance on manual verification leads to high hardware resource costs, complex configuration processes and low efficiency.
By building BMC's digital twin program, use modular compiled code to simulate and run the subsystem to be configured in the digital twin program, generate simulated operation results, perform functional verification and code modification suggestions, and finally complete compilation and configuration, replacing traditional manual verification process.
It significantly improves firmware configuration efficiency, reduces dependence on hardware resources and cost consumption, simplifies the configuration process, and improves development efficiency and resource utilization.
Smart Images

Figure CN119127287A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a firmware configuration method, system, device and medium. Background Art
[0002] The Baseboard Management Controller (BMC) is a unique management controller for servers. It is used to automatically monitor the operating status of the server to assist operation and maintenance personnel to timely understand the operating status of the server and ensure the normal operation of the server. Therefore, how to efficiently and conveniently implement the firmware configuration of the baseboard management controller is one of the technical problems that need to be solved urgently.
[0003] In the related technology, BMC operation and maintenance engineers usually use the local integrated development environment (IDE) to write and compile codes to form corresponding files, and then refresh the files to the BMC of the real server to gradually verify the functional operation effect of the firmware, thereby realizing the configuration of the BMC firmware. However, the BMC contains multiple firmwares, and the configuration process is complicated. If the functional operation effect of the firmware is verified one by one on the real server manually, a lot of manpower and material resources will be consumed, resulting in low firmware configuration efficiency and high hardware resource costs.
[0004] Therefore, there is an urgent need for a firmware configuration method, system, device and medium to solve the above technical problems. Summary of the invention
[0005] The present invention provides a firmware configuration method, system, device and medium, which are used to solve the defects of manual firmware configuration in the prior art, low firmware configuration efficiency and high required hardware resource cost, realize intelligent firmware configuration, improve firmware configuration efficiency and reduce hardware resource cost.
[0006] The present invention provides a firmware configuration method, comprising: According to the firmware configuration request of the baseboard management controller, obtaining the subsystem to be configured in the baseboard management controller and the modular compiled code of the subsystem to be configured; Constructing a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured; According to the modular compiled code, the subsystem to be configured is simulated in the digital twin program, and according to the simulation result, the firmware of the subsystem to be configured is configured.
[0007] According to the present invention, a firmware configuration method is provided, wherein according to the modular compiled code, the subsystem to be configured is simulated and run in the digital twin program, comprising: Inputting the modular compiled code into the mirror data transmission interface of the digital twin program; Receive target data generated when the digital twin program simulates and runs the subsystem to be configured according to the modular compiled code, wherein the target data includes multiple items of interaction data, log generation data, data processing results, and resource occupancy information; The simulation operation result is generated according to the target data.
[0008] According to the present invention, a firmware configuration method is provided, wherein according to the modular compiled code, the subsystem to be configured is simulated and run in the digital twin program, comprising: Determine a simulation operation strategy according to the modular compiled code; the simulation operation strategy includes multiple items of initialization strategy, thread scheduling strategy, data collection strategy, data display strategy, data processing strategy, data interaction strategy, log generation strategy, and alarm recording strategy; According to the simulation operation strategy, the subsystem to be configured is simulated in the digital twin program.
[0009] According to the present invention, a firmware configuration method is provided, wherein the firmware configuration of the subsystem to be configured is performed according to the simulation operation result, comprising: According to the simulation operation result, functional verification is performed on the subsystem to be configured; In the case where it is determined that the subsystem to be configured has not passed the functional verification, obtaining code modification suggestion information of the subsystem to be configured according to the functional verification result and the modular compiled code; Sending the code modification suggestion information to the client; receiving an updated modular compiled code sent by the client, where the updated modular compiled code is obtained by the client updating the modular compiled code according to the code modification suggestion information; According to the updated modular compiled code, simulating and running the subsystem to be configured in the digital twin program; When it is determined according to the simulation operation result that the subsystem to be configured has passed the functional verification, firmware configuration is performed on the subsystem to be configured according to the updated modular compiled code.
[0010] According to the present invention, there is provided a firmware configuration method, wherein the firmware configuration of the subsystem to be configured is performed according to the updated modular compiled code, comprising: Performing full compilation according to the updated modular compiled code to generate full code of the baseboard management controller; The full code is refreshed into the baseboard management controller to perform firmware configuration on the subsystem to be configured.
[0011] According to the present invention, a firmware configuration method is provided, wherein the code modification suggestion information of the subsystem to be configured is obtained according to the functional verification result and the modular compiled code, including: Inputting the functional verification result and the modular compiled code into a recognition model to obtain a code template and code compilation suggestion information of the subsystem to be configured output by the recognition model; Generate code modification suggestion information of the subsystem to be configured according to the code template and the code compilation suggestion information; The recognition model is obtained by training based on the modular compiled code and functional verification results of the sample subsystem, as well as the corresponding code modification template and code modification information of the sample subsystem.
[0012] According to the present invention, a firmware configuration method is provided, wherein a digital twin program corresponding to the baseboard management controller is constructed according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured, comprising: Building a first digital twin program according to the main running program of the baseboard management controller; Constructing a second digital twin program according to the configuration information of the subsystem to be configured and the configuration information of the target subsystem; When the subsystem to be configured is a subsystem to be added, the second digital twin program is integrated into the first digital twin program to obtain the digital twin program.
[0013] The present invention also provides a firmware configuration system, comprising: An acquisition unit, configured to acquire a subsystem to be configured in the baseboard management controller and a modular compiled code of the subsystem to be configured according to a firmware configuration request of the baseboard management controller; A construction unit, configured to construct a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured; A configuration unit is used to simulate the operation of the subsystem to be configured in the digital twin program according to the modular compiled code, and perform firmware configuration on the subsystem to be configured according to the simulation operation result.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned firmware configuration methods is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the firmware configuration method described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the firmware configuration method described above is implemented.
[0017] The firmware configuration method, system, device and medium provided by the present invention obtain the modular compiled code and configuration information of the subsystem to be configured in the baseboard management controller, and combine them with the configuration information of the associated target subsystem to construct a digital twin program of the BMC to simulate the operating environment of the real BMC; then, the modular compiled code is used in the digital twin program to simulate the operation of the subsystem to be configured, so as to configure the firmware according to the simulation results, and the operating environment of the real BMC is simulated by the digital twin model to perform intelligent configuration of the firmware, which effectively replaces the traditional cumbersome process of manually writing, compiling and verifying firmware functions through IDE on a real server, significantly improves the firmware configuration efficiency, reduces the dependence on hardware resources and cost consumption, and solves the technical defects of complex BMC firmware configuration, low efficiency and high hardware resource cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flowchart of a firmware configuration method provided by the prior art.
[0020] Figure 2 This is one of the flowcharts of the firmware configuration method provided by the present invention.
[0021] Figure 3 This is the second flowchart of the firmware configuration method provided by the present invention.
[0022] Figure 4 It is a structural schematic diagram of the firmware configuration system provided by the present invention.
[0023] Figure 5It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] The baseboard management controller is a management controller unique to the server. One of the main functions of the current BMC is to automatically monitor the operating status of the server, such as monitoring the health status of each hardware. When the BMC monitors the health status of each hardware, it can effectively obtain information about each hardware to help the operation and maintenance personnel to timely understand the operating status of the server and ensure the normal operation of the server. When a problem occurs in the server, the fault information can be sent to the operation and maintenance personnel in a timely manner through the log to assist the operation and maintenance personnel in locating the fault.
[0026] The development of the firmware of the current server BMC, including new component adaptation, development of new monitoring functions, and fault repair, usually relies on BMC engineers to use local IDE to write code, compile, generate IMA files and HPM files, and refresh the files to the actual server BMC to verify the operation of new functions and collect debugging information. The compilation, packaging, and upgrade processes of this process rely on various toolkits in the development environment, and the operation is relatively cumbersome. Usually, the operations on different platforms are different, the learning cost is high, and it cannot be fully reused when switching projects. When refreshing the corresponding files to the real server BMC for functional verification, it is necessary to rely on the specific configuration of the server. For example, when the new component is adapted, the server needs to build the links required by the new component, such as the graphics processing unit (GPU) and smart network card. When building the specific configuration of the server, R&D engineers are generally required to borrow and return items in the laboratory, which increases the cost of BMC development and easily causes the problem of development engineers competing for server resources in the R&D laboratory, reducing development efficiency. In addition, the server energy consumption, heat dissipation, noise, and component management in the R&D laboratory require a lot of management manpower, which increases the investment in server development.
[0027] like Figure 1 As shown in the figure, the traditional solution currently developed by BMC engineers through R&D laboratory server BMC is divided into the following steps: Step 1: Use the local ID to write code, compile, generate ima and hpm files, and refresh them to the actual server BMC to verify the operation of the new function and collect debug information.
[0028] Step 2: When adapting or debugging a new component, it is necessary to borrow it from the laboratory and install it on the R&D laboratory server, and then return the adapted or debugged component.
[0029] The operation steps of this process are complicated. Even if you modify a simple function of just a few lines of code, you will be subject to various problems in the process of borrowing parts, scheduling resources on R&D laboratory servers, compiling the entire code, manually packaging the project's unique packaging method, refreshing the full BMC firmware, and collecting information. Unskilled engineers often need to spend hours on this process, which is inefficient. In addition, the compilation and environment building methods of each project are often not reusable, which has switching costs. Furthermore, the hidden costs of this development model include: 1. Physical space and facilities of the R&D laboratory; 2. High noise, high energy consumption, and safety hazards; 3. Scheduling issues of R&D laboratory servers and component resources; 4. Laboratory management and borrowing and returning management costs.
[0030] In summary, if we rely on manual verification of the functional operation effect of the firmware on the real server one by one, it will consume a lot of manpower and material resources, resulting in inefficient firmware configuration and high cost of required hardware resources.
[0031] Digital Twin is an equivalent virtual expression of actual physical products. It integrates multi-disciplinary, multi-physical quantity, multi-scale, and multi-probability simulation processes by utilizing physical models, sensor updates, operation history and other data, and completes mapping in virtual space, thereby reflecting the entire life cycle of the corresponding physical equipment. Simply put, digital twins are highly simulated virtual models of real objects created in a digital way to achieve a virtual representation of the state of a physical entity or system. Digital twin technology uses virtual fusion to gradually replace the degree of participation of physical assets in industrial production. Its potential application areas include product design, industrial manufacturing, medical analysis, and engineering construction.
[0032] Therefore, in order to solve the above technical problems, this embodiment provides a firmware configuration method, so that the BMC firmware engineer can first perform multiple separate compilation and verification of the development module through the BMC digital twin system of the cloud server before compiling the code and performing refresh verification on the actual physical machine. After forming a stable functional version, it is integrated into the real server for verification. This can reduce the frequency of using the actual server for verification, reduce the resource usage, energy consumption noise and management costs of the R&D laboratory, and improve the work efficiency of BMC R&D engineers by shortening the programming-verification-feedback-modification loop time, thereby improving the firmware configuration efficiency and reducing the hardware resource cost. It can also be applied to the training of new BMC R&D employees, so as to help new BMC R&D employees quickly become familiar with the debugging / development methods of the main modules of the BMC through actual programming experience and rapid feedback.
[0033] Figure 2 This is one of the flowcharts of the firmware configuration method provided by the present invention, which can be implemented based on the digital twin system in the cloud server. Figure 2 As shown, the method includes step 210, step 220 and step 230.
[0034] Step 210: According to a firmware configuration request of a baseboard management controller, a subsystem to be configured in the baseboard management controller and a modular compiled code of the subsystem to be configured are obtained.
[0035] Optionally, when performing firmware configuration on the baseboard management controller, it is necessary to first receive a firmware configuration request input by a server BMC development engineer at the front end to request firmware configuration of the baseboard management controller; the firmware configuration request includes an identifier of a subsystem in the baseboard management controller to be firmware configured, and a modular compiled code or code identifier for firmware configuration.
[0036] After the firmware configuration request is obtained, the firmware configuration request may be parsed, and according to the identifier of the subsystem to be firmware configured obtained through the parsing, the corresponding subsystem may be associated and obtained in the baseboard management controller as the subsystem to be configured; in addition, it may be determined whether a modular compiled code for firmware configuration is parsed, and if a modular compiled code is parsed, the modular compiled code is determined as the modular compiled code of the subsystem to be configured; if the modular compiled code is not parsed, but a code identifier is parsed, the modular compiled code of the subsystem to be configured is associated and obtained based on the code identifier, thereby reducing manual code input, reducing labor costs, and improving firmware configuration efficiency.
[0037] The subsystem to be configured here is a subsystem that needs to be configured with firmware, such as a subsystem formed by a heat dissipation link of BMC-CPLD-fan / liquid cooling pipe-sensor, a subsystem formed by a BMC-RAID card link, a subsystem formed by a BMC-hard disk-sensor storage link, a subsystem formed by a BMC-network card-sensor network link, a subsystem formed by a CPU-GPU card-sensor computing link, etc. This embodiment does not specifically limit this.
[0038] The modular compiled code (or subsystem image) here can be the full amount of code on the local side. Engineers organize the code into modules according to the running configuration of each subsystem, clarify the interface and dependency of each module, and perform modular and minimized code modification, compilation, and linking for the functional modules that need to be developed or scheduled for the subsystem to be configured with firmware, such as storage system monitoring settings, cooling system monitoring settings, remote desktop system, etc. to form a subsystem image.
[0039] Step 220: construct a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured.
[0040] Optionally, after determining the subsystem to be configured, the relevant information of the main running program (or main function) of the BMC can be fully collected, including but not limited to its software version, function module list, such as BMC initialization and startup functions, etc. At the same time, for the subsystem to be configured, its detailed configuration information is read through interface query or directly from the configuration file. This information may cover hardware specifications, interface types, performance parameters, and specific configuration settings. In addition, it is necessary to identify and obtain the configuration information of the target subsystem that has a dependent or interactive relationship with the subsystem to be configured to ensure that the digital twin model can accurately reflect the interaction between systems, such as the target subsystem's preemption of business resources of the configured subsystem.
[0041] Next, build a digital twin basic model: Based on the collected BMC main operating program architecture and logic, use modeling tools to build a digital twin basic model of BMC. This model needs to accurately map the basic software structure, functional modules and their relationships of BMC, and provide a framework for the subsequent integration of subsystem configuration information.
[0042] Then, integrate the subsystem configuration information: Based on the digital twin basic model, customize and expand the basic model according to the configuration information of the subsystem to be configured and the configuration information of the target subsystem, and obtain the digital twin program corresponding to the baseboard management controller, so that the digital twin program can simulate the operation of the BMC main function, the operation of the subsystem to be configured (for example, when the subsystem to be configured is a subsystem formed by the heat dissipation link of BMC-CPLD-fan / liquid cooling pipe-sensor, the digital twin program can simulate the fan speed regulation of the subsystem), and the business resource preemption of the subsystem to be configured by other subsystems, etc. The specific implementation steps include: adding virtual components representing subsystems in the model, setting corresponding properties (such as hardware specifications, performance indicators) and parameters (such as configuration options, working modes), and ensuring that these virtual components can be correctly connected and interacted according to the actual configuration information. At the same time, for the target subsystem associated with the subsystem to be configured, it is also necessary to establish corresponding virtual representation and interaction logic in the model under the guidance of its configuration information. For example, the communication thread between the target subsystem and the subsystem to be configured can be replaced by a simple calculation script to simulate its preemption of business resources of the subsystem to be configured, thereby fully reflecting the dependency and collaboration relationship between systems.
[0043] Step 230: simulate the subsystem to be configured in the digital twin program according to the modular compiled code, and perform firmware configuration on the subsystem to be configured according to the simulation result.
[0044] Optionally, after building the digital twin program corresponding to the baseboard management controller, the modular compiled code of the subsystem to be configured can be refreshed into the digital twin program, so that the digital twin program can simulate the operation of the subsystem to be configured based on the modular compiled code, and perform functional verification on the subsystem to be configured based on the simulation operation result. If the functional verification fails, the modular compiled code is continuously modified until an updated modular compiled code of a stable version that passes the functional verification of the subsystem to be configured is obtained.
[0045] In addition, the updated modular compiled code of the stable version may be refreshed to the real BMC for simple verification. After passing the verification in the real BMC, the firmware of the subsystem to be configured is configured according to the updated modular compiled code of the stable version.
[0046] The method provided in this embodiment obtains the modular compiled code and configuration information of the subsystem to be configured in the baseboard management controller, and combines it with the configuration information of the associated target subsystem to build a digital twin program of the BMC to simulate the operating environment of the real BMC; then, the modular compiled code is used in the digital twin program to simulate the operation of the subsystem to be configured, so as to configure the firmware according to the simulation results, and the operating environment of the real BMC is simulated by the digital twin model to perform intelligent configuration of the firmware, which effectively replaces the traditional cumbersome process of manually writing, compiling and verifying firmware functions through IDE on a real server, significantly improves the efficiency of firmware configuration, reduces the dependence on hardware resources and cost consumption, and solves the technical defects of complex BMC firmware configuration, low efficiency and high hardware resource cost.
[0047] In some embodiments, the simulating operation of the subsystem to be configured in the digital twin program according to the modular compiled code includes: Inputting the modular compiled code into the mirror data transmission interface of the digital twin program; Receive target data generated when the digital twin program simulates and runs the subsystem to be configured according to the modular compiled code, wherein the target data includes multiple items of interaction data, log generation data, data processing results, and resource occupancy information; The simulation operation result is generated according to the target data.
[0048] Figure 3 The second flowchart of the firmware configuration method provided by the present invention; Figure 3 As shown, step 230 further includes: Optionally, the image upgrade module inputs the modular compiled code of the subsystem to be configured into the image data transmission interface of the digital twin program, so that the digital twin program of the BMC running in the cloud server models the subsystem to be configured of the real server BMC, and simulates the BMC monitoring and setting of the information flow of different server components through the image (or modular compiled code) of the subsystem, including but not limited to the threads of the BMC in the subsystem, the data and commands sent and received, the logs generated, and the data packets sent by the components to the BMC, thereby realizing the simulation of the initialization, thread scheduling, data communication, data collection, log generation, data display on the web side, etc. of the real server BMC image and the subsystem, and collects multiple items of interaction data, log generation data, data processing results and resource occupancy information (such as resource preemption status) generated by the simulation operation, thereby obtaining the target data.
[0049] Subsequently, based on the target data, a simulation operation result of the BMC is generated, so that the functional verification of the subsystem to be configured can be performed based on the simulation operation result, and then the firmware configuration of the subsystem to be configured can be performed according to the functional verification result.
[0050] The method provided in this embodiment inputs the modular compiled code into the mirror data transmission interface of the BMC digital twin program in the cloud server to achieve accurate modeling and simulation of the subsystem to be configured of the real server BMC. The process covers all aspects of simulation such as subsystem thread scheduling, data communication, log collection and web display, and effectively collects multi-dimensional target data including interaction data, logs, processing results and resource occupancy, thereby generating detailed BMC simulation operation results, which provides solid data support and optimization guidance for the functional verification and firmware configuration of subsequent subsystems.
[0051] In some embodiments, simulating and running the subsystem to be configured in the digital twin program includes: Determine a simulation operation strategy according to the modular compiled code; the simulation operation strategy includes multiple items of initialization strategy, thread scheduling strategy, data collection strategy, data display strategy, data processing strategy, data interaction strategy, log generation strategy, and alarm recording strategy; According to the simulation operation strategy, the subsystem to be configured is simulated in the digital twin program.
[0052] Optionally, step 230 further includes: The modular compiled code is refreshed into the digital twin program so that the digital twin program can determine the simulation operation strategy based on the modular compiled code, and then simulate the operation process of the subsystem to be configured in the actual BMC according to the simulation operation strategy, including but not limited to initialization, thread scheduling, data collection, data display, data processing, data interaction, log generation, and alarm recording. In addition, multiple items of interaction data, log generation data, data processing results, and resource occupancy information (such as resource preemption) generated by the simulation operation are collected to obtain the target data, and based on the target data, the simulation operation results of the BMC are generated, so as to subsequently perform functional verification of the subsystem to be configured based on the simulation operation results, and then perform firmware configuration of the subsystem to be configured based on the functional verification results.
[0053] The method provided in this embodiment realizes high-precision simulation of the all-round operation process of the subsystem to be configured in the actual BMC by refreshing the modular compiled code to the digital twin program, comprehensively collects multi-dimensional target data during the operation process, and finally generates detailed BMC simulation operation results, which provides efficient and accurate data support and decision-making basis for subsystem functional verification and firmware configuration.
[0054] In some embodiments, performing firmware configuration on the subsystem to be configured according to the simulation operation result includes: According to the simulation operation result, functional verification is performed on the subsystem to be configured; In the case where it is determined that the subsystem to be configured has not passed the functional verification, obtaining code modification suggestion information of the subsystem to be configured according to the functional verification result and the modular compiled code; Sending the code modification suggestion information to the client; receiving an updated modular compiled code sent by the client, where the updated modular compiled code is obtained by the client updating the modular compiled code according to the code modification suggestion information; According to the updated modular compiled code, simulating and running the subsystem to be configured in the digital twin program; When it is determined according to the simulation operation result that the subsystem to be configured has passed the functional verification, firmware configuration is performed on the subsystem to be configured according to the updated modular compiled code.
[0055] like Figure 3 As shown, step 230 further includes: After obtaining the simulation operation results, the subsystem to be configured can be functionally verified based on the simulation operation results to verify the validity of the functions of the subsystem to be configured. If the functional verification of the subsystem to be configured passes, it indicates that the functional version of the modular compiled code is stable. At this time, full compilation can be performed based on the modular compiled code to generate real image code, and the real image code is refreshed to the real server BMC to verify the validity of the development function. If the real image code passes the development function validity verification in the real server BMC, the real image code is refreshed to the BMC where the firmware configuration is required to perform the firmware configuration of the subsystem to be configured.
[0056] If the functional verification of the subsystem to be configured fails (such as compilation error or runtime error), it indicates that the functional version of the modular compiled code is unstable. At this time, it is necessary to re-obtain the code modification suggestion information of the subsystem to be configured based on the functional verification result and the modular compiled code.
[0057] Next, the code modification suggestion information is sent to the client, so that the BMC engineer can make targeted adjustments to the modular compiled code according to the code modification suggestion information to obtain updated modular compiled code.
[0058] Subsequently, the updated modular compiled code is refreshed into the digital twin program, so that the digital twin program can simulate the subsystem to be configured, generate new simulation results, and judge whether the subsystem to be configured has passed the functional verification based on the new simulation results. If the subsystem to be configured has passed the functional verification, the firmware configuration of the subsystem to be configured is performed according to the updated modular compiled code.
[0059] Exemplarily, performing firmware configuration on the subsystem to be configured according to the updated modular compiled code includes: Performing full compilation according to the updated modular compiled code to generate full code of the baseboard management controller; The full code is refreshed into the baseboard management controller to perform firmware configuration on the subsystem to be configured.
[0060] Optionally, based on the updated modular compiled code, when the subsystem to be configured passes the functional verification, a full compilation is performed based on the updated modular compiled code to generate a real image code, and the real image code is refreshed to the real server BMC to verify the validity of the development function. When the real image code passes the development function validity verification in the real server BMC, the real image code is refreshed to the BMC where the firmware configuration is required to perform the firmware configuration of the subsystem to be configured.
[0061] If it is determined based on the new simulation operation result that the subsystem to be configured has not passed the functional verification, then based on the functional verification result and the updated modular compilation code, iteratively execute the steps of obtaining the code modification suggestion information of the subsystem to be configured, code modification, and functional verification, until the updated modular compilation code that enables the subsystem to be configured to pass the functional verification is obtained, then a full compilation is performed based on the updated modular compilation code that has passed the functional verification to generate a real image code, and the real image code is refreshed to the real server BMC to verify the validity of the development function. When the real image code passes the development function validity verification in the real server BMC, the real image code is refreshed to the BMC where the firmware configuration is required to perform the firmware configuration of the subsystem to be configured.
[0062] The method provided in this embodiment opens a modular upgrade interface through a digital twin system, supports BMC firmware engineers to compile modular programming that only contains BMC initialization and a small amount of subsystem code that needs to be developed into a subsystem image, refresh it into the BMC digital twin system for simulation, and verify the effectiveness of its modified code function. The verification is continued until a stable functional code design is formed and then refreshed and verified by the physical machine BMC. In the preliminary verification in the early stage of development, by using a virtualized BMC and component communication and modularly simulating a small amount of business code, the effectiveness and problems of the solution can be quickly verified, so as to reduce the dependence on physical machines during the development process and optimize and alleviate various pain points in the traditional server BMC development model, including: a slower programming-compilation-upgrade-verification-feedback-modification verification process, resource limitations of actual servers and components, energy consumption, noise and space limitations, laboratories, and borrowing and returning management costs, thereby improving firmware configuration efficiency and reducing hardware resource costs. At the same time, new BMC engineers can use the digital twin system to quickly conduct multi-module programming exercises. Through the rapid feedback process of the digital twin system, they can quickly master the skills of developing each BMC module, which is conducive to training a large number of skilled BMC firmware development engineers in a short period of time and alleviating the problems of insufficient manpower and unskilled engineers in various BMC projects.
[0063] In some embodiments, the obtaining code modification suggestion information of the subsystem to be configured according to the functional verification result and the modular compiled code includes: Inputting the functional verification result and the modular compiled code into a recognition model to obtain a code template and code compilation suggestion information of the subsystem to be configured output by the recognition model; Generate code modification suggestion information of the subsystem to be configured according to the code template and the code compilation suggestion information; The recognition model is obtained by training based on the modular compiled code and functional verification results of the sample subsystem, as well as the corresponding code modification template and code modification information of the sample subsystem.
[0064] Optionally, the step of generating code modification suggestion information further includes: The functional verification results and modular compiled codes are input into the recognition model, so that the recognition model can learn the functional verification results and modular compiled codes to identify the code template and code compilation suggestion information of the subsystem to be configured. The code template here includes an exemplary code writing format and code examples; the code compilation suggestion information here includes suggested reference information such as code compilation technical ideas.
[0065] After obtaining the code template and code compilation suggestion information, the code template and code compilation suggestion information can be combined to generate code modification suggestion information for the subsystem to be configured, so that BMC engineers can quickly get started with the development functions of the functional modules of the system to be configured, thereby improving the efficiency of BMC firmware development, and enhancing BMC engineers' understanding of BMC firmware development technology and improving their practical development level.
[0066] The recognition model here is obtained by iteratively training the artificial intelligence (AI) model integrated in the interface of the digital twin system with the modular compilation code and functional verification results of the sample subsystem as input information and the corresponding code modification template and code modification information of the sample subsystem as labels. The AI model can be a localized AI model of the digital twin system or an AI model in the cloud, which is not specifically limited here.
[0067] The method provided in this embodiment, by inputting the functional verification results and the modular compiled code into a pre-trained recognition model, the model is constructed based on the compiled code of the sample subsystem, the verification results and the corresponding code modification template and modification information, and can directly output the code template and compilation suggestion of the subsystem to be configured, and then generate specific code modification suggestion information, thereby realizing the automatic conversion from verification results to code optimization suggestions, significantly improving the efficiency and accuracy of code correction, and facilitating BMC engineers to quickly get started with the development functions of the functional modules of the system to be configured, improving the proficiency of BMC engineers in BMC firmware development technology, and improving the actual development level.
[0068] In some embodiments, step 220 constructs a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured, including: Building a first digital twin program according to the main running program of the baseboard management controller; Constructing a second digital twin program according to the configuration information of the subsystem to be configured and the configuration information of the target subsystem; When the subsystem to be configured is a subsystem to be added, the second digital twin program is integrated into the first digital twin program to obtain the digital twin program.
[0069] Optionally, in the process of constructing the digital twin program corresponding to the baseboard management controller, the first digital twin program can be constructed based on the main running program; the main running program is the running program of the main functions of the Linux system in the BMC chip summarized by the server BMC system engineer and the server component engineer, including initialization, process creation of various modules (such as storage system monitoring module, heat dissipation control module, remote desktop module, etc.), communication protocols with various server components, communication data structure, logs, alarm records, etc. The first digital twin program can transplant the main running program in the physical BMC to the digital twin system of the BMC in the cloud, that is, simulate the basic functions of the physical BMC on the virtual machine, including but not limited to the initialization of the virtual BMC, the communication protocol with the virtual component, data structure, information transmission, logs, alarm records, etc.
[0070] The virtual server BMC can be regarded as an independently running small Linux system. Its initialization function can be used by the virtual machine on the cloud server to monitor the virtualized server components through the initialization program to create a thread. The example of the initialization data code is as follows: “ / / 1. Hardware initialization
[0071] void hardware_init() {
[0072] / / Initialize the clock and timer
[0073] clock_init(); timer_init(); / / Initialize serial communication interface (such as UART, IPMI interface)
[0074] uart_init(); ipmi_interface_init(); / / Initialize the interrupt controller
[0075] interrupt_controller_init(); / / Other necessary hardware initialization...
[0076] }
[0077] / / 2. Firmware internal structure and variable initialization
[0078] void firmware_internal_init() {
[0079] / / Initialize the data structure and variables inside the firmware
[0080] initialize_firmware_data_structures(); / / Load and initialize necessary drivers and modules
[0081] load_and_init_drivers(); load_and_init_modules(); }
[0082] / / 3. System configuration and self-test
[0083] void system_configuration_and_self_test() {
[0084] / / Read and apply system configuration (such as network settings, user permissions, etc.)
[0085] apply_system_configuration(); / / Perform hardware self-test (POST)
[0086] perform_hardware_self_test(); / / If there is an error, handle the error (e.g. log, restart, etc.)
[0087] handle_errors_if_any(); }
[0088] / / 4. Network service startup
[0089] void start_network_services() {
[0090] / / Start IPMI service
[0091] start_ipmi_service(); / / Start other network services (such as REDFISH)
[0092] start_other_network_services(); / / Configure network interface and IP address
[0093] configure_network_interfaces(); }
[0094] / / Main initialization function
[0095] void bmc_firmware_init() {
[0096] / / Step 1: Hardware initialization
[0097] hardware_init(); / / Step 2: Initialize firmware internal structure and variables
[0098] firmware_internal_init(); / / Step 3: System configuration and self-test
[0099] system_configuration_and_self_test(); / / Step 4: Start the network service
[0100] start_network_services(); / / Initialization completed, enter the main loop or wait for network request
[0101] enter_main_loop_or_wait_for_requests(); }"; Subsequently, formatting and modeling are performed according to the configuration information of the subsystem to be configured and the configuration information of the target subsystem to generate a second digital twin program. If the subsystem to be configured is a new subsystem that needs to be adapted (such as a new GPU), the second digital twin program is integrated into the first digital twin program so that the simulation program containing the virtual BMC's new monitoring, communication, setting, and log collection functions for the subsystem can be run; at the same time, the digital twin program (or model) of the obsolete subsystem is deleted to update and adjust the system model data, thereby forming a comprehensive and accurate integrated digital twin program to effectively simulate and verify the operation process of the new subsystem, thereby realizing the effective configuration of the firmware of the subsystem to be configured.
[0102] The firmware configuration system provided by the present invention is described below. The firmware configuration system described below and the firmware configuration method described above can be referenced to each other.
[0103] Figure 4 is a schematic diagram of the structure of the firmware configuration system provided by the present invention; Figure 4 As shown, the device comprises: The acquisition unit 410 is used to acquire the subsystem to be configured in the baseboard management controller and the modular compiled code of the subsystem to be configured according to the firmware configuration request of the baseboard management controller; The construction unit 420 is used to construct a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured; The configuration unit 430 is used to simulate the operation of the subsystem to be configured in the digital twin program according to the modular compiled code, and perform firmware configuration on the subsystem to be configured according to the simulation operation result.
[0104] The system provided in this embodiment obtains the modular compiled code and configuration information of the subsystem to be configured in the baseboard management controller, and combines it with the configuration information of the associated target subsystem to build a digital twin program of the BMC to simulate the operating environment of the real BMC; then, the modular compiled code is used in the digital twin program to simulate the operation of the subsystem to be configured, so as to configure the firmware according to the simulation results, and the operating environment of the real BMC is simulated by the digital twin model to perform intelligent configuration of the firmware, which effectively replaces the traditional cumbersome process of manually writing, compiling and verifying firmware functions through IDE on a real server, significantly improves the efficiency of firmware configuration, reduces the dependence on hardware resources and cost consumption, and solves the technical defects of complex BMC firmware configuration, low efficiency and high hardware resource cost.
[0105] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the firmware configuration method, which includes: obtaining the subsystem to be configured in the baseboard management controller and the modular compiled code of the subsystem to be configured according to the firmware configuration request of the baseboard management controller; constructing the digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured; according to the modular compiled code, simulating the subsystem to be configured in the digital twin program, and performing firmware configuration on the subsystem to be configured according to the simulation result.
[0106] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0107] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the firmware configuration method provided by the above methods, the method including: according to the firmware configuration request of the baseboard management controller, obtaining the modular compiled code of the subsystem to be configured and the subsystem to be configured in the baseboard management controller; according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured, constructing a digital twin program corresponding to the baseboard management controller; according to the modular compiled code, simulating the operation of the subsystem to be configured in the digital twin program, and according to the simulation operation result, performing firmware configuration on the subsystem to be configured.
[0108] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the firmware configuration method provided by the above-mentioned methods, the method comprising: obtaining the modular compiled code of the subsystem to be configured and the subsystem to be configured in the baseboard management controller according to the firmware configuration request of the baseboard management controller; constructing a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured; simulating the operation of the subsystem to be configured in the digital twin program according to the modular compiled code, and performing firmware configuration on the subsystem to be configured according to the simulation operation result.
[0109] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A firmware configuration method, characterized in that: include: According to the firmware configuration request of the baseboard management controller, obtaining the subsystem to be configured in the baseboard management controller and the modular compiled code of the subsystem to be configured; Constructing a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured; According to the modular compiled code, the subsystem to be configured is simulated in the digital twin program, and according to the simulation result, the firmware of the subsystem to be configured is configured.
2. The firmware configuration method according to claim 1, characterized in that: The simulating operation of the subsystem to be configured in the digital twin program according to the modular compiled code includes: Inputting the modular compiled code into the mirror data transmission interface of the digital twin program; Receive target data generated when the digital twin program simulates and runs the subsystem to be configured according to the modular compiled code, wherein the target data includes multiple items of interaction data, log generation data, data processing results, and resource occupancy information; The simulation operation result is generated according to the target data.
3. The firmware configuration method according to claim 1, characterized in that: The simulating operation of the subsystem to be configured in the digital twin program according to the modular compiled code includes: Determine a simulation operation strategy according to the modular compiled code; the simulation operation strategy includes multiple items of initialization strategy, thread scheduling strategy, data collection strategy, data display strategy, data processing strategy, data interaction strategy, log generation strategy, and alarm recording strategy; According to the simulation operation strategy, the subsystem to be configured is simulated in the digital twin program.
4. The firmware configuration method according to any one of claims 1 to 3, characterized in that: The step of performing firmware configuration on the subsystem to be configured according to the simulation operation result includes: According to the simulation operation result, functional verification is performed on the subsystem to be configured; In the case where it is determined that the subsystem to be configured has not passed the functional verification, obtaining code modification suggestion information of the subsystem to be configured according to the functional verification result and the modular compiled code; Sending the code modification suggestion information to the client; receiving an updated modular compiled code sent by the client, where the updated modular compiled code is obtained by the client updating the modular compiled code according to the code modification suggestion information; According to the updated modular compiled code, simulating and running the subsystem to be configured in the digital twin program; When it is determined according to the simulation operation result that the subsystem to be configured has passed the functional verification, firmware configuration is performed on the subsystem to be configured according to the updated modular compiled code.
5. The firmware configuration method according to claim 4, characterized in that: The step of performing firmware configuration on the subsystem to be configured according to the updated modular compiled code includes: Performing full compilation according to the updated modular compiled code to generate full code of the baseboard management controller; The full code is refreshed into the baseboard management controller to perform firmware configuration on the subsystem to be configured.
6. The firmware configuration method according to claim 4, characterized in that: The obtaining code modification suggestion information of the subsystem to be configured according to the functional verification result and the modular compiled code includes: Inputting the functional verification result and the modular compiled code into a recognition model to obtain a code template and code compilation suggestion information of the subsystem to be configured output by the recognition model; Generate code modification suggestion information of the subsystem to be configured according to the code template and the code compilation suggestion information; The recognition model is obtained by training based on the modular compiled code and functional verification results of the sample subsystem, as well as the corresponding code modification template and code modification information of the sample subsystem.
7. The firmware configuration method according to any one of claims 1 to 3, characterized in that: The constructing of a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured includes: Building a first digital twin program according to the main running program of the baseboard management controller; Constructing a second digital twin program according to the configuration information of the subsystem to be configured and the configuration information of the target subsystem; When the subsystem to be configured is a subsystem to be added, the second digital twin program is integrated into the first digital twin program to obtain the digital twin program.
8. A firmware configuration system, characterized in that: include: An acquisition unit, configured to acquire a subsystem to be configured in the baseboard management controller and a modular compiled code of the subsystem to be configured according to a firmware configuration request of the baseboard management controller; A construction unit, configured to construct a digital twin program corresponding to the baseboard management controller according to the main running program of the baseboard management controller, the configuration information of the subsystem to be configured, and the configuration information of the target subsystem associated with the subsystem to be configured; A configuration unit is used to simulate the operation of the subsystem to be configured in the digital twin program according to the modular compiled code, and perform firmware configuration on the subsystem to be configured according to the simulation operation result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the firmware configuration method according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the firmware configuration method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Embedded development method, system and equipment based on artificial intelligence and storage medium
CN120780288A
