mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-21 21:18:54 +00:00
kernel: add usage in readme
Add usage of build-kernel.sh to the readme Signed-off-by: Jimmy Xu <junming.xjm@antfin.com>
This commit is contained in:
parent
1389500071
commit
12d351d6fb
@ -1,6 +1,7 @@
|
|||||||
# Build Kata Containers Kernel
|
# Build Kata Containers Kernel
|
||||||
|
|
||||||
* [Requirements](#requirements)
|
* [Requirements](#requirements)
|
||||||
|
* [Usage](#usage)
|
||||||
* [Setup kernel source code](#setup-kernel-source-code)
|
* [Setup kernel source code](#setup-kernel-source-code)
|
||||||
* [Build the kernel](#build-the-kernel)
|
* [Build the kernel](#build-the-kernel)
|
||||||
* [Install the Kernel in the default path for Kata](#install-the-kernel-in-the-default-path-for-kata)
|
* [Install the Kernel in the default path for Kata](#install-the-kernel-in-the-default-path-for-kata)
|
||||||
@ -17,6 +18,54 @@ automates the process to build a kernel for Kata Containers.
|
|||||||
The `build-kernel.sh` script requires an installed Golang version matching the
|
The `build-kernel.sh` script requires an installed Golang version matching the
|
||||||
[component build requirements](https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#requirements-to-build-individual-components).
|
[component build requirements](https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#requirements-to-build-individual-components).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./build-kernel.sh -h
|
||||||
|
Overview:
|
||||||
|
|
||||||
|
Build a kernel for Kata Containers
|
||||||
|
|
||||||
|
Description: This script is the *ONLY* to build a kernel for development.
|
||||||
|
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
build-kernel.sh [options] <command> <argument>
|
||||||
|
|
||||||
|
Commands:
|
||||||
|
|
||||||
|
- setup
|
||||||
|
|
||||||
|
- build
|
||||||
|
|
||||||
|
- install
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
-c <path> : Path to config file to build a the kernel.
|
||||||
|
-d : Enable bash debug.
|
||||||
|
-e : Enable experimental kernel.
|
||||||
|
-f : Enable force generate config when setup.
|
||||||
|
-g <vendor> : GPU vendor, intel or nvidia.
|
||||||
|
-h : Display this help.
|
||||||
|
-k <path> : Path to kernel to build.
|
||||||
|
-p <path> : Path to a directory with patches to apply to kernel.
|
||||||
|
-t : Hypervisor_target.
|
||||||
|
-v : Kernel version to use if kernel path not provided.
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
$ ./build-kernel.sh -v 4.19.86 -g nvidia -f -d setup
|
||||||
|
```
|
||||||
|
> **Note**
|
||||||
|
> - `-v 4.19.86`: Specify the guest kernel version.
|
||||||
|
> - `-g nvidia`: To build a guest kernel supporting Nvidia GPU.
|
||||||
|
> - `-f`: The .config file is forced to be generated even if the kernel directory already exists.
|
||||||
|
> - `-d`: Enable bash debug mode.
|
||||||
|
|
||||||
|
|
||||||
## Setup kernel source code
|
## Setup kernel source code
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -1 +1 @@
|
|||||||
69
|
70
|
||||||
|
Loading…
Reference in New Issue
Block a user