Mangoh yellow wifi from source

I was having trouble finding a guide to getting wifi working from a custom build.
It would work from the pre compiled firmware but would fail when generating my own .spk.
I ended up finding everything I needed through various forum posts and have compiled a step by step guide.

//configure leaf
>> $ cd ~
>> $ mkdir leaf_yellow
>> $ cd leaf_yellow
>> $ leaf init
>> $ leaf profile create yellow
>> $ leaf profile config yellow -p swi-wp77_4.0.1
>> $ leaf profile sync

//install current toolchain
>> $ wget https://downloads.sierrawireless.com/AirPrime/WP77xx/Release13/poky-swi-ext-glibc-x86_64-meta-toolchain-swi-armv7a-neon-toolchain-swi-SWI9X06Y_02.35.02.00.sh
>> $ ./poky-swi-ext-glibc-x86_64-meta-toolchain-swi-armv7a-neon-toolchain-swi-SWI9X06Y_02.35.02.00.sh

//get linux source and compile
>> $ leaf getsrc swi-linux
>> $ cd swi-linux-src
>> $ make image_bin
>> $ cd ..

//get meta-mangoh and recompile
>> $ cd swi-linux-src
>> $ git clone https://github.com/mangOH/meta-mangoh
>> $ cd meta-mangoh
>> $ git cherry-pick f68c437
>> $ git cherry-pick d1fe480
>> $ cd ..
>> $ make image_bin
>> $ cd ..

//get legato source and compile
>> $ leaf getsrc legato
>> $ cd legato-src/legato
>> $ make wp77xx
>> $ ./bin/legs
>> $ cd ../..

//get mangoh yellow source and compile
>> $ git clone --recursive https://github.com/mangOH/mangOH.git
>> $ cd mangOH/components/boschBsec
>> $ wget https://community.bosch-sensortec.com/varuj77995/attachments/varuj77995/bst_community-mems-forum/44/1/BSEC_1.4.7.2_GCC_CortexA7_20190225.zip
>> $ unzip BSEC_1.4.7.2_GCC_CortexA7_20190225.zip
>> $ cd ../..
>> $ OCTAVE=0 LEGATO=0 LEGATO_TARGET=wp77xx make yellow_spk
>> $ cd ..

//generate firmware.spk
>> $ swicwe -o firmware.spk -c \
>> $ leaf-data/current/wp77-modem-image/9999999_9908397_SWI9X06Y_02.35.02.00_00_TELSTRA_001.044_000.spk \
>> $ swi-linux-src/build_bin/tmp/deploy/images/swi-mdm9x28-wp/yocto_wp77xx.4k.cwe \
>> $ mangOH/build/yellow_wp77xx/legato.cwe
1 Like