Cloud native operating system mirror image construction method and system supporting U-Boot
By designing a cloud-native operating system image construction method that supports U-Boot, including installation image structure design, root file system construction and post-installation processing procedures, the problem of cloud-native operating systems not supporting U-Boot bootloader installation is solved. Provides system boot installation under a variety of hardware platforms, improving applicability and versatility.
Patent Information
- Application Number
- CN202410682038.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-08-30
AI Technical Summary
Existing cloud-native operating systems do not support installation directly through the U-Boot boot loader, which limits its applicability and versatility.
A cloud native operating system image construction method that supports U-Boot was designed, including installation image structure design, root file system construction and post-installation processing process, and modifying the device tree parameter dtb for installation through the U-Boot boot loader.
On the basis of supporting UEFI or Legacy boot methods, the cloud-native operating system further supports the installation of U-Boot boot loader, improving its applicability and versatility, and maintaining a simple and flexible installation and startup method.
Smart Images

Figure CN118567667A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud native operating systems, and in particular to a method and system for building a cloud native operating system image supporting U-Boot. Background Art
[0002] Cloud native operating system is a lightweight operating system based on Linux kernel, with the characteristics of automatic update, easy deployment, security and reliability, and container-centricity. It is designed for modern distributed systems and provides the basic functional environment required for deploying container applications and a series of built-in tools for service discovery and configuration sharing. It aims to provide the best container host to run containerized workloads safely and on a large scale. Currently, cloud native operating systems include CoreOS, RancherOS, Project Atomic, NestOS, etc. U-Boot is a boot loader mainly used for embedded systems. It has high reliability and stability. It currently supports a variety of computer system structures, such as ARM, x86, MIPS, PowerPC, etc., and supports a variety of operating systems, such as Linux, OpenBSD, NetBSD, FreeBSD, Solaris, Android, etc.
[0003] The ISO installation images provided by the current mainstream cloud-native operating systems support architectures such as aarch64 and x86_64, and can be installed through UEFI or Legacy boot mode, but do not support direct installation through the U-Boot boot loader. How to install cloud-native operating systems based on U-Boot has become a key technical issue that needs to be solved urgently. Summary of the invention
[0004] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a method and system for building a cloud native operating system image supporting U-Boot are provided. The present invention aims to enable the cloud native operating system to support direct installation through the U-Boot boot loader, so as to improve the applicability and versatility of the cloud native operating system.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: A method for building a cloud native operating system image supporting U-Boot includes the following steps: S101. Design an installation image structure of a cloud native operating system to support U-Boot installation; design a method for building a root file system of a cloud native operating system to support U-Boot installation; build a post-installation processing flow of a cloud native operating system to modify a device tree parameter dtb of a startup configuration file to support U-Boot installation; S102. Based on the installation image structure of the cloud native operating system supporting U-Boot installation, the designed method for building the root file system of the cloud native operating system, and the installation program, build a cloud native operating system installation image that supports U-Boot.
[0006] Optionally, when the installation image structure of the cloud native operating system is designed in step S101 to support U-Boot installation, the designed installation image structure includes a startup directory casper and an image directory images. The files under the startup directory casper include a kernel image file uImage dedicated to U-Boot, an initial root file system initrd, a device tree dtb, and a boot directory grub. The boot directory grub includes boot files corresponding to firmware from different manufacturers; the files under the image directory images include an actual root file system rootfs.img; when the installation image of the cloud native operating system is booted by U-Boot, the locations of the kernel image file uImage and the initial root file system initrd are first determined, the kernel image file uImage and the initial root file system initrd are loaded into the memory, and the control is handed over to the kernel in the kernel image file uImage, and the kernel detects the device, loads the internal module, and mounts the actual root file system rootfs.img under the image directory images to enter the installation environment to execute the installation program to complete the installation task of the cloud native operating system.
[0007] Optionally, when designing a method for building a root file system of a cloud-native operating system in step S101 so that it supports U-Boot installation, the designed method for building a root file system of a cloud-native operating system includes: S201, initializing the root file system; S202, creating a root file system partition; S203, formatting the root file system partition; S204, installing the software package to the root file system; S205, executing a post-installation script of the software package in the root file system; S206, check whether there is a directory / usr / lib / ostree-boot in the root file system. If there is a directory / usr / lib / ostree-boot, proceed to the next step. Otherwise, determine that the construction fails, end and exit; S207, check whether there is a file with a name prefix of "uImage-" under the directory / usr / lib / ostree-boot in the root file system, if yes, proceed to the next step, otherwise determine that the build fails, end and exit; S208. Copy the file with the name prefix "uImage-" to the directory / boot / ostree / ${osname}-${bootcsum} of the root file system, where ${osname} represents the name of the cloud native operating system, and ${bootcsum} represents the object checksum generated by the system tree command ostree; S209, modify the kernel startup parameters of the system background service systemd in the root file system, and add kernel startup parameters related to U-Boot; S210, check whether there is a startup configuration file / boot / grub / grub.cfg in the root file system, if there is a startup configuration file / boot / grub / grub.cfg, proceed to the next step, otherwise proceed to step S212; S211. Delete the startup configuration file / boot / grub / grub.cfg in the root file system; S212, creating a startup configuration file / boot / grub / grub.cfg in the root file system and writing the boot configuration items; S213. The root file system is constructed successfully.
[0008] Optionally, when writing boot configuration items in step S212, the written boot configuration items include: default menu items, timeout period, and boot configuration corresponding to the cloud native operating system, including name, boot partition, kernel file name, initial root file system initrd file name and device tree parameter dtb, wherein the device tree parameter dtb is a placeholder reserved for updating the target device tree file corresponding to the CPU type of the target machine in the post-installation processing phase.
[0009] Optionally, the placeholder character string is “@@U-BOOT-DTB@@”.
[0010] Optionally, when building a post-installation processing flow of the cloud native operating system in step S101 to support U-Boot installation, the post-installation processing includes: S301, determine whether the target machine is U-Boot booted, if so, proceed to the next step, otherwise end and exit; S302, obtaining the CPU type of the target machine; S303, modifying the startup configuration file / boot / grub / grub.cfg in the target installation hard disk, replacing the specified placeholder in the startup configuration file / boot / grub / grub.cfg with the device tree file corresponding to the CPU type of the target machine; S304: The post-installation processing flow is executed successfully.
[0011] Optionally, step S102 includes: S401, initialize the building environment of the cloud native operating system installation image and create an image directory; S402, pull the specified image building configuration file; S403, reading the software package list and the software warehouse address in the image building configuration file, and downloading the software package from the software warehouse according to the software package list; S404, building a root file system according to the designed method for building a root file system of a cloud native operating system; S405, packaging the constructed root file system into a compressed read-only file system SquashFS and copying it to the directory images / pxeboot in the mirror directory; S406, copy the startup directory casper from the configuration file to the root directory of the mirror directory; S407, downloading the kernel software package from the software repository in the configuration file and decompressing it; S408, extracting files with a name prefix of "uImage" and a suffix of "dtb" from the decompressed directory to the startup directory casper of the image directory; S409, copying the image file initrd.img of the initial root file system initrd from the directory images / pxeboot of the image directory to the startup directory casper of the image directory; S410. Pack the image directory to obtain an installation image of the cloud native operating system that supports U-Boot.
[0012] Optionally, after step S102, the step further includes booting and installing the constructed installation image of the cloud native operating system supporting U-Boot using U-Boot for deploying the container application.
[0013] In addition, the present invention also provides a cloud-native operating system image building system supporting U-Boot, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the cloud-native operating system image building method supporting U-Boot.
[0014] In addition, the present invention also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used to be programmed or configured by a microprocessor to execute the method for building a cloud-native operating system image supporting U-Boot.
[0015] Compared with the prior art, the present invention mainly has the following advantages: 1. The present invention includes improvements in four dimensions: design of cloud native operating system installation image structure supporting U-Boot, construction process of cloud native operating system root file system supporting U-Boot, post-installation processing process of cloud native operating system installer supporting U-Boot (constructing post-installation processing process of cloud native operating system to modify device tree parameter dtb of startup configuration file to support U-Boot installation), and image construction process of cloud native operating system supporting U-Boot. Thus, cloud native operating system can further support installation through U-Boot boot loader on the basis of supporting UEFI or Legacy boot mode installation. U-Boot can utilize the characteristics of supporting multiple computer system structures and supporting wide compatibility of multiple operating systems to realize system boot installation of multiple cloud native operating systems under multiple hardware platforms, so as to improve the applicability and versatility of cloud native operating system.
[0016] 2. Compared with the original deployment and startup process, users do not need to perform additional operations. That is, while supporting installation and startup through U-Boot, it retains the simple and flexible installation and startup methods of the cloud native operating system, without affecting the usage habits of cloud native operating system users. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Schematic diagram of the basic flow of the method of the embodiment of the present invention.
[0018] Figure 2 The figure is a schematic diagram of the installation mirror structure of an embodiment of the present invention.
[0019] Figure 3 The present invention is a flowchart of a method for building a root file system of a cloud native operating system in an embodiment of the present invention.
[0020] Figure 4 It is a schematic diagram of the process of post-installation processing in an embodiment of the present invention.
[0021] Figure 5 The following is a schematic diagram of the process of constructing an installation image in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] This patent application is to build a cloud native operating system installation image that supports U-Boot, so that users can install and run the cloud native operating system on a target machine that supports the U-Boot boot loader, thereby further improving the applicability and versatility of the cloud native operating system. The following will be described in detail with the accompanying drawings and examples to explain the implementation of this patent application, so that the implementation process of how this patent applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. Figure 1As shown, the method for building a cloud native operating system image supporting U-Boot in this embodiment includes the following steps: S101. Design an installation image structure of a cloud native operating system to support U-Boot installation; design a method for building a root file system of a cloud native operating system to support U-Boot installation; build a post-installation processing flow of a cloud native operating system to modify a device tree parameter dtb of a startup configuration file to support U-Boot installation; S102. Based on the installation image structure of the cloud native operating system supporting U-Boot installation, the designed method for building the root file system of the cloud native operating system, and the installation program, build a cloud native operating system installation image that supports U-Boot.
[0023] like Figure 2 As shown, in step S101 of this embodiment, when designing the installation image structure of the cloud native operating system to support U-Boot installation, the designed installation image structure includes a startup directory casper and an image directory images. The files under the startup directory casper include a kernel image file uImage dedicated to U-Boot (uImage is applicable to Feiteng 1500CPU, uImage-ft2000plus is applicable to Feiteng 2000+CPU), an initial root file system initrd, a device tree dtb (u-boot-general.dtb is applicable to Feiteng 1500CPU, ft2000plus.dtb is applicable to Feiteng 2000+CPU) and a boot directory grub. The boot directory grub includes boot loaders corresponding to firmware of different manufacturers (grub_ba.efi is applicable to Baiao firmware, grub_kl.efi is applicable to Kunlun firmware) and fonts The file unicode.pf2; the files under the image directory images include the actual root file system pxeboot / rootfs.img, as well as efiboot.img, pxeboot / vmlinuz, pxeboot / initrd.img for compatibility with UEFI boot mode, and ignition.img for system configuration; when the installation image of the cloud native operating system is booted by U-Boot, the location of the kernel image file uImage and the initial root file system initrd is first determined, the kernel image file uImage and the initial root file system initrd are loaded into the memory, and the control is handed over to the kernel in the kernel image file uImage. The kernel detects the device, loads the internal module, and mounts the actual root file system rootfs.img under the image directory images to enter the installation environment to execute the installation program to complete the installation task of the cloud native operating system.
[0024] In this embodiment, the root file system of the cloud native operating system that supports U-Boot is mainly composed of three partitions: the EFI system partition, which is used to support the booting of the UEFI BIOS system; the boot partition, which contains the Linux kernel image, initrd, and device tree files used in the boot process; the root partition, which is the root partition where the root directory of the cloud native operating system is located. Figure 3 As shown, in step S101 of this embodiment, when designing a method for building a root file system of a cloud native operating system so that it supports U-Boot installation, the designed method for building a root file system of a cloud native operating system includes: S201, initializing the root file system. In this embodiment, the qemu-img tool is used to create a virtual machine disk image; S202, creating a root file system partition. In this embodiment, specifically, by attaching the virtual machine disk image and starting the virtual machine, using the disk partition tool sgdisk to create an EFI system partition, a boot partition, and a root partition; S203, formatting the root file system partition. In this embodiment, the mkfs tool is used to format the EFI system partition into fat format, the boot partition into ext4 format, and the root partition into xfs format; S204, installing the software package to the root file system; in this embodiment, the process includes pulling a configuration file from a git repository, obtaining a software package list and a software package repository address from the configuration file, downloading the software package from the software repository according to the software package list, and installing the software package to the root file system through the rpm-ostree command; S205, executing a post-installation script of the software package in the root file system; S206, check whether there is a directory / usr / lib / ostree-boot in the root file system. If there is a directory / usr / lib / ostree-boot, proceed to the next step. Otherwise, determine that the construction fails, end and exit; S207, check whether there is a file with a name prefix of "uImage-" under the directory / usr / lib / ostree-boot in the root file system, if yes, proceed to the next step, otherwise determine that the build fails, end and exit; S208. Copy the file with the name prefix "uImage-" to the directory / boot / ostree / ${osname}-${bootcsum} of the root file system, where ${osname} represents the name of the cloud native operating system, and ${bootcsum} represents the object checksum generated by the system tree command ostree; S209, modify the kernel startup parameters of the system background service systemd in the root file system, and add the kernel startup parameters related to U-Boot; this embodiment includes modifying the kernel startup parameters of the systemd service in the root file system, and adding the hard-coded kernel startup parameters in the U-Boot firmware to the systemd service without modifying the target machine firmware, so as to ensure that the service can be started normally when U-Boot boots. Assuming that the hard-coded parameter in the U-Boot firmware is "boot=casper", it means loading the kernel, initrd and device tree from the casper directory and booting the system to start. For the original "=" conditional kernel command line parameter (ConditionKernelCommandLine=), change it to a trigger condition, that is, add a "|" symbol after the "=" sign, and add a new trigger condition "ConditionKernelCommandLine=|boot=casper", indicating that the service can be started as long as one condition is met; for the "=!" conditional kernel command line parameter, only a new line of conditional parameters "ConditionKernelCommandLine=!boot=casper" is needed, and the service will not be started when all conditions are not met; S210, check whether there is a startup configuration file / boot / grub / grub.cfg in the root file system, if there is a startup configuration file / boot / grub / grub.cfg, proceed to the next step, otherwise proceed to step S212; S211. Delete the startup configuration file / boot / grub / grub.cfg in the root file system; S212, creating a startup configuration file / boot / grub / grub.cfg in the root file system and writing the boot configuration items; S213. The root file system is constructed successfully.
[0025] When writing boot configuration items in step S212 of this embodiment, the written boot configuration items include: default menu items, timeout period, and boot configuration corresponding to the cloud native operating system, including name, boot partition, kernel file name, initial root file system initrd file name and device tree parameter dtb, wherein the device tree parameter dtb is a placeholder reserved for updating the target device tree file corresponding to the CPU type of the target machine in the post-installation processing stage. It should be noted that the placeholder string can be defined as needed. For example, as an optional implementation scheme, the placeholder string in this embodiment is "@@U-BOOT-DTB@@".
[0026] like Figure 4As shown, in step S101 of this embodiment, when constructing a post-installation processing flow of a cloud native operating system to support U-Boot installation, the post-installation processing includes: S301, determine whether the target machine is U-Boot booted, if so, proceed to the next step, otherwise end and exit; the specific determination method is: if the target machine is aarch64 architecture, and the / sys / firmware / efi / vars and / sys / firmware / efi / efivars directories do not exist, it is determined to be booted by U-Boot; S302, obtaining the CPU type of the target machine, specifically, obtaining the CPU type of the target machine by reading the "CPUpart" field of the / proc / cpuinfo file; S303, modify the startup configuration file / boot / grub / grub.cfg in the target installation hard disk, and replace the specified placeholder in the startup configuration file / boot / grub / grub.cfg with the device tree file corresponding to the CPU type of the target machine, for example, when the CPU type is "0x660", use the "dtb / phytium / u-boot-general.dtb" device tree file, and when the CPU type is "0x662", use the "dtb / phytium / ft2000plus.dtb" device tree file; S304: The post-installation processing flow is executed successfully.
[0027] like Figure 5 As shown, step S102 of this embodiment includes: S401, initialize the build environment of the cloud native operating system installation image, create an image directory, and also include a cache directory, a build product directory, a temporary directory, etc.; S402, pull the specified image building configuration file, for example, pull the configuration file from the git repository, the configuration file includes a software package list, a software repository address, a casper directory, etc., the casper directory contains a grub directory, and the grub directory contains efi files, font files, background images, etc. corresponding to firmware of different manufacturers; S403, reading the software package list and the software warehouse address in the image building configuration file, and downloading the software package from the software warehouse according to the software package list; S404, building a root file system according to the designed method for building a root file system of a cloud native operating system; S405, packaging the constructed root file system into a compressed read-only file system SquashFS and copying it to the directory images / pxeboot in the mirror directory; S406, copy the startup directory casper from the configuration file to the root directory of the mirror directory; S407, downloading the kernel software package from the software repository in the configuration file and decompressing it; S408, extracting files with a name prefix of "uImage" and a suffix of "dtb" from the decompressed directory to the startup directory casper of the image directory; S409, copying the image file initrd.img of the initial root file system initrd from the directory images / pxeboot of the image directory to the startup directory casper of the image directory; S410. Pack the image directory to obtain an installation image of the cloud native operating system that supports U-Boot.
[0028] After step S102 of this embodiment, the method further includes booting and installing the constructed installation image of the cloud native operating system supporting U-Boot using U-Boot for deploying container applications.
[0029] To summarize, the method for building a cloud-native operating system image that supports U-Boot in this embodiment includes improvements in four dimensions: designing a cloud-native operating system installation image structure that supports U-Boot, building a cloud-native operating system root file system that supports U-Boot, building a cloud-native operating system installer post-installation processing process that supports U-Boot, and building a cloud-native operating system image that supports U-Boot. By building a root file system, adding files required for U-Boot booting and packaging them into a cloud-native operating system installation image, users can use the image to boot into the installation environment through U-Boot, execute the installer to install the root file system to the target hard disk, and modify the dtb parameters in the GRUB configuration file through the post-installation processing process. After the installation is successful After restarting, you can boot into the cloud native operating system through U-Boot, so that the cloud native operating system, on the basis of supporting UEFI or Legacy boot mode installation, further supports installation through the U-Boot boot loader. The user can use the image to boot into the installation environment through U-Boot. Without affecting the user's usage habits, use the cloud native operating system installer to install the root file system in the installation image to the target hard disk, and restart to boot into the cloud native operating system through U-Boot. By utilizing the characteristics of U-Boot supporting multiple computer system structures and supporting wide compatibility of multiple operating systems, multiple cloud native operating systems can support system boot installation on multiple hardware platforms, thereby improving the applicability and versatility of the cloud native operating system.
[0030] In addition, this embodiment also provides a cloud native operating system image building system supporting U-Boot, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the cloud native operating system image building method supporting U-Boot. In addition, this embodiment also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is used to be programmed or configured by the microprocessor to execute the cloud native operating system image building method supporting U-Boot.
[0031] The above is only a preferred embodiment of the present invention, which is only used to help understand the method and core idea of the present application. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the idea of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for building a cloud native operating system image supporting U-Boot, characterized in that: The steps include: S101. Design an installation image structure of a cloud native operating system to support U-Boot installation; design a method for building a root file system of a cloud native operating system to support U-Boot installation; build a post-installation processing flow of a cloud native operating system to modify a device tree parameter dtb of a startup configuration file to support U-Boot installation; S102. Based on the installation image structure of the cloud native operating system supporting U-Boot installation, the designed method for building the root file system of the cloud native operating system, and the installation program, build a cloud native operating system installation image that supports U-Boot.
2. The method for building a cloud native operating system image supporting U-Boot according to claim 1, characterized in that: When designing the installation image structure of the cloud native operating system in step S101 to support U-Boot installation, the designed installation image structure includes a startup directory casper and an image directory images. The files under the startup directory casper include a kernel image file uImage dedicated to U-Boot, an initial root file system initrd, a device tree dtb, and a boot directory grub. The boot directory grub includes boot files corresponding to firmware from different manufacturers; the files under the image directory images include the actual root file system rootfs.img; when the installation image of the cloud native operating system is booted by U-Boot, the locations of the kernel image file uImage and the initial root file system initrd are first determined, the kernel image file uImage and the initial root file system initrd are loaded into the memory, and the control is handed over to the kernel in the kernel image file uImage, and the kernel detects the device, loads the internal module, and mounts the actual root file system rootfs.img under the image directory images to enter the installation environment to execute the installation program to complete the installation task of the cloud native operating system.
3. The method for building a cloud native operating system image supporting U-Boot according to claim 1, characterized in that: When designing a method for building a root file system of a cloud native operating system in step S101 so that it supports U-Boot installation, the designed method for building a root file system of a cloud native operating system includes: S201, initializing the root file system; S202, creating a root file system partition; S203, formatting the root file system partition; S204, installing the software package to the root file system; S205, executing a post-installation script of the software package in the root file system; S206, check whether there is a directory / usr / lib / ostree-boot in the root file system. If there is a directory / usr / lib / ostree-boot, proceed to the next step. Otherwise, determine that the construction fails, end and exit; S207, check whether there is a file with a name prefix of "uImage-" in the directory / usr / lib / ostree-boot in the root file system, if yes, proceed to the next step, otherwise, determine that the build fails, end and exit; S208. Copy the file with the name prefix "uImage-" to the directory / boot / ostree / ${osname}-${bootcsum} of the root file system, where ${osname} represents the name of the cloud native operating system, and ${bootcsum} represents the object checksum generated by the system tree command ostree; S209, modify the kernel startup parameters of the system background service systemd in the root file system, and add kernel startup parameters related to U-Boot; S210, check whether there is a startup configuration file / boot / grub / grub.cfg in the root file system, if there is a startup configuration file / boot / grub / grub.cfg, proceed to the next step, otherwise proceed to step S212; S211. Delete the startup configuration file / boot / grub / grub.cfg in the root file system; S212, creating a startup configuration file / boot / grub / grub.cfg in the root file system and writing the boot configuration items; S213. The root file system is constructed successfully.
4. The method for building a cloud native operating system image supporting U-Boot according to claim 3, characterized in that: When writing the boot configuration items in step S212, the written boot configuration items include: default menu items, timeout period, and boot configuration corresponding to the cloud native operating system, including name, boot partition, kernel file name, initial root file system initrd file name and device tree parameter dtb, wherein the device tree parameter dtb is a placeholder reserved for updating the target device tree file corresponding to the CPU type of the target machine in the post-installation processing phase.
5. The method for building a cloud native operating system image supporting U-Boot according to claim 4, characterized in that: The string of the placeholder is "@@U-BOOT-DTB@@".
6. The method for building a cloud native operating system image supporting U-Boot according to claim 5, characterized in that: When the post-installation processing flow of the cloud native operating system is constructed in step S101 to support U-Boot installation, the post-installation processing includes: S301, determine whether the target machine is U-Boot booted, if so, proceed to the next step, otherwise end and exit; S302, obtaining the CPU type of the target machine; S303, modifying the startup configuration file / boot / grub / grub.cfg in the target installation hard disk, replacing the specified placeholder in the startup configuration file / boot / grub / grub.cfg with the device tree file corresponding to the CPU type of the target machine; S304: The post-installation processing flow is executed successfully.
7. The method for building a cloud native operating system image supporting U-Boot according to claim 2, characterized in that: Step S102 includes: S401, initialize the building environment of the cloud native operating system installation image and create an image directory; S402, pull the specified image building configuration file; S403, reading the software package list and the software warehouse address in the image building configuration file, and downloading the software package from the software warehouse according to the software package list; S404, building a root file system according to the designed method for building a root file system of a cloud native operating system; S405, packaging the constructed root file system into a compressed read-only file system SquashFS and copying it to the directory images / pxeboot in the mirror directory; S406, copy the startup directory casper from the configuration file to the root directory of the mirror directory; S407, downloading the kernel software package from the software repository in the configuration file and decompressing it; S408, extracting files with a name prefix of "uImage" and a suffix of "dtb" from the decompressed directory to the startup directory casper of the image directory; S409, copying the image file initrd.img of the initial root file system initrd from the directory images / pxeboot of the image directory to the startup directory casper of the image directory; S410. Pack the image directory to obtain an installation image of the cloud native operating system that supports U-Boot.
8. The method for building a cloud native operating system image supporting U-Boot according to claim 1, characterized in that: After step S102, the process also includes booting and installing the constructed installation image of the cloud native operating system supporting U-Boot using U-Boot for deploying container applications.
9. A cloud native operating system image building system supporting U-Boot, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the method for building a cloud-native operating system image supporting U-Boot as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored therein, characterized in that: The computer program is used to be programmed or configured by a microprocessor to execute the method for building a cloud-native operating system image supporting U-Boot as described in any one of claims 1 to 8.
Citation Information
Cited By
OSTree rollback method and device and storage medium
CN119883302A
