# Build Linux for wp76

**URL:** <https://mangoh.discourse.group/t/build-linux-for-wp76/1084>\
**Category:** Uncategorized\
**Created:** [January 16, 2018, 7:31pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084 "2018-01-16T19:31:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [January 16, 2018, 7:31pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/1 "2018-01-16T19:31:48Z")

</div>

Is anybody have build the Linux distro for the wp76?

I try it but Wp76 use Linux Qualcomm (quic) and command line is a little bit different. I can’t set the default kernel config. The next step seems ok.

I would like to add FTDI driver to wp76 kernel,

Thanks  
Francis

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [January 18, 2018, 6:44pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/2 "2018-01-18T18:44:29Z")

</div>

Nobody can help me ?  
I just want to add Fdti driver into the wp76 Linux distro…

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [January 18, 2018, 9:37pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/3 "2018-01-18T21:37:07Z")

</div>

##### Setup the bitbake environment

1. `cd poky`
2. `source oe-init-build-env`

##### Run menuconfig for the kernel

1. `cd ../../build_src`
2. `bitbake -c listtasks linux-quic`
3. `bitbake -c menuconfig linux-quic`
4. Navigate to _Device Drivers \> USB Support \> USB Serial Converter Support_ and press _m_ for module
5. Press _enter_ to view the list of serial converters
6. Find _USB FTDI Single Port Serial Driver_ and press _m_
7. Save the config as _.config_ (the default) and exit

##### Put the config changes into yocto

1. Diff the original config vs your new one. Your paths may be slightly different: `diff -U3 ./tmp/work/swi_mdm9x28-poky-linux-gnueabi/linux-quic/3.18.20+git301b7484e0a2c68a7f852db9c09fc237639021f5-r1/build/.config.orig ./tmp/work/swi_mdm9x28-poky-linux-gnueabi/linux-quic/3.18.20+git301b7484e0a2c68a7f852db9c09fc237639021f5-r1/build/.config`
2. Edit _kernel/arch/arm/configs/mdm9607\_defconfig_ and add `CONFIG_USB_SERIAL=m` and `CONFIG_USB_SERIAL_FTDI_SIO=m`

##### Rebuild the yocto image

1. `cd` to the toplevel yocto directory
2. `make image_src`

Now install _build\_src/tmp/deploy/images/swi-mdm9x28/yocto\_wp76xx.4k.cwe_ using fdt, fwupdate or swiflash.

I verified this using a yocto from the sierra wireless internal git repository. The instructions might need to change slightly to use the public tarball. Maybe you need to do `make image_bin` instead of `make image_src` and replace all the `build_src` instances with `build_bin` in the above instructions. I hope that helps.

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [January 19, 2018, 5:19am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/4 "2018-01-19T05:19:13Z")

</div>

Thank a lot David. I will test it this afternoon.  
I will now used the wp7607-1 for test.

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [January 19, 2018, 8:57am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/5 "2018-01-19T08:57:48Z")

</div>

Hi Dfrey

I can use [\*] in the menuconfig setting and ‘y’ (instead of ‘m’ in mdm9607\_defconfig file) if I want to load driver at startup ?

Is it correct ?  
Thank’s

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [January 20, 2018, 10:18am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/6 "2018-01-20T10:18:26Z")

</div>

Hello

I have now the FDTI driver in the WP76 firmware 🙂  
I can see it in /dev/ttyUSB0 and able to send data over a USB FTDI cable.

Thank’s a lot for your help !!

---

<div class="post-metadata">

**Author:** ![Evets](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/evets/32/279_2.png) [@Evets](https://mangoh.discourse.group/u/Evets)\
**Post date:** [January 26, 2018, 11:06pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/7 "2018-01-26T23:06:38Z")

</div>

Hi @dfrey  
I have something similar, but not a driver. Apparently, the extended network filtering (that handles mtu clamping) has been removed from the build. I need to put it back in. I am trying to find out what I change to do that. Can you tell me?

Thanks,  
Evets

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [January 31, 2018, 4:40am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/8 "2018-01-31T04:40:42Z")

</div>

That’s not a feature I am familiar with. Is it a missing kernel config option or a utility program?

---

<div class="post-metadata">

**Author:** ![yogesh.tyagi](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@yogesh.tyagi](https://mangoh.discourse.group/u/yogesh.tyagi)\
**Post date:** [February 6, 2018, 2:32pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/9 "2018-02-06T14:32:44Z")

</div>

I am trying to do the same thing. I downloaded Legato Linux Distribution from here:

[https://source.sierrawireless.com/resources/legato/download/legatolinuxdist9x15/](https://source.sierrawireless.com/resources/legato/download/legatolinuxdist9x15/)

and trying to build it but getting below error:

warlord@ubuntu:~/legato\_source/yocto$ . ./poky/oe-init-build-env  
warlord@ubuntu:~/legato\_source/yocto/build$  
warlord@ubuntu:~/legato\_source/yocto/build$ bitbake -c listtasks linux-quic  
Loading cache: 100% |###############################################################################################################################| ETA: 00:00:00  
Loaded 1288 entries from dependency cache.  
ERROR: Nothing PROVIDES ‘linux-quic’

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Am I missing some steps?

Thanks,  
Yogesh

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [February 6, 2018, 2:54pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/10 "2018-02-06T14:54:59Z")

</div>

I think you miss to build “image\_bin” before o start…

cd yocto  
export LEGATO\_BUILD=0  
make image\_bin

---

<div class="post-metadata">

**Author:** ![yogesh.tyagi](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@yogesh.tyagi](https://mangoh.discourse.group/u/yogesh.tyagi)\
**Post date:** [February 7, 2018, 6:16am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/11 "2018-02-07T06:16:45Z")

</div>

> [@dfrey](#):
>
> USB Serial Converter Support

Hi @Francis.duhaut,

I want to enable “USB Serial Converter Support” before starting the build? How can I do that? And How do I make sure that I am using the correct yocto(Legato/MangoH-Green) package/version? Linux Kernel version on my MangoH Green board is 3.18.44 .

Here is the output of modprobe:

lsusb | grep -i ft  
Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC  
root@swi-mdm9x28:~# modprobe ftdi\_sio vendor=0x403 product=0x6001  
modprobe: module ftdi\_sio not found in modules.dep

Thanks,  
Yogesh

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [February 7, 2018, 7:57pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/12 "2018-02-07T19:57:32Z")

</div>

Send me a private message I will send a small tuto to build the yocto.

---

<div class="post-metadata">

**Author:** ![yogesh.tyagi](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@yogesh.tyagi](https://mangoh.discourse.group/u/yogesh.tyagi)\
**Post date:** [February 8, 2018, 6:43am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/13 "2018-02-08T06:43:03Z")

</div>

Hi @Francis.duhaut,

Do I need to set some environment variable for cross compilation before running “make image\_bin” because target board is ARM?

While running the “make image\_bin” initially I am getting following error:

make image\_bin  
Makefile:30: “Legato: build disabled since ‘/home/warlord/legato\_source/yocto/legato/’ does not exist”  
“meta-swi-extras/build.sh” -p poky/ -o meta-openembedded/ -l meta-swi -x “kernel/.git” -j 9 -t 9 -a “LK\_REPO=”/home/warlord/legato\_source/yocto/lk"" -m swi-mdm9x28 -b build\_bin -q  
Poky dir: /home/warlord/legato\_source/yocto/poky  
OE meta: /home/warlord/legato\_source/yocto/meta-openembedded  
SWI meta dir: /home/warlord/legato\_source/yocto/meta-swi  
Linux repo dir: /home/warlord/legato\_source/yocto/kernel/.git  
Number of make threads 9  
Number of bitbake tasks 9  
Extra options added - LK\_REPO=/home/warlord/legato\_source/yocto/lk  
SWI machine: swi-mdm9x28  
Build dir: /home/warlord/legato\_source/yocto/build\_bin  
Enable Qualcomm Proprietary bin  
You had no conf/local.conf file. This configuration file has therefore been  
created for you with some default values. You may wish to edit it to use a  
different MACHINE (target hardware) or enable parallel build options to take  
advantage of multiple cores for example. See the file for more information as  
common configuration options are commented.

The Yocto Project has extensive documentation about OE including a reference manual  
which can be found at:  
[http://yoctoproject.org/documentation](http://yoctoproject.org/documentation)

For more information about OpenEmbedded see their website:  
//http://www.openembedded.org/

You had no conf/bblayers.conf file. The configuration file has been created for  
you with some default values. To add additional metadata layers into your  
configuration please add entries to this file.

The Yocto Project has extensive documentation about OE including a reference manual  
which can be found at:  
//http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:  
//http://www.openembedded.org/

/### Shell environment set up for builds. ###

You can now run 'bitbake ’

Common targets are:  
core-image-minimal  
core-image-sato  
meta-toolchain  
adt-installer  
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  
make: \*\*\* [image\_bin] Error 1

Thanks,  
Yogesh

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [February 8, 2018, 7:36am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/14 "2018-02-08T07:36:04Z")

</div>

Hello,

To build Yocto and add FDTI driver

download yocto distro for WP76 and tool chain from sierra website (use the VM linux available on the Mangoh website)

remove old toolchain

sudo rm - R /opt/swi/\*

install new toolchain  
create a new folder ( ex yocto\_wp76 )  
cd yocto\_cp76

untar the linux distro into a folder  
-\> tar -xvjf DistroName…

Setup the bitbake environment

cd yocto  
make image\_bin

… you have time to drink a lot of cofee this take around 3H…

Now you can set the bitbake environnement :

cd poky  
source oe-init-build-env  
cd …/…/build\_bin  
bitbake -c listtasks linux-quic  
bitbake -c menuconfig linux-quic  
Navigate to Device Drivers \> USB Support \> USB Serial Converter Support and press space to have \* for module  
Press enter to view the list of serial converters  
Find USB FTDI Single Port Serial Driver and press space to have \*  
Save the config as .config (the default) and exit

Edit kernel/arch/arm/configs/mdm9607\_defconfig and add  
CONFIG\_USB\_SERIAL=y  
CONFIG\_USB\_SERIAL\_FTDI\_SIO=y

Rebuild the yocto image  
cd to the toplevel yocto directory  
make image\_bin

Now you can install build\_bin/tmp/deploy/images/swi-mdm9x28/yocto\_wp76xx.4k.cwe

cd /yocto/build\_bin/tmp/deploy/images/swi-mdm9x28  
cfglegato  
fwupdate download yocto\_wp76xx.4k.cwe 192.168.2.2

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [February 8, 2018, 9:34am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/15 "2018-02-08T09:34:55Z")

</div>

I use the VM linux available on MangOH web site.

Please use it. Idon’t have the list of the packet to install on linux.

---

<div class="post-metadata">

**Author:** ![yogesh.tyagi](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@yogesh.tyagi](https://mangoh.discourse.group/u/yogesh.tyagi)\
**Post date:** [February 8, 2018, 10:11am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/16 "2018-02-08T10:11:08Z")

</div>

The VM image you are using, is arm or x86?

Thanks,  
Yogesh

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [February 8, 2018, 10:58am UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/17 "2018-02-08T10:58:30Z")

</div>

It’s a Ubuntu 16.04 LTS x86 64 bits

You can download the VM at :

[http://mangoh.io/mangoh-red-resources-getting-started](http://mangoh.io/mangoh-red-resources-getting-started)

---

<div class="post-metadata">

**Author:** ![yogesh.tyagi](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@yogesh.tyagi](https://mangoh.discourse.group/u/yogesh.tyagi)\
**Post date:** [February 8, 2018, 12:52pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/18 "2018-02-08T12:52:15Z")

</div>

HI @Francis.duhaut,

After extracting toolchain, how did you make sure that this toolchain was used to build linux distro ? By default bitbake builds linux disro for “x86” architecture?

By the way, when I run “make image\_bin” in “yocto” folder, I get this error:

Common targets are:  
core-image-minimal  
core-image-sato  
meta-toolchain  
adt-installer  
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  
make: \*\*\* [image\_bin] Error 1

Thanks,  
Yogesh

---

<div class="post-metadata">

**Author:** ![Francis.duhaut](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/francis.duhaut/32/350_2.png) [@Francis.duhaut](https://mangoh.discourse.group/u/Francis.duhaut)\
**Post date:** [February 8, 2018, 1:04pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/19 "2018-02-08T13:04:55Z")

</div>

sorry the commande is :

make image (not image\_bin)

Toolchain is not necessary to build yocto (but required to build legato and apps)

---

<div class="post-metadata">

**Author:** ![yogesh.tyagi](https://avatars.discourse-cdn.com/v4/letter/y/c89c15/32.png) [@yogesh.tyagi](https://mangoh.discourse.group/u/yogesh.tyagi)\
**Post date:** [February 8, 2018, 2:26pm UTC](https://mangoh.discourse.group/t/build-linux-for-wp76/1084/20 "2018-02-08T14:26:51Z")

</div>

I get following error if I run “make image” from yocto folder:

make image  
Makefile:30: “Legato: build disabled since ‘/home/warlord/legato\_source/yocto/legato/’ does not exist”  
“meta-swi-extras/build.sh” -p poky/ -o meta-openembedded/ -l meta-swi -x “kernel/.git” -j 9 -t 9 -a “LK\_REPO=”/home/warlord/legato\_source/yocto/lk"" -m swi-mdm9x28 -b build\_bin -q  
Poky dir: /home/warlord/legato\_source/yocto/poky  
OE meta: /home/warlord/legato\_source/yocto/meta-openembedded  
SWI meta dir: /home/warlord/legato\_source/yocto/meta-swi  
Linux repo dir: /home/warlord/legato\_source/yocto/kernel/.git  
Number of make threads 9  
Number of bitbake tasks 9  
Extra options added - LK\_REPO=/home/warlord/legato\_source/yocto/lk  
SWI machine: swi-mdm9x28  
Build dir: /home/warlord/legato\_source/yocto/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  
adt-installer  
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  
make: \*\*\* [image\_bin] Error 1

Do you have any idea about this error?

[Next page](https://mangoh.discourse.group/t/build-linux-for-wp76/1084.md?page=2)
