Skip to content

Commit

Permalink
doc: fix obsolete guide for building guest kernels and rootfs
Browse files Browse the repository at this point in the history
Documentation for building guest kernels was pointing to a devtool
command that does not exist any more. Fix that by pointing to the newly
added `./tools/devtool build_ci_artifacts` command. Also, fix rootfs
instructions to use this command rather than directly calling
`resources/rebuild.sh` which assumes an Ubuntu host.

Signed-off-by: Babis Chalios <bchalios@amazon.es>
  • Loading branch information
bchalios committed Oct 17, 2024
1 parent 6b1b729 commit d84d76c
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions docs/rootfs-and-kernel-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,28 @@ For a list of currently supported kernel versions, check out the
### Use the provided recipe

The kernel images used in our CI to test Firecracker's features are obtained by
using the recipe inside devtool:
running the script `resources/rebuild.sh`.

Users can build those locally by running:

```bash
config="resources/guest_configs/microvm-kernel-x86_64-4.14.config"
./tools/devtool build_kernel -c $config -n 8
./tools/devtool build_ci_artifacts kernels
```

or
This will build all versions that we currently use in our CI. `kernels`
subcommand allows passing a specific kernel version to build. For example:

```bash
config="resources/guest_configs/microvm-kernel-arm64-4.14.config"
./tools/devtool build_kernel -c $config -n 8
./tools/devtool build_ci_artifacts kernels 6.1
```

on an aarch64 machine.
will build only the 6.1 kernel.

Currently supported kernel versions are: `5.10`, `5.10-no-acpi` (same as 5.10
but without ACPI support) and `6.1`.

After the command finishes, the kernels along with the corresponding KConfig
used will be stored under `resources/$(uname -m)`.

## Creating a rootfs Image

Expand Down Expand Up @@ -170,11 +177,11 @@ The disk images used in our CI to test Firecracker's features are obtained by
using the recipe (in a Ubuntu 22.04 host):

```bash
./resources/rebuild.sh
./tools/devtool build_ci_artifacts rootfs
```

The images resulting using this method are minimized Ubuntu 22.04. Feel free to
adjust the script(s) to suit your use case.

You should now have a kernel image (`vmlinux`) and a rootfs image
(`rootfs.ext4`), that you can boot with Firecracker.
You should now have a rootfs image (`ubuntu-22.04.ext4`), that you can boot with
Firecracker.

0 comments on commit d84d76c

Please sign in to comment.