Coder Social home page Coder Social logo

mangoh / mangoh Goto Github PK

View Code? Open in Web Editor NEW
48.0 17.0 40.0 2.94 MB

Primary mangOH git repository

Home Page: https://mangoh.io

License: Mozilla Public License 2.0

Makefile 0.71% C 81.76% Shell 1.86% Python 0.26% C++ 14.06% Objective-C 1.16% CMake 0.10% Dockerfile 0.09%

mangoh's Introduction

mangOH

Base project containing apps and drivers for the mangOH hardware

Setup

  1. Download and install the appropriate toolchain for your WP module from source.sierrawireless.com
    1. Click AirPrime > WP Series > Your WP module > Firmware
    2. Scroll to near the bottom of the page and follow the Release X Components link
    3. Download the 64-bit ToolChain
    4. Run chmod a+x toolchain.sh on the toolchain file (name will vary depending on module)
    5. Run the toolchain installer: ./toolchain.sh and install to /opt/swi/y22-ext_SWI9X07Y_02.14.04.00. Alter the previous path so that it is consistent with the yocto version and Legato Linux distribution version.
    6. Run ln -sf /opt/swi/y22-ext_SWI9X07Y_02.14.04.00 /opt/swi/y22-ext-wp76xx, again modifying this command slightly to match the toolchain/module.
  2. Yocto 1.7 based systems have a problem with their toolchain where some scripts required for building kernel modules aren't built. This currently affects the WP85 and WP75 release 15. To correct this issue, do the following.
    1. export PATH=$PATH:/opt/swi/y17-ext-wpXXXX/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi (Note that the y17-ext-wpXXXX will be something like y17-ext-wp750x depending on the module.)
    2. cd /opt/swi/y17-ext-wpXXXX/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel
    3. sudo chown -R $USER .
    4. ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- make scripts
    5. sudo chown -R root .
  3. Get the Legato source code as described by the Legato README
  4. Define an environment variable describing the location of the legato framework: export LEGATO_ROOT=~/legato_workspace/legato
  5. cd to the home directory and clone the mangOH source code by running git clone --recursive git://github.com/mangOH/mangOH
  6. Build mangOH for your board/module combination by doing using a command like make red_wp76xx in the mangOH folder. Possible boards are red and green and possible modules are wp85, wp750x, wp76xx and wp77xx. Note that this will build the necessary parts of the Legato framework from $LEGATO_ROOT as well.
  7. Run $LEGATO_ROOT/bin/update build/update_files/red/mangoh.wp76xx.update 192.168.2.2 to program the update file to the mangOH board connected via a USB cable to the CF3 USB port. Note that the previous command will need to be changed slightly depending on which board and module is in use. Also note that it may be convenient to put $LEGATO_ROOT/bin into your $PATH variable for easier access to the update command.

mangoh's People

Contributors

ashsyal avatar bcmitchells avatar dclark75 avatar doug-skl avatar dpfrey avatar essembeh avatar jvermillard avatar nxthongbk avatar zchowdhury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mangoh's Issues

Enable effective including of yellow.sdef

Today, the Cypress wifi is build using the mangOH Makefile. This doesn't provide a very good experience for someone who wants to build their own SDEF that's built on top of the yellow.sdef because they will have to copy/paste the stuff for building the Cypress wifi kernel modules into their own Makefile.

Ideally, I think it would be nice if the building of the Cypress modules could be integrated into an externalBuild step of an mdef, but I think this won't work because the Cypress build script ends up generating a number of modules (4?) and the mdef paradigm is one mdef = one .ko.

Perhaps we could modify our Makefile so that there is an option to pass a user specified SDEF through an environment variable so that at least the user doesn't have to copy the Makefile.

Nightly builds

Start doing nightly builds of the master branch for all supported modules on all supported mangOH boards.

Remove default.sdef copied from Legato

The default.sdef in the mangOH project is identical to the one in Legato except that the smsInboxService is removed from the apps section in the mangOH version. I don't think this is a sufficiently large deviation from the Legato version to justify maintaining our own version of the file.

Remove wifi.sdef copied from Legato

The wifi.sdef was copied from Legato so that some unnecessary apps could be removed from it in order to reduce the size of the mangOH Yellow system. Once we start using Legato 19.09.0 or newer, we can have our SDEF #include "$LEGATO_ROOT/modules/WiFi/wifi.sinc instead and that will only include the necessary apps.

libiio-0.15 vs libiio-0.18

When I recursively checked out the project. I'm pretty sure I got libiio-0.15
The build seems to need libiio-0.18
To workaround this I renamed
libiio to libiio-0.15
added libiio-0.18 source
added symlink called libiio --> libiio-0.18

BMI088 error

I use BMI088 drivers,when I insmod bmi088.ko and it show me this error"bmi088 4-0068: bmi088_write(): regmap_bulk_write() failed(-6)"?

CAN drivers not building/working for green_wp750x

I am trying to build CAN drivers for a green_wp750x. The mcp251x can bus card is in slot 1 since we have the WiFi module in slot 0.

The most recent mangOH.sdef includes the drivers but only for the red_xxxx (https://github.com/mangOH/mangOH/blob/master/mangOH.sdef#L128-L152).

When I add the drivers to the green without any further changes (i.e. not commenting out spisvc) it builds

mangoh@mangoh-vm:~/mangOH$ make clean green_wp750x
mangoh@mangoh-vm:~/mangOH$ find build -name *.ko
build/green_wp750x/staging/modules/can_iot.ko
build/green_wp750x/staging/modules/can-raw.ko
build/green_wp750x/staging/modules/lsm6ds3-i2c.ko
build/green_wp750x/staging/modules/mangoh_green_dv4.ko
build/green_wp750x/staging/modules/can-dev.ko
build/green_wp750x/staging/modules/can.ko
build/green_wp750x/staging/modules/lsm6ds3.ko
build/green_wp750x/staging/modules/spisvc.ko
build/green_wp750x/staging/modules/vcan.ko
build/green_wp750x/staging/modules/can-bcm.ko
build/green_wp750x/staging/modules/mcp251x.ko
build/green_wp750x/modules/spisvc/spisvc.ko
build/green_wp750x/modules/lsm6ds3/lsm6ds3.ko
build/green_wp750x/modules/can/can.ko
build/green_wp750x/modules/mangoh_green_dv4/mangoh_green_dv4.ko
build/green_wp750x/modules/vcan/vcan.ko
build/green_wp750x/modules/can_iot/can_iot.ko
build/green_wp750x/modules/lsm6ds3-i2c/lsm6ds3-i2c.ko
build/green_wp750x/modules/mcp251x/mcp251x.ko
build/green_wp750x/modules/can-dev/can-dev.ko
build/green_wp750x/modules/can-bcm/can-bcm.ko
build/green_wp750x/modules/can-raw/can-raw.ko

... but the subsequent installation fails:

Jul 17 09:46:27 swi-mdm9x15 user.err Legato: =ERR= | gpioExpanderService[2157]/gpioExpanderCommon T=main | gpioExpander.c I2cAccessBusAddr() 972 | Could not open file /dev/i2c-6 or /dev/i2c/6: No such file or directory
Jul 17 09:46:27 swi-mdm9x15 user.err Legato: =ERR= | gpioExpanderService[2157]/gpioExpanderCommon T=main | gpioExpander.c SmbusWriteReg() 1053 | failed to open i2c bus 6 for access to address 63
Jul 17 09:46:27 swi-mdm9x15 user.emerg Legato: *EMR* | gpioExpanderService[2157]/gpioExpanderCommon T=main | gpioExpander.c gpioExpander_Reset() 812 | Failed to reset GPIO expander on I2C bus 6 at address 0x3f
Jul 17 09:46:28 swi-mdm9x15 user.warn Legato: -WRN- | atClientDaemon[1953]/framework T=main | LE_FILENAME le_fdMonitor_Create() 672 | FD Monitor object name 'atClientDaemon.watchdogChain.le_wdog' truncated to 'atClientDaemon.watchdogChain.le'.
Jul 17 09:46:29 swi-mdm9x15 user.warn Legato: -WRN- | atServerDaemon[1954]/framework T=main | LE_FILENAME le_fdMonitor_Create() 672 | FD Monitor object name 'atServerDaemon.watchdogChain.le_wdog' truncated to 'atServerDaemon.watchdogChain.le'.
Jul 17 09:46:29 swi-mdm9x15 user.info Legato:  INFO | gpioService[2012]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs_SessionCloseHandlerFunc() 1178 | Releasing GPIO 2
Jul 17 09:46:29 swi-mdm9x15 user.info Legato:  INFO | supervisor[1905]/supervisor T=main | proc.c proc_SigChildHandler() 2035 | Process 'gpioExpanderService' (PID: 2157) has exited with exit code 1.
Jul 17 09:46:29 swi-mdm9x15 user.emerg Legato: *EMR* | supervisor[1905]/supervisor T=main | proc.c proc_SigChildHandler() 2077 | Process 'gpioExpanderService' reached fault limit while system in probation. Device will be rebooted.
Jul 17 09:46:29 swi-mdm9x15 user.warn Legato: -WRN- | _appStopClient[2192]/framework T=main | LE_FILENAME CreateSocket() 550 | Socket opened as standard i/o file descriptor 2!
Jul 17 09:46:29 swi-mdm9x15 user.info Legato:  INFO | modemDaemon[2024]/swiQmi T=main | swiQmi.c InitService() 378 | Init QMI service QMI_SERVICE_DMS (2)
Jul 17 09:46:29 swi-mdm9x15 user.info Legato:  INFO | modemDaemon[2024]/swiQmi T=main | swiQmi.c PrintServiceDetails() 354 | Service.2: library_version.6 idl_version.1 service_id.0x2 idl_minor_version.35
Jul 17 09:46:30 swi-mdm9x15 user.info Legato:  INFO | modemDaemon[2024]/swiQmi T=main | swiQmi.c StartService() 113 | qmi_client_get_service_list rc=0, numServices=1
Jul 17 09:46:30 swi-mdm9x15 user.info Legato:  INFO | modemDaemon[2024]/swiQmi T=main | swiQmi.c InitService() 378 | Init QMI service QMI_SERVICE_UIM (8)
Jul 17 09:46:30 swi-mdm9x15 user.info Legato:  INFO | modemDaemon[2024]/swiQmi T=main | swiQmi.c PrintServiceDetails() 354 | Service.8: library_version.6 idl_version.1 service_id.0xB idl_minor_version.42
Jul 17 09:46:30 swi-mdm9x15 user.emerg Legato: *EMR* | supervisor[1905]/supervisor T=main | app.c app_SigChildHandler() 3494 | Process 'gpioExpanderService' in app 'gpioExpanderServiceGreen' faulted: Rebooting system.
Jul 17 09:46:30 swi-mdm9x15 user.emerg Legato: *EMR* | supervisor[1905]/supervisor T=main | supervisor.c framework_Reboot() 695 | Supervisor going down to trigger reboot.

When I comment out $LEGATO_ROOT/drivers/spisvc/spisvc as described in the comment the build fails.

make[2]: Leaving directory '/home/mangoh/legato_framework/legato'
make[1]: Leaving directory '/home/mangoh/legato_framework/legato'
TOOLCHAIN_DIR=/opt/swi/y17-ext-wp750x/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi \
TOOLCHAIN_PREFIX=arm-poky-linux-gnueabi- \
MANGOH_BOARD=GREEN \
mksys -t wp750x --object-dir=build/green_wp750x --output-dir=build/update_files/green mangOH.sdef
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** ERROR:
Kernel module spisvc.mdef must be listed in sdef file.
Makefile:47: recipe for target 'green_wp750x' failed
make: *** [green_wp750x] Error 1

I am using Legato18.05.1_a37432c091f4345ee50613db47b0da5c and the latest mangOH code (f58376a) and reproduce this in the mangOH VM.

What am I missing?

mangOH Red Mediatek Wifi does not allow a stop and then start on Legato 19.10.

wifi client disconnect and then wifi client stop are the suggested Legato commands needed to bring
down a Wifi interface and later wifi client start ... can be used to restart the interface. This does not
work as the mt7697 core driver does not exit on a disconnect, nor on a stop, It seems some iproute2
interface issues while the supplicant is kept running. Doing everything manually, with killing
procs and rmmod drivers works but Legato is out of sync and things never work again. Note Legato
tries to always keep the supplicant up on 19.10.

Broken build.

Using the VM provided by mangOH, I can't run make red_wp76xx inside mangOH folder.

I get this error:
/home/mangoh/mangOH/mangOH.sdef:85:15: error: Unrecognized section name 'componentSearch'.

Whenever I revert these 3 commits: (2496571, 354e27d, 3d5bc8b) I can run the make again.

You guys should be using tags and releases instead of making commits directly on master.

Instruction of "mangOH Red mt7697 WiFi" not working!

I followed the instruction on
https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi

for WP76xx R9 release.

It is not correct in “Configure WiFi SSID on the units” Section.

The tricky point is that after reboot, we need to remove the wifi core driver by “rmmod 2-mt7697wifi_core”.
Otherwise, we can never make the wifi works.
After that I can config the WIFI setting by the following commands:

wifi ap setssid "SIERRAWIFI123"
wifi ap setdriver 1
wifi ap setmaxclients 1
wifi ap setsecurityproto 1
wifi ap setpassphrase "knockknock"
wifi ap setdiscoverable 1
wifi ap start wlan1

Now I can see the SSID in mobile phone.

Please verify above and update the instructions.

Create WiFi platform adaptor (PA) script for mangOH Red

Create a platform adaptor for the Legato WiFi service for use with the mt7697 based WiFi on the mangOH Red. This issue duplicates a suggestion from #34 so that the creation of a mangOH Red WiFi PA can be removed from the scope of that issue.

Custom Board

Good morning,
dont know if this is the right channel to ask, but i will try.
I realized a custom board starting from a mangoH yellow, this new device is 99% similar to original device, but I removed the i2c multiplexer component, connecting the bmi160 directly to i2c (in my project i dont need other hardware muxed.. wifi etc).
On my board i run legato 19.5, and I load the yellow_wp77xx_update.. but now i cant access the accelerometer..
Can someone point me in the right direction on how to remove the multiplexer code and load drivers so i can talk directly with bmi160 without (U505.. TCA9546A)?

best regards
Gianmaria

Don't set LEGATO_WIFI_PA in shared.sinc

The Cypress PA is only applicable to yellow. Ideally a MTK PA should be written for red, but at a minimum, the Cypress PA should only be set for yellow.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.