Sdef and 'commands'

Hiya,

When a ‘command’ is defined in an sdef file, at runtime does Legato copy the binary to the filesystem, or does Legato symlink the binary into the filesystem?

ta, Dave

Hi @davidc,
if i have understood your question correctly, Binary/executable will be present in the application’s directory/file system which are mentioned in the ‘commands’ section of .sdef file and symlink of these binaries/executables will be used from the directory ‘/mnt/legato/system/bin’ to use the respective command.

Below is an example where all the binaries/excecutables of the application ‘tools’ which are mentioned in the ‘commands’ section of .sdef and symlinks of these binaries/excecutables are used in the ‘/mnt/legato/system/bin’ directory. Hope your doubt is clear.

root@swi-mdm9x15:/mnt/legato/apps/de45f1162fc62407ddb30b24270fea78/read-only/bin# ls -l
-rwxr-xr-x 1 root root 13325 Sep 6 2017 cm
-rwxr-xr-x 1 root root 12083 Sep 6 2017 fwupdate
-rwxr-xr-x 1 root root 12085 Sep 6 2017 secstore
root@swi-mdm9x15:/mnt/legato/apps/de45f1162fc62407ddb30b24270fea78/read-only/bin# cd
root@swi-mdm9x15:~# cd /mnt/legato/system/bin/
root@swi-mdm9x15:/mnt/legato/system/bin# ls -l
-rwxr-xr-x 1 root root 5231 Sep 6 2017 app
-rwxr-xr-x 1 root root 12324 Sep 6 2017 appCtrl
-rwxr-xr-x 1 root root 1803 Sep 6 2017 cleanSandbox
lrwxrwxrwx 1 root root 30 Sep 6 2017 cm → …/apps/tools/read-only/bin/cm
-rwxr-xr-x 1 root root 12208 Sep 6 2017 config
-rwxr-xr-x 1 root root 7375 Sep 6 2017 configEcm
-rwxr-xr-x 1 root root 12232 Sep 6 2017 configTree
-rwxr-xr-x 1 root root 12400 Sep 6 2017 execInApp
lrwxrwxrwx 1 root root 36 Sep 6 2017 fwupdate → …/apps/tools/read-only/bin/fwupdate
-rwxr-xr-x 1 root root 12505 Sep 6 2017 gdbCfg
-rwxr-xr-x 1 root root 70290 Sep 6 2017 inspect
-rwxr-xr-x 1 root root 227 Sep 6 2017 install-hook
-rwxr-xr-x 1 root root 6030 Sep 6 2017 legato
-rwxr-xr-x 1 root root 21997 Sep 6 2017 log
-rwxr-xr-x 1 root root 12149 Sep 6 2017 logCtrlDaemon
-rwxr-xr-x 1 root root 774 Sep 6 2017 procInSandbox
-rwxr-xr-x 1 root root 3271 Sep 6 2017 saveLogs
-rwxr-xr-x 1 root root 12046 Sep 6 2017 sdir
lrwxrwxrwx 1 root root 36 Sep 6 2017 secstore → …/apps/tools/read-only/bin/secstore
-rwxr-xr-x 1 root root 245 Sep 6 2017 security-unpack
-rwxr-xr-x 1 root root 48858 Sep 6 2017 serviceDirectory
-rwxr-xr-x 1 root root 9545 Sep 6 2017 setNet
-rwxr-xr-x 1 root root 39306 Sep 6 2017 startSystem
-rwxr-xr-x 1 root root 9461 Sep 6 2017 startupScript
-rwxr-xr-x 1 root root 12505 Sep 6 2017 straceCfg
-rwxr-xr-x 1 root root 13162 Sep 6 2017 supervisor
-rwxr-xr-x 1 root root 12342 Sep 6 2017 update
-rwxr-xr-x 1 root root 13604 Sep 6 2017 updateDaemon
-rwxr-xr-x 1 root root 12334 Sep 6 2017 watchdog
-rwxr-xr-x 1 root root 15712 Sep 6 2017 xattr
root@swi-mdm9x15:/mnt/legato/system/bin#

Regards,
Muralidhara N