GUF-Yocto-jethro-9.0-r7707-0
i.MX6
User Manual
. /etc/profile
case "$\$$1" in
start)
# Add here command that should execute during system startup.
;;
stop)
# Add here command that should execute during system shutdown.
;;
*)
echo "Usage: ... " >&2
exit 1
;;
esac
To create the startup links, put the above script into
/etc/init.d/myapp
execute:
root@gufboardll:~# update-rc.d myapp defaults 95 05
Adding system startup for /etc/init.d/myapp.
Here
95
is the startup level (late) and
05
is the stop level (early). If those numbers are omitted the level are
determined by the dependencies given in the header of the init script.
Make sure the executable bit is set with:
root@gufboardll:~# chmod +x /etc/init.d/myapp
It is also possible to create the individual links with:
root@gufboardll:~# ln -s
/etc/init.d/myapp /etc/rc5.d/S95myapp
A service is disabled using:
root@gufboardll:~# update-rc.d -f myapp remove
update-rc.d: /etc/init.d/myapp exists during rc.d purge (continuing)
Removing any system startup links for myapp ...
/etc/rc0.d/K20myapp
/etc/rc1.d/K20myapp
/etc/rc2.d/S20myapp
/etc/rc3.d/S20myapp
/etc/rc4.d/S20myapp
/etc/rc5.d/S20myapp
/etc/rc6.d/K20myapp
In chapter
[
I
7.5 Autostart mechanism for user applications]
this mechanism will be used for automatic application
start up.
4.1.1 Udev
The
udev
service dynamically creates the device nodes in the
/dev
directory on system start up, as they are
reported by the Linux kernel.
Furthermore, udev is user-configurable to react on asynchronous events from device drivers reported by the Linux
kernel like hotplugging. The according rules are located in the root file system at
/lib/udev/rules.d
.
Additionally, udev is in charge of loading firware if a device driver requests it. Drivers that use the firmware
subsystem have to place their firmware in the folder
/lib/firmware
.
The udev service has a startup link that points to the corresponding start script:
/etc/rcS.d/S04udev -> /etc/init.d/udev
15