Make not including meta-columbia-x in build

TL/DR: make used to include files/layers specified in meta-columbia-x and now doesn’t

I’m having a problem lately building my linux distribution for an FX30 Cat-M, this is somewhat drawn-out so please bear with me. I have been developing a custom linux distribution and legato app for the fx-30 and have everything working fine on my development unit. I recently obtained a 2nd unit for our client and was in the process of configuring it with the custom distribution and application that I have developed. Prior to loading the new unit I wanted to include some directories and files in home/root in the linux image so I didn’t have to scp them to the device so I added my own custom layer following the directions in the “Yocto and FX30 Application Note”: (https://forum.legato.io/uploads/short-url/hSSvsqgQs3wsPOkqwpDfzxLYEWq.pdf) it was here that I ran into my first problem:

While the application note says to add the custom layer information to build.sh and external.mk files in the meta-columbia-x directory, when I made the edits to those files the new layer (meta-custom) was not included in my build. Through trial and error I made the edits to the same files in them meta-swi directory and then found that the custom layer was built and I found the files and directory included in directory swi-linux-src/build_bin/tmp/work/swi_mdm9x28_wp-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs/home/root/ However, in swi-linux-src/build_bin/tmp/deploy/images/swi-mdm9x28-wp I do not find the expected file boot-yocto-legato_wp77xx.cwe but rather only yocto_wp77xx.4k.cwe and when I download this to my FX30 the files added by my layer are not found. Also prior to adding my custom layer I had made changes to swi-linux-src/meta-columbia-x/rootfs/recipes/init-ifupdown/files/iptables.rules adding some rules needed for my application, however, when I built the image the iptables.rules file is not included. Bottom line is it seems that for some reason in my build environment the meta-columbia-x folder/layer is not being processed.

I’m using the swi-linux-src from the leaf getsrc swi-linux command and have package swi-fx30-catm_1.0.0 "SDK for FX30-CATM (Release 9.1.1.013 + Legato 18.06.1)" installed.

I have a working version of my firmware and when I run swicwe -P on it I get the following content list:

 Type	 Size(Exclude Header)	 Product	 Compress	 Version
*SPKG    36722056                Y931            0               9999999_9999999_?_?_?_?_?
*APPL    526008                  Y931            0               Fri Dec 13 14:50:02 EST 2019
 APBL    525608                  9X06            0               1.3.0_838aec2863
*APPL    31738000                Y931            0               Fri Dec 13 14:50:02 EST 2019
 SYST    22544384                9X06            0               Fri Dec 13 14:50:02 EST 2019
 APPS    9192816                 9X06            0               3.18.44 20191205144811
3.18.44 20191213135833
3.18.44 20191213144959
*APPL    4456848                 Y921            0               18.06.1_78dcbb9d788329aa62d6846110371fe1
 USER    4456448                 9X28            0               18.06.1_78dcbb9d788329aa62d6846110371fe1

The image now built with make only has this:

 Type	 Size(Exclude Header)	 Product	 Compress	 Version
*APPL    30161040                Y921            0               Sat Feb  1 10:11:44 EST 2020
 SYST    20971520                9X28            0               Sat Feb  1 10:11:44 EST 2020
 APPS    9188720                 9X28            0               3.18.44 20200201094341
3.18.44 20200201100126
3.18.44 20200201101142

One other item that’s changed is that I installed the VS Code support for leaf - I suspect that may have broken something in my build environment.

Any ideas on how to fix this?

Hi there,
Sounds like either the build script or makefile has accidentally been modified so the meta-columbia-x layer isn’t being added.

Could you please post the contents from meta-columbia-x of:

  1. external.mk
  2. build.sh

Also:

  1. What command line are you using to build?
  2. What does your Makefile symlink point to?
  3. Please post the full yocto log as well

BR,
Chris

Chris,
Here’s external.mk:
external.mk (7.4 KB)

And here’s build.sh:
build.sh (20.8 KB)

I’m simply using make from swi-linux-src to build.

My Makefile symbolic link is: Makefile -> meta-swi/repo.mk

I’m not sure where to find my yocto log, there is a file in my source root named yocto-layer.log but it is empty.
There are files in a directory named: swi-linux-src/build_bin/tmp/log/cooker/swi-mdm9x28-wp/, I’ve attached the one from a build that succeeded but did not include the changes I expected to see from meta-columbia-x.
20200201213116.log (883.7 KB)

Thanks for the help.

Best regards,
David

Chris,

In answering your questions I realized that the likely source of my problem was the Makefile symbolic link, when I pointed Makefile to meta-columbia-x/external.mk everything built as expected. Not sure how that link got changed but at least now I know where to look if this problem occurs again.

I am still having an issue with the custom layer I added. This layer gets built and I can see the proper files added to swi-linux-src/build_bin/tmp/work/swi_mdm9x28_wp-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs/home/root/, and the file mdm9x28-image-minimal-swi-mdm9x28-wp.manifest indicates it is part of the image. However, when I install the image the files and directory located in /home/root do not get copied to the root file system of the device. Instead I can see them in /mnt/flash/home/root/. I suspect this has something to do with the different partitions but don’t really understand the mechanics of the device’s partition architecture and how it works when firmware is uploaded. Is there some way to get the contents of /mnt/flash/home/root/ to get add-to/overwrite /home/root on the device after the image is downloaded?

Thanks again for all your help.

Best regards,
David

Hi David,
Your meta-columbia-x build files look fine.

I think you’ve either changed your profile to a stock WP module, or you’ve manually changed the Makefile symlink to point to repo.mk.

Check your profile first, if that’s fine, then delete your Makefile symlink and re-create it, and point it to meta-columbia-x/external.mk

Then, do a make clean followed by make

The FX30 build artifacts (full image) are located at:
build_bin/images/public

BR,
Chris

Chris,

Yep, you were correct, it was the Makefile symbolic link. I can build successfully now that it points to meta-columbia-x/external.mk.

I think our replies might have crossed this morning, but if you look above, I’m still having an issue with the custom layer I wrote (unrelated to the build issue). Do you have any thoughts about why files from the custom layer meant for /home/root do not getting written there, but rather to /mnt/flash/home/root ?

Thanks again.
David

Hi David,
I think the issue is due to when the /home/root partition is mounted.

One solution is by adding your files somewhere in the target rfs /etc folder and then create a startup script that will copy from your /etc folder to /home/root.

BR,
Chris

That makes sense Chris, I’ll give that a try.

Thanks again for your help.