This guide walks through the complete process of onboarding a new hardware target into the URM Extensions framework.
Adding a new target requires:
The target name is read from /sys/devices/soc0/machine and lowercased.
cat /sys/devices/soc0/machine | tr upper lower
# Example output: qcs9200
This string is used as:
The Resources needed for this target can be added to userspace-resource-manager-extensions-public/Configs/ResourcesConfig.yaml.
Suppose the target name is: qcs9200, a new Resource could look like:
ResourceConfigs:
- ResType: "0x9C"
ResID: "0x0b0f"
Name: "RES_MY_CUSTOM_RESOURCE"
Path: "/sys/my/sysfs/path"
Supported: true
LowThreshold: 0
HighThreshold: 100
Permissions: "third_party"
Modes: ["display_on", "doze"]
Policy: "pass_through"
ApplyType: "global"
TargetsEnabled: ["qcs9200"] # Enabled only on this target
Signal Configurations which need to be supported for this target should be provided through a SignalsConfig.yaml file for that target:
mkdir -p Configs/target-specific/qcs9200
touch SignalsConfig.yaml
Edit the new file to add all the Configurations required.
URM already provides a common post-boot script in: userspace-resource-manager-extensions-public/initscripts/post_boot/post_boot_common.sh
If additional configurations are required on top of the common script, then target-specific postboot scripts can be created. The script must have the following name:
post_boot_{target_name}.sh For example: post_boot_qcs9200.sh
Store the script in initscripts/post_boot/, and perform the necessary configurations.