# Build the Debian image with prebuilt firmware The prebuilt firmware path builds the Debian operating system layer while firmware ships as binaries. It suits unregistered users and quick bring-up. Complete all of the following steps in order. 1. Clone the repository. 2. Build the `debos` container. 3. Build the kernel. 4. Build the root file system. 5. Build the flash images. ## Prerequisites See [Host requirements](https://docs.qualcomm.com/doc/SP80-A0399-4/topic/host-requirements.html#host-requirements). ## Clone the repository The repository holds the `debos` recipes and build scripts for the Debian layer. > > > git clone https://github.com/qualcomm-linux/qcom-deb-images.git > cd qcom-deb-images > Copy to clipboard 1. Clone the image repository. 2. Change into the cloned image repository. ## Build the debos container image Build the debos container image that runs the image assembly in an isolated environment. The Dockerfile installs debos and its supporting tools. > > > cat > Dockerfile <<'EOF' > FROM ghcr.io/go-debos/debos:latest > RUN apt-get update && \ > apt-get install -y --no-install-recommends \ > debian-archive-keyring \ > debos \ > file \ > make \ > mmdebstrap \ > mtools \ > python3-pexpect \ > python3-pytest \ > python3-defusedxml \ > qemu-efi-aarch64 \ > qemu-system-arm \ > xmlstarlet \ > device-tree-compiler \ > u-boot-tools \ > && rm -rf /var/lib/apt/lists/* > EOF > Copy to clipboard > > > sudo docker build -t qcom-deb-images-debos . > Copy to clipboard ## Build the kernel Debian package Build the kernel as a Debian package using one of the two source options, and then copy the resulting `.deb` files into the local package directory. > > > - Option A builds from the qcom-next branch, where `prune.config` and `qcom.config` come from the kernel tree. > - Option B builds from a local kernel source that you clone and check out to the release tag. 1. Option A - qcom-next branch. > > > scripts/build-linux-deb.py --qcom-next prune.config qcom.config kernel-configs/*.config > Copy to clipboard 2. Option B - local kernel source. > > > git clone https://github.com/qualcomm-linux/kernel.git -b linux > scripts/build-linux-deb.py --local-dir linux prune.config qcom.config kernel-configs/*.config > Copy to clipboard 3. Copy the kernel `.deb` files to the local package directory. > > > ls *.deb | grep -v dbg | xargs cp -t debos-recipes/local-debs/ > Copy to clipboard ## Build the root file system 1. Build the root file system archive with debos, using the local kernel packages you staged in the kernel build step. 2. The build options control the kernel source, desktop environment, overlay repository, and build identifier. > > > make rootfs.tar \ > CONTAINER_IMAGE=qcom-deb-images-debos \ > EXTRA_DEBOS_OPTS="-t localdebs:local-debs \ > -t kernelpackage:none \ > -t xfcedesktop:true \ > -t buildid:local-$(date +%Y%m%d)" > Copy to clipboard 3. The build options set the following behavior: - `localdebs:local-debs`: Installs kernel packages from the local directory staged in the kernel build step. - `kernelpackage:none`: Skips installing a kernel from advanced package tool (APT), because the local packages are used instead. - `xfcedesktop:true`: Installs the Xfce desktop environment. - `overlays:qsc-deb-releases`: Enables the Qualcomm overlay APT repository. - `buildid:local-`: Embeds a build identifier in the image. ## Build the flash images 1. Build the SD card disk image and the flashable images. If you hit permission errors, prepend sudo to the commands. 2. Build the SD card disk image: > > > make disk-sdcard.img \ > CONTAINER_IMAGE=qcom-deb-images-debos > Copy to clipboard 3. Build the flashable images: > > > make flash \ > CONTAINER_IMAGE=qcom-deb-images-debos > Copy to clipboard > > > On success, the build creates the following directories: > > > > > > > > > - `/qcom-deb-images/flash_glymur-crd_nvme/spinor/` - boot chain images. > > - `/qcom-deb-images/flash_glymur-crd_nvme/` - Linux root file system image. > > - To flash the images, see [Flash the software images](https://docs.qualcomm.com/doc/SP80-A0399-4/topic/flash-the-software-images.html#flash-the-software-images). Last Published: Sep 29, 2026 [Previous Topic Host requirements](https://docs.qualcomm.com/bundle/publicresource/SP80-A0399-4/topics/host-requirements.md) [Next Topic Build the Debian image with full firmware](https://docs.qualcomm.com/bundle/publicresource/SP80-A0399-4/topics/build-the-debian-image-with-full-firmware.md)