Adding a layer to SDK

you guys really dont make life easy…

so Ive got to add a layer to the existing Legato-Dist-Source-mdm9x15-SWI9X15Y_07.12.14.00.tar.bz2

i can build images with make very easily, however we have some custom proprietary apps that require their own layer and licensing, and well to be honest looking around, i see 0 documentation on how to add a layer to your reworked non-git shareable macroed re-engineered version of yocto … im to say the least quite a bit dissatisfied at the abnormal modifications your concocted over a logical working yocto experience. Ive said it before… great board great design, but your killing us with this over-engineered process of having three trees to deal with and not being able to productively use the sdk as we would in yocto. i wount even mention how far behind ¨current"yocto we are with this SDK however…

can someone explain in the simplest of terms how does one add a layer… without me having to waste hours deciphering your macros and such…

when i make a build i simply run make… and it does generate the correct cwe files, which i can make a custom flashable spk no problem… i just want to simply add a layer to be included without jumping through hoops…

ps… ill also state ive had to update certain apps… cmake and others to more recent versions just so our apps will build properly… why so far behind normal yocto… how have you made it so hard to even update to a more recent version…

Hi @dingo

I agree that it’s complicated. Please post this to the Legato forum so that your message reaches the right people.

Create new layer (called jack) in yocto source code folder:

owner@owner-ThinkPad-T60:~/legato/packages/legato.source.16.10.1.SWI9X15Y_07_11_21_00-201702011246/resources/yocto/poky/scripts$ ./yocto-layer create jack
Please enter the layer priority you’d like to use for the layer: [default: 6]
Would you like to have an example recipe created? (y/n) [default: n] y
Please enter the name you’d like to use for your example recipe: [default: example] jacktest
Would you like to have an example bbappend file created? (y/n) [default: n]

New layer created in meta-jack.

Don’t forget to add it to your BBLAYERS (for details see meta-jack\README).

Please note that here when you enter the name of your example recipe, it cannot have “_” character.

Move the new layer to outermost folder.

owner@owner-ThinkPad-T60:~/legato/packages/legato.source.16.10.1.SWI9X15Y_07_11_21_00-201702011246/resources/yocto/poky/scripts$ mv meta-jack/ …/…/

Rename the “jacktest-0.1” to “files”
owner@owner-ThinkPad-T60:~/legato/packages/legato.source.16.10.1.SWI9X15Y_07_11_21_00-201702011246/resources/yocto/poky$ mv . /meta-jack/recipes-example/example/jacktest-0.1 . /meta-jack/recipes-example/example/files

In yocto/meta-swi-extra/, enable the new layer:

Enable the meta-swi layer
enable_layer “meta-swi” $SWI
Enable the meta-oe layer
enable_layer “meta-oe” "$OE/meta-oe"
Enable the meta-networking layer
enable_layer “meta-networking” "$OE/meta-networking"
Enable the meta-python layer
enable_layer “meta-python” "$OE/meta-python"
enable_layer “meta-jack” “$SWI/…/meta-jack”

In yocto/meta-swi/meta-swi-mdm9x15/recipes-core/images/ (the file might be changed according to your chipset), add the following:

IMAGE_INSTALL += “jacktest”

Now go to yocto foler and type “make” to build the yocto image.
The new image will located in yocto/build_bin/tmp/deploy/images/swi-mdm9x15/ , now download the image to the module. The new hello world file will be in /usr/bin/ in the module file system.