Configure cameras and sensors on the reference image
The reference image is configured to boot the Camera MUX example application. If you change your hardware configuration because you want to run another application, you often must change the sensor configuration file and the order in which SLM starts different services.
To simplify the changes, the reference image provides multiple SLM configuration files that specify different service startup orders based on different hardware and that use predefined sensor configuration files, which are used by the Sensor service.
You may need to modify the sensor configuration file based on
what you want to use with your image. This file is located
at /etc/system/config/ on the reference image.
For information about the Sensor service and sensor configuration files, see the
Sensor
chapter in the Sensor Framework Services guide.
- slm-config-all.xml — A configuration that starts various services, such as io-pkt (TCP/IP), drivers, essential services (such as ssh), and graphics (Screen).
- slm-config-platform.xml — By default, this file is a copy of the slm-config-platform-default.xml file. You can overwrite this file with the configuration you want, which is referenced by the slm-config-all.xml file.
- slm-config-platform-default.xml — The default configuration.
- slm-config-platform-finger-count.xml — Configuration file that runs the Sensor service with /etc/system/config/cogent_surround_cameras.conf (in a manner similar to slm-config-platform-default.xml), then runs the ADAS example application (adas_example) with /etc/system/config/adas_finger_count.conf to display one of the cameras and dynamically analyze a region of interest (represented by a drawn bounding box) for detecting hands, segmenting, and counting fingers.
Change the configuration
- Determine the SLM configuration from the previous list that matches your configuration and copy that configuration over the slm-config-platform.xml file.
If your setup requires you to change an existing SLM configuration file, we recommend that you:
- If you haven't already, run mount -uw /base to allow you to write to the filesystem.
- Create a copy of the SLM configuration that points to a sensor configuration file and that's close to what you want.
- Create a custom sensor configuration file under /etc/system/config.
- Configure your version of the SLM configuration file to point to your custom file.
For example, if you want to connect two cameras, you must:
- Create a new sensor configuration file called /etc/system/config/two_cameras_surround.conf based on the /etc/system/config/cogent_surround_cameras.conf file.
- Create a copy of the slm-config-platform-default.xml file and call it slm-config-platform-two-surround-view.xml.
- In the new SLM configuration file, modify the following block to
point to your sensor configuration file as follows:
<SLM:component name="sensor"> <SLM:command>/base/bin/sensor</SLM:command> <SLM:args>-U 521:521,1001 -r /accounts/1000/shared/sensor -c /base/etc/system/config//etc/system/config/two_cameras_surround.conf</SLM:args> <SLM:waitfor wait="pathname">/dev/sensor/camera</SLM:waitfor> <SLM:depend>i2c-ready</SLM:depend> <SLM:depend>resarb</SLM:depend> <SLM:stop stop="signal">SIGTERM</SLM:stop> </SLM:component> - Copy your custom SLM configuration to replace the slm-config-platform.xml file
and type shutdown:
# cp /etc/slm-config-platform-two-surround-view.xml /etc/slm-config-platform.xml # shutdown
