Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
$ bitbake <component> -c compile -f

Ex:

Code Block
languagebash
titleEx:
$ bitbake ccsp-dmcli -c compile -f

...

<ImageName.rootfs.rpi-sdimg>Ex:

Path:

Code Block
languagebash
titleEx Path:
$ cd container-work/build-raspberrypi-rdk-broadband-lxc/tmp/deploy/images/

...

Code Block
languagebash
$ sudo dd if=<path to ImageName.rootfs.rpi-sdimg> of=<path to SD card space> bs=4M

Ex:

Code Block
languagebash
titleEx:
$ sudo dd if=rdkb-generic-broadband-image_default_20181026100202.rootfs.rpi-sdimg of=/dev/sdd bs=4M

The SD card is inserted to the Raspberry Pi board and booted to check for containers created.

The Raspberry Pi board is connected to the PC via a USB to serial converter and the logs can be checked in console or can be connected via HDMI cable to a TV and logs will be shown in the terminal


Steps/commands to be executed to check for successful container generation

1.Check for the container generated in the following path:                 

Code Block
languagebash
  /container/<container_name>/

...

The above folders will be created automatically based on the xml files written in the workspace.Path :


Code Block
languagebash
titleXML File path
<workspace>/meta-cmf-raspberrypi/recipes-containers/lxc-container-generator/files/xml/<container.xml>

Ex:

Code Block
languagebash
titleEx:
container-work/meta-cmf-raspberrypi/recipes-containers/lxc-container-generator/files/xml/lxc_conf_CcspPandMSsp.xml

...

2.Check all the processes running in regard to lxc.         

Code Block
languagebash
$ ps -Af | grep lxc

...

Code Block
languagebash
sh /container/<Container Name>/launcher/<container.sh> start

...

Code Block
languagebash
titleEx:
$ sh /container/PSMSSP/launcher/PsmSsp.sh start

...

Code Block
languagebash
$ lxc-attach -n CCSPWIFI -f /container/CCSPWIFI/conf/lxc.conf

...

Code Block
languagebash
titleEx:
$ lxc-attach -n CCSPWIFI -f /container/CCSPWIFI/conf/lxc.conf

...

Component registrar acts as a centralized container for registration of all the component containers with their respective name, version, dbus path and namespace.


Useful commands for container execution

lxc-execute

This command is used to quickly launch a container in an isolated environment. It mainly runs the specified command into the container via intermediate process lxc-init (forwards the received signal to starting command). Lxc-execute uses the configurations specified by the lxc-create process.

Ex:

Code Block
languagebash
titleEx:
$ lxc-execute -n DBUS -f /container/DBUS/conf/lxc.conf

$ lxc-execute -n PSMSSP -f /container/PSMSSP/conf/lxc.conf

$ lxc-execute -n CCSPPANDM -f /container/CCSPPANDM/conf/lxc.conf

$ lxc-execute -n CCSPWIFI -f /container/CCSPWIFI/conf/lxc.conf

$ lxc-execute -n CCSPCR -f /container/CCSPCR/conf/lxc.conf

lxc-attach

This command attaches to the container namespace and run a specified command inside, the already executing container.

Ex:

Code Block
languagebash
titleEx:
$ lxc-attach -n DBUS -f /container/DBUS/conf/lxc.conf

$ lxc-attach -n PSMSSP -f /container/PSMSSP/conf/lxc.conf

$ lxc-attach -n CCSPPANDM -f /container/CCSPPANDM/conf/lxc.conf

$ lxc-attach -n CCSPWIFI -f /container/CCSPWIFI/conf/lxc.conf

$ lxc-attach -n CCSPCR -f /container/CCSPCR/conf/lxc.conf

hostapd

hostapd is software daemon used for turning the normal network interface to access point.

Ex:

Code Block
languagebash
titleEx:
$ hostapd -B /nvram/hostapd0.conf

...