Adding Debian packages
General
It's not recommended to duplicate/clone SOM's internal storage from one device and attach it to another. There are few scripts run for the first time at startup, and configuration files are generated, which are unique to the SOM. A better approach is to add required packages, services, and applications to the Debian rootfs at compile time using the build script. The resulting rootfs, created by the build script, will then be available as an archive, ready to be deployable for other targets.
Please refer to the Debian Build Release guide to learn more about the build process.
Adding packages during build time
Extra Debian packages can be added to the Debian rootfs using the Yocto variable APTGET_EXTRA_PACKAGES. For example, to add the package git and vim, one can add the following line to the local.conf (~/debian_imx8mq_var_dart/build_debian_xwayland/conf/local.conf):
APTGET_EXTRA_PACKAGES:append = " git vim"
This will add those packages to the rootfs and, respectively, to the Debian image.
Build the rootfs
Once you have made the changes one can rebuild the Debian image, including the rootfs. Please refer to the Debian Build Release guide to learn how to do it.