Legato Yocto Install Notes

Here are some helpful tips for Yocto Linux working with Sierra Wireless devices.

Log on Without Password

To log onto the target through the serial interface, log on as root with no password. This allows manual changes to other interfaces (e.g., USB if you want to run CDC-ECM).

CDC-ECM for IP vs Ethernet

Using CDC-ECM for IP connections will cause the MAC address to change every reboot because the kernel allocates software-defined MAC addresses to interfaces. This may cause new connections to be detected by your host every time you reboot the device. See Configure IP Address and setNet

Setup Preferred IP

Either boot with an Ethernet cable plugged in and let the device obtain an IP address using DHCP, or enable CDC-ECM and the micro-USB cable. You can then determine the IP address using ifconfig on the console or provide a fixed IP from your DHCP server. Then use ssh and scp to access the device and transfer files.

Change Default USB Classes

During the boot sequence, startup scripts run the file /etc/legato/usbsetup that enumerates the USB types listed in /etc/legato/usbmode.

You can easily override default types by creating your own usbmode file in /mnt/flash/startup/usb. The new file will take precedence over the old one. By default, the device will enumerate an ECM port, an ACM port for AT commands and USB audio.

Setup SSH Key-based Login

You can configure your target so that it will accept an ssh connection from your development PC without prompting for a password, which makes using the ssh based tools much more convenient, and will allow you to automate ssh connections in scripts without the need for user interaction. To pair your host machine with the target for passwordless logins run:

bin/configtargetssh

Note
Use your target's actual IP address if you're not using 192.168.2.2.

Setup Target Static IP

You can configure your target and development PC so it doesn't prompt for a password, run: bin/configtargetssh

It'll look like this:

dave@devbox:~/legato$ bin/configtargetssh 192.168.2.2
Generating new key pair... --->>> LEAVE THE PASSPHRASE EMPTY <<<---
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/dave/.ssh/id_rsa.legatoTarget.
Your public key has been saved in /home/dave/.ssh/id_rsa.legatoTarget.pub.
The key fingerprint is:
af:c5:e4:8c:7d:53:b4:a4:72:c8:67:f3:88:9c:3f:67 dave's key for Legato
target devices.
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| o |
| . . + . |
| S = * o |
| X B = |
| . @ + . |
| o o..E |
| . .+ |
+-----------------+
/home/dave/.ssh/known_hosts updated.
Original contents retained as /home/dave/.ssh/known_hosts.old
Connecting to the target... (ENTER TARGET'S ROOT PASSWORD WHENEVER
PROMPTED FOR A PASSWORD)
(press ENTER if your target doesn't have a root password)
The authenticity of host '192.168.2.2 (192.168.2.2)' can't be established.
RSA key fingerprint is f2:2f:66:a5:14:20:bd:46:8f:a2:02:b3:99:6f:72:24.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.2.2' (RSA) to the list of known hosts.
root@192.168.2.2's password:
dave@devpc:~/legato$

You will need to repeat this procedure from every machine you intend to connect to the target from.

Read/Write rootfs

It's convenient right now to enable r/w to rootfs, but it will be moving to a read-only model soon. If you change the rootfs (e.g., in /etc, /lib, /bin), you may cripple your device and have to re-install your rootfs.

Disable New Package Download

The Yocto build defaults to disable new package downloads.

Enable downloading new packages over the Internet, modify:

<build-dir>/conf/local.conf value BB_NO_NETWORK to "0" . The file is only present after a build has run once.

Setup using BSPTestReport.xls

The BSPTestReport.xls spreadsheet is used for instructions and reports to help set up different BSP features to test. Start with the Contents sheet.

Use nfs root

The file meta-swi/meta-swi-mdm9x15/conf/machine/qcom-mdm9615.conf contains examples if you need to include a lot of extra packages in your rootfs or if you build the debug version. See README.bsp for details. Remember to untar the generated rootfs to an exported file system. The file pointed to by the rootfs link contains the most recent root file system. There’s more info available at kernel docs.