Errors when compiling R17 Yocto source from scratch for WP7609

Hello,

I am trying to compile a complete image for the WP7609 of the new R17 source.

I successfully did so with the R16 source but I went to re-do it and one of the hosting repositories has been shut down so I’m redoing the same process but for the R17 source.

I am running into a bug in the build script though.

I am running this on Ubuntu 18.04, with the 64 bit tool chain downloaded from the R17 components website from Sierra Wireless.

When i run the ‘make image’ command to generate the Yocto image it gets part way through the jobs and then spits out this error:

ERROR: lk-1.3.0-r2 do_compile: oe_runmake failed
ERROR: lk-1.3.0-r2 do_compile: Execution of ‘/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/temp/run.do_compile.4284’ failed with exit code 1
ERROR: Logfile of failure stored in: /home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/temp/log.do_compile.4284
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 9 -j 1 TOOLCHAIN_PREFIX=arm-poky-linux-gnueabi- TOOLCHAIN_OPTIONS= --sysroot=/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/recipe-sysroot mdm9607 DEBUG=0 BOOTLOADER_OUT=/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build ARCH=arm CC=arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/recipe-sysroot -Wno-error=format-security ENABLE_IMA=0 ENABLE_FX30= IMA_KERNEL_CMDLINE_OPTIONS= LINUX_KERNEL_DIR=/home/user/yocto/kernel WP_BOARD_PROBE=1 SIGNED_KERNEL=1
| make[1]: Entering directory ‘/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/lk’
| including app/aboot app/nandwrite app/rpmbtests dev/keys dev/pmic/pm8x41 dev/vib lib/debug lib/heap lib/libc lib/libfdt lib/openssl lib/ptable
| including lib/openssl/crypto lib/zlib_inflate
| generating /home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build/build-mdm9607/config.h
| compiling app/aboot/sierra_bl.c
| arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/recipe-sysroot -Wno-error=format-security -O2 -g -fno-builtin -finline -W -Wall -Wno-multichar -Wno-unused-parameter -Wno-unused-function -include /home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build/build-mdm9607/config.h -D_SIGNED_KERNEL=1 -DSIERRA -DSWI_IMAGE_LK -DSSDP_OVER_SPI -DENABLE_HASH_CHECK -fstack-protector-all -fno-strict-overflow -ffunction-sections -fdata-sections -I app/aboot -mcpu=cortex-a8 -DOPENSSL_BN_ASM_MONT -DAES_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DOPENSSL_NO_STDIO -DOPENSSL_NO_FP_API -DNO_WINDOWS_BRAINDEATH -DOPENSSL_IMPLEMENTS_strncasecmp -DOPENSSL_NO_DSA -DOPENSSL_NO_DH -DGETPID_IS_MEANINGLESS -DOPENSSL_NO_EC -DOPENSSL_NO_DES -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_SHA0 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_STORE -DOPENSSL_NO_WHIRLPOOL -DOPENSSL_NO_HW -DOPENSSL_NO_ENGINE -DZLIB -DLK_NO_TIME -DLK_NO_QSORT -DLK_NO_BIO -DLK_NO_HMAC -DLK_NO_ENCODE -DLK_NO_STDERR -DLK_NO_ABORT -DLK_NO_PEM -DLK_NO_OAEP -DLK_NO_SSLV23 -DLK_NO_RAND -DLK_NO_UNISTD -DLK_NO_ERR_STATE -DOPENSSL_LK --std=c99 -I/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build/build-mdm9607 -Iinclude -Itarget/mdm9607/include -I./platform/msm_shared -Iplatform/mdm9607/include -I./platform/msm_shared/include -I./include -I./include/sys -Iplatform/msm_shared/include -I./dev/panel/msm -Iarch/arm/include -I./platform/msm_shared/include -I./lib/zlib_inflate -I/home/user/yocto/kernel/arch/arm/mach-msm/include -I./platform/msm_shared/include -Idev/pmic/pm8x41/include -Idev/vib/include -Ilib/libfdt -Ilib/openssl/crypto -Ilib/openssl/crypto/asn1 -Ilib/openssl/crypto/evp -Ilib/openssl/crypto/x509 -Ilib/openssl/crypto/…/… -Ilib/openssl/crypto/…/include -Ilib/openssl/crypto/…/include/openssl -Ilib/openssl/crypto/…/…/openssl -c app/aboot/sierra_bl.c -MD -MT /home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build/build-mdm9607/app/aboot/sierra_bl.o -MF /home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build/build-mdm9607/app/aboot/sierra_bl.d -o /home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build/build-mdm9607/app/aboot/sierra_bl.o
| cc1: error: /home/user/yocto/kernel/arch/arm/mach-msm/include: Not a directory
| cc1: warning: switch ‘-mcpu=cortex-a8’ conflicts with ‘-march=armv7-a’ switch
| arch/arm/compile.mk:3: recipe for target ‘/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build/build-mdm9607/app/aboot/sierra_bl.o’ failed
| make[1]: *** [/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/build/build-mdm9607/app/aboot/sierra_bl.o] Error 1
| make[1]: Leaving directory ‘/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/lk’
| ERROR: oe_runmake failed
| makefile:20: recipe for target ‘make-make’ failed
| make: *** [make-make] Error 2
| WARNING: /home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/temp/run.do_compile.4284:1 exit 1 from ‘exit 1’
| ERROR: Execution of ‘/home/user/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/temp/run.do_compile.4284’ failed with exit code 1
ERROR: Task (/home/user/yocto/meta-swi/meta-swi-mdm9xxx/recipes-bsp/lk/lk_1.3.0.bb:do_compile) failed with exit code ‘1’

Can anyone help me fix this error in the build script or with my environment?

Thanks in advance!

We don’t see problem in compiling r17 yocto source

Did you download the source from the R17 components page or from the git repo?

Could you please share the environment that you are using to compile with? Perhaps the difference is our environments.

I am using Ubuntu 18.04, installing the packages from apt that the Yocto project recommend and the x64 toolchain from the sierra wireless website. Then running ‘make image’.

Thanks in advance!

I used Ubuntu 16 and I download the yocto package (Legato-Dist-Source-mdm9x28-SWI9X07Y_03.01.07.00.tar.bz2) from SOURCE:

https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-17-components/#sthash.ZccOb9ya.dpbs

I think your yocto package has some problem.

| cc1: error: /home/user/yocto/kernel/arch/arm/mach-msm/include: Not a directory

But “yocto/kernel/arch/arm/mach-msm/include/” can be found in my PC:

owner@CNHKG-EX-001367:~/Yocto/WP76/R17_SWI9X07Y_03.01.07.00$ ls yocto/kernel/arch/arm/mach-msm/include/
mach
owner@CNHKG-EX-001367:~/Yocto/WP76/R17_SWI9X07Y_03.01.07.00$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.7 LTS
Release:	16.04
Codename:	xenial

BTW, I used “make” to build the image.

Hello,

You were of course correct. By redownloading the tar file i have now been able to compile the default image and flash it onto a module successfully.

I now have the issue where i am trying to compile the gstreamer & usb webcam support into the yocto image. I have followed the pdf guide to integrate it into the compile time and the compile is successful, once I up the image size to 48M. However, when I flash the flash fails.

Do you have any advice on how to successfully increase the image size and flash correctly?

Thank you in advance.

I remember it won’t have enough space on module by default, you can see if just adding the following without the “gstreamer1.0-plugins-good” is ok to you:

IMAGE_INSTALL += "gstreamer1.0"
IMAGE_INSTALL += "gstreamer1.0-plugins-base"
#IMAGE_INSTALL += "gstreamer1.0-plugins-good"

some other user also tried to integrate gstreamer in WP7702:

If you need to expand the system size of your module, you need to contact distributor to get a tool

Hello,

So I’ve been able to compile in gstreamer and have the image install correctly on the WP76. However, when I modprobe for the uvcvideo driver it appears to not have been loaded into the OS image.

I have added the camera.cfg to meta-swi/meta-swi-mdm9x28/recipeskernel/linux/files/, and I patched in references to it in the linux-quic_git.bb file.

The files do differ slightly from the guide to the version in R17, are there any additional changes that i need to make to have the uvc drivers be added to the image?

Thanks in advance.

You can see here to modify the following file in order to add the driver
./kernel/arch/arm/configs/mdm9607_defconfig