Add kernel modules


#1

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
}


#2

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:

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.


#3

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. :frowning:


#4

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.