Yocto source build for wp7608

Hi ,

we are using the wp7608 on out customized board and would like to customize the BSP with / without legato (irrelevant)

Once after successful kernel & rootfs , would like to flash the images to appropriate NAND flash.

Could some one point me to the right location to start with this task

1 Like

Hi Siva,
Please find info and package below:
https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-9-components/

Hope it helps.
Thx

Hi lotam,

I have downloaded the linux-SWI9X07Y_02.16.02.00.cwe file and I am not clear how to use this file for the yocto build.
Could you please guide me on this topic.

Hi Siva,

No, you need to refer to “Rebuild Linux Distribution or/and Legato from source” section.
i.e. SWI9X07Y_02.16.02.00 Source is the complete Yocto Linux package used to customize and build your own Linux.

Basically, you just need to extract the package (tar), then “make” to build.

Customization steps depends what device/driver you are going to add.
Maybe you can refer to below doc (for FX30 adding Bluetooth) as example to understand the customize and build/flash process.
https://source.sierrawireless.com/resources/airlink/application_notes_and_code_samples/airlink_appnote_using-bluetooth-with-the-mirage-iot-card/

Thx

1 Like

Hi lotam,

Is Some one has tried to build this tar ball package succesfully ?
make image_bin ==> throws the following error.

[1/783] Bundling file
| [2/783] Build kernel driver module
| FAILED: /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules/spisvc/spisvc.ko
| make -C /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules/spisvc
| make[1]: Entering directory ‘/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules/spisvc’
| make -C /home/stirulaka/work/mttm/yocto/build_bin/tmp/work-shared/swi-mdm9x28/kernel-build-artifacts M=/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules/spisvc modules
| make[2]: Entering directory ‘/home/stirulaka/work/mttm/yocto/build_bin/tmp/work-shared/swi-mdm9x28/kernel-build-artifacts’
| make[2]: *** No rule to make target ‘modules’. Stop.
| make[2]: Leaving directory ‘/home/stirulaka/work/mttm/yocto/build_bin/tmp/work-shared/swi-mdm9x28/kernel-build-artifacts’
| Makefile:11: recipe for target ‘all’ failed
| make[1]: *** [all] Error 2
| make[1]: Leaving directory ‘/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules/spisvc’
| [3/783] Bundling file
| ninja: build stopped: subcommand failed.
| Makefile:518: recipe for target ‘system_wp76xx’ failed
| make: *** [system_wp76xx] Error 1
| WARNING: /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/temp/run.do_compile.31422:1 exit 2 from ‘make $LEGATO_TARGET’
| ERROR: Function failed: do_compile (log file is located at /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_compile.31422)
ERROR: Task (/home/stirulaka/work/mttm/yocto/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 1400 tasks of which 0 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/stirulaka/work/mttm/yocto/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb:do_compile
Summary: There were 13 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Makefile:217: recipe for target ‘image_bin’ failed
make: *** [image_bin] Error 1

My host setup is
Ubuntu 16.04 64 bit

we are blocked on making progress to build from the source. Any suggestions would be appreciated ?

Thanks,
Siva

Hi ,

I had did a work around to overcome the above error in the following Makefile

/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules/spisvc/Makefile

I had commented out the spisvc.ko to not to build.

How ever at the end of the build, the build system fails to copy the kernel module as it was not build. Below is the error message

| find: ‘/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules//.ko’: No such file or directory
| cp: missing file operand
| Try ‘cp --help’ for more information.
| ninja: build stopped: subcommand failed.
| Makefile:518: recipe for target ‘system_wp76xx’ failed
| make: *** [system_wp76xx] Error 1
| WARNING: /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/temp/run.do_compile.21174:1 exit 2 from ‘make $LEGATO_TARGET’
| ERROR: Function failed: do_compile (log file is located at /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_compile.21174)
ERROR: Task (/home/stirulaka/work/mttm/yocto/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 1400 tasks of which 1399 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/stirulaka/work/mttm/yocto/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb:do_compile
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Makefile:217: recipe for target ‘image_bin’ failed

Looks like I am close to overcome this build issue . Is some one faced this issue earlier ?
Any inputs are greatly appreciated.

Thanks

Hi Siva,

Seems you are also following up this build topic on forum.legato.io and forum.mangoh.io, have you got this build issue solved?

If not, from the last log here, it seems the error is due to the workaround you made:

Can you share how you modify in the Makefile?

Guess the workaround cannot solve the build problem, please try rollback to original and try modify sdef file to comment out spisvc related.

Thx

Hi,

The Makefile changes are below


#obj-m += spisvc.o

src = /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/drivers/spisvc

KBUILD := /home/stirulaka/work/mttm/yocto/build_bin/tmp/work-shared/swi-mdm9x28/kernel-build-artifacts
export CROSS_COMPILE := /home/stirulaka/work/mttm/yocto/build_bin/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
export ARCH := arm

all:
#make -C $(KBUILD) M=/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules/spisvc modules

clean:
make -C $(KBUILD) M=/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/build/wp76xx/system/modules/spisvc clean


I had tried commenting spisvc related in the
./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af/default.sdef

But no luck

Could you please point to the exact sdef file that I need to modify to comment out spisvc related

Hi,

Can you share the content of the compilation log file (/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_compile.31422)?

Thanks,

Olivier

log.do_compile.31422.txt (82.0 KB)

Please find the attached log file for your reference

Please try:
export LEGATO_BUILD=0
make image_bin

Regards,

Olivier

Hi Olivier,

Now build fails as shown below

| NOTE: Executing: ldconfig -r/home/stirulaka/work/mttm/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs-c new -v
| WARNING: [log_check] mdm9x28-image-minimal: found 1 warning message in the logfile:
| [log_check] WARNING: The license listed TI-TSPA was not in the licenses collected for recipe wl18xx-firmware
|
| DEBUG: Python function do_rootfs finished
| DEBUG: Executing shell function rootfs_symlink
| ln: failed to create symbolic link ‘/home/stirulaka/work/mttm/yocto/build_bin/tmp/deploy/images/swi-mdm9x28/rootfs’: No such file or directory
| WARNING: /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/temp/run.rootfs_symlink.114372:1 exit 1 from ‘ln -sf mdm9x28-image-minimal-swi-mdm9x28.4k.default /home/stirulaka/work/mttm/yocto/build_bin/tmp/deploy/images/swi-mdm9x28/rootfs’
| ERROR: Function failed: rootfs_symlink (log file is located at /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/temp/log.do_rootfs.114372)
ERROR: Task (/home/stirulaka/work/mttm/yocto/meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image-minimal.bb:do_rootfs) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 2540 tasks of which 1345 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/stirulaka/work/mttm/yocto/meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image-minimal.bb:do_rootfs
Summary: There were 11 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Makefile:217: recipe for target ‘image_bin’ failed
make: *** [image_bin] Error 1

please find the attached log.do_rootfs.114372.txt (98.9 KB)
log file

Thanks,
Siva

Did you do a clean build (completely delete the build_bin directory prior to run make)?

Regards,

Olivier

Hi Olivier,

Clean build didn’t help. below is the same error

| DEBUG: Python function do_rootfs finished
| DEBUG: Executing shell function rootfs_symlink
| ln: failed to create symbolic link ‘/home/stirulaka/work/mttm/yocto/build_bin/tmp/deploy/images/swi-mdm9x28/rootfs’: No such file or directory
| WARNING: /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/temp/run.rootfs_symlink.24805:1 exit 1 from ‘ln -sf mdm9x28-image-minimal-swi-mdm9x28.4k.default /home/stirulaka/work/mttm/yocto/build_bin/tmp/deploy/images/swi-mdm9x28/rootfs’
| ERROR: Function failed: rootfs_symlink (log file is located at /home/stirulaka/work/mttm/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/temp/log.do_rootfs.24805)
ERROR: Task (/home/stirulaka/work/mttm/yocto/meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image-minimal.bb:do_rootfs) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 2540 tasks of which 3 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/stirulaka/work/mttm/yocto/meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image-minimal.bb:do_rootfs
Summary: There were 11 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Makefile:217: recipe for target ‘image_bin’ failed
make: *** [image_bin] Error 1

log.do_rootfs.24805.txt (98.8 KB)

Sorry but it looks like in this version of the source package the deploy directory is not created if you do not compile Legato. Which causes this link error.

So we’re back to your original error. I can not reproduce this error on my compilation machine but I am working with our development team to get it resolved.

Regards,

Olivier

Hi opsaco,

Thanks fro your reply.
Its good to know that you have no problem with the compilation on your machine.
May I know what is the build environment that you are using ?
and also the exact sequence of steps to build ?

Thanks,
Siva

Siva,

I am using an Ubuntu 16.04.4 LTS 64 bit machine. To build the image I usually just untar the package, go in the yocto directory and run “make”.

I think some packages might be downloaded during the compilation process, does your build machine have internet access?

I am pushing our team to review your error messages, I will get back to you as soon as I get more details.

Regards,

Olivier

Hi Olivier,

I am using the same Ubuntu 16.04. 5 LTS 64 bit machine.
I run the make image_bin
Yes, the build machine has internet access.

Thanks,
Siva

HI Olivier,

I was wondering any updates on this topic ?

Thanks,
Siva

Siva,

Can you try to add “mkdir -p ${DEPLOY_DIR_IMAGE}” to the top of the rootfs_symlink task in meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image-minimal.bb:

rootfs_symlink() {
mkdir -p {DEPLOY_DIR_IMAGE} # Provide minimal image as rootfs symlink ln -sf {IMAGE_LINK_NAME}.4k.default ${DEPLOY_DIR_IMAGE}/rootfs
}

And then compile with LEGATO_BUILD=0

Regards,

Olivier