CN109901844A - A kind of bootstrap technique suitable for different processor - Google Patents
A kind of bootstrap technique suitable for different processor Download PDFInfo
- Publication number
- CN109901844A CN109901844A CN201711305048.3A CN201711305048A CN109901844A CN 109901844 A CN109901844 A CN 109901844A CN 201711305048 A CN201711305048 A CN 201711305048A CN 109901844 A CN109901844 A CN 109901844A
- Authority
- CN
- China
- Prior art keywords
- boardid
- different processor
- value
- grub
- bootstrap technique
- 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.)
- Granted
Links
Abstract
The present invention relates to a kind of bootstrap techniques suitable for different processor, include the following steps: step S1: insertion optical disk drives are arranged, from optical disk start-up system into BIOS;Step S2: BoardID variate-value is obtained;Step S3: BoardID variate-value is passed to grub.cfg script file;Step S4: judge BoardID respective value;Step S5: path boot is started according to the BoardID respective value of judgement, to complete the guidance of different processor.Bootstrap technique provided by the invention suitable for different processor supports guidance and the installation question of multiple manufacturer's complete machines and different processor model, has unified the version that operating system externally provides, and also solves that operating system version is more, maintenance and supports difficult problem.
Description
Technical field
The present invention relates to computer software technical fields, and in particular to a kind of bootstrap technique suitable for different processor.
Background technique
Different processors, including domestic Shen prestige processor, corresponding to each complete-system vendor production mainboard on
Hardware it is different, as soon as cause a kernel that can not support the mainboards of all complete-system vendors' productions, in operating system installation
Needing corresponding kernel can start and installation system, result in the inconvenience of operation.
Summary of the invention
To solve the shortcomings of the prior art, the present invention provides a kind of bootstrap technique suitable for different processor,
Include the following steps:
Step S1: insertion optical disk drives are arranged, from optical disk start-up system into BIOS;
Step S2: BoardID variate-value is obtained;
Step S3: BoardID variate-value is passed to grub.cfg script file;
Step S4: judge BoardID respective value;
Step S5: path boot is started according to the BoardID respective value of judgement, to complete the guidance of different processor.
Wherein, the respective value of the BoardID judged includes boot.img, bootloard.bin and vmlinuxl
Wherein, the step S5 includes:
Step S51: start interim root file system boot.img;
Step S52: starting CPU and hardware initialization program bootloard.bin;
Step S53: activation system kernel vmlinuxl;
Step S54: starting installation procedure anaconda.
Wherein, in the step S2, BoardID variate-value is obtained from flash by GRUB program.
Bootstrap technique provided by the invention suitable for different processor supports multiple manufacturer's complete machines and different disposal type
Number guidance and installation question, unified the version that operating system externally provides, it is more also to solve operating system version, maintenance and
Support difficult problem.
Detailed description of the invention
Fig. 1: the implementation flow chart of the bootstrap technique suitable for different processor of the invention.
Specific embodiment
In order to have further understanding to technical solution of the present invention and beneficial effect, it is described in detail with reference to the accompanying drawing
Technical solution of the present invention and its beneficial effect of generation.
Inventive concept of the invention are as follows: produce the hardware difference of mainboard for each complete-system vendor and lead to kernel more than one
It is a, and need to install this phenomenon of corresponding kernel when installation again, start and install corresponding by BoardID difference
Kernel, so that an iso file solves each manufacturer's complete machine, the guidance of different processor model, installation and starting.
Specifically, BoardID is arranged to distinguish the mainboard of each manufacturer.Started in GRUB guidance according to BoardID and
Corresponding kernel is installed, realize iso (system image) file guidance installation and starts different complete-system vendors, different disposal
The function of device.
BoardID is GRUB by reading the variable that flash is obtained on mainboard, according to its different value of manufacturer also with
Change.As Jiangnan complete-system vendor's code name be 1, table 1 be Jiangnan BoardID produced.
Table 1: Jiangnan BoardID produced
GRUB is most common multiple operating systems boot manager, it is responsible for being packed into kernel and guides operating system.By
Hard disk startup loads the process of GRUB and operating system, including following operating procedure:
1, the stage1 stage
BIOS is usually first sector for turning to first piece of hard disk, i.e. master boot record (MBR).The sector MBR (0 face, 0 magnetic
1st sector in road), size is 512 bytes (+2 byte flag 55AA of+64 byte partitions table of 446 syllabified code), it is responsible for load
Deposit in the start program of the 2nd sector of 0 face 0.
2, the stage1_5 stage
Stage1_5 be responsible for identify file system and load stage2, so stage1_5 often have it is multiple, with support not
With the reading of file system.When installing GRUB, GRUB can be according to current/boot/ divisional type, and load is corresponding
Stage1_5 is to the 3rd sector of 0 face, 0 magnetic track.Stage1_5 is loaded by start 1.
3, the stage2 stage
It is responsible for display starting menu and provides user's interactive interface, and according to user's selection or default configuration load operation
System kernel.
The working directory of GRUB is at/boot/grub, and wherein grub.cfg is the text file based on script
(such as Fig. 1), wherein the kernel loads configuration of the configuration and each operating system shown comprising menu.GRUB is aobvious according to grub.cfg
Show starting menu, same user interface is provided.According to the kernel setup load of user's selection or default configuration and grub.cfg
Corresponding kernel program, and kernel program is given control, so that kernel program completes the starting of real operating system.
Fig. 1 is the implementation flow chart of the bootstrap technique suitable for different processor of the invention, as shown in Figure 1, of the invention
The bootstrap technique suitable for different processor, mainly include the following steps:
Step S1:GRUB guidance insertion optical disk start-up machine, is arranged, from optical disk start-up system into BIOS.
Step S2: after the three phases end of run for executing GRUB program, BoardID variable is obtained from flash.
Step S3: BoardID variate-value is passed to grub.cfg script file.
Step S4: sentencing a section BoardID respective value in grub.cfg, shows respective branches GRUB menu:
NeoKylin Desktop 4.0(Sunway)Install
NeoKylin Desktop 4.0(Sunway)Backup
NeoKylin Desktop 4.0(Sunway)Recovery
NeoKylin Desktop 4.0(Sunway)Debug
Step S5: after choosing and executing GRUB menu, can enter operating system installation environment, due to it is determined that
The value of BoardID, can be arranged corresponding starting path boot, and boot is a catalogue, the inside contain boot.img,
bootloader.bin,vmlinux1.Bootup process is as shown in Figure 1.
Step S51: start interim root file system boot.img.Its life cycle is very short, only can be with accomplishing authentic document
One bridge of system
Step S52: starting CPU and hardware initialization program bootloard.bin.Main function is to complete CPU and correlation
The initialization of hardware takes the hardware environment of system to a proper states, to be final calling system kernel.
Step S53: activation system kernel vmlinux1.Into true file system, installation procedure is run.
The problem of iso (system image) file adaptation installs all manufacturer's complete machines can be realized through this process.
Bootstrap technique suitable for different processor of the invention is particularly suitable under domestic Shen prestige processor platform compatible
The bootstrap technique of each manufacturer's complete machine and different processor model.
It includes multiple kernels that the present invention, which solves one iso (system image) file of Shen prestige processor platform, is supported multiple
The guidance of manufacturer's complete machine and different processor model and installation question have unified the version that Shen prestige platform operating system externally provides
This, also solves the problems, such as more operating system version, maintenance and supports hardly possible.
It is so-called " Shen prestige processor " in the present invention, the Alpha 21164 from DEC, to use Shen prestige from master instruction
64 domestic processors of one kind of collection.
It is so-called " BoardID " in the present invention, it is uniquely marked defined in the mainboard information byte for a kind of each complete-system vendor
Know code.The complete-system vendor's code name surmounted such as tide is 101 (0x65), and the mainboard number of the complete machine CS5536ATX of exploitation is then
0x65xxxxx2。
It is so-called " GRUB " in the present invention, it is the abbreviation of GRand Unified Bootloader, is one from GNU
The multiple operating system startup program of project.GRUB is the realization of more starting specifications, it allows user can be in computer simultaneously
Possess multiple operating systems, and the operating system run is wished in selection in computer starting.GRUB can be used for selection operation system
The different kernels united on subregion, it can also be used to transmit start-up parameter to these kernels.
Although the present invention is illustrated using above-mentioned preferred embodiment, the protection model that however, it is not to limit the invention
It encloses, anyone skilled in the art are not departing within the spirit and scope of the present invention, and opposite above-described embodiment carries out various changes
It is dynamic still to belong to the range that the present invention is protected with modification, therefore protection scope of the present invention subjects to the definition of the claims.
Claims (4)
1. a kind of bootstrap technique suitable for different processor, which comprises the steps of:
Step S1: insertion optical disk drives are arranged, from optical disk start-up system into BIOS;
Step S2: BoardID variate-value is obtained;
Step S3: BoardID variate-value is passed to grub.cfg script file;
Step S4: judge BoardID respective value;
Step S5: path boot is started according to the BoardID respective value of judgement, to complete the guidance of different processor.
2. being suitable for the bootstrap technique of different processor as described in claim 1, which is characterized in that in the step S5, institute
The respective value of the BoardID of judgement includes boot.img, bootloard.bin and vmlinuxl.
3. being suitable for the bootstrap technique of different processor as described in claim 1, which is characterized in that the step S5 includes:
Step S51: start interim root file system boot.img;
Step S52: starting CPU and hardware initialization program bootloard.bin;
Step S53: activation system kernel vmlinuxl;
Step S54: starting installation procedure anaconda.
4. being suitable for the bootstrap technique of different processor as described in claim 1, which is characterized in that in the step S2, lead to
It crosses GRUB program and obtains BoardID variate-value from flash.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711305048.3A CN109901844B (en) | 2017-12-11 | 2017-12-11 | Guiding method suitable for different processors |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711305048.3A CN109901844B (en) | 2017-12-11 | 2017-12-11 | Guiding method suitable for different processors |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109901844A true CN109901844A (en) | 2019-06-18 |
CN109901844B CN109901844B (en) | 2022-08-23 |
Family
ID=66941758
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711305048.3A Active CN109901844B (en) | 2017-12-11 | 2017-12-11 | Guiding method suitable for different processors |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109901844B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1484143A (en) * | 2002-09-18 | 2004-03-24 | 联想(北京)有限公司 | Method for realizing multe-function embedding system |
US20080162917A1 (en) * | 2006-12-31 | 2008-07-03 | Sandisk Corp. | Multi-Platform Portable-Booting Systems and Architectures |
CN101957769A (en) * | 2010-09-27 | 2011-01-26 | 浙江大学 | MID (Mobile Internet Device) multiple operating system parallelizing method |
-
2017
- 2017-12-11 CN CN201711305048.3A patent/CN109901844B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1484143A (en) * | 2002-09-18 | 2004-03-24 | 联想(北京)有限公司 | Method for realizing multe-function embedding system |
US20080162917A1 (en) * | 2006-12-31 | 2008-07-03 | Sandisk Corp. | Multi-Platform Portable-Booting Systems and Architectures |
CN101957769A (en) * | 2010-09-27 | 2011-01-26 | 浙江大学 | MID (Mobile Internet Device) multiple operating system parallelizing method |
Non-Patent Citations (1)
Title |
---|
__DARK__: "利用grub引导多系统debian8.0+win7+ubuntu16.04", 《CSDN》 * |
Also Published As
Publication number | Publication date |
---|---|
CN109901844B (en) | 2022-08-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103729184B (en) | Software component combining and constructing method | |
CN103955363B (en) | A kind of manufacture method of program upgrade installation package | |
US7490298B2 (en) | Creating documentation screenshots on demand | |
US7669201B2 (en) | System and method for common file installation | |
US20160188345A1 (en) | Method of a UEFI firmware and Computer System thereof | |
CN102929716B (en) | Method for starting multiple processes | |
CN106445576A (en) | Motherboard and computer implementing method thereof, and non-transitory computer readable storage devices thereof | |
CN103746833A (en) | PXE-based RAID automatic configuration method and system | |
CN102135893A (en) | Method for integrating operating system on BIOS (Basic Input Output System) chip and starting operating system on server | |
CN103593281B (en) | Test macro and method of testing | |
CN102402427A (en) | Method and device for updating Java application program | |
US20100049961A1 (en) | Update method for basic input/output system and update system thereof | |
CN103678053A (en) | Computer self-check method and system | |
US8370618B1 (en) | Multiple platform support in computer system firmware | |
CN106303707A (en) | A kind of version method for burn-recording, system and terminal | |
CN101685402A (en) | Method for BIOS configuration of computer | |
CN101201746A (en) | Method for setting ROM-BIOS | |
JP2020177544A (en) | Linux installation support program | |
CN101281485B (en) | Computer testing method without hard disc | |
CN116820606A (en) | Method, device, equipment and storage medium for configuring bootstrap program | |
CN109901844A (en) | A kind of bootstrap technique suitable for different processor | |
KR100755697B1 (en) | Method, apparatus, and system for installing software | |
TWI486876B (en) | Host and method of upgrading connection manager of dongle | |
CN103136010A (en) | Firmware update method and firmware update device capable of being used by firmware update method | |
CN102902554B (en) | A kind of LINUX installation method of operating system of Loongson platform |
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 |