Company Products/Technology Services News/Events Support Spacer Contact Partners Customers
English    日本語
Products Photo

Product Documentation
Devicescape Wireless Infrastructure Platform

Documentation Home for Devicescape Wireless Infrastructure Platform > Developer Guide

Developer GuidePreviousNextIndex

 


Runtime Initialization Sequence

Directory Structure

From the perspective of system initialization there are a number of key directories:

Directory
Description
/etc/init.d
Location of all the initialization scripts
/etc/default
Data files defining the configuration values for various subsystems
/usr/lib/dman/plugins
Plugin services

System Initialization Sequence

The following sequence looks at the common parts of the initialization sequence. There are some package-specific initialization steps that happen interleaved with this sequence (see Specific Package Initialization).

1. /sbin/init
2. Execution of /etc/init.d/rc
3. Mounting Filesystems
4. Inserting Kernel Modules
5. Starting the Device Management Agent
6. Stopping Other Services and Transferring Control to the Device Management Agent

At this point, the Device Management Agent takes control of the system initialization process, loading plugins and starting services as appropriate.

1. /sbin/init

The init program (part of busybox) will process the /etc/inittab file. By default, this file contains just two lines:

console::wait:/etc/cp_factory
console::wait:/etc/init.d/rc

The first is a script that is intended to provide a placeholder for a script that would initialize the system from factory defaults if necessary. This does nothing in today's release.

The second script, /etc/init.d/rc, is the core of the system initialization sequence.

2. Execution of /etc/init.d/rc

This is the beginning of a stripped down version of the regular Unix™ System V initialization sequence. It will execute, in order, the scripts that it finds under /etc/rc.d (in fact symbolic links to scripts in /etc/init.d, but with a prefix that defines the order of execution using lexical sequence).

When adding a new feature to the system, its initialization script should be added to the /etc/init.d directory and a symbolic link created from the /etc/rc.d directory to this script. The symbolic link name should be prefixed with 'Snn' where 'nn' is a two digit number (zero padded if less than 10) that defines when the script will run relative to the other scripts.

3. Mounting Filesystems

S20mountall mounts all the file systems defined in the /etc/fstab file. This is a board-dependent file that is added as part of the ds-config-* package for the board.

4. Inserting Kernel Modules

The kernel modules are inserted and kernel services started as appropriate. Kernel services loaded include ieee80211, drivers (such as atheros-drv), radio services (such as rate_control_ath).

5. Starting the Device Management Agent

S33dman starts the Device Management Agent (device-mgmt-agent), which then takes control of starting all other system services and managing the subsystems for which there are Device Management Agent plugins after they are initialized. (For more information on the Device Management Agent, see The Device Management Agent.

You can view a full list of Device Management Agent plugins on a system console by using the listing directory /usr/lib/dman/plugins.

For example on a Devicescape Reference AP, the Device Management Agent would load (and in some cases initialize) a set of services and subsystems including the IEEE 802.11 subsystem, the configuration subsystem, the Web UI and CLI subsystems, Clustering services, the Bridge and Network interfaces, and so on. For a detailed list of these services and subsystems, please refer to List of Device Management Agent Plugins in the The Device Management Agent topic in this guide.

6. Stopping Other Services and Transferring Control to the Device Management Agent

S33dman is followed by S34stop. After this special service named "stop", nothing else runs. Everything else is handled by the Device Management Agent via its plugins.

Specific Package Initialization

This section describes the package-specific initialization scripts that are added to the boot sequence when the package is installed (either during RFS creation on the host, or dynamically).

  1. Wireless driver modules
    Keyword
    Description
    S30broadcom-drv
    Broadcom 4306/4309/4712 wireless driver
    S30ieee80211
    Devicescape IEEE 802.11 datapath driver
    S31atheros-drv
    Devicescape Atheros chip driver
  2. Ethernet driver modules (board specific)
    Keyword
    Description
    S30bcm947xx-eth
    Broadcom 4712 SoC ethernet driver
  3. Wireless applications (hostapd)
    Keyword
    Description
    S35hostapd
    Access point management daemon
  4. Other applications:
    Keyword
    Description
    S50dropbear
    Dropbear SSH server daemon
    S50httpd
    Web server
    S50telnet
    Telnet daemon
Developer GuidePreviousNextIndex