This topic provides info about working with Legato and Yocto.
The Yocto Project is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture.
Legato is compatible with Yocto 1.7.2
Untar the file Legato-Dist-Source-mdm9x15-SWI9X15Y_07.04.06.00.tar.bz2 to a directory (available at Legato Downloads):
These file/directories will be extracted:
Yocto uses a layered model for its build system. In Legato, device-specific layers are meta-swi-
[target] and meta-swi-bin
.
Yocto 1.7.2 and poky environment documentation is available at Yocto docs
The following table lists details about Yocto support for the WP85 module.
legato-image.wp85.ubi
requires fakeroot 1.10.2 for generation.File Type | Partition | Filename | Def. | Description |
---|---|---|---|---|
bootloader image | mtd0 | appsboot.mbn | * | LK (little-kernel), provides fastboot |
kernel image | mtd1 | boot-yocto-mdm9x15.2k.img | * | kernel (uncompressed) + mdm9x15-image-initramfs |
rootfs image | mtd2 | mdm9x15-image-minimal-swi-mdm9x15.2k.ubi | * | rootfs as ubi (actual rootfs filesystem is squashfs, read-only) |
mdm9x15-image-minimal-swi-mdm9x15.2k.yaffs2 | rootfs as yaffs2 format (not working) | |||
legato image | mtd3 | legato-image.wp85.ubi | * | legato as ubi (actual filesystem is squashfs, require fakeroot > 1.10.2 for generation) |
legato-image.wp85.yaffs2 | legato as yaffs2 (not working) | |||
packages | boot_wp85.cwe | package with bootloader | ||
boot-yocto_wp85.cwe | package with bootloader + yocto (= kernel + rootfs) | |||
boot-yocto-legato_wp85.cwe | package with bootloader + yocto (= kernel + rootfs) + legato | |||
legato-image.wp85.cwe | package with legato | |||
yocto_wp85.cwe | package with yocto (= kernel + rootfs) | |||
yocto-legato_wp85.cwe | package with yocto (= kernel + rootfs) + legato |
The prebuilt directory contains a kernel and root file system that can be built using the command below. It's the same as what's flashed on the device, and can be used to return to a known state.
Instructions on how to flash these images to the device are given in the file README.bsp.
Instructions for rebuilding the image are contained in the file Legato-Yocto1_6/meta-swi-extras/README.build
Running the build script with no arguments will print out the help message. There is also a file called stdbuild.sh
to build the images with common options. This can take a long time the first time you run it. Once the build is complete, you'll find new images in the directory:
Links are created at the end of the build to point to the latest kernel (kernel) and root file system (rootfs)
You can flash the Yocto images on Linux;, the device must be in fastboot mode. From the shell prompt on the device run:
After a few seconds, the device will enumerate as an Android Bootloader Device. You can test this on the development PC with:
Then erase and rewrite the kernel and root filesystem partitions using the fastboot command (the partitions are called kernel and rootfs):
Because the Legato image is a Yocto-compliant BSP, there are many options for customizing.
Here's the easy way to add some packages to the rootfs:
For more complex customizations, refer to the Yocto documentation.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.