# Add kernel modules

**URL:** <https://mangoh.discourse.group/t/add-kernel-modules/1871>\
**Category:** mangOH Red\
**Created:** [August 30, 2018, 2:31pm UTC](https://mangoh.discourse.group/t/add-kernel-modules/1871 "2018-08-30T14:31:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex1](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@alex1](https://mangoh.discourse.group/u/alex1)\
**Post date:** [August 30, 2018, 2:31pm UTC](https://mangoh.discourse.group/t/add-kernel-modules/1871/1 "2018-08-30T14:31:39Z")

</div>

I compiled the mangoh system files but I got this result.

mangoh@mangoh-vm:~/mangOH$ make red\_wp76xx |grep undefined  
Target compilers: /opt/swi/y22-ext-wp76xx/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc /opt/swi/y22-ext-wp76xx/sysroots/x86\_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++  
Target sysroot: /opt/swi/y22-ext-SWI9X07Y\_02.16.02.00/sysroots/armv7a-neon-poky-linux-gnueabi  
C compiler: GNU  
\*\* Warning: Ignoring empty app specification  
\*\* Warning: Ignoring empty app specification  
\*\* Warning: Ignoring empty app specification  
WARNING: “bmp280\_dev\_pm\_ops” [/home/mangoh/mangOH/build/red\_wp76xx/modules/bmp280-i2c/bmp280-i2c.ko] undefined!  
WARNING: “bmp280\_regmap\_config” [/home/mangoh/mangOH/build/red\_wp76xx/modules/bmp280-i2c/bmp280-i2c.ko] undefined!  
WARNING: “bmp180\_regmap\_config” [/home/mangoh/mangOH/build/red\_wp76xx/modules/bmp280-i2c/bmp280-i2c.ko] undefined!  
WARNING: “bmp280\_common\_probe” [/home/mangoh/mangOH/build/red\_wp76xx/modules/bmp280-i2c/bmp280-i2c.ko] undefined!  
WARNING: “bmp280\_common\_remove” [/home/mangoh/mangOH/build/red\_wp76xx/modules/bmp280-i2c/bmp280-i2c.ko] undefined!  
WARNING: “bmi160\_core\_probe” [/home/mangoh/mangOH/build/red\_wp76xx/modules/bmi160-i2c/bmi160-i2c.ko] undefined!  
WARNING: “bmi160\_core\_remove” [/home/mangoh/mangOH/build/red\_wp76xx/modules/bmi160-i2c/bmi160-i2c.ko] undefined!  
WARNING: “bmi160\_regmap\_config” [/home/mangoh/mangOH/build/red\_wp76xx/modules/bmi160-i2c/bmi160-i2c.ko] undefined!  
WARNING: “cp2130\_update\_ch\_config” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697q/mt7697q.ko] undefined!  
WARNING: “mt7697q\_read” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!  
WARNING: “mt7697\_uart\_read” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!  
WARNING: “mt7697q\_shutdown” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!  
WARNING: “mt7697\_uart\_close” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!  
WARNING: “mt7697\_uart\_write” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!  
WARNING: “mt7697q\_unblock\_writer” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!  
WARNING: “mt7697\_uart\_open” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!  
WARNING: “mt7697q\_write” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!  
WARNING: “mt7697q\_init” [/home/mangoh/mangOH/build/red\_wp76xx/modules/mt7697wifi\_core/mt7697wifi\_core.ko] undefined!

How to define them? Because I tried to add this in mangoh.sdef but it didn4t work. (corresponding to mdef for the concerned one of course).

taken form legato example  
moduleSearch:  
{  
// My example modules are found in this directory.  
$LEGATO\_ROOT/drivers/example  
}

// In the kernel modules section, you no longer need to give a full path to your mdef files. The  
// mktools will search through all of your paths given in the moduleSearch section.  
kernelModules:  
{  
// Include my sample module in the build.  
example.mdef  
}

---

<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:** [September 6, 2018, 8:18pm UTC](https://mangoh.discourse.group/t/add-kernel-modules/1871/2 "2018-09-06T20:18:11Z")

</div>

I think those symbol undefined warnings can be ignored. I believe they occur because we are building modules that depend on other modules. So for example:

```auto
WARNING: “mt7697q_init” [/home/mangoh/mangOH/build/red_wp76xx/modules/mt7697wifi_core/mt7697wifi_core.ko] undefined!

```

The function `mt7697q_init` is provided by the `mt7697q` module. When the mt7697wifi module is being built, it doesn’t really know about the `mt7697q` module so that’s why it says that the symbol is undefined.

---

<div class="post-metadata">

**Author:** ![alex1](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@alex1](https://mangoh.discourse.group/u/alex1)\
**Post date:** [September 17, 2018, 9:44pm UTC](https://mangoh.discourse.group/t/add-kernel-modules/1871/3 "2018-09-17T21:44:19Z")

</div>

I don’t know if this could be ignored.  
When I tried to launch Wifi interface this happens :  
root@mangoh9:~# ifup wlan1  
Setup MT7697 UART  
Device: WP76  
Enable power control  
insmod: can’t insert ‘/legato/systems/current/modules/mt7697wifi\_core.ko’: unknown symbol in module, or unknown parameter

root@mangoh9:~# logread -f  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.008335] mt7697wifi\_core: Unknown symbol mt7697q\_init (err 0)  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.013609] mt7697wifi\_core: Unknown symbol mt7697q\_write (err 0)  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.019426] mt7697wifi\_core: Unknown symbol mt7697\_uart\_open (err 0)  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.026262] mt7697wifi\_core: Unknown symbol mt7697q\_unblock\_writer (err 0)  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.032751] mt7697wifi\_core: Unknown symbol mt7697\_uart\_write (err 0)  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.039015] mt7697wifi\_core: Unknown symbol mt7697\_uart\_close (err 0)  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.046067] mt7697wifi\_core: Unknown symbol mt7697q\_shutdown (err 0)  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.051928] mt7697wifi\_core: Unknown symbol mt7697\_uart\_read (err 0)  
Jan 6 01:59:34 mangoh9 user.warn kernel: [7172.058109] mt7697wifi\_core: Unknown symbol mt7697q\_read (err 0)

And it’s weird because with another same mangOH Red WP7607 I could execute it easily, I should have the same software on both. Maybe a bad update. ☹

---

<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:** [September 17, 2018, 10:09pm UTC](https://mangoh.discourse.group/t/add-kernel-modules/1871/4 "2018-09-17T22:09:16Z")

</div>

Are you trying to use Legato 18.08.0? If so, please try with Legato 18.07.0. There’s a known bug in 18.08.0 with kernel modules.
