CN109901844B - Guiding method suitable for different processors - Google Patents

Guiding method suitable for different processors Download PDF

Info

Publication number
CN109901844B
CN109901844B CN201711305048.3A CN201711305048A CN109901844B CN 109901844 B CN109901844 B CN 109901844B CN 201711305048 A CN201711305048 A CN 201711305048A CN 109901844 B CN109901844 B CN 109901844B
Authority
CN
China
Prior art keywords
boardid
different processors
starting
grub
value
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
CN201711305048.3A
Other languages
Chinese (zh)
Other versions
CN109901844A (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.)
China Standard Software Co Ltd
Original Assignee
China Standard Software 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 China Standard Software Co Ltd filed Critical China Standard Software Co Ltd
Priority to CN201711305048.3A priority Critical patent/CN109901844B/en
Publication of CN109901844A publication Critical patent/CN109901844A/en
Application granted granted Critical
Publication of CN109901844B publication Critical patent/CN109901844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a guiding method suitable for different processors, which comprises the following steps: step S1: inserting the CD starter, entering BIOS setting, starting the system from the CD; step S2: acquiring a BoardID variable value; step S3: transmitting the value of the BoardID variable into a grub. Step S4: judging a BoardID corresponding value; step S5: and starting the path boot according to the judged BoardID corresponding value to complete the booting of different processors. The guiding method suitable for different processors provided by the invention supports the guiding and installation problems of a plurality of manufacturers and machines and different processor models, unifies the externally provided versions of the operating system, and also solves the problems of multiple versions of the operating system and difficult maintenance and support.

Description

Guiding method suitable for different processors
Technical Field
The invention relates to the technical field of computer software, in particular to a guiding method suitable for different processors.
Background
Different processors, including a domestic Shenwei processor, have different hardware on the corresponding motherboards produced by the manufacturers of the whole machines, so that one kernel cannot support the motherboards produced by all manufacturers of the whole machines, and the corresponding kernel is required to start and install the system when the operating system is installed, which causes inconvenience in operation.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a guiding method suitable for different processors, which comprises the following steps:
step S1: inserting the CD starter, entering BIOS setting, starting the system from the CD;
step S2: acquiring a BoardID variable value;
step S3: transmitting the BoardID variable value into a grub.
Step S4: judging a BoardID corresponding value;
step S5: and starting a path boot according to the judged BoardID corresponding value to finish the booting of different processors.
Wherein the judged corresponding values of BoardID include boot
Wherein the step S5 includes:
step S51: starting a temporary root file system boot.
Step S52: starting a CPU and a hardware initialization program bootloader.
Step S53: starting a system kernel vmlinux;
step S54: the installer anaconda is started.
In step S2, the value of the BoardID variable is obtained from the flash through the GRUB program.
The guiding method applicable to different processors provided by the invention supports the guiding and installing problems of a plurality of manufacturers and complete machines and different processor models, unifies the externally provided versions of the operating system, and also solves the problems of more versions of the operating system and difficult maintenance and support.
Drawings
FIG. 1: the invention discloses a flow chart for realizing a booting method suitable for different processors.
Detailed Description
In order to further understand the technical scheme and the advantages of the present invention, the technical scheme and the advantages thereof are described in detail below with reference to the accompanying drawings.
The invention conception of the invention is as follows: aiming at the phenomenon that more than one kernel is caused by different hardware for producing the main board by each whole machine manufacturer and the corresponding kernel needs to be installed during installation, the corresponding kernel is started and installed through the difference of BoardID, so that the guidance, installation and starting of the whole machines and different processor models of each manufacturer are solved by one iso file.
Specifically, BoardID is set to distinguish the motherboards of the respective manufacturers. And starting and installing a corresponding kernel according to the BoardID during GRUB guidance, so that the functions of guiding and installing and starting different complete machine manufacturers and different processors by using an iso (system image) file are realized.
BoardID is a variable obtained by GRUB by reading flash on the motherboard, and the value of GRUB changes according to different manufacturers. For example, the manufacturer of the whole machine in south of the Yangtze river has the code number 1, and Table 1 shows BoardID produced in south of the Yangtze river.
Table 1: BoardID produced in the south of the Yangtze river
Figure BDA0001501819450000031
GRUB is the most common multiple operating system boot manager that is responsible for loading the kernel and booting the operating system. The process of loading GRUB and operating system is started by the hard disk, which comprises the following operation steps:
1. stage1
The BIOS is typically the first sector, the Master Boot Record (MBR), that is diverted to the first hard disk. MBR sector (1 st sector of 0 track on 0), 512 bytes in size (446 byte code +64 byte partition table +2 byte flag 55AA), which is responsible for loading the start procedure stored in the 2 nd sector of 0 track on 0.
2. stage1_5
stage1_5 is responsible for identifying file systems and loading stage2, so stage1_5 is often multiple to support reading of different file systems. When installing GRUB, GRUB will load corresponding stage1_5 to sector 3 of the 0's plane 0 track according to the current/boot/partition type. stage1_5 is loaded by start 1.
3. stage2
It is responsible for displaying the startup menu and providing a user interaction interface and loading the operating system kernel according to user selection or default configuration.
The working directory of GRUB is under/boot/GRUB, where grub.cfg is a script-based text file (see fig. 1) containing the configuration of the menu display and the kernel loading configuration of the respective operating system. And the GRUB displays a starting menu according to GRUB. Loading a corresponding kernel program according to the user selection or default configuration and the kernel configuration of grub.
Fig. 1 is a flowchart of an implementation of a booting method applicable to different processors according to the present invention, and as shown in fig. 1, the booting method applicable to different processors according to the present invention mainly includes the following steps:
step S1: GRUB guides the CD to start the machine, enters BIOS setting, and starts the system from CD.
Step S2: and after the three stages of executing the GRUB program are finished, acquiring a BoardID variable from the flash.
Step S3: the BoardID variable value is passed into a grub.
Step S4: cfg, judging the corresponding value of the BoardID in the GRUB, and displaying a GRUB menu corresponding to the branch:
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 selecting and executing a GRUB menu, the operating system installation environment is entered, and because the value of BoardID is judged, a corresponding boot path boot is set, wherein the boot is a directory and contains boot. The boot process is shown in fig. 1.
Step S51: img starts the temporary root file system boot. Its life cycle is very short, and it can only be used as a bridge of real file system
Step S52: the CPU and hardware initializer bootloader. The main function is to complete the initialization of CPU and related hardware, and bring the software and hardware environment of the system to a proper state, so as to call the system kernel finally.
Step S53: the system kernel vmlinux1 is started. And entering a real file system and operating an installation program.
The problem that one iso (system image) file is adaptive to install the complete machines of all manufacturers can be solved through the process.
The invention is suitable for the guiding methods of different processors, in particular to the guiding method compatible with all manufacturers and different processor models under a domestic Shenwei processor platform.
The invention solves the problems that one iso (system image) file of the Shenwei processor platform comprises a plurality of kernels and supports the guidance and installation of a plurality of manufacturers and complete machines and different processor models, unifies the externally provided versions of the Shenwei platform operating system and also solves the problems of multiple versions and difficult maintenance and support of the operating system.
In the present invention, the "Shenwei processor" is derived from Alpha 21164 of DEC and is a 64-bit domestic processor using the Shenwei autonomous instruction set.
In the invention, the so-called "BoardID" is a unique identification code defined in a mainboard information byte by each complete machine manufacturer. If the manufacturer code of the whole machine surpassed by the wave is 101(0x65), the main board number of the developed whole machine CS5536ATX is 0x65xxxxx 2.
In the present invention, the term "GRUB" is used for short for GRand Unified Bootloader, and is a multi-operating system boot program from GNU project. GRUB is an implementation of a multi-boot specification that allows a user to have multiple operating systems simultaneously within a computer and select the operating system that he wishes to run at computer boot. GRUB may be used to select different kernels on the operating system partition and may also be used to pass boot parameters to these kernels.
Although the present invention has been described with reference to the preferred embodiments, it should be understood that various changes and modifications can be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (3)

1. A booting method suitable for different processors is characterized by comprising the following steps:
step S1: inserting CD starter, entering BIOS setting, starting system from CD;
step S2: acquiring a BoardID variable value;
step S3: transmitting the BoardID variable value into a grub.
Step S4: judging a BoardID corresponding value;
step S5: starting a path boot according to the judged BoardID corresponding value to complete the guidance of different processors;
the step S5 includes:
step S51: starting a temporary root file system boot.
Step S52: starting a CPU and a hardware initialization program bootloader.
Step S53: starting a system kernel vmlinux;
step S54: the installer anaconda is started.
2. The booting method applicable to different processors of claim 1, wherein the corresponding values of boardID determined in the step S5 include boot.
3. The booting method of claim 1 adapted to different processors, wherein in step S2, the value of the BoardID variable is obtained from the flash by a GRUB program.
CN201711305048.3A 2017-12-11 2017-12-11 Guiding method suitable for different processors Active CN109901844B (en)

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 CN109901844A (en) 2019-06-18
CN109901844B true 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1484143A (en) * 2002-09-18 2004-03-24 联想(北京)有限公司 Method for realizing multe-function embedding system
CN101957769A (en) * 2010-09-27 2011-01-26 浙江大学 MID (Mobile Internet Device) multiple operating system parallelizing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7925875B2 (en) * 2006-12-31 2011-04-12 Sandisk Corporation Systems and methods for identifying and booting a computer architecture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1484143A (en) * 2002-09-18 2004-03-24 联想(北京)有限公司 Method for realizing multe-function embedding system
CN101957769A (en) * 2010-09-27 2011-01-26 浙江大学 MID (Mobile Internet Device) multiple operating system parallelizing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
利用grub引导多系统debian8.0+win7+ubuntu16.04;__DARK__;《CSDN》;20160915;第1-2页 *

Also Published As

Publication number Publication date
CN109901844A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
US10055218B2 (en) System and method for adding and storing groups of firmware default settings
US6804774B1 (en) Software image transition aid comprising building a disk image based on identified hardware
US8028155B1 (en) Initiating an operating system boot from firmware
US20160188345A1 (en) Method of a UEFI firmware and Computer System thereof
US20040210848A1 (en) Multiple operating system quick boot utility
US7873960B2 (en) Generic packaging tool for packaging application and component therefor to be installed on computing device
CN110096314B (en) Interface initialization method, device, equipment and computer readable storage medium
KR20140109401A (en) Backing up firmware during initialization of device
US10025587B2 (en) Method of bootup and installation, and computer system thereof
CN102135893A (en) Method for integrating operating system on BIOS (Basic Input Output System) chip and starting operating system on server
US9513889B2 (en) System and method of automating installation of applications
US20100049961A1 (en) Update method for basic input/output system and update system thereof
CN103593281A (en) Test system and test method
US9965292B2 (en) Method of bluetooth pairing with UEFI firmware and computer system thereof
US10491736B2 (en) Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS
KR100578955B1 (en) Method and apparatus for determining the drive letter assignment of a CD ROM drive during initial system setup of a computer system
CN113254089B (en) System boot method correction method, device, equipment and storage medium
CN101201746A (en) Method for setting ROM-BIOS
CN111367745B (en) Memory pressure testing method and system without support of operating system and related components
CN109901844B (en) Guiding method suitable for different processors
CN116820606A (en) Method, device, equipment and storage medium for configuring bootstrap program
KR100755697B1 (en) Method, apparatus, and system for installing software
CN113821265B (en) Operating system control method and device, computer mainboard and readable storage medium
CN106502847B (en) Server diagnosis method and device
CN102455919A (en) Automatic optimization setting method for basic input output system(BIOS)

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