> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Prerequisites & host setup

Set up your host computer before building or modifying the Qualcomm<sup>®</sup> Linux kernel.
The requirements below apply to both the Yocto-based and standalone build workflows.

## Host computer requirements

**Table: Minimum host requirements**

| Requirement      | Value                                                        |
| ---------------- | ------------------------------------------------------------ |
| Architecture     | x86\_64                                                      |
| CPU              | Quad-core (Intel i7-2600 at 3.4 GHz or equivalent)           |
| RAM              | 16 GB                                                        |
| Free disk space  | 300 GB (swap partition > 32 GB recommended for Yocto builds) |
| Operating system | Ubuntu 22.04 LTS                                             |

<Note>
  Building on a virtual machine is supported but significantly slower. For VM
  setup instructions, see the [Qualcomm Linux Virtual Machine Setup Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-80021-41/).
</Note>

## Required tools

**Table: Required tool versions**

| Tool     | Minimum version |
| -------- | --------------- |
| Git      | 1.8.3.1         |
| Python   | 3.10.2          |
| GCC      | 10.1            |
| GNU Make | 4.0             |
| Kas      | 4.8             |

### Install host packages

Run the following commands to install the required packages and the `kas` build tool:

```bash theme={null}
sudo apt update
sudo apt install build-essential chrpath cpio debianutils diffstat \
    file gawk gcc git iputils-ping libacl1 locales python3 \
    python3-git python3-jinja2 python3-pexpect python3-pip \
    python3-subunit socat texinfo unzip wget xz-utils zstd

sudo apt install pipx
pipx ensurepath
```

Restart your shell (or run `source ~/.bashrc`) so that the `pipx` binary is on
your PATH, then install `kas`:

```bash theme={null}
# kas 4.8 or later is required
pipx install kas
```

Optionally, download the `kas-container` script to run builds inside a Docker
container on any Linux distribution:

```bash theme={null}
wget -qO kas-container \
    https://raw.githubusercontent.com/siemens/kas/refs/tags/5.1/kas-container
chmod +x kas-container
```

### Configure locales

```bash theme={null}
sudo locale-gen en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
```

### Configure git

```bash theme={null}
git config --global user.email <your-email>
git config --global user.name "Your Name"

# Recommended settings to handle large repositories
git config --global http.postBuffer 1048576000
git config --global http.maxRequestBuffer 1048576000
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
```

## Standalone kernel development prerequisites

The standalone build workflow uses the `kmake-image` Docker container to provide
the cross-compilation toolchain, `systemd ukify`, and image-packaging scripts.
Docker must be installed on the host before running a standalone build.

### Install Docker CE

```bash theme={null}
sudo apt update
sudo apt install ca-certificates curl gnupg

sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
    | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
    | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
```

### Add your user to the docker group

```bash theme={null}
sudo usermod -aG docker $USER
newgrp docker
```

### Verify the installation

```bash theme={null}
docker run --rm hello-world
```

<Note>
  The `kmake-image` container build and shell alias setup are covered in
  [Build the kernel without Yocto](./build-kernel-standalone).
</Note>

## Repository access

The Qualcomm Linux kernel and `meta-qcom` layer are publicly hosted on GitHub and
require no special credentials:

* Kernel source: [https://github.com/qualcomm-linux/kernel](https://github.com/qualcomm-linux/kernel)
* meta-qcom layer: [https://github.com/qualcomm-linux/meta-qcom](https://github.com/qualcomm-linux/meta-qcom)
