Leaf swi-linux wp77xx

I am trying out leaf, but I am not having much luck.
I have set up a workspace for the wp77xx and retrieved the linux source.

When I try to build from source, I am getting errors saying that layers for the mdm9x06 are missing.
Looking at bblayers.conf I can see layers for the mdm9x28 and also for the mdm9x06.
If I have a look at the manifest.json file I can see it says MACH is an mdm9x06 and the LINUX_IMAGES and SYSROOT directories are for the mdm9x06.

Is there a bug in the manifest.json file?

I am a bit confused about few things.

In firmware release 9, 9.1, and 11, when downloading from source.sierrawireless.com yocto was always built for an mdm9x28.
When using leaf, suddenly yocto is built for an mdm9x06.
Looking at the product technical specification for the WP77XX the core is a mdm9x06 core.

Would the linux source built for an mdm9x28 be incompatible with an mdm9x06?

This is only half the problem though, as when I try to build the linux source after downloading using leaf it is missing the meta-swi-mdm9x06 layer and the build fails.

Hi @shib,

from the linux point of view mdm9x06/mdm9x07/mdm9x28 are the same.
You’re right that wp77 is a mdm9x06, while wp76 is mdm9x07.
However for the Yocto build, in both cases we should be building using MACH=mdm9x28.
I’m confused as to how it would get mdm9x06, can you provide some logs?

Thanks

FYI this is also my post: Leaf swi-linux wp77xx - #9 by CoRfr - WP Series - Sierra Wireless Forum

I think my whole problem was executing the builds from within the leaf shell.
When I did a make clean and rebuilt everything normally it built OK - for the toolchain as well.

I set up my leaf environment for a WP77XX following the leaf guide and then downloaded and switched to using the source.
I was perhaps confused as to the purpose of the leaf shell, and thought I had to do everything leaf from inside the leaf shell.
If you enter a leaf shell and echo $MACH you see it reports an mdm9x06.
When you try to build the linux source from within the leaf shell it messes everything up, adding layers that don’t exist.

mangoh@mangoh-virtualbox:~/leaf$ leaf shell
Leaf Shell /bin/bash started in Leaf environment.

(lsh:profile1) mangoh@mangoh-virtualbox:~/leaf$ echo $MACH
mdm9x06

@shib,
What did you want to build exactly with Leaf? Linux source (Yocto) is not existing under Leaf? there is only the .cwe

(lsh:SWI-WP77) user@ITE00174:~/leafworkspace/leaf-data/current/wp77-linux-image$ ll
total 28956
drwxr--r--  2 user user 4096 avril 25 00:26 ./
drwxrwxr-x 43 user user 4096 sept.  4 10:06 ../
-rw-r--r--  1 user user 29634972 avril 25 00:26 linux.cwe
-rw-r--r--  1 user user 443 avril 25 00:26 manifest.json

And in my manifest, I don’t have “MACH is an mdm9x06 and the LINUX_IMAGES and SYSROOT”

(lsh:SWI-WP77) user@ITE00174:~/leafworkspace/leaf-data/current/wp77-linux-image$ cat manifest.json
{
    "env": {
        "WP77XX_LINUX_IMAGES": "@{DIR}"
    },
    "info": {
        "name": "wp77-linux-image",
        "version": "SWI9X06Y_02.22.12.00",
        "description": "Linux Image for WP77",
        "date": "Wed Apr 24 22:26:24 UTC 2019",
        "requires": [
            "swi-license_1.1",
            "swi-verify-license_latest"
        ],
        "tags": [
            "wp77xx"
        ],
        "leafMinVersion": "1.6"
    }

Hi Mehdi,

The instructions to get the Linux source through leaf are in the docs.
When you get the Linux source through leaf it creates: leaf-data/profile/wp77-linux-src/manifest.json
That manifest.json file contains the following:

{
    "install": [
        {
            "command": [
                "/bin/sh",
                "-c",
                "/bin/sh $LEAF_PREREQ_ROOT/swi-verify-license_latest/postinstall.sh @{NAME} @{VERSION}"
            ],
            "verbose": true,
            "ignoreFail": true
        }
    ],
    "sync": [
        {
            "command": [
                "@{DIR:swi-cloneutils_latest}/swi-clone",
                "-s",
                "swi-linux",
                "-Im",
                "wp77xx",
                "-It",
                "external",
                "-Iv",
                "SWI9X06Y_02.22.12.00",
                "-Ip",
                "mdm9x06"
            ],
            "verbose": true
        }
    ],
    "env": {
        "MACH": "${MACH:-mdm9x06}",
        "WP77XX_LINUX_IMAGES": "${SWI_LINUX_CLONE}/build_bin/tmp/deploy/images/swi-mdm9x06-wp",
        "WP77XX_TOOLCHAIN_DIR": "${SWI_LINUX_CLONE}/build_bin/tmp/sysroots/`uname -m`-linux/usr/bin/arm-poky-linux-gnueabi",
        "WP77XX_TOOLCHAIN_PREFIX": "arm-poky-linux-gnueabi-",
        "WP77XX_SYSROOT": "${SWI_LINUX_CLONE}/build_bin/tmp/sysroots/swi-mdm9x06-wp"
    },
    "info": {
        "name": "wp77-linux-src",
        "version": "SWI9X06Y_02.22.12.00",
        "description": "Linux distribution source code metadata and prerequisites",
        "date": "Wed Jun  5 14:58:29 UTC 2019",
        "requires": [
            "swi-license_1.1",
            "swi-verify-license_latest",
            "swi-aptdeps-linux-src_1.0",
            "swi-verify-aptdeps_latest"
        ],
        "depends": [
            "swi-cloneutils_latest"
        ],
        "tags": [
            "wp77xx"
        ],
        "leafMinVersion": "1.6"
    }
}

Right, and that declaration doesn’t work. We should be using MACH=mdm9x28 for wp77.