Build Linux for wp76


#1

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


Correct way to configure and rebuild kernel
#2

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


#3
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.


#4

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


#5

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


#6

Hello

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

Thank’s a lot for your help !!


#7

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


#8

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


#9

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

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


#10

I think you miss to build “image_bin” before o start…

cd yocto
export LEGATO_BUILD=0
make image_bin


#11

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


#12

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


#13

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

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


#14

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


#15

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.


#16

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

Thanks,
Yogesh


#17

It’s a Ubuntu 16.04 LTS x86 64 bits

You can download the VM at :

http://mangoh.io/mangoh-red-resources-getting-started


#18

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


#19

sorry the commande is :

make image (not image_bin)

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


#20

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?