RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
execute the following command:
Code Block | ||
---|---|---|
| ||
$ source meta-cmf-raspberrypi/setup-environment |
...
A list is obtained, select the following option from among the list:
Code Block | ||
---|---|---|
| ||
12) meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-broadband-lxc.conf |
The path is automatically directed to:
...
Use the following command to compile the complete code:
Code Block | ||||
---|---|---|---|---|
| ||||
$ bitbake rdk-generic-broadband-lxc-image |
To compile a specific component container use the below command:
Code Block | ||
---|---|---|
| ||
$ bitbake <component> -c compile -f |
Ex:
Code Block | ||
---|---|---|
| ||
$ bitbake ccsp-dmcli -c compile -f |
The above command will compile the dmcli component container.
...
Once the code generation for containerization is compiled, the image for the same is found under the path:
Code Block | ||
---|---|---|
| ||
$ cd <workspace>/build-raspberrypi-rdk-broadband-lxc/tmp/deploy/images/raspberrypi-rdk-broadband-lxc/ |
The image to be considered:
<ImageName.rootfs.rpi-sdimg>
Ex:
Path:
Code Block | ||
---|---|---|
| ||
$ cd container-work/build-raspberrypi-rdk-broadband-lxc/tmp/deploy/images/ |
Image:
raspberrypi-rdk-broadband-lxcrdk-generic-broadband-lxc-image_default_20190327101556.rootfs.rpi-sdimg
...
Generated image has to be flashed to an SD card using this command in local PC:
Code Block | ||
---|---|---|
| ||
$ sudo dd if=<path to ImageName.rootfs.rpi-sdimg> of=<path to SD card space> bs=4M |
Ex:
Code Block | ||
---|---|---|
| ||
$ 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 above folders will be created automatically based on the xml files written in the workspace.
Path :
Code Block | ||||
---|---|---|---|---|
| ||||
<workspace>/meta-cmf-raspberrypi/recipes-containers/lxc-container-generator/files/xml/<container.xml> |
Ex:
Code Block | ||
---|---|---|
| ||
container-work/meta-cmf-raspberrypi/recipes-containers/lxc-container-generator/files/xml/lxc_conf_CcspPandMSsp.xml |
The above xml file is written for “P and M” container and will be responsible for the generation of the 3 folders mentioned above.
2.Check all the processes running in regard to lxc.
ps
Code Block | ||
---|---|---|
| ||
$ ps -Af | grep lxc |
The Pi terminal should show logssimilar to the following:
...
After checking pandm container status which has to be up and running, run the following commands
Code Block | ||
---|---|---|
| ||
$ sh /lib/rdk/wifi_container.sh |
- this command may return error which can be ignored
Code Block | ||
---|---|---|
| ||
$ sh /container/CCSPWIFI/launcher/CcspWifiSsp.sh start |
Please wait for few seconds/mins till log "Enter WiFi Loop" is observed in the console
Code Block | ||
---|---|---|
| ||
$ lxc-attach -n CCSPWIFI -f /container/CCSPWIFI/conf/lxc.conf |
After execution of above command shell will change to ccspwifi
Inside container shell please run following command
Code Block | ||
---|---|---|
| ||
$ hostapd -B /nvram/hostapd0.conf |
Now Check (in host shell) if CCSPWIFI container is running with corresponding name
Now, can able to connect wifi client(Laptop or mobile) using default ssid: RPI3_RDKB-AP0 and password as : rdk@1234
...
1. Run respective container scripts to execute individual container when container fails in boot up process:sh /container/<Container Name>/launcher/<container.sh> start
Code Block | ||
---|---|---|
| ||
sh /container/<Container Name>/launcher/<container.sh> start |
Ex:
Code Block | ||
---|---|---|
| ||
$ sh /container/PSMSSP/launcher/PsmSsp.sh start |
The above command can be executed to run PSM container and see its logs in Console.
...
2. Run command/commands inside the container specified by the Name when the container is already running:
Code Block | ||
---|---|---|
| ||
$ lxc-attach -n CCSPWIFI -f /container/CCSPWIFI/conf/lxc.conf |
Ex:
Code Block | ||
---|---|---|
| ||
$ lxc-attach -n CCSPWIFI -f /container/CCSPWIFI/conf/lxc.conf |
The above command can be executed to run the commands specified by lxc.conf file.
...
i. Service file used:
Code Block | ||
---|---|---|
| ||
/lib/systemd/system/dbus.service |
ii. Directory name:
Code Block | ||
---|---|---|
| ||
/container/DBUS/ |
iii. Conf file used for it:
Code Block | ||
---|---|---|
| ||
/container/DBUS/conf/lxc.conf |
iv. Service handled by this file:
DBUS acts as a message bus. DBUS container contains commands which initialize the message bus and connects all the components to each other for communication. Dbus path differs for each component.
i. Service file used:
Code Block | ||
---|---|---|
| ||
/lib/systemd/system/PsmSsp.service |
ii. Directory name:
Code Block | ||
---|---|---|
| ||
/container/PSMSSP/ |
iii. Conf file used for it:
Code Block | ||
---|---|---|
| ||
/container/PSMSSP/conf/lxc.conf |
iv. Service handled by this file:
...
i. Service file used:
Code Block | ||
---|---|---|
| ||
/lib/systemd/system/CcspPandMSsp.service |
ii. Directory name:
Code Block | ||
---|---|---|
| ||
/container/CCSPPANDM/ |
iii. Conf file used for it:
Code Block | ||
---|---|---|
| ||
/container/CCSPPANDM/conf/lxc.conf |
iv. Service handled by this file:
...
i. Service file used:
Code Block | ||
---|---|---|
| ||
/lib/systemd/system/ccspwifiagent.service |
ii. Directory name:
Code Block | ||
---|---|---|
| ||
/container/CCSPWIFI/ |
iii. Conf file used for it:
Code Block | ||
---|---|---|
| ||
/container/CCSPWIFI/conf/lxc.conf |
iv. Service handled by this file:
WiFi Agent container provides each component container, the access to data model APIs and driver specific APIs to manage WiFi specific parameters through a component specific Abstraction layer. It helps to manage and configure the gateway’s wifi access point interface.
i. Service file used:
Code Block | ||
---|---|---|
| ||
/lib/systemd/system/CcspCrSsp.service |
ii. Directory name:
Code Block | ||
---|---|---|
| ||
/container/CCSPCR/ |
iii. Conf file used for it:
Code Block | ||
---|---|---|
| ||
/container/CCSPCR/conf/lxc.conf |
iv. Service handled by this file:
...
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 | ||
---|---|---|
| ||
$ 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 |
This command attaches to the container namespace and run a specified command inside, the already executing container.
Ex:
Code Block | ||
---|---|---|
| ||
$ 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 is software daemon used for turning the normal network interface to access point.
Ex:
Code Block | ||
---|---|---|
| ||
$ hostapd -B /nvram/hostapd0.conf |
...