The instructions below show how to build custom yocto images for the WP76 and WP85. Note that if someone chooses to build their own yocto image then they should set the LEGATO_KERNELROOT environment variable before building MangOH, for example:
WP85:
export LEGATO_KERNELROOT="~/yocto-2.2/build_src/tmp/work/swi_mdm9x15-poky-linux-gnueabi/linux-yocto/3.14.29-r0.1/linux-swi_mdm9x15-standard-build"
WP76:
export LEGATO_KERNELROOT="~/yocto-2.2/build_src/tmp/work/swi_mdm9x28-poky-linux-gnueabi/linux-quic/3.18.44-r1/build"
1. Initialize repo
Create yocto folder:
mkdir ~/yocto-2.2
cd ~/yocto-2.2
WP85:
repo init -u git://gerrit-legato/manifest -m lxswi/branches/master/systems/wp85xx.xml -g “default,amss”
WP76:
repo init -u git://gerrit-legato/manifest -m lxswi/branches/master/systems/wp76xx.xml
2. Synchronize repo and build yocto
repo sync
make image_src
To set/unset kernel configuration options use the following commands:
cd $LEGATO_KERNELROOT
VERBOSE=1 make ARCH=arm menuconfig
Note if you just want to rebuild the kernel then the following can be used in a script (e.g. here we create a script called build_kernel.sh and place in the build_src folder).
WP85:
bitbake -c compile -f linux-yocto
bitbake -c build -f linux-yocto
bitbake -c build -f mdm9x15-image-minimal
WP76:
bitbake -c compile -f linux-quic
bitbake -c build -f linux-quic
bitbake -c build -f mdm9x28-image-minimal
3. Build and install the toolchain (optional)
Note this step is only required for users that desire to build their own toolchain instead of downloading it from the sierrawireless web sites:
make toolchain_src
WP85:
cd ~/yocto-2.2/
sudo ./build_src/tmp/deploy/sdk/poky-swi-ext-glibc-x86_64-meta-toolchain-swi-ext-armv7a-neon-toolchain-swi-ext-2.2.3.sh
WP76:
cd ~/yocto-2.2/
sudo ./build_src/tmp/deploy/sdk/poky-swi-ext-glibc-x86_64-meta-toolchain-swi-ext-armv7a-neon-toolchain-swi-ext-2.2.3.sh
4. Download new yocto build to the target device
Note before downloading switch pin 7 up for the MangOH Red and then once the downloading has started switch pin 7 back down.
WP85:
cd ~/yocto-2.2/
swiflash -m “WP85XX” -i ./build_src/tmp/deploy/images/swi-mdm9x15/yocto-legato_wp85.cwe
OR
copy yocto-legato_wp85.cwe to a folder on Windows PC with fdt2 installed
fdt2 yocto-legato_wp85.cwe
WP76:
cd ~/yocto-2.2/
swiflash -m “WP76XX” -i …/yocto-wp76/build_src/tmp/deploy/images/swi-mdm9x28/yocto_wp76xx.4k.cwe
OR
copy yocto-legato_wp85.cwe to a folder on Windows PC with fdt2 installed
fdt2 yocto_wp76xx.4k.cwe