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

# Build Shikra firmware and OS images for SD card

Use this workflow to build Shikra (`shikra-evk`) images with the SD-card
partition layout. The generated flash artifacts include the firmware, boot,
ESP, and rootfs images needed for SD-card media.

<Note>
  This workflow is different from booting only the Linux operating system from
  an SD card as fallback media. For fallback HLOS boot using `efi.bin` and
  `rootfs.img`, see [Boot Linux operating system from the SD card](./boot-linux-operating-system-from-the-sd-card).
</Note>

## **Prerequisites**

* Set up the Yocto build host and install `kas`. For more information, see
  [Build Qualcomm Linux using Yocto](./build-qualcomm-linux).
* Select the `meta-qcom` release tag that you want to build.

## **Procedure**

1. Clone the selected `meta-qcom` release:

   ```bash theme={null}
   git clone https://github.com/qualcomm-linux/meta-qcom -b <meta-qcom-release-tag>
   ```

2. If the selected `meta-qcom` release tag does not already include the Shikra
   SD-card partition configuration from `qcom-ptool`, update
   `meta-qcom/recipes-bsp/partition/qcom-ptool.inc` to use a `qcom-ptool`
   revision that contains it:

   ```bitbake theme={null}
   HOMEPAGE = "https://github.com/qualcomm-linux/qcom-ptool"
   LICENSE = "BSD-3-Clause"
   LIC_FILES_CHKSUM = "file://LICENSE;md5=b0a8acd90d872086b279ead88af03369"

   SRC_URI = "git://github.com/ArunSahu418/qcom-ptool.git;branch=add-shikra-sdcard-partitions;protocol=https"
   SRCREV = "46b8264a74d4ad307f00ef7a62117c461f918f8b"
   ```

3. In `meta-qcom/conf/machine/shikra-evk.conf`, change the partition files
   subdirectory from the eMMC layout to the SD-card layout.

   Replace:

   ```bitbake theme={null}
   QCOM_PARTITION_FILES_SUBDIR ?= "partitions/shikra-evk/emmc"
   ```

   With:

   ```bitbake theme={null}
   QCOM_PARTITION_FILES_SUBDIR ?= "partitions/shikra-evk/sdcard"
   ```

4. Build the Shikra image:

   ```bash theme={null}
   kas build meta-qcom/ci/shikra-evk.yml:meta-qcom/ci/qcom-distro.yml:meta-qcom/ci/performance.yml
   ```

## **Result**

The build generates Shikra flash artifacts using the SD-card partition layout.
Use those generated artifacts when preparing SD-card media for Shikra.

## **Related topics**

* [Build Qualcomm Linux using Yocto](./build-qualcomm-linux)
* [Manage partitions in Qualcomm Linux](./manage-partitions-in-qualcomm-linux)
* [Configure the storage type for Yocto BSP build](./how-to-configure-storage-type)
