Process Control Daemon (PCD) is an open source, light-weight system level process manager/controller for Embedded-Linux based projects (such as consumer electronics and network devices).
intro | usage | scripts | handle exception | dependency graph | header file | system startup | api |
The current PCD package contains a configuration system that is similar to the Kernel configuration system. Unlike the older versions of PCD, the configuration process is now more user friendly and easy. Please follow the following steps in order to configure and build the PCD project for your target platform:
There are few different ways to get the PCD sources to your build machine.
Use the following command to clone the PCD repo to the requested destination:
$> git clone git@github.com:meetrp/pcd.git
Cloning into 'pcd'...
remote: Counting objects: 595, done.
remote: Compressing objects: 100% (260/260), done.
remote: Total 595 (delta 335), reused 575 (delta 324), pack-reused 0
Receiving objects: 100% (595/595), 1.33 MiB | 357.00 KiB/s, done.
Resolving deltas: 100% (335/335), done.
Checking connectivity... done.
Use the following set of commands to download the package and extract the PCD package to the requested destination.
Here I shall show how to use the wget
command to download the latest source code from GitHub.
$> wget https://github.com/meetrp/pcd/archive/master.zip
--2017-10-15 19:32:46-- https://github.com/meetrp/pcd/archive/master.zip
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/meetrp/pcd/zip/master [following]
--2017-10-15 19:32:47-- https://codeload.github.com/meetrp/pcd/zip/master
Resolving codeload.github.com (codeload.github.com)... 192.30.253.121, 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘master.zip’
master.zip [ <=> ] 303.81K 109KB/s in 2.8s
2017-10-15 19:32:52 (109 KB/s) - ‘master.zip’ saved [311100]
$> unzip ./master.zip
Archive: ./master.zip
07043e2225cb287ac449d993538ec36699c9e8c8
creating: pcd-master/
inflating: pcd-master/.gitignore
inflating: pcd-master/LICENSE
inflating: pcd-master/Makefile
creating: pcd-master/docs/
inflating: pcd-master/docs/_config.yml
....
....
....
....
inflating: pcd-master/scripts/kconfig/zconf.l
inflating: pcd-master/scripts/kconfig/zconf.y
Starting from release 1.0.5, the PCD is configured via the Kconfig configuration engine, similarly to the Linux Kernel configuration method. The supported configuration commands are:
The menu interfaces provide help per each configuration option. Don’t forget to:
make menuconfig
If you are using an older version of PCD which does not support the Kconfig option, you are encouraged to upgrade. Otherwise, follow these steps: The build script allows the user to configure some of the build environment variables. Here is the list of the variables that can be configured, and an example:
$> export CC=armeb-linux-uclibceabi-gcc
$> export INCLUDE_DIR_PREFIX=<your_project_path>/include
$> export INSTALL_DIR_PREFIX=<your_project_path>/filesystem
$> export USE_STATIC_LIBS=y
$> export LIB_DIR_PREFIX=<your_project_path>/lib
$> export CONFIG_ARM=y
Starting from PCD release 1.0.5, there is a Top-Level Makefile that does everything for you. Run “make all” or “make pcd” to compile everything. Run “make install” to install the executables and libraries in the target filesystem, according to the configuration. The binaries are also installed to bin/host and bin/target directories for your reference.
$> make all install
For older versions, this stage is automated by the build script. Run it to build and install the PCD in your target’s file system image.
$> ./build-all.sh
The PCD and its libraries are built and installed. If you are using an embedded platform, then the binaries are already installed in your target’s file system image and ready for use. You will need to regenerate the file system and reload it to your target. The PCD should be activated once the kernel has finished its loading.
Note: Please note that without PCD scripts that contain rules, the PCD doesn’t do much. It must be configured for your system with the appropriate rules.
Starting from PCD release 1.0.5, run “make clean” to clean all the executables, libraries and objects. Run “make distclean” to clean also the configuration files.
For older releases, use the clean_all.sh script to clean everything.