You are viewing an old version of this page. View the current version .
Compare with Current
View Page History
« Previous
Version 5
Next »
Initial Bundle Gen slide. (click to expand)
Markdown Notes WIP Notes:
OCI Bundle Generator Requirements.md
OCI Bundle Gen Use Cases (1) Rewrite these as User Stories
As an Operator I want to be able used in STB
expected to be on Cloud
Extendable architecture
Requirements (2) Read in OCI_Image Read in template for a target STB (format TBC) Output a minimal OCI bundle* suitable for execution on target STBFS system runtime Config.json Apply operator restrictions based
Summary An overview of Bundle gen in context
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6IlJhaHVsIE1laHJhIiwib3V0cHV0VHlwZSI6ImJsb2NrIiwibGFzdE1vZGlmaWVyTmFtZSI6IlJhaHVsIE1laHJhIiwibGFuZ3VhZ2UiOiJlbiIsInVpQ29uZmlnIjoie30iLCJkaWFncmFtRGlzcGxheU5hbWUiOiIiLCJzRmlsZUlkIjoiIiwiYXR0SWQiOiIxMDc4Mzk1MjciLCJkaWFncmFtTmFtZSI6Ik9DSSBCdW5kbGUgR2VuIiwiYXNwZWN0IjoiIiwibGlua3MiOiJhdXRvIiwiY2VvTmFtZSI6Ik9DSSBCdW5kbGUgR2VuZXJhdG9yIiwidGJzdHlsZSI6InRvcCIsImNhbkNvbW1lbnQiOmZhbHNlLCJkaWFncmFtVXJsIjoiIiwiY3N2RmlsZVVybCI6IiIsImJvcmRlciI6dHJ1ZSwibWF4U2NhbGUiOiIxIiwib3duaW5nUGFnZUlkIjoxMDc4Mzk1MDIsImVkaXRhYmxlIjpmYWxzZSwiY2VvSWQiOjEwOTAxOTY1MCwicGFnZUlkIjoiIiwibGJveCI6dHJ1ZSwic2VydmVyQ29uZmlnIjp7ImVtYWlscHJldmlldyI6IjEifSwib2RyaXZlSWQiOiIiLCJyZXZpc2lvbiI6MSwibWFjcm9JZCI6IjY3MzJiMzQyLTJhZmYtNDlkZC05YWQ3LTA2NmMyYmQyYTJmYSIsInByZXZpZXdOYW1lIjoiT0NJIEJ1bmRsZSBHZW4ucG5nIiwibGljZW5zZVN0YXR1cyI6Ik9LIiwic2VydmljZSI6IiIsImlzVGVtcGxhdGUiOiIiLCJ3aWR0aCI6IjY5MSIsInNpbXBsZVZpZXdlciI6ZmFsc2UsImxhc3RNb2RpZmllZCI6MTU5MzQ0MTkzMjAwMCwiZXhjZWVkUGFnZVdpZHRoIjpmYWxzZSwib0NsaWVudElkIjoiIn0=
STB Specific Template (3) Where does this come from?today its : /sys, /proc, /tmp, /lib, /bin, /sbin, /usr, /dev PLUS an manually generated optional file list - a list of additional files/devices/groups... i.e. psudeo FS nodes that are available PLUS an manually generated optional MAPPING file that maps any actual node from any of the above lists into the RDK-M namespace. i.e tells you what non standard nodes name are in RDK-M std terms. (e.g. XXx) What format is it in?tar of above directories the lists is JSON list the MAPPING is JSON tuple { expected path, actual path} Define REference ones for : Operator Rules (3) What does it have:Meory, cpu, networking, resolutions, RDK services upported, .... What format: Where: Who : OCI Image Spec (3) Standard OCI image
plus RDK extensions to define application requirements
Overview processing steps (4)
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6IlJhaHVsIE1laHJhIiwib3V0cHV0VHlwZSI6ImJsb2NrIiwibGFzdE1vZGlmaWVyTmFtZSI6IlJhaHVsIE1laHJhIiwibGFuZ3VhZ2UiOiJlbiIsInVpQ29uZmlnIjoie30iLCJkaWFncmFtRGlzcGxheU5hbWUiOiIiLCJzRmlsZUlkIjoiIiwiYXR0SWQiOiIxMDc4Mzk1MzMiLCJkaWFncmFtTmFtZSI6Ik9DSSBCdW5kbGUgR2VuIFByb2Nlc3NpbmciLCJhc3BlY3QiOiIiLCJsaW5rcyI6ImF1dG8iLCJjZW9OYW1lIjoiT0NJIEJ1bmRsZSBHZW5lcmF0b3IiLCJ0YnN0eWxlIjoidG9wIiwiY2FuQ29tbWVudCI6ZmFsc2UsImRpYWdyYW1VcmwiOiIiLCJjc3ZGaWxlVXJsIjoiIiwiYm9yZGVyIjp0cnVlLCJtYXhTY2FsZSI6IjEiLCJvd25pbmdQYWdlSWQiOjEwNzgzOTUwMiwiZWRpdGFibGUiOmZhbHNlLCJjZW9JZCI6MTA5MDE5NjUwLCJwYWdlSWQiOiIiLCJsYm94Ijp0cnVlLCJzZXJ2ZXJDb25maWciOnsiZW1haWxwcmV2aWV3IjoiMSJ9LCJvZHJpdmVJZCI6IiIsInJldmlzaW9uIjoxLCJtYWNyb0lkIjoiMzUwOWQ5ZTItOTEzOS00NTExLWI0MDktNmIzOTVkMjRlMzkxIiwicHJldmlld05hbWUiOiJPQ0kgQnVuZGxlIEdlbiBQcm9jZXNzaW5nLnBuZyIsImxpY2Vuc2VTdGF0dXMiOiJPSyIsInNlcnZpY2UiOiIiLCJpc1RlbXBsYXRlIjoiIiwid2lkdGgiOiI5MTEiLCJzaW1wbGVWaWV3ZXIiOmZhbHNlLCJsYXN0TW9kaWZpZWQiOjE1OTI5MTc1NTgwMDAsImV4Y2VlZFBhZ2VXaWR0aCI6ZmFsc2UsIm9DbGllbnRJZCI6IiJ9
A summary of the processing steps (re-order if it helps)
Get OCI_Image Parse the subset of OCI_Image_config to get the DAC subsection Filter by architecture (remove all libs and bins that aren't for our arch. Lib matching: lib is in template then remove lib and put in bind mount Config App storage. Write the plugin for storage to oci_bundle_config. (AppID is unique across RDK-M.) Write the plugin ram FS to bundle config if needed Add the devices and bindmount to that required to output config (inc. networking) Copy across the layer for architecture independent assets (images, configs, certificates) Copy across the executable compiles to the correct architecture Translate the the remaining parts of OCI_Image_Config to OCI_Bundle_Config Parse STB config file and operator config for syntax errors Determine arch of selected device Image contains suitable manifest for platform arch? Yes No Determine image type ( imageLayout / image / imageZip ) Unpack OCI image based on manifest for required platform/arch Read application requirements and STB platform config Target STB can support app? Yes No Begin lib matching algorithm How would we manually loaded libs with dlopen - ldd won't show these? Run ldd on application to find dependencies Platform already contains same (major) version of library? Yes No Add bind mount for library to config.json Delete library from rootfs directory in bundle Do nothing - use version in rootfs More dependencies? Yes Add bind mounts for platform specific GPU libraries Add additional bind mounts specified in platform config Add bind mounts for any devices in platform config Add devices to devices array in config Add environment variables specified in platform/operator config Process application capabilites Add rdkPlugins section to the config accordingly Write any remaining config sections Create tarball of rootfs directory and config.json file Return Error Platform cannot support application App requires something platform cannot provide Return Error App does not support target architecture
Library matching Options:
https://en.wikipedia.org/wiki/Soname Full Name matching Base name matching, exclude version numbering Hash of the libhow to handle to handle compiler option diffs e.g. strip? Are LD commands to get version number? /Dev Matching