How to replace the module in FW image(R16)

How to replace the module in FW image(R16)
(/mnt/legato/system/modules/mangoh_yellow_dev.ko)
Becausewe have some modification in mangoh_yellow_dev.ko
so we will run
rmmod /mnt/legato/system/modules/mangoh_yellow_dev.ko
and insert our modified module after remove module
insmod /home/root/mangoh_yellow_dev.ko

Can we replace this module during the build process? ( I can’t find the this module in yocto source code)

have you checked the legato source?

yes , I also search “mangoh_yellow_dev” in yocto folder , but no related files were found

It should be in the legato layer, not yocto

1 Like

Thanks your information.
I modified it under the source code folder of Legato and recompiled it, and installed it to the WP7605 target board (update yellow.wp76xx.update 192.168.2.2)

But checking the version of “/mnt/legato/system/modules/mangoh_yellow_dev.ko” is still not updated.

Did I miss something?

how about compile it together to the legato.cwe image?
(i.e. not using xxx.update file)

I don’t understand about your suggestion.
Only update file after compile “mangOH” .

And “R16” (Legato-Dist-Source-mdm9x28-SWI9X07Y_02.37.07.00.tar.bz2) can not find the relevant documents of mangoh_yellow_dev

so I don’t know how to compile it together…

Here has an example to include a new application to legato.cwe

Probably you need to do the same according to yellow.sdef to include your kernel driver:

1 Like

Hi jyijyi,
Thanks,
I have downloaded the tarball (legato-19.11.5.tar.bz2)
And try to modify localhost.sdef, then compile it (make wp76xx)
But I didn’t see my newly added module on the target board after firmware updated
image

(I hope wifi and the modified mangoh_yellow_dev.ko driver can be added)
Is there any error in my modification?

below is modified ‘localhost.sdef’

//--------------------------------------------------------------------------------------------------
// Sample system definition that includes essential modem and positioning services.
//
// Copyright (C) Sierra Wireless Inc.
//--------------------------------------------------------------------------------------------------

#include "$LEGATO_ROOT/legatoTargetConfig.sinc"

#include "$LEGATO_ROOT/apps/platformServices/defaultAirVantage.sinc"

buildVars:
{
    MANGOH_BOARD = yellow

    LEGATO_WIFI_PA = ${CURDIR}/linux_kernel_modules/cypwifi/scripts/pa_wifi.sh

#if ${MANGOH_WP_CHIPSET_9X07} = 1
    MANGOH_BME680_I2C_BUS = 6
#elif ${MANGOH_WP_CHIPSET_9X15} = 1
    MANGOH_BME680_I2C_BUS = 2
#endif

    // Exclude a few big libraries from the Legato apps to save space in the legato.cwe.
    // These libraries are available in the root file system, but by default they also
    // get added to some apps to prevent potential version mismatches when running on older
    // root file systems.
    USE_ROOTFS_CURL = 1
    USE_ROOTFS_OPENSSL = 1
    USE_ROOTFS_ZLIB = 1
}

#if ${OCTAVE} = 1
#include "sinc/octave_full.sinc"
#endif

apps:
{
    // Platform services.
    $LEGATO_ROOT/apps/platformServices/audioService
    $LEGATO_ROOT/apps/platformServices/cellNetService
    $LEGATO_ROOT/apps/platformServices/dataConnectionService
    $LEGATO_ROOT/apps/platformServices/fwupdateService
    $LEGATO_ROOT/apps/platformServices/modemService
    $LEGATO_ROOT/apps/platformServices/positioningService
    $LEGATO_ROOT/apps/platformServices/powerMgr
    $LEGATO_ROOT/apps/platformServices/secStore
    $LEGATO_ROOT/apps/platformServices/smsInboxService
    $LEGATO_ROOT/apps/platformServices/voiceCallService
    $LEGATO_ROOT/apps/platformServices/gpioService
    $LEGATO_ROOT/apps/platformServices/atService
    $LEGATO_ROOT/apps/platformServices/portService
//
    $CURDIR/apps/YellowSensor/imu
    $CURDIR/apps/YellowSensor/light
    $CURDIR/apps/YellowSensor/button
    $CURDIR/apps/Bme680EnvironmentalSensor/environment
    $CURDIR/apps/DataHub-Buzzer/buzzer
    $CURDIR/apps/YellowOnBoardActuators/leds
    $CURDIR/apps/BatteryService/battery
    $CURDIR/apps/VegasMode/vegasMode
    $CURDIR/apps/Welcome/helloYellow
    $CURDIR/samples/BluetoothSensorTag/bluetoothSensorTag
    $CURDIR/apps/ntag/ntag
    $CURDIR/apps/NtagDhubIf/NtagDhubIf
    $CURDIR/apps/BluetoothServices/bluetoothServices
    $CURDIR/apps/wakeup_app/wakeup_app
    // Command-line tools.
    $LEGATO_ROOT/apps/tools/tools
}

commands:
{
    cm = tools:/scripts/cm
    fwupdate = tools:/bin/fwupdate
    secstore = tools:/bin/secstore
    pmtool = tools:/bin/pmtool
    gnss = tools:/bin/gnss
    uartMode = tools:/bin/uartMode
}

bindings:
{
    <root>.le_fwupdate -> fwupdateService.le_fwupdate
}

interfaceSearch:
{
    interfaces/modemServices
    interfaces/positioning
    interfaces/atServices
    $CURDIR/apps/YellowSensor/interfaces
    $LEGATO_ROOT/interfaces/wifi
}

kernelModules:
{
    $CURDIR/linux_kernel_modules/mangoh/mangoh_yellow_dev
    $CURDIR/linux_kernel_modules/bmi160/bmi160-i2c
    $CURDIR/linux_kernel_modules/bmi160/bmi160
    $CURDIR/linux_kernel_modules/rtc-pcf85063/rtc-pcf85063
    $CURDIR/linux_kernel_modules/rtc_sync/rtc_sync
    $CURDIR/linux_kernel_modules/bq25601/bq25601
    $CURDIR/linux_kernel_modules/bq27xxx/bq27xxx_battery
    $CURDIR/linux_kernel_modules/opt300x/opt300x
    $CURDIR/linux_kernel_modules/expander/expander
    $CURDIR/linux_kernel_modules/cp2130/cp2130
}

How about modifying ./modules/WiFi/wifi.sdef

1 Like