mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
packaging/kernel: Update kernel build doc
Clarify dependencies, correct typos, and fill in some gaps. Fixes: #2422 Signed-off-by: Dan Middleton <dan.middleton@intel.com>
This commit is contained in:
parent
99e9a6ad0a
commit
b980c62f43
@ -8,6 +8,14 @@ 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](../../../docs/Developer-Guide.md#requirements-to-build-individual-components).
|
[component build requirements](../../../docs/Developer-Guide.md#requirements-to-build-individual-components).
|
||||||
|
It also requires [yq](https://github.com/mikefarah/yq) version 3.4.1
|
||||||
|
> **Hint**: `snap install yq --channel=v3/stable`
|
||||||
|
|
||||||
|
|
||||||
|
The Linux kernel scripts further require a few packages (flex, bison, and libelf-dev)
|
||||||
|
See the CI scripts for your distro for more information...
|
||||||
|
Look for the setup*.sh files [here](https://github.com/kata-containers/tests/tree/main/.ci)
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -17,9 +25,6 @@ Overview:
|
|||||||
|
|
||||||
Build a kernel for Kata Containers
|
Build a kernel for Kata Containers
|
||||||
|
|
||||||
Description: This script is the *ONLY* to build a kernel for development.
|
|
||||||
|
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
build-kernel.sh [options] <command> <argument>
|
build-kernel.sh [options] <command> <argument>
|
||||||
@ -49,14 +54,16 @@ Options:
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
```
|
```
|
||||||
$ ./build-kernel.sh -v 4.19.86 -g nvidia -f -d setup
|
$ ./build-kernel.sh -v 5.10.25 -g nvidia -f -d setup
|
||||||
```
|
```
|
||||||
> **Note**
|
> **Note**
|
||||||
> - `-v 4.19.86`: Specify the guest kernel version.
|
> - `-v 5.10.25`: Specify the guest kernel version.
|
||||||
> - `-g nvidia`: To build a guest kernel supporting Nvidia GPU.
|
> - `-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.
|
> - `-f`: The `.config` file is forced to be generated even if the kernel directory already exists.
|
||||||
> - `-d`: Enable bash debug mode.
|
> - `-d`: Enable bash debug mode.
|
||||||
|
|
||||||
|
> **Hint**: When in doubt look at [versions.yaml](../../../versions.yaml) to see what kernel version CI is using.
|
||||||
|
|
||||||
|
|
||||||
## Setup kernel source code
|
## Setup kernel source code
|
||||||
|
|
||||||
@ -90,7 +97,7 @@ on this path, the following command will install it to the default Kata
|
|||||||
containers path (`/usr/share/kata-containers/`).
|
containers path (`/usr/share/kata-containers/`).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ./build-kernel.sh install
|
$ sudo ./build-kernel.sh install
|
||||||
```
|
```
|
||||||
|
|
||||||
## Submit Kernel Changes
|
## Submit Kernel Changes
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
description="
|
|
||||||
Description: This script is the *ONLY* to build a kernel for development.
|
|
||||||
"
|
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
@ -71,7 +67,6 @@ usage() {
|
|||||||
Overview:
|
Overview:
|
||||||
|
|
||||||
Build a kernel for Kata Containers
|
Build a kernel for Kata Containers
|
||||||
${description}
|
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user