GUF-Yocto-jethro-9.0-r7707-0
i.MX6
User Manual
Notes:
If
sconfig
replies with its usage-information you still have an OS installed, which doesn’t support en-
abling/disabling individual
autojob
functions. Please update your OS in this case.
If querying an
autojob
function returns no reply, at all, your XML-configuration probably doesn’t contain
explicit settings for the
autojob
functions, yet. Please install one of the provided XML-configuration files as
shown above.
The possible values of
all
and
off
have been chosen on purpose to allow future extension to enable/disable
the functions for different storage media individually. When this extension will be implemented and how
exactly the syntax for this will look like is still to be defined.
4.1.10 Autostart
The autostart service on Garz & Fricke Linux platforms uses nearly the same mechanism as
autocopy
described
in chapter
[
I
except for the autostart specific part in
/etc/udev/scripts/mount.sh
.
The
autostart
simply searches for an
autostart
folder in the root directory of the storage media. If found, the
executable files are executed in alphabetic order. Filenames starting with digits are executed before those starting
with letters in numeric order. Files in subfolders of the
autostart
are ignored.
The execution of the autostart files is shown in the Linux console during start up:
mount.sh/automount Auto-mount of [/media/sda1] successful
mount.sh/automount Found an autostart folder. Executing files...
mount.sh/automount Executing /media/sda1/autostart/test.sh...
Finished executing autostart files
As already stated in
[
I
autocopy
is executed before
autostart
.
The user may desire to autostart an application from a storage media with command line args. In this case a
start script can be placed in the autostart folder that starts the aplication itself in a subfolder of autostart with the
desired command line args. It is important to place the application itself in a subfolder. Otherwise the
autostart
mechanism will try to start this application without the command line args in parallel to the start script.
Example:
The user created a Qt application (e.g.
myapp
) to run on X Server. This makes it necessary to
set the environment variable
DISPLAY=:0.0
before calling
myapp
. The application is placed e.g. in the folder
/autostart/custom
on the storage media. Consequently, the start script (e.g.
myapp.sh
) must have the following
contents:
#!/bin/sh
export DISPLAY=:0.0
./custom/myapp
The start script must be placed in the folder
/autostart
on the storage media. The layout of the storage medium
is shown in figure
[
I
Figure 5]
.
Figure 5: Layout of the storage medium after preperation with the custom files
After plugging the storage media into the target system. The start script and the apllication should start properly.
Enabling/Disabling:
Starting with OS Release 33 and newer the
autostart
function may be enabled/disabled
via XML-configuration and the
sconfig
tool.
For backward compatibility the
autostart
function is still enabled by default if the XML-configuration contains no
explicit setting for this function. To be able to configure each of the
autojob
functions individually, you may have
to install an XML-configuration file specifying explicit state-settings for the
autojob
functions. At least two such
configuration files are available from Garz & Fricke:
22