Skip to content

Commit

Permalink
packaging/kernel: Update kernel build doc
Browse files Browse the repository at this point in the history
Clarify dependencies, correct typos, and fill in some gaps.

Fixes: #2422

Signed-off-by: Dan Middleton <dan.middleton@intel.com>
  • Loading branch information
dcmiddle committed Aug 12, 2021
1 parent 99e9a6a commit b980c62
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
19 changes: 13 additions & 6 deletions tools/packaging/kernel/README.md
Expand Up @@ -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

Expand All @@ -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>
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions tools/packaging/kernel/build-kernel.sh
Expand Up @@ -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
Expand Down Expand Up @@ -71,7 +67,6 @@ usage() {
Overview:
Build a kernel for Kata Containers
${description}
Usage:
Expand Down

0 comments on commit b980c62

Please sign in to comment.