Process |
Main Function |
Sub-function/command |
Explanation |
Preparations |
Valid_dev |
|
Check whether BLV exists on the disk |
Make_workdir |
|
Build a working directory |
Check_diskspace |
|
Check that the/tmp file system has sufficient space to accommodate ramfs and kernel images. |
Init_tmpfile_vars |
|
Set auxiliary environment variables, such as the name of the ramfs file and the name of the proto file. |
Build ramfs files, including library files, ODM and other required commands |
Create_ramfs |
Create_db |
Build a streamlined ODM in the working directory |
Strip_lib |
Copy required C-library files in the working directory |
Database files are processed by strip to save space |
Build_proto |
The most critical step is to build the proto file for mkfs The mkfs command creates a directory in ramfs Based on the proto file and copies the file, such as/sbin/RC. boot and other required commands and kernel extensions, including the ODM and C library files in the working directory |
Check_proto |
Mk_ramfs |
Create ramfs and copy files to it |
Build boot images, including the operating system kernel and ramfs |
Create_bootimage |
Compress_ramfs |
Create and compress ramfs |
Copy_ker |
Copy/Unix kernel to temporary directory |
Mkboot_compresss |
Create and compress the kernel Image Based on the/Unix kernel in the temporary directory |
Cat_ker_ramfs |
Merge ramfs and kernel Images |
Mkboot_image |
Notify Bootstrap BLV location in the disk using the mkboot command |
Dd The merged kernel image to BLV |
Copy driver |
Copy_device |
Savebase |
Copy the drivers required by the boot system to BLV |
The operating system to be booted must meet the following conditions:
Ü
Bootstrap must know the starting position of the bootable image in the disk
Ü
The bootable image contains the drivers, operating system kernel and library files required to initialize the minimum device, as well as other required commands and ODM.
The bosboot command completes the preceding two tasks.