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.
Here are the SLM configuration files provided with the reference image, which
are located in the
/etc directory:
-
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 that makes use
of the OV5640 camera to run the ADAS example application using the finger counting algorithm.
-
slm-config-platform-single_cam.xml — A configuration that makes use of a single
OV10635 camera to run the Camera MUX application.
-
slm-config-platform-traffic-sensors.xml — A configuration that makes use of file
data (captured data) from a camera, a lidar, a radar, a GPS, and an IMU. It runs the ADAS example application
using the traffic light detection algorithm.
Change the configuration
To change the configuration, you can copy predefined
changes from the SLM configuration files or modify
both the SLM and sensor configuration files.
You can do one of the following series of steps:
-
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.conf
based on the
/etc/system/config/single_ov5640.conf file.
- Create a copy of the
slm-config-platform-default.xml file and
call it slm-config-platform-two-cameras.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/single_ov5640.conf -b external</SLM:args>
<SLM:depend>resarb</SLM:depend>
<SLM:waitfor wait="pathname">/dev/sensor</SLM:waitfor>
</SLM:component>
-
Copy your custom SLM configuration to replace the slm-config-platform.xml
and type shutdown:
# cp /etc/slm-config-platform-two-cameras.xml /etc/slm-config-platform.xml
# shutdown