Build WP77XX steps

Hello,
I’m tring to building legato and linux for a custom device with WP7702.

I’ve downloaded the legato source and swi-linux source with leaf. I can build legato with (make wp77xx) but I’m not able to customize the swi-linux-src (make menuconfig ???) to add support in kernel for BMI160 (On my board I have no i2c mux … removed couse not used).

Can someone help me with swi-linux build? I have this error right now:

(lsh:wp77) gianmaria@leg:~/myWorkspace/swi-linux-src$ make
“meta-swi/build.sh” -p poky/ -o meta-openembedded/ -l meta-swi -x “kernel” -j 9 -t 9 -g -a “LEGATO_WORKDIR=/home/gianmaria/myWorkspace/swi-linux-src/legato/” -a “IMA_SUPPORT_TOOLS_REPO=git:///home/gianmaria/myWorkspace/swi-linux-src/legato/3rdParty/ima-support-tools/.git;protocol=file;usehead=1” -a “IMA_SUPPORT_TOOLS_REV=${AUTOREV}” -a LK_REPO_DIR=“/home/gianmaria/myWorkspace/swi-linux-src” -a LK_REPO_NAME=“lk” -a LK_REPO=“file://lk” -m swi-mdm9x06 -P wp -b build_bin -q
Poky dir: /home/gianmaria/myWorkspace/swi-linux-src/poky
OE meta: /home/gianmaria/myWorkspace/swi-linux-src/meta-openembedded
SWI meta dir: /home/gianmaria/myWorkspace/swi-linux-src/meta-swi
Linux repo dir: /home/gianmaria/myWorkspace/swi-linux-src/kernel
Number of make threads 9
Number of bitbake tasks 9
With Legato
Extra options added - LEGATO_WORKDIR=/home/gianmaria/myWorkspace/swi-linux-src/legato/
Extra options added - IMA_SUPPORT_TOOLS_REPO=git:///home/gianmaria/myWorkspace/swi-linux-src/legato/3rdParty/ima-support-tools/.git;protocol=file;usehead=1
Extra options added - IMA_SUPPORT_TOOLS_REV=${AUTOREV}
Extra options added - LK_REPO_DIR=/home/gianmaria/myWorkspace/swi-linux-src
Extra options added - LK_REPO_NAME=lk
Extra options added - LK_REPO=file://lk
SWI machine: swi-mdm9x06
SWI product: wp
Build dir: /home/gianmaria/myWorkspace/swi-linux-src/build_bin
Enable Qualcomm Proprietary bin

Shell environment set up for builds.

You can now run ‘bitbake ’

Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
meta-ide-support

You can also run generated qemu images with a command like ‘runqemu qemux86’
Error: bash is not set as default provider for /bin/sh
build is not guaranteed to work, aborting
Makefile:384: recipe for target ‘image_bin’ failed
make: *** [image_bin] Error 1

How to make linux for my wp7702?

Regards,
Gianmaria

When build yocto:

Error: bash is not set as default provider for /bin/sh
       build is not guaranteed to work, aborting
make: *** [image_bin] Error 1

sudo apt-get remove ccache
sudo dpkg-reconfigure dash
Answer “No” to the question.


For building the menuconfig, you can do:

make dev
build_bin# bitbake linux-quic -c menuconfig
1 Like

Done… it worked. Now I have enabled support for BMI160 in kernel and saved the config.
How can i build the entire linux? And do it for wp7701… ? Also… in my experience (android kernel), i have DTS to indicate i2c address and presence of accelerometer under i2c bus…

Regards,
gian

I remember the mangoh layer already has bmi160 driver

Yes… but i cant use mangoH cause it defines communication with accelerometer through i2c multiplexer, and i dont have it on my board.
So the master plan is this:
1)Build legato (DONE…)
2)Configure kernel on linux source with BMI support (not enabled by default but i enabled right now…DONE)
3)Make kernel and linux for WP7702 (dont know how to do it)
4)Make legato for WP7702 (dont know how to do it)
5) Merge legato.cwe linux.cwe and modemdrivers to produce a complete system.

Actually I’m at point 3…
Gian

After you finish the menuconfig, just type “make”

1 Like

After reboot now i have:
(lsh:wp77) gianmaria@leg:~/myWorkspace/swi-linux-src/build_bin$ bitbake linux-quic -c menuconfig
bitbake: command not foud

… do i have to init something?

gian

Have you done “make dev”

(lsh:wp77) gianmaria@leg:~/myWorkspace/swi-linux-src$ make dev
Makefile:8: *** “Detected Makefile being re-invoked from within bitbake environment!”. Arresto.

Ok, now i’m able to execute following commands…
bitbake -c compile -f linux-quic
bitbake -c build -f linux-quic
bitbake -c build -f mdm9x28-image-minimal

…mdm9x28-image-minimal is right for WP7702?

Gian

I don’t know, what is that command for?

Useless command… found on help.
Anyway seems I’ve compiled everything… now I’ve:
LEGATO HERE:
/home/gianmaria/myWorkspace/legato-src/legato/build/wp77xx/legato.cwe

LINUX HERE
/home/gianmaria/myWorkspace/swi-linux-src/build_bin/tmp/deploy/images/swi-mdm9x28-wp/yocto_wp77xx.4k.cwe

MODEM DRIVERS
Original from
https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-latest-release-components/-/media/17ae6bd0fd1449f28429a0d5b1434df6.ashx

are this the right files???

I will try to pack with
swicwe -o custom-firmware.spk -c modemFW.spk yocto_wp77xx.4k.cwe legato.cwe

gian

You can download to module one by one to make sure they are working fine

It worked… file by file… it worked.
Anyway i still didt see my BMI160 even if it’s enabled in kernel drivers cause i need to know witch DTS to edit to declare it… there are a lot of it and i dont know wich is the right one to define the accel i2c address… something like this:

bosch@68 { /* Accelerometer and Gyroscope sensor */
compatible = “bosch,bmi160”;
reg = <0x68>;

Actually I’m not sure i generated the right recipe…
With bitbake -s i see a toon of recipes i can build… which is the right one?

seems porting the mangoh layer bmi160 driver is easier for you

Can you suggest me? I’m a little bit lost…

thanks,
gian

you can try to port this driver: