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:
Dan Middleton 2021-08-10 16:57:23 -05:00
parent 99e9a6ad0a
commit b980c62f43
2 changed files with 13 additions and 11 deletions

View File

@ -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
[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
@ -17,9 +25,6 @@ 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>
@ -49,14 +54,16 @@ Options:
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**
> - `-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.
> - `-f`: The `.config` file is forced to be generated even if the kernel directory already exists.
> - `-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
@ -90,7 +97,7 @@ on this path, the following command will install it to the default Kata
containers path (`/usr/share/kata-containers/`).
```bash
$ ./build-kernel.sh install
$ sudo ./build-kernel.sh install
```
## Submit Kernel Changes

View File

@ -4,10 +4,6 @@
#
# SPDX-License-Identifier: Apache-2.0
description="
Description: This script is the *ONLY* to build a kernel for development.
"
set -o errexit
set -o nounset
set -o pipefail
@ -71,7 +67,6 @@ usage() {
Overview:
Build a kernel for Kata Containers
${description}
Usage: