Leaf swi-linux wp77xx

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.

If you get WP77 Linux source from https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-latest-release-components/, you can do cd yocto;make and it will generate a yocto_wp77xx.4k.cwe file that you can use.

I am aware of that link, I mentioned that I have previously gotten the source code from there.
My issue is with the source provided through leaf.

Evidently the source was released without being tested, because it fails to compile.

The manifest.json file for firmware 11 it sets the variable MACH to mdm9x06 which the makefile uses to add layers which don’t exist in the source files.

Hi @uncleshibba, we’ll check the issue and address it. thanks.

Performing leaf update and moving to the newest version removed the error and I can now compile the linux src retrieved through leaf.

BUT

make toolchain_bin fails on the most recent swi-linux-src for the wp77xx.

I downloaded the latest R11 WP77 source from source.sierrawireless.com and I was able to run “make toolchain_bin” successfully. I have a Ubuntu 16.04.6 LTS 64 bit with all latest updates.

Hi Joseph.

I think you knew that I was referring to the firmware released through leaf.
From your response it sounds like you aren’t recommending I use leaf.
I think I will abandon leaf for now as I can’t get Legato to build with it either.

I did notice that the firmware built through leaf and the release 11 from source.sierra produced firmware files of a different size.
Doing a diff of release 11 from source.sierra and gerrit shows that there are heaps of differences. That doesn’t sit right with me, as I expect a release to be immutable.

Thanks for your time though, I appreciate getting a response.

Hi @uncleshibba
I use leaf for Legato and Legato applications, but I do not use leaf for Linux source code management. I do that separately and so I did not realize that you’re using leaf. My bad. It’s just a personal choice. I will let the leaf team know about your concerns and we’ll make leaf more robust. Thanks.

Can you provide the logs for when you do make toolchain_bin ? What about make image_bin ?

If I try to build swi-linux-src inside a leaf shell the output is this:

(lsh:profile1) mangoh@mangoh-virtualbox:~/leaf/swi-linux-src$ make image_bin
Makefile:62: "Legato: build disabled since '/home/mangoh/leaf/swi-linux-src/legato/' does not exist"
"meta-swi/build.sh" -p poky/ -o meta-openembedded/ -l meta-swi -x "kernel" -j 9 -t 9            -m swi-mdm9x06 -P wp  -b build_bin -q
Poky dir: /home/mangoh/leaf/swi-linux-src/poky
OE meta: /home/mangoh/leaf/swi-linux-src/meta-openembedded
SWI meta dir: /home/mangoh/leaf/swi-linux-src/meta-swi
Linux repo dir: /home/mangoh/leaf/swi-linux-src/kernel
Number of make threads 9
Number of bitbake tasks 9
SWI machine: swi-mdm9x06
SWI product: wp
Build dir: /home/mangoh/leaf/swi-linux-src/build_bin
Enable Qualcomm Proprietary bin
You had no conf/local.conf file. This configuration file has therefore been
created for you with some default values. You may wish to edit it to, for
example, select a different MACHINE (target hardware). See conf/local.conf
for more information as common configuration options are commented.

You had no conf/bblayers.conf file. This configuration file has therefore been
created for you with some default values. To add additional metadata layers
into your configuration please add entries to conf/bblayers.conf.

The Yocto Project has extensive documentation about OE including a reference
manual which can be found at:
    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
    http://www.openembedded.org/


### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
+ layer: meta-swi/meta-swi-mdm9xxx
         -> /home/mangoh/leaf/swi-linux-src/meta-swi/meta-swi-mdm9xxx
+ layer: meta-swi/meta-swi-mdm9x06
         -> /home/mangoh/leaf/swi-linux-src/meta-swi/meta-swi-mdm9x06
+ layer: meta-swi/common
         -> /home/mangoh/leaf/swi-linux-src/meta-swi/common
+ layer: meta-oe
         -> /home/mangoh/leaf/swi-linux-src/meta-openembedded/meta-oe
