Skip to main content

Environment Setup

This guide covers setting up the development environment for Kernel and Radxa OS.

Prerequisites

  • Hardware: x86_64 PC
  • Software:
    • Visual Studio Code + Dev Container extension
    • Docker
  • Recommended OS: Ubuntu 22.04

Environment Setup

To quickly set up a compilation and development environment for Kernel and Radxa OS, we need to install Visual Studio Code, the Dev Container extension, and Docker on your PC.

Enable binfmt

Enables running cross-architecture binaries.

Linux@host$
sudo apt-get update
sudo apt-get install git qemu-user-static binfmt-support

Docker

You can choose to install either Docker Engine or Docker Desktop based on your needs.

  • Docker Engine: Core background service with no GUI, primarily operated via command line.
  • Docker Desktop: Desktop application that includes Docker Engine and provides a graphical management interface for easier use.
Official References

This section explains how to install Docker Engine on Linux.

Download Official Script

Use the curl command to download the official Docker installation script.

Linux@host$
sudo apt update
sudo apt install curl -y
sudo curl -fsSL https://get.docker.com -o get-docker.sh

Install Docker Engine

Run the installation script with sudo for root privileges.

Linux@host$
sudo sh get-docker.sh

Verify Installation

Check if Docker Engine is installed successfully using the docker --version command.

Linux@host$
docker --version

If the terminal displays the Docker version information, the installation was successful!

Add User to Docker Group

Linux@host$
sudo usermod -aG docker $USER

Restart your system for the Docker configuration to take effect.

Visual Studio Code

Download Visual Studio Code

Visit the Visual Studio Code download page and select the appropriate installation package for your system. For Ubuntu, choose the .deb package.

Install Visual Studio Code

Navigate to the directory containing the Visual Studio Code installation package and run the following command to install it.

Linux@host$
sudo apt-get install ./code_xxx_amd64.deb

Using Visual Studio Code

Open Visual Studio Code and install the Dev Container extension.

  1. Click on the Extensions option
  2. Search for Dev Containers
  3. Select the Dev Containers extension
  4. Click Install to install the Dev Containers extension

How to confirm the environment is ready

After completing the steps above, you can quickly verify the environment with the checklist below:

  • docker --version prints the Docker version successfully.
  • After re-login or reboot, a normal user can run docker ps without sudo.
  • Visual Studio Code has the Dev Containers extension installed.
  • When you later open a source tree that contains a .devcontainer configuration, Visual Studio Code can detect it and offer Reopen in Container.

If all of the above are true, the host is ready for subsequent Kernel and Radxa OS build work.

First download and disk space notes

  • The first time you use Dev Container, Visual Studio Code will automatically pull the container image and install dependencies.
  • This usually downloads several GB of data and also consumes several GB of disk space.
  • The exact image size and download time vary with the base image, dependency versions, and your network environment. Under a normal network, the first initialization can still take a while, so reserve enough time and disk space in advance.

Common network issues

If Docker installation, VS Code download, or the first Dev Container startup is very slow, times out, or fails to download, check the following in order:

  1. Confirm that the host network is working and can access https://get.docker.com and https://code.visualstudio.com/.
  2. If your network restricts Docker Hub or related download endpoints, configure a working proxy or registry mirror according to your environment.
  3. If Docker is already installed but image pulling fails, run docker pull hello-world first to verify the basic Docker download path.
  4. If you are on a company network, campus network, or another restricted network, switch to a more stable network before retrying the initial setup to avoid interruption during the first Dev Container pull.

If it still fails, record the exact error message first, then continue troubleshooting Docker networking, proxy, or DNS configuration.

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0