RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ repo init -u <url> -m <manifest file> -b <branch> $ repo init -u https://code.rdkcentral.com/r/manifests -m rdkb-raspberrypi.xml -b mortyrdkb-container $ repo sync -j4 --no-clone-bundle |
...
1) Create a *.xml file on the following path meta-cmf-raspberrypi/recipes-containers/lxc-container-generator/files/xml/*.xml
This xml file would describe the following parameters for an container generation
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="ISO-8859-1"?> <CONTAINER SandboxName="CONTAINER_FOLDER_NAME"> <LxcParams> <LauncherName>"LAUNCHER_SCRIPT_NAME"</LauncherName> <ExecName>"APPLICATION_NAME_WITH_PATH"</ExecName> <ExecParams>"COMMAND_LINE_ARGUMENTS"</ExecParams> <SystemdNotify create="yes"> <PidFile>"PID_FILE_WITH_PATH"</PidFile> </SystemdNotify> <StopFunction enable="true"></StopFunction> </LxcParams> <LxcConfig> - <UserName>"USER_NAME"</UserName> <GroupName>"GROUP_NAME"</GroupName> <CGroupSettings> <DeviceCgroup> <DevicesDeny>a</DevicesDeny> <AllowDefaultDevices enable="yes"/> </DeviceCgroup> </CGroupSettings> <Environment> <Variable>DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket</Variable> </Environment> <Network type="none"></Network> <Dbus enable="true"></Dbus> <Rootfs create="yes"> <MountPoints> <!-- /bin --> <Entry type="file"> <Source>/bin/sh</Source> <Destination>bin/sh</Destination> <Options>ro,bind,nosuid,nodev</Options> </Entry> <!-- /proc --> <Entry type="dir"> <Source>proc</Source> <Destination>proc</Destination> <FsType>proc</FsType> <Options>defaults,noexec,nosuid,nodev,hidepid=2</Options> </Entry> </MountPoints> <LibsRoBindMounts> <Entry>ld</Entry> <Entry>libtr181</Entry> <Entry>libxml2</Entry> <Entry>libz</Entry> <Entry>libccsp_common</Entry> </LibsRoBindMounts> </Rootfs> </LxcConfig> </CONTAINER> ---------------------------------------------------------------------------------------------------------------------- For example, common</Entry> </LibsRoBindMounts> </Rootfs> </LxcConfig> </CONTAINER> |
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1"?> <CONTAINER SandboxName="PSMSSP"> <LxcParams> <LauncherName>PsmSsp</LauncherName> <ExecName>/usr/bin/PsmSsp</ExecName> <ExecParams>-subsys eRT.</ExecParams> <SystemdNotify create="yes"> <PidFile>/var/tmp/PsmSsp.pid</PidFile> </SystemdNotify> <StopFunction enable="true"></StopFunction> </LxcParams> <LxcConfig> - <UserName>psm</UserName> <GroupName>psm</GroupName> <CGroupSettings> <DeviceCgroup> <DevicesDeny>a</DevicesDeny> <AllowDefaultDevices enable="yes"/> </DeviceCgroup> </CGroupSettings> <Environment> <Variable>DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket</Variable> </Environment> <Network type="none"></Network> <Dbus enable="true"></Dbus> <Rootfs create="yes"> <MountPoints> <!-- /bin --> <Entry type="file"> <Source>/bin/sh</Source> <Destination>bin/sh</Destination> <Options>ro,bind,nosuid,nodev</Options> </Entry> <Entry type="file"> <Source>/usr/bin/PsmSsp</Source> <Destination>usr/bin/PsmSsp</Destination> <Options>ro,bind,nosuid,nodev</Options> </Entry> <Entry type="file"> <Source>/bin/touch</Source> <Destination>bin/touch</Destination> <Options>ro,bind,nosuid,nodev</Options> </Entry> <Entry type="file"> <!--rdklogs--> <Entry type="dir"> <Source>/rdklogs</Source> <Destination>rdklogs</Destination> <Options>rw,bind,noexec,nosuid</Options> </Entry> </MountPoints> <LibsRoBindMounts> <Entry>ld</Entry> <Entry>libtr181</Entry> <Entry>libxml2</Entry> <Entry>libz</Entry> <Entry>libccsp_common</Entry> <Entry>libsyscfg</Entry> <Entry>libsysevent</Entry> ... <Entry>liblzma</Entry> <Entry>libdl</Entry> <Entry>libtinfo</Entry> </LibsRoBindMounts> </Rootfs> </LxcConfig> </CONTAINER> |
2) Include the lxc_conf_<NAME>.xml file on the bb file meta-cmf-raspberrypi/recipes-containers/lxc-container-generator/lxc-container-generator-native.bbappend
...