Rebuild legato images inside yocto

hi all!

I have yocto extracted from Legato-Dist-Source-mdm9x28-SWI9X07Y_02.16.02.00.tar.bz2
there is legato dir inside from legato-18.03.0.tar.bz2

This combination produces yocto_wp76xx.4k.cwe and legato-image.wp76xx.cwe.
Which one is for flashing into my wp7607-1 device?

After some changes in legato subdir (i.e. enabling example.ko module) I need to regenerate cwe images.
How to it wthout recompilig the whole world?

The similar question is the almost same: how to regenerate image after recompiling kernel?

Is it ok to go to legato folder and tye the following?
make wp76xx

answer is : no

legato is not build in “yocto/legato”, there is no “bin” directory inside it,
there should be some bitbake command for doing this, but I can’t find it…

as an option I can put legato standalone somwhere else,
but legato uses outdated kernel

so the question is:
where from legato gets the kernel and modules ??? how to change it

Here it says it is inside the toolchain if you build the legato standalone.

/opt/swi/y22-ext/sysroots/armv7a-neon-poky-linux-gnueabi/usr/src/kernel contains only scripts and headers for making external modules …

where are binaries used by legato to make image??

Didn’t “/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel/drivers” contain the kernel drivers source code?
which driver .ko are you referring to in legato image?

/opt/swi…/kernel does not contain full source code

I’m not trying to compile a new kernel module now,
I know how to do it

I just want to change kernel (and modules) binary in legato distribution,

Can you tell which kernel module are you referring to?
I look into default.sdef, I don’t see it is including any kernel driver.
Also in case I search inside the legato framework folder, I don’t see any .ko file.

please see my post here: Correct way to configure and rebuild kernel - mangOH Green - mangOH forum

I’ve already rebuild whole system: kernel,modules,filesystem
Then created my.spk file like with something like this:
swicwe -o my.spk -c modemFW.spk mcuFW.cwe appsboot_wp76xx.cwe legato.cwe

Then flashed it with swiflash.

  • where is kernel binary in this image?
  • how to update it (in image) without recompilong everything?

Does " my.spk " contain the kernel module you want?
Or you still need to download the yocto.cwe image?

in yocto/build_bin/tmp/deploy/images/swi-mdm9x28 there are such cwe files:
appsboot_wp76xx.cwe appsboot_wp77xx.cwe legato-image.wp76xx.cwe legato-image.wp77xx.cwe yocto_wp76xx.4k.cwe yocto_wp77xx.4k.cwe

Is there any documentation explaining what is inside them?

Do I need to flash both legato.cwe and yocto_wp76xx.4k.cwe ???

you can use swicwe -P option to see what is inside the cwe file.
You need to flash both legato.cwe and yocto.cwe in case you need to update the legato framework partition and yocto linux partition.

Thanks a lot. It explains my misunderstanding