How install packages into Target?

lets say I want to install gdbserver; apt-get is not recognized by Legato. So how will I do that ? Also gdbserver is not recognized by the framework.

apt-get is not supported in Legato. If any package needs to be added it has to be included using Yocto recipe.

As for gdbserver, it is packaged into the devMode application, that is built by default and can be installed according to this doc: Developer Mode - Legato Docs

Otherwise as noted by @Vasantha_lax, the rootfs is a relatively closed system, on purpose.

To add new software, either: