My goal is to create a custom image for a factory WP7702 where every layer is built from known sources. So far I have been successful rebuilding the modem firmware image and the Yocto kernel/rootfs image. The remaining piece I am struggling with is the Legato layer.
Specifically, I need to build a replacement for legato-squashfs.ubi.cwe that includes my primary application by default.
My application is defined by a single .adef file. My assumption was that I could create a custom .sdef that includes the default Legato system definition and then adds my application:
// custom.sdef
#include "$LEGATO_ROOT/default.sdef"
apps:
{
$PA_CONFIG_ADEF
}
I then build the system using the Yocto SDK environment and mksys:
mksys -t wp77xx \
-i $LEGATO_ROOT/interfaces/modemServices \
-C "-O2 -Wno-unused-but-set-variable -Wno-unused-result" \
custom.sdef
This produces a .update file that is approximately 9.1 MB. For comparison, the stock legato-squashfs.ubi.cwe appears to be about 7.1 MB.
I then convert the .update file into a CWE using systocwe, and finally merge the modem firmware CWE, the Yocto kernel/rootfs CWE, and the generated Legato CWE into a single image using swicwe.
The resulting image installs, but Sahara reports that the Legato image is too large.
My questions are:
-
Is this the correct process for generating a replacement
legato-squashfs.ubi.cwe? -
Is the additional ~2 MB likely causing the image to exceed the available Legato partition size?
-
What is the recommended way to reduce the size of the generated Legato image?
-
Is there an existing Sierra/Legato system definition that is used to generate the stock
legato-squashfs.ubi.cwe, and if so, is it available for reference?
Any guidance would be appreciated.