Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>I am struggling with the best solution for system startup,</p> </blockquote> <p>You have not provided any criteria for deciding what is "best".</p> <blockquote> <p>... a simple, and robust way to take care of startup, shutdown and integrity monitoring of the embedded device?</p> </blockquote> <p>If "simple" and "best" are your criteria, then what you are looking for is already integral to the Linux OS. It uses the concept of runlevels. On start up, a runlevel is established, and a set of processes can be started. Any change to another runlevel will stop a set of processes and start a set of processes. On shutdown, which is another runlevel, all processes are terminated. </p> <p>I don't know what you mean by "integrity monitoring". If a system process terminates, then it can be "respawned" if it is so designated. The <em>proc</em> pseudo-filesystem can be used to monitor active processes. You will probably have design &amp; implement your own concept of integrity monitoring.</p> <p>BusyBox has simplified the standard (aka SysV) <em>init</em> process, presumably on the assumption that embedded processes run once or always after startup. Either <em>cron</em> or a custom daemon would have to provide process startup on events. But you argue that: </p> <blockquote> <p>It does not have a concept of run levels.<br> So we are not able to use the same startup mechanisms as a full-featured OS.</p> </blockquote> <p>Not quite. BusyBox declares:</p> <blockquote> <p>BusyBox init doesn't support multiple runlevels. The runlevels field of the /etc/inittab file is completely ignored by BusyBox init.</p> </blockquote> <p>Note the the word "multiple". BusyBox's <em>init</em> will perform process control for the runlevels equivalent to startup, shutdown and reboot. Interestingly, BusyBox even has a <code>runlevel</code> command! If you want <em>more</em> "runlevels" than BusyBox offers, then </p> <blockquote> <p>If you want runlevels, use sysvinit. </p> </blockquote> <p>SysV <em>init</em> source code is available from <a href="http://packages.qa.debian.org/s/sysvinit.html" rel="nofollow">here</a>. BusyBox is fully configurable, and its version of <em>init</em> can easily be replaced.</p> <p>A mini version of SysV <em>init</em> is released under the GPL by Axis Communications for their Etrax SoC. The Axis <code>/etc/inittab</code> is:`</p> <pre><code># The runlevels used by axis are: # 0 - Halt # 1 - Single user mode # 2 - Multiuser without network # 3 - Full multiuser mode # 4 - Upgrade # 5 - unused # 6 - Reboot id:3:initdefault: sh:1235:respawn:/bin/cttyhack /bin/sh tnet:35:once:/usr/sbin/telnetd # System initialization. si::sysinit:/etc/init.d/rc sysinit # The initscripts. l0:0:wait:/etc/init.d/rc 0 l1:1:wait:/etc/init.d/rc 1 l2:2:wait:/etc/init.d/rc 2 l3:3:wait:/etc/init.d/rc 3 l4:4:wait:/etc/init.d/rc 4 l5:5:wait:/etc/init.d/rc 5 l6:6:wait:/etc/init.d/rc 6 # Add your own stuff below </code></pre> <p>The current source is in <code>devboard-R2_20-distfiles.tar.gz</code>, which includes version 1.3.6 of <code>init.c</code> and initscript packages, and requires registration at the <a href="http://www.axis.com/products/dev_sdk/download.htm" rel="nofollow">Axis site</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload