|
| 1 | +📄 **YAML Configuration Usage Guide** |
| 2 | + |
| 3 | +--- |
| 4 | + |
| 5 | +### 🔧 **Purpose** |
| 6 | +The YAML configuration file enables **fastrpc** to set machine-specific configurations at runtime. Each machine entry corresponds to a specific hardware platform. |
| 7 | + |
| 8 | +- fastrpc supports reading YAML configuration files from a particular directory. Users should ensure all configuration files are stored in that same directory. |
| 9 | + - For Linux platforms: `/usr/share/qcom/conf.d/` |
| 10 | +- In case of multiple configuration files defining path for a single machine, the directory is parsed in lexicographical order and the latest one carrying the |
| 11 | + machine path is picked. |
| 12 | +- **Machine Name**: Obtain the machine name for your platform from: |
| 13 | + ``` |
| 14 | + /sys/firmware/devicetree/base/model |
| 15 | + ``` |
| 16 | + (fastrpc uses same path for matching machine names) |
| 17 | +--- |
| 18 | +### 📄 **Current Properties** |
| 19 | +- **DSP_LIBRARY_PATH**: Specifies the path to DSP binaries and resources for the Machine. |
| 20 | +--- |
| 21 | + |
| 22 | +### 📁 **Format Guidelines** |
| 23 | +The configuration uses YAML format with the following structure: |
| 24 | +``` |
| 25 | +machines: |
| 26 | + "Machine Name": |
| 27 | + DSP_LIBRARY_PATH: "/relative/path/to/dsp/binaries/" |
| 28 | +``` |
| 29 | + |
| 30 | +**Key Points:** |
| 31 | +- The root element is `machines:` |
| 32 | +- Each machine name is a quoted string key under `machines:` |
| 33 | +- Properties are indented under each machine name |
| 34 | +- Use proper YAML indentation |
| 35 | +- Paths should be quoted strings |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +### ✅ **Example Configuration** |
| 40 | +``` |
| 41 | +machines: |
| 42 | + "Qualcomm Technologies, Inc. DB820c": |
| 43 | + DSP_LIBRARY_PATH: "/apq8096/Qualcomm/db820c/" |
| 44 | + "Thundercomm Dragonboard 845c": |
| 45 | + DSP_LIBRARY_PATH: "/sdm845/Thundercomm/db845c/" |
| 46 | +``` |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +### ⚠️ **Important Notes** |
| 51 | +- Do **not** modify machine names unless adding a new supported Machine. |
| 52 | +- Ensure `DSP_LIBRARY_PATH` values: |
| 53 | + - Are enclosed in double quotes (`"..."`). |
| 54 | + - Are **relative to `/usr/share/qcom/`**. |
| 55 | +- Follow YAML syntax rules: |
| 56 | + - Use consistent indentation. |
| 57 | + - Ensure proper spacing after colons (`: `). |
| 58 | + - Quote strings containing special characters or spaces. |
| 59 | + - Avoid tabs (use spaces only). |
| 60 | +- Maintain: |
| 61 | + - Proper YAML structure and hierarchy. |
| 62 | + - Consistent formatting across entries. |
| 63 | +- When adding new properties: |
| 64 | + - Document their purpose **here**. |
| 65 | + - Follow the same indentation pattern. |
| 66 | +- Do **not** create duplicate Machine entries. |
| 67 | +- Validate YAML syntax before deployment to avoid parsing errors. |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +### ➕ **Adding New Platforms** |
| 72 | +To add a new Machine, follow the existing YAML format: |
| 73 | +``` |
| 74 | +machines: |
| 75 | + "New Machine Name": |
| 76 | + DSP_LIBRARY_PATH: "/new_machine/path/" |
| 77 | +``` |
| 78 | + |
| 79 | +Ensure the new entry is properly indented under the `machines:` root element and follows YAML syntax conventions. |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +### 📝 **File Naming** |
| 84 | +Configuration files should use the `.yaml` or `.yml` extension and be placed in the designated configuration directory (`/usr/share/qcom/conf.d/` on Linux platforms). |
| 85 | + |
| 86 | +### ✅ Schema Validation |
| 87 | +To ensure the configuration file adheres to the required structure, validate it against the schema provided. |
| 88 | + |
| 89 | +Schema File Location: |
| 90 | +<ROOT>/Docs/schemas/fastrpc-config-schema.yaml |
| 91 | + |
| 92 | +Validation Command: |
| 93 | +Use Yamale for schema validation: |
| 94 | +yamale -s fastrpc-config-schema.yaml <yaml file> |
0 commit comments