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:
Jimmy Xu 2020-03-20 02:47:21 +08:00
parent 1389500071
commit 12d351d6fb
2 changed files with 50 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# Build Kata Containers Kernel
* [Requirements](#requirements)
* [Usage](#usage)
* [Setup kernel source code](#setup-kernel-source-code)
* [Build the kernel](#build-the-kernel)
* [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
[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
```bash

View File

@ -1 +1 @@
69
70