> For the complete documentation index, see [llms.txt](https://amobile-solutions.gitbook.io/yocto-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amobile-solutions.gitbook.io/yocto-developer-guide/getting-started/quickstart/build-from-source-code.md).

# Build from Source Code

{% hint style="info" %}
Please contact the Amobile representative to obtain the source code.
{% endhint %}

## Build the rity-demo-image

1. **Extract the Source Code**

   Unzip the source code and rename the directory to `amobile_yocto_kirkstone`.
2. **Navigate to the Project Directory**

   ```bash
   cd amobile_yocto_kirkstone
   ```
3. **Set Environment Variables**

   ```bash
   export PROJ_ROOT=$(pwd)
   export BUILD_DIR=$(pwd)/sd510_build/
   TEMPLATECONF=$PROJ_ROOT/src/meta-amobile-sd510/conf 
   ```
4. **Initialize the Build Environment**

   Source the build environment configuration:

   ```bash
   source src/poky/oe-init-build-env "sd510_build"
   ```
5. **Build the Image**

   Launch the build process:

   ```bash
   bitbake rity-demo-image
   ```

## Build Result and Images

If you encounter an error in the Yocto Project, the failure details are logged in a specific file. You can find this logfile by searching for:

```
ERROR: Logfile of failure stored in: '<path-to-logfile>'
```

For detailed instructions on using the bitbake command, refer to the Yocto Project's Bitbake manual. When troubleshooting, look for specific error patterns in the log.&#x20;

If all tasks succeed, your built image will be available in the location mentioned below

```
$BUILD_DIR/tmp/deploy/images/sd510
```