+ layer: meta-networking
         -> /home/mangoh/leaf/swi-linux-src/meta-openembedded/meta-networking
+ layer: meta-python
         -> /home/mangoh/leaf/swi-linux-src/meta-openembedded/meta-python
+ layer: meta-swi-extras/common
         -> /home/mangoh/leaf/swi-linux-src/meta-swi/../meta-swi-extras/common
+ layer: meta-swi-extras/meta-swi-mdm9x06
         -> /home/mangoh/leaf/swi-linux-src/meta-swi/../meta-swi-extras/meta-swi-mdm9x06
+ layer: meta-swi-extras/meta-swi-mdm9xxx-bin
         -> /home/mangoh/leaf/swi-linux-src/meta-swi/../meta-swi-extras/meta-swi-mdm9xxx-bin
+ layer: meta-swi-extras/meta-swi-mdm9x06-bin
         -> /home/mangoh/leaf/swi-linux-src/meta-swi/../meta-swi-extras/meta-swi-mdm9x06-bin
find: ‘/home/mangoh/leaf/swi-linux-src/meta-swi/meta-swi-mdm9x06’: No such file or directory
find: ‘/home/mangoh/leaf/swi-linux-src/meta-swi/../meta-swi-extras/meta-swi-mdm9x06’: No such file or directory
find: ‘/home/mangoh/leaf/swi-linux-src/meta-swi/../meta-swi-extras/meta-swi-mdm9x06-bin’: No such file or directory
find: ‘/home/mangoh/leaf/swi-linux-src/meta-swi/meta-swi-mdm9x06’: No such file or directory
find: ‘/home/mangoh/leaf/swi-linux-src/meta-swi/../meta-swi-extras/meta-swi-mdm9x06’: No such file or directory
find: ‘/home/mangoh/leaf/swi-linux-src/meta-swi/../meta-swi-extras/meta-swi-mdm9x06-bin’: No such file or directory
Adding option LEGATO_BUILD with value false
Adding option IMA_BUILD with value false
Adding option IMA_CONFIG with value 
Adding option IMA_LOCAL_CA_X509 with value 
Adding option IMA_PRIV_KEY with value 
Adding option IMA_PUB_CERT with value 
Adding option IMA_KERNEL_CMDLINE_OPTIONS with value 
Adding option ENABLE_IMA with value 0
Adding option IMA_PUBLIC_CERT with value 
Adding option IMA_PRIVATE_KEY with value 
Adding option IMA_SMACK with value 
Disabling QCA9377 support...
Adding option ENABLE_QCA9377 with value 0
Adding option ROOTFS_VERSION with value 
Adding option EXT_SWI_IMG with value false
Adding option INITRAMFS_IMAGE_BUNDLE with value 1
Adding option INITRAMFS_IMAGE with value mdm9x06-image-initramfs
Adding option FIRMWARE_PATH with value 
Adding option PACKAGECONFIG_remove with value gnutls
Build image of minimal rootfs (for swi-mdm9x06).
ERROR: Layer directory '/home/mangoh/leaf/swi-linux-src/meta-swi/meta-swi-mdm9x06' does not exist! Please check BBLAYERS in /home/mangoh/leaf/swi-linux-src/build_bin/conf/bblayers.conf
Makefile:344: recipe for target 'image_bin' failed
make: *** [image_bin] Error 1

The build is successful if you run it outside of the leaf shell.
I have read and re-read the leaf documentation many times, and I am still not sure what the correct way to build things inside leaf is.

I am just doing a clean build and will post the output of make toolchain_bin when it is complete.
I am not even certain I need to make the toolchain, I was only doing that to try to make sure it wasn’t my build that was making the WP7700 so unstable.

Right, yes the issue with leaf is that MACH value that’s being set.

I believe that if you do unset MACH before you start building, it should work.

EDIT: Issue should be solved in next releases