CN112162794B - Single board starting method, device, single board and network equipment - Google Patents

Single board starting method, device, single board and network equipment Download PDF

Info

Publication number
CN112162794B
CN112162794B CN202011065196.4A CN202011065196A CN112162794B CN 112162794 B CN112162794 B CN 112162794B CN 202011065196 A CN202011065196 A CN 202011065196A CN 112162794 B CN112162794 B CN 112162794B
Authority
CN
China
Prior art keywords
board
boot file
reset configuration
configuration word
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.)
Active
Application number
CN202011065196.4A
Other languages
Chinese (zh)
Other versions
CN112162794A (en
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.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies 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 New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202011065196.4A priority Critical patent/CN112162794B/en
Publication of CN112162794A publication Critical patent/CN112162794A/en
Application granted granted Critical
Publication of CN112162794B publication Critical patent/CN112162794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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/44536Selecting among different versions

Landscapes

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

Abstract

The present specification provides a method and an apparatus for starting a board, and a network device, and relates to the technical field of communications. A method for starting a single board comprises the following steps: acquiring a first boot file pre-stored in a memory, wherein the first boot file comprises a basic reset configuration word, a boot program and at least two sections of classified reset configuration words, the basic reset configuration word is arranged at the head of the first boot file, and each section of classified reset configuration word corresponds to a single board of one type; initializing the board according to the basic reset configuration word and the bootstrap program; in the initialization process, acquiring a single board identifier of a local board, and determining a classified reset configuration word corresponding to the single board identifier in a first boot file; replacing the basic reset configuration words in the first boot file in the memory by the determined classified reset configuration words to form a second boot file; and restarting the board, acquiring a second boot file in the memory, and initializing the board through the second boot file.

Description

Single board starting method, device, single board and network equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for starting a board, and a network device.
Background
With the development of network devices, the network devices need to have higher message processing and forwarding capabilities. Therefore, a network device such as a switch or a router may have a structure of interconnecting single boards, for example, the network device may include an interface board, a switch board, a service board, and the like, and each single board may be used to implement different functions.
When the single board is started, the booting and configuration of the single board need to be realized through the boot files, and the boot files are stored in the memory.
In the prior art, different configuration required by different boards requires different guide files to be prepared for different boards, and as the diversity of network devices increases, a worker consumes more time to prepare different guide files to implement the operation of the network devices, and needs to store a plurality of guide files in the network devices respectively, thereby increasing the occupied space.
Disclosure of Invention
In order to overcome the problems in the related art, the present specification provides a board starting method, an apparatus, a board, and a network device.
According to a first aspect of embodiments of the present specification, there is provided a board starting method, including:
acquiring a first boot file prestored in a memory, wherein the first boot file comprises basic reset configuration words, a boot program and at least two sections of classified reset configuration words, the basic reset configuration words are arranged at the head of the first boot file, and each section of classified reset configuration word corresponds to one type of single board;
initializing the board according to the basic reset configuration word and the bootstrap program;
in the initialization process, acquiring a single board identifier of a local board, and determining a classified reset configuration word corresponding to the single board identifier in a first boot file;
replacing the basic reset configuration words in the first boot file in the memory by the determined classified reset configuration words to form a second boot file;
and restarting the board, acquiring a second boot file in the memory, and initializing the board through the second boot file.
Optionally, the first boot file further includes a default reset configuration word;
after acquiring the single board identifier of the board, when the classification resetting configuration word corresponding to the single board identifier is not found in the first boot file, replacing the basic resetting configuration word in the first boot file in the memory by the default resetting configuration word to form a third boot file;
and restarting the board, acquiring a third boot file in the memory, and initializing the board through the third boot file.
Optionally, after obtaining the board identifier of the board, when the classification resetting configuration word corresponding to the board identifier is not found in the first boot file, the initialization of the board is completed through the basic resetting configuration word and the boot program in the first boot file.
Further, after obtaining the first boot file pre-stored in the memory, the method further includes:
determining a version number of the first boot file;
sending a request message to a main control board, wherein the request message carries the version number of the first boot file, so that the main control board determines whether the first boot file is consistent with an upgrade boot file stored by the main control board according to the version number of the first boot file;
receiving an upgrade guidance file issued by a main control board, and replacing a first guidance file in a memory, wherein the upgrade guidance file is issued by the main control board when the first guidance file is determined to be inconsistent with the upgrade guidance file stored by the main control board;
and restarting the board, and initializing the board according to the upgrade boot file.
Further, after obtaining the board identifier of the board, the method further includes:
when the basic reset configuration word is consistent with the classification reset configuration word corresponding to the single plate identifier of the local plate, the initialization of the local plate is completed through the basic reset configuration word and a bootstrap program;
determining a classified reset configuration word corresponding to the single board identifier in the first boot file, specifically:
and when the basic reset configuration word is not consistent with the classification reset configuration word corresponding to the single plate identifier of the board, determining the classification reset configuration word corresponding to the single plate identifier in the first guide file.
According to a second aspect of the embodiments of the present specification, there is provided a single board starting apparatus, including:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a first boot file pre-stored in the storage unit, the first boot file comprises a basic reset configuration word, a boot program and at least two sections of classified reset configuration words, the basic reset configuration word is arranged at the head of the first boot file, and each section of classified reset configuration word corresponds to a single board of one type;
the initialization unit is used for initializing the board according to the basic reset configuration word and the bootstrap program; in the initialization process, acquiring a single board identifier of a local board, and determining a classification resetting configuration word corresponding to the single board identifier in a first guide file;
a replacing unit, which is used for replacing the basic reset configuration word in the first boot file in the memory by the determined classification reset configuration word to form a second boot file;
and the initialization unit is also used for restarting the board, acquiring a second boot file in the memory and initializing the board through the second boot file.
Optionally, the first boot file further includes a default reset configuration word;
after the initialization unit obtains the board identifier of the board, the replacement unit is further configured to replace, when the classification reset configuration word corresponding to the board identifier is not found in the first boot file, the basic reset configuration word in the first boot file in the memory by using the default reset configuration word, so as to form a third boot file;
and the initialization unit is also used for restarting the board, acquiring a third boot file in the memory and initializing the board through the third boot file.
Optionally, after the initialization unit obtains the board identifier of the board, the initialization unit is further configured to complete initialization of the board through the basic reset configuration word and the boot program in the first boot file when the classification reset configuration word corresponding to the board identifier is not found in the first boot file.
Further, the apparatus further comprises:
the upgrading unit is used for determining the version number of the first boot file after the first boot file pre-stored in the memory is acquired;
the request unit is used for sending a request message to the main control board, wherein the request message carries the version number of the first boot file, so that the main control board determines whether the first boot file is consistent with the upgrade boot file stored in the main control board according to the version number of the first boot file;
the receiving unit is used for receiving the upgrading guide file issued by the main control board and replacing the first guide file in the memory, wherein the upgrading guide file is issued by the main control board when the first guide file is determined to be inconsistent with the upgrading guide file stored by the main control board;
and the initialization unit is also used for restarting the board and initializing the board according to the upgrade boot file.
Further, the initialization unit is further configured to complete initialization of the board through the basic reset configuration word and the bootstrap program when the basic reset configuration word is consistent with the classification reset configuration word corresponding to the board identifier of the board.
According to a third aspect of embodiments of the present specification, there is provided a single board including a processor, a memory, and a system bus connecting the processor and the memory;
storing a first boot file in a memory, wherein the first boot file comprises a basic reset configuration word, a boot program and at least two segments of classified reset configuration words, the basic reset configuration word is arranged at the head of the first boot file, and each segment of classified reset configuration word corresponds to a single board of one type;
the processor calls program code in the memory to perform the following:
acquiring a first boot file in a memory;
initializing the board according to the basic reset configuration word and the bootstrap program;
in the initialization process, acquiring a single board identifier of a local board, and determining a classified reset configuration word corresponding to the single board identifier in a first boot file;
replacing the basic reset configuration words in the first boot file in the memory by the determined classified reset configuration words to form a second boot file;
and restarting the board, acquiring a second boot file in the memory, and initializing the board through the second boot file.
According to a fourth aspect of the embodiments of the present specification, there is provided a network device, including a main control board and at least one single board as described above.
The technical scheme provided by the implementation mode of the specification can have the following beneficial effects:
in the embodiment of the present specification, by setting the basic reset configuration word for performing the initial initialization of the board and the classified reset configuration words for the boards of the multiple types in the boot file, in the process of the initial initialization, the classified reset configuration word corresponding to the board identifier is used to replace the basic reset configuration word, and the initialization is performed again, so as to implement the initialization for the board of the specific type, avoid the need to store the boot file of the corresponding type for each type of board, and reduce the occupation of the network device space when the boot files of the multiple types need to be stored.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of the specification.
Fig. 1 is a schematic structural diagram of a network device to which the present application relates;
FIG. 2 is a schematic diagram of a first boot file to which the present application relates;
FIG. 3 is a flow chart of a method of single board boot-up according to the present application;
FIG. 4 is a schematic illustration of a second boot file to which the present application relates;
fig. 5 is a schematic structural diagram of a network device in an embodiment to which the present application relates, in which a dashed arrow illustrates a flow process of a boot file;
FIG. 6 is a schematic illustration of a boot file in one embodiment to which the present application is directed;
fig. 7 is a schematic structural diagram of a network device in an embodiment to which the present application relates, where a dashed arrow illustrates a flow process of the boot file after execution in fig. 5;
FIG. 8 is a schematic illustration of a boot file in an embodiment to which the present application is directed, wherein the base reset configuration word of FIG. 6 is replaced with a categorized reset configuration word;
fig. 9 is a schematic structural diagram of a single-board starting device according to the present application;
fig. 10 is a schematic structural diagram of a single board according to the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification.
In the network device, as shown in fig. 1, a main control board and a plurality of single boards may be included, and the main control board and the single boards are connected through a bus, for example, through a PCIE (Peripheral Component Interconnect Express). The main control board and the single board have similar structures and comprise a processor, a memory and a storage. The memory is generally a Flash memory with a small capacity for realizing the startup of the board, for example, a NOR (nand gate) Flash, an SPI (Serial Peripheral Interface) Flash, and the like, because the space of the board is limited. Since the space of the main control board is large, two memories may be respectively provided, one is a flash Memory with a small capacity, similar to the single board, for implementing the start of the main control board, and the other is a Memory with a large capacity, such as a hard disk, an SD (Secure Digital Memory) card, and the like, for storing the boot file used by the upgraded single board.
For a board, a first boot file may be stored in the memory, and the first boot file, as shown in fig. 2, includes a basic reset configuration word, a boot program, and at least two segments of classification reset configuration words. The basic reset configuration word is set at the head of the first boot file, each segment of the classified reset configuration word corresponds to a type of single board, and the classified reset configuration word can be positioned through a field in the boot program and is not limited to setting the classified reset configuration word at a specific position in the first boot file.
It should be noted that, the reset configuration word is used to configure the board, and the functions that can be implemented include, but are not limited to, early driving, obtaining board identifiers in registers (for example, complex Programmable Logic Devices (CPLDs)), board communication, and the like, and these configurations are common to various types of boards, and therefore, the common reset configuration word located at the head in the first boot file may be referred to as a basic reset configuration word. In addition, in the reset configuration word, it is also possible to implement selection of a network port SERDES (SERializer, DESerializer), selection of a rate mode, a multiplexing mode of a pin, and the like, and these matches may be different for different single boards, so that it is necessary to configure one type of single board to use the corresponding reset configuration word. Here, the reset configuration word may be referred to as a sort reset configuration word for different types of boards.
And, the space occupied by the basic reset configuration word and each classification reset configuration word is the same, for example, both can be set to 4 kbytes.
Based on the foregoing single board structure, the present application provides a single board starting method, as shown in fig. 3, including:
s100, acquiring a first boot file pre-stored in a memory.
The first boot file is pre-stored in a memory of the board, and the processor can acquire data from the memory after being powered on to acquire the first boot file. The obtaining process may be understood as reading the first boot file into the memory of the board. For example, in the network device shown in fig. 1, two boards, that is, board 1 and board 2, may be included, and correspondingly, in the first boot file shown in fig. 2, the categorized reset configuration word 1 corresponding to board 1 and the categorized reset configuration word 2 corresponding to board 2 may be included.
And S102, initializing the board according to the basic reset configuration word and the bootstrap program.
And acquiring a basic reset configuration word from the head of the first boot file, and initializing the board according to the basic reset configuration word and the boot program, so that the processor can acquire the board identifier. It should be noted that the initialization process is not limited to the above-described process, and includes other operations, which are not described herein since the other operations are similar to the existing initialization process.
S104, in the process of initialization, acquiring the single board identification of the board, and determining the classified reset configuration word corresponding to the single board identification in the first boot file.
During initialization, resources such as registers may be enabled, thereby enabling the processor to read data stored in the registers. For example, a board identifier configured for each board.
The corresponding relation between the single board identification and the classification resetting configuration words in the first guide file can be stored on the single board. In the first boot file, a number may be set for different reset configuration words, for example, the number of the basic reset configuration word is 0, the number of the class reset configuration word configuring the board 1 is 1, and the number of the class reset configuration word configuring the board 2 is 2.
Based on the board identifier of the board, the classification resetting configuration word corresponding to the board identifier may be found in the first guidance file, for example, the classification resetting configuration word 1 corresponding to the board 1 may be found.
And S106, replacing the basic reset configuration word in the first boot file in the memory by the determined classification reset configuration word to form a second boot file.
And reading out the classified reset configuration word after determining the classified reset configuration word corresponding to the single board identifier. And comparing the read classification reset configuration word with the basic reset configuration word of the head part of the first guide file, and if the classification reset configuration word is not consistent with the basic reset configuration word, representing that the classification reset configuration word needs to be replaced. At this time, the obtained class reset configuration word may be written into the memory to replace the basic reset configuration word at the head of the first boot file, and in the boot file after replacement, the basic reset configuration word at the head is replaced with the class reset configuration word 1 corresponding to the board 1, as shown in fig. 4, which may be referred to as a second boot file.
And S108, restarting the board, acquiring a second boot file in the memory, and initializing the board through the second boot file.
After the replacement is completed, the processor needs to restart the board, because the reset configuration word needs to be configured at the time of starting and cannot be modified again before the board is powered down once the reset configuration word is configured, the board needs to be restarted to complete the configuration for each board.
And after the single board is restarted, the processor reads the second boot file from the memory and initializes the single board according to the second boot file.
At this time, since the replacement of the reset configuration word has already been completed for the board, in the subsequent initialization process, when the classification reset configuration word for the board is read again according to the board identifier, the comparison with the basic reset configuration word at the head of the first boot file is consistent, and the replacement is not required again. In this way, the initialization process is continuously performed, thereby completing the initialization process of the board.
That is to say, in the boot file stored in the memory on the board, the reset configuration word at the head may be consistent with the classified reset configuration word carried in the boot file, and the replacement may not be executed in case of consistency, the initialization of the board is directly completed based on the current boot file, the replacement is executed and the board is restarted in case of inconsistency, and then the initialization of the board is completed through the replaced boot file.
In the embodiment of the present specification, by setting the basic reset configuration word for performing the initial initialization of the board and the classified reset configuration words for the boards of the multiple types in the boot file, in the process of the initial initialization, the classified reset configuration word corresponding to the board identifier is used to replace the basic reset configuration word, and the initialization is performed again, so as to implement the initialization for the board of the specific type, avoid the need to store the boot file of the corresponding type for each type of board, and reduce the occupation of the network device space when the boot files of the multiple types need to be stored. In addition, for the staff, only one version of the guide file can be edited, and the method and the device can be suitable for various single boards, so that the efficiency of network equipment configuration is improved.
Optionally, the first bootstrap file may further include a default reset configuration word, where the default reset configuration word is used for default configuration of the single board, that is, when the corresponding classification reset configuration word cannot be found through the single board identifier, the default reset configuration word is selected to initialize the single board.
After acquiring the board id of the board, in step S104, if the classified reset configuration word corresponding to the board id cannot be found in the first boot file, the default reset configuration word in the first boot file is acquired, and in step S106, the default reset configuration word is replaced with the basic reset configuration word in the first boot file. After the board is restarted, the initialization of the board is carried out through the boot file replaced by the default reset configuration word.
Optionally, in step S104, after obtaining the board identifier of the board, if the classification reset configuration word corresponding to the board identifier cannot be found in the first boot file, the initialization of the board may be completed directly through the basic reset configuration word and the boot program without replacing the basic reset configuration word.
After the processor acquires the first boot file stored in the memory on the board, the method further comprises the following steps:
S101A, determining the version number of the first boot file.
The version number may be a file name of the first boot file or a field marked in the first boot file, which is not limited.
And S101B, sending a request message to the main control board.
After the version number of the first boot file is obtained, it is necessary to determine whether the current version number is the latest version, so that the processor generates a request message, carries the version number into the request message, and sends the request message to the main control board through inter-board communication between the single board and the main control board.
At this time, after receiving the request message, the main control board may analyze a version number therein, and compare the version number with a version number of the upgrade boot file stored in a memory of the main control board.
When the main control board determines that the version number in the request message is consistent with the version number of the upgrade boot file stored in the main control board, the single board is informed through the feedback message that the version of the first boot file stored in the single board is the latest version, and when the version number in the request message is inconsistent with the version number of the upgrade boot file stored in the single board, the upgrade boot file starts to be transmitted through a bus between the main control board and the single board.
And S101C, receiving the upgrade guide file issued by the main control board, and replacing the first guide file in the memory.
And S101D, restarting the board, and initializing the board according to the upgrade boot file.
And after receiving the upgrade guide file sent by the main control board, initializing the board through the upgrade guide file. The specific initialization process is similar to the above steps S100 to S108, and will not be described again.
Through steps S101A-S101D, the boot file on the board may be upgraded, so that the board may be started through the latest boot file. When the version number of the boot file stored in the single board is inconsistent with the version number of the boot file stored in the main control board, the time consumed for storing multiple boot files in the memory of the main control board can be reduced, and the efficiency of upgrading the single board in the network equipment is improved.
A specific embodiment of the present invention is described below with reference to a board startup method, which includes:
s1, the single board receives power supply of a power supply, and a processor is started.
S2, the processor of the single board conducts early stage guiding, and data communication between the single board devices is achieved.
The above steps S1 and S2 are similar to the existing processing flow, and will not be described herein. The structure of the network device is shown in fig. 5, at this time, communication between the processor and the register (not shown) of the board and communication in the memory can be realized, and data in the register and the memory can be acquired. The same boot file, called boot file 1, is stored in the board 1 and the same boot file, called boot file 2, is stored in the main control board. The processor in the board 1 is referred to as a processor 1, the memory is referred to as a memory 1, the processor in the board 2 is referred to as a processor 2, the memory is referred to as a memory 2, the processor in the main control board is referred to as a processor 3, and the memory is referred to as a memory 3.
And S3, the processor of the single board reads the boot file from the memory, loads the boot file into the memory, and starts initialization according to the boot file.
As shown by the dotted arrow in fig. 5, the boot file 1 is loaded into the memory for processing, and the initial configuration is performed on the board through the basic reset configuration word in the boot file 1. At this time, the plate communication between the single plates 1 and 2 and the main control board can be realized through the basic reset configuration words.
And S4, the processor of the single board sends a request message to the main control board according to the version number of the guide file.
When the processors 1 and 2 acquire the boot file 1, the version number of the boot file 1, such as V1.2, may be determined, and the processors 1 and 2 carry the version number to a request message and send the request message to the main control board.
And S5, the processor of the main control board receives the request message sent by the single board and acquires the version number carried in the request message.
S6, the processor of the main control board compares the version number carried in the request message with the version number of the guide file stored in the memory of the processor of the main control board, if the version number is consistent with the version number of the guide file stored in the memory of the processor of the main control board, a feedback message is sent to the single board to inform the single board that the guide file is the latest version, the step S8 is skipped, and if the version number is inconsistent with the version number, the guide file stored in the processor of the main control board is sent to the single board, and the step S7 is skipped.
And S7, when the processor of the single board receives the guide file issued by the main control board, replacing the guide file in the memory of the single board by the received guide file, and restarting the single board.
As shown in fig. 6, the boot file 1 stored in the memory 1 is replaced with the boot file 2 stored in the memory 3 of the main control board. After step S7 is executed, which is equivalent to the process of restarting the board, the process will jump back to step S1 for initialization.
And S8, when the processor of the single board receives the feedback message, continuously executing initialization according to the self guide file.
At this time, processor 1 of board 1 re-executes the initialization process, and the description is not repeated here.
S9, the processor of the single board obtains the single board identification in the register.
The description is made here taking the single board 2 as an example. In the register of the board 2, a board identifier of the board is stored, and a corresponding relationship between the board identifier and the reset configuration word in the boot file is also stored. The board identifier of board 1 is identifier 1, and the board identifier of board 2 is identifier 2. As shown in fig. 6, a sort reset configuration word 1 and a sort reset configuration word 2 are respectively configured in the boot file 1 and the boot file 2, wherein the sort reset configuration word 1 corresponds to the identifier 1, and the sort reset configuration word 2 corresponds to the identifier 2.
S10, the processor of the single board searches the corresponding reset configuration word in the guide file according to the single board identification, if the basic reset configuration word in the guide file corresponds to the single board identification or the corresponding classified reset configuration word is not found in the guide file, the step S11 is skipped, and if the basic reset configuration word is found, the step S12 is skipped.
And S11, the processor of the single board completes the initialization of the single board according to the basic reset configuration word and the bootstrap program.
S12, the processor of the single board replaces the basic reset configuration words of the guide files stored in the memory according to the determined classified reset configuration words to form new guide files.
As shown in fig. 7, the processor 2 determines that the classified reset configuration word 2 corresponds to its own board 2 in the boot file 1, reads out the classified reset configuration word 2 in the boot file 1 from the memory 2, and replaces the classified reset configuration word 2 with the basic reset configuration word to form the boot file 3 shown in fig. 8. After that, the board 2 is restarted, and the step S1 is skipped to restart the initialization.
In the embodiment of the present specification, by setting the basic reset configuration word for performing the initial initialization of the board and the classified reset configuration words for the boards of the multiple types in the boot file, in the process of the initial initialization, the classified reset configuration word corresponding to the board identifier is used to replace the basic reset configuration word, and the initialization is performed again, so as to implement the initialization for the board of the specific type, avoid the need to store the boot file of the corresponding type for each type of board, and reduce the occupation of the network device space when the boot files of the multiple types need to be stored.
The present application further provides a device for starting a board, as shown in fig. 9, including:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a first boot file pre-stored in the storage unit, the first boot file comprises a basic reset configuration word, a boot program and at least two sections of classification reset configuration words, the basic reset configuration word is arranged at the head of the first boot file, and each section of classification reset configuration word corresponds to a type of single board;
the initialization unit is used for initializing the board according to the basic reset configuration word and the bootstrap program; in the initialization process, acquiring a single board identifier of a local board, and determining a classified reset configuration word corresponding to the single board identifier in a first boot file;
a replacing unit, which is used for replacing the basic reset configuration word in the first boot file in the memory by the determined classification reset configuration word to form a second boot file;
and the initialization unit is also used for restarting the board, acquiring a second boot file in the memory and initializing the board through the second boot file.
Optionally, the first boot file further includes a default reset configuration word;
after the initialization unit obtains the board identifier of the board, the replacement unit is further configured to replace, when the classification reset configuration word corresponding to the board identifier is not found in the first boot file, the basic reset configuration word in the first boot file in the memory by using the default reset configuration word, so as to form a third boot file;
and the initialization unit is also used for restarting the board, acquiring a third boot file in the memory and initializing the board through the third boot file.
Optionally, after the initialization unit obtains the board identifier of the board, the initialization unit is further configured to complete initialization of the board through the basic reset configuration word and the boot program in the first boot file when the classification reset configuration word corresponding to the board identifier is not found in the first boot file.
Optionally, the single board starting apparatus further includes:
the upgrading unit is used for determining the version number of the first boot file after the first boot file pre-stored in the memory is acquired;
the request unit is used for sending a request message to the main control board, wherein the request message carries the version number of the first boot file, so that the main control board determines whether the first boot file is consistent with the upgrade boot file stored in the main control board according to the version number of the first boot file;
the receiving unit is used for receiving the upgrading guide file issued by the main control board and replacing the first guide file in the memory, wherein the upgrading guide file is issued by the main control board when the first guide file is determined to be inconsistent with the upgrading guide file stored by the main control board;
and the initialization unit is also used for restarting the board and initializing the board according to the upgrade boot file.
Optionally, the initialization unit is further configured to complete initialization of the board through the basic reset configuration word and the bootstrap program when the basic reset configuration word is consistent with the classification reset configuration word corresponding to the board identifier of the board.
In the embodiment of the present specification, by setting the basic reset configuration word for performing the initial initialization of the board and the classified reset configuration words for the boards of the multiple types in the boot file, in the process of the initial initialization, the classified reset configuration word corresponding to the board identifier is used to replace the basic reset configuration word, and the initialization is performed again, so as to implement the initialization for the board of the specific type, avoid the need to store the boot file of the corresponding type for each type of board, and reduce the occupation of the network device space when the boot files of the multiple types need to be stored.
In addition, when the version numbers of the boot file stored by the single board and the boot file stored by the main control board are inconsistent, the time consumed for storing a plurality of boot files into the memory of the main control board can be reduced, and the efficiency of upgrading the single board in the network equipment is improved.
In addition, the present application also discloses a single board, as shown in fig. 10, including: a processor, a memory, and a system bus connecting the processor and the memory;
storing a first boot file in a memory, wherein the first boot file comprises a basic reset configuration word, a boot program and at least two segments of classified reset configuration words, the basic reset configuration word is arranged at the head of the first boot file, and each segment of classified reset configuration word corresponds to a single board of one type;
the processor calls program code in the memory to perform the following:
acquiring a first boot file in a memory;
initializing the board according to the basic reset configuration word and the bootstrap program;
in the initialization process, acquiring a single board identifier of a local board, and determining a classified reset configuration word corresponding to the single board identifier in a first boot file;
replacing the basic reset configuration word in the first boot file in the memory by the determined classified reset configuration word to form a second boot file;
and restarting the board, acquiring a second boot file in the memory, and initializing the board through the second boot file.
It should be noted that, the above-mentioned single board may also implement the above-mentioned method for starting the single board, so as to start the single board.
In addition, the present application further provides a network device, as shown in fig. 1, including a main control board and at least one board as described above.
In the embodiment of the specification, by setting the basic reset configuration word for performing the initial initialization of the board and the classified reset configuration words for the boards of the multiple types in the boot file, in the process of the initial initialization, the classified reset configuration word corresponding to the board identifier is used to replace the basic reset configuration word, and the initialization is performed again, so that the initialization for the board of the specific type is realized, the boot file of the corresponding type needs to be stored for each type of board, and the occupation of the network equipment space when the boot files need to be stored is reduced.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
The above description is only for the purpose of illustrating the preferred embodiments of the present disclosure and is not to be construed as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (12)

1. A single board starting method is characterized by comprising the following steps:
acquiring a first boot file pre-stored in a memory, wherein the first boot file comprises a basic reset configuration word, a boot program and at least two segments of classified reset configuration words, the basic reset configuration word is arranged at the head of the first boot file, and each segment of the classified reset configuration word corresponds to a single board of one type;
initializing the board according to the basic reset configuration word and the bootstrap program;
in the initialization process, acquiring a single board identifier of a local board, and determining a classified reset configuration word corresponding to the single board identifier in the first boot file;
replacing the basic reset configuration words in the first boot file in the memory by the determined classified reset configuration words to form a second boot file;
and restarting the board, acquiring a second boot file in the memory, and initializing the board through the second boot file.
2. The method of claim 1, wherein the first boot file further comprises a default reset configuration word;
after the single board identifier of the local board is obtained, when the classification resetting configuration word corresponding to the single board identifier is not found in the first boot file, replacing the basic resetting configuration word in the first boot file in the memory by the default resetting configuration word to form a third boot file;
and restarting the board, acquiring a third boot file in the memory, and initializing the board through the third boot file.
3. The method according to claim 1, wherein after the board id of the board is obtained, when the classified reset configuration word corresponding to the board id is not found in the first boot file, the initialization of the board is completed through the basic reset configuration word in the first boot file and the boot program.
4. The method according to claim 1, further comprising, after the obtaining the first boot file pre-stored in the memory:
determining a version number of the first boot file;
sending a request message to a main control board, wherein the request message carries a version number of the first boot file, so that the main control board determines whether the first boot file is consistent with an upgrade boot file stored by the main control board according to the version number of the first boot file;
receiving an upgrade guidance file issued by the main control board, and replacing the first guidance file in a memory, wherein the upgrade guidance file is issued by the main control board when the first guidance file is determined to be inconsistent with an upgrade guidance file stored by the main control board;
restarting the board, and initializing the board according to the upgrade boot file.
5. The method according to claim 1, further comprising, after obtaining the board identifier of the board:
when the basic reset configuration word is consistent with the classification reset configuration word corresponding to the single plate identifier of the local plate, the initialization of the local plate is completed through the basic reset configuration word and the bootstrap program;
determining a classified reset configuration word corresponding to the board identifier in the first boot file, specifically:
and when the basic reset configuration word is not consistent with the classification reset configuration word corresponding to the single plate identifier of the board, determining the classification reset configuration word corresponding to the single plate identifier in the first guide file.
6. A single board start-up apparatus, comprising:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a first boot file pre-stored in the storage unit, the first boot file comprises a basic reset configuration word, a boot program and at least two sections of classification reset configuration words, the basic reset configuration word is arranged at the head of the first boot file, and each section of the classification reset configuration word corresponds to a single board of one type;
the initialization unit is used for initializing the board according to the basic reset configuration word and the bootstrap program; in the initialization process, acquiring a single board identifier of a local board, and determining a classified reset configuration word corresponding to the single board identifier in the first boot file;
a replacing unit, configured to replace the basic reset configuration word in the first boot file in the memory by the determined classification reset configuration word to form a second boot file;
the initialization unit is further configured to restart the board, acquire a second boot file in the memory, and initialize the board through the second boot file.
7. The apparatus of claim 6, wherein the first boot file further comprises a default reset configuration word;
after the initialization unit obtains the board identifier of the board, the replacement unit is further configured to replace, when the classification reset configuration word corresponding to the board identifier is not found in the first boot file, the basic reset configuration word in the first boot file in the memory with the default reset configuration word, so as to form a third boot file;
the initialization unit is further configured to restart the board, acquire a third boot file in the memory, and initialize the board through the third boot file.
8. The apparatus according to claim 6, wherein after the initialization unit obtains the board identifier of the board, the initialization unit is further configured to complete initialization of the board through the basic reset configuration word in the first boot file and the boot program when the classified reset configuration word corresponding to the board identifier is not found in the first boot file.
9. The apparatus of claim 6, further comprising:
the upgrading unit is used for determining the version number of a first boot file stored in a memory in advance after the first boot file is acquired;
the request unit is used for sending a request message to a main control board, wherein the request message carries the version number of the first boot file, so that the main control board determines whether the first boot file is consistent with an upgrade boot file stored by the main control board according to the version number of the first boot file;
a receiving unit, configured to receive an upgrade guidance file issued by the main control board and replace the first guidance file in a memory, where the upgrade guidance file is issued by the main control board when it is determined that the first guidance file is inconsistent with an upgrade guidance file stored in the main control board;
and the initialization unit is also used for restarting the board and initializing the board according to the upgrade boot file.
10. The apparatus of claim 6,
the initialization unit is further configured to complete initialization of the board through the basic reset configuration word and the bootstrap program when the basic reset configuration word is consistent with the classification reset configuration word corresponding to the board identifier of the board.
11. A board, comprising a processor, a memory, and a system bus connecting the processor and the memory;
storing a first boot file in the memory, wherein the first boot file comprises a basic reset configuration word, a boot program and at least two segments of classified reset configuration words, the basic reset configuration word is arranged at the head of the first boot file, and each segment of the classified reset configuration word corresponds to a single board of one type;
the processor calls program code in the memory to perform the following:
acquiring a first boot file in the memory;
initializing the board according to the basic reset configuration word and the bootstrap program;
in the initialization process, acquiring a single board identifier of a local board, and determining a classified reset configuration word corresponding to the single board identifier in the first boot file;
replacing the basic reset configuration words in the first boot file in the memory by the determined classified reset configuration words to form a second boot file;
and restarting the board, acquiring a second boot file in the memory, and initializing the board through the second boot file.
12. A network device, comprising a main control board and at least one board according to claim 11.
CN202011065196.4A 2020-09-30 2020-09-30 Single board starting method, device, single board and network equipment Active CN112162794B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011065196.4A CN112162794B (en) 2020-09-30 2020-09-30 Single board starting method, device, single board and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011065196.4A CN112162794B (en) 2020-09-30 2020-09-30 Single board starting method, device, single board and network equipment

Publications (2)

Publication Number Publication Date
CN112162794A CN112162794A (en) 2021-01-01
CN112162794B true CN112162794B (en) 2023-03-28

Family

ID=73862311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011065196.4A Active CN112162794B (en) 2020-09-30 2020-09-30 Single board starting method, device, single board and network equipment

Country Status (1)

Country Link
CN (1) CN112162794B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835646A (en) * 2021-02-20 2021-05-25 杭州迪普科技股份有限公司 Equipment configuration recovery method and device
CN114125902A (en) * 2021-11-30 2022-03-01 上海移远通信技术股份有限公司 WWAN equipment and configuration method, device and storage medium thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547394A (en) * 2017-09-21 2019-03-29 中兴通讯股份有限公司 A kind of bootstrap source code generation method and business board

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030041129A1 (en) * 2000-07-20 2003-02-27 John Applcby-Allis Voice-over-internet protocol telephone in reconfigurable logic
CN100511148C (en) * 2007-11-12 2009-07-08 中兴通讯股份有限公司 CPU system starting method and system
CN102053842B (en) * 2009-11-09 2013-07-03 中兴通讯股份有限公司 Method and device for improving BOOT compatibility
CN102830982A (en) * 2011-06-14 2012-12-19 中兴通讯股份有限公司 Processor configuring method, device and processor
CN102854962B (en) * 2012-08-23 2015-05-13 哈尔滨工业大学 MPC8280 minimum system applying CPLD (complex programmable logic device) and state switching method for setting hard reset configuration words
CN107766090A (en) * 2016-08-15 2018-03-06 天津科畅慧通信息技术有限公司 A kind of method and device for assisting CPU to start based on EPLD

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547394A (en) * 2017-09-21 2019-03-29 中兴通讯股份有限公司 A kind of bootstrap source code generation method and business board

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于MPC860的嵌入式处理机的硬件设计;杜景凡等;《航空电子技术》(第01期);全文 *
基于双SPI Flash自动翻转的高可靠路由器启动设计;尤亮等;《电子设计工程》(第04期);全文 *

Also Published As

Publication number Publication date
CN112162794A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
US9720678B2 (en) Network switching method, version upgrade method, and terminal device
CN110134446B (en) Method for starting PCIE equipment scanning
CN112162794B (en) Single board starting method, device, single board and network equipment
JP2003345618A (en) Method of switching between tow or more images of firmware
CN112470119B (en) Service upgrading method and device in distributed system and distributed system
CN113434202B (en) Device starting method and device, electronic device and computer storage medium
CN107656757A (en) operating system switching method and device
US20020156945A1 (en) Computer system, resource allocating method thereof and resource allocating program thereof
CN113626059A (en) System upgrade method, camera and computer readable storage medium
CN116991758A (en) Spatial layout updating method, device, equipment and medium
CN115495161B (en) BIOS option modification validation method and device and storage medium
CN116149941A (en) Monitoring method and device of server component, server and storage medium
CN115221092A (en) Method, device and equipment for determining distributable bus of PCI-E card and storage medium
CN111147400B (en) Method and device for command line configuration synchronization and electronic equipment
CN109684134B (en) Method and server for rapidly deploying firmware settings among multiple devices
CN112148376A (en) Terminal starting method and device
CN111324384B (en) Device and method for selecting starting image file according to device message in pre-execution environment
CN117234544B (en) Method and device for recovering system of server equipment
CN117687703B (en) Method, device and system for starting server, storage medium and electronic equipment
CN117931719A (en) BIOS and BMC intercommunication method and device
CN115118605A (en) Server slot bandwidth allocation method, device, terminal and storage medium
CN117762455A (en) Updating method and device of BIOS firmware file, storage medium and electronic equipment
CN116820841A (en) Starting method, device, equipment, medium and product of terminal equipment
CN115237478A (en) Computer equipment and processor initialization method
KR100402326B1 (en) Method for Change Inter Processor Communication Protocol

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
GR01 Patent grant
GR01 Patent grant