GUF-Yocto-34.0-r5756-0
VINCELL
User Manual
/etc/rcS.d/S24sharedconf -> /etc/init.d/sharedconf
4.1.8 Autocopy
This service is executed after the OS has booted and when a storage medium has been inserted. It is triggered
together with the the
Autostart
service (see chapter
[
I
) via UDEV.
Autocopy
always runs before
Autostart
.
The
Autocopy
service provides a comfortable installation and/or update functionality as well as copy mechanism
for specific files that are not included in the OS (e.g. for runtime libraries).
Subfolders and files within a folder named
autocopy
on a USB stick, SD card or in the NAND flash will be copied
to the root of the device resp. its equivalent targets. Non-existing folders will be created automatically.
The autocopy mechanism includes the following components:
/etc/udev/rules.d/automount.rules
:
UDEV rule that triggers the mount.sh script
when a storage media is plugged/unplugged
/etc/udev/scripts/mount.sh
:
Script that implements the autocopy and automount
functionality.
Example:
The user has created and application
myapp
that should be installed to
/usr/bin/myapp
on the target
and a library
mylib.so
used by this application that should be installed to
/usr/lib/mylib.so
. The layout of the
storage medium is shown in figure
[
I
Figure 4.1.8]
.
Figure 3: Layout of the storage medium after preperation with the custom files
After the target device is up and the storage media is plugged, the following message on the target’s console is
shown:
mount.sh/automount Auto-mount of [/media/sda1] successful
mount.sh/automount Found an autocopy folder. Copying files...done
[
I
Figure 4]
illustrates what happens in background. The files are properly transferred to the target.
17