Installing mangOH on Device fails


#1

Hello everyone

I try to install mangOH on the device as described in the official Tutorial. The Chip used of Sierra Wireless is the WP7502. When trying to execute the command to make the mangOH Green system file as described in the ReadMe on the page https://github.com/mangOH/mangOH
i get the error that the file system.sdef is malformed.
I need to make the command mux work on the device for using the CAN. Any help would be appreciated.
Thank you :grinning:


#2

I modified the README.md yesterday and made a mistake in the instructions. So depending on when you viewed the README.md you may have seen the old version that tells you to use the Makefile (which was broken) or the new version in which every $ was mistakenly $$. Please take another look at README.md and tell me if you’re still having problems.


#3

When I execute the command now for the Green mangOH Board, it get the following error:

**** ERROR:**
**/home/netipc/workspace/legato/system.sdef:7:0: error: Unexpected character ‘#’ **
Makefile:382: recipe for target ‘system_wp85’ failed
make: *** [system_wp85] Error 1

Thank you for your help.


#4

Are you using Legato 17.06? Also, please give me the output of git rev-parse HEAD in your mangOH folder.


#5

I’m using Legato 16.10.3 because the newer release i wasn’t able to compile. The ubuntu version is 16.04. the output of the command is:

~/mangOH$ git rev-parse HEAD
3c8a5c0298364ec3881ebaad2b74c96dbc5b61ec

Thank you for the help.


#6

The version of the mangOH repository that you have checked out won’t compile against Legato 16.10.3. Can you tell me the problems you are having with compiling Legato? If we can fix that, then compiling mangOH should work as well.


#7

I was now able to compile the Legato 17.06.0 successfully. When trying to compile now the mangOH repository, i get following errors:

FAILED: make -C /home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4
make[1]: Entering directory '/home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4’
make -C /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel M=/home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4 modules
make[2]: Entering directory '/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel’
CC [M] /home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4/mangoh_module.o
/bin/sh: /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel/scripts/recordmcount: No such file or directory
scripts/Makefile.build:308: recipe for target ‘/home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4/mangoh_module.o’ failed
make[3]: *** [/home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4/mangoh_module.o] Error 1
Makefile:1276: recipe for target ‘module/home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4’ failed
make[2]: *** [module/home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4] Error 2
make[2]: Leaving directory '/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel’
Makefile:16: recipe for target ‘all’ failed
make[1]: *** [all] Error 2
make[1]: Leaving directory ‘/home/netipc/workspace/legato/build/wp750x/system/modules/9-mangoh_green_dv4’
[30/959] Build kernel driver module
FAILED: make -C /home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c
make[1]: Entering directory '/home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c’
make -C /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel M=/home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c modules
make[2]: Entering directory '/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel’
CC [M] /home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c/lsm6ds3_i2c.o
/bin/sh: /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel/scripts/recordmcount: No such file or directory
scripts/Makefile.build:308: recipe for target ‘/home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c/lsm6ds3_i2c.o’ failed
make[3]: *** [/home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c/lsm6ds3_i2c.o] Error 1
Makefile:1276: recipe for target ‘module/home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c’ failed
make[2]: *** [module/home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c] Error 2
make[2]: Leaving directory '/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel’
Makefile:12: recipe for target ‘all’ failed
make[1]: *** [all] Error 2
make[1]: Leaving directory ‘/home/netipc/workspace/legato/build/wp750x/system/modules/1-lsm6ds3-i2c’
[30/959] Build kernel driver module
FAILED: make -C /home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3
make[1]: Entering directory '/home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3’
make -C /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel M=/home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3 modules
make[2]: Entering directory '/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel’
CC [M] /home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3/lsm6ds3_core.o
/bin/sh: /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel/scripts/recordmcount: No such file or directory
scripts/Makefile.build:308: recipe for target ‘/home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3/lsm6ds3_core.o’ failed
make[3]: *** [/home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3/lsm6ds3_core.o] Error 1
Makefile:1276: recipe for target ‘module/home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3’ failed
make[2]: *** [module/home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3] Error 2
make[2]: Leaving directory '/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel’
Makefile:12: recipe for target ‘all’ failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/netipc/workspace/legato/build/wp750x/system/modules/0-lsm6ds3’
ninja: build stopped: subcommand failed.
Makefile:428: recipe for target ‘system_wp750x’ failed
make: *** [system_wp750x] Error 1

Thanks.


#8

The toolchain as it is distributed today is unable to build kernel modules. It is necessary to run make scripts in the kernel headers directory. I’m not sure why this issue hasn’t been fixed yet since it was discovered a long time ago. The workaround to fix the toolchain is described in the legato documentation for out of tree kernel modules. I will save you some reading and reproduce the instructions here:

# Put the arm toolchain in your PATH environment variable
export PATH=$PATH:/opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
# Change directory into the kernel headers directory distributed with the toolchain
cd /opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/src/kernel
# Change the ownership of everything in the folder so that we can update the contents
sudo chown -R $USER .
# Run make scripts with appropriate cross compilation flags
ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- make scripts
# Change the ownership of the kernel headers back to root
sudo chown -R root .

Failed to Compile red_wp750x
#9

Thank you for your support, the compilation finally worked and i was able to install mangOH on my device :grinning:


#10

Hi @dfrey, does this mean the current mangOH repository can only be used on framework of version 17.06 or even newer ones?


#11

I believe the mangOH Red and Green SDEFs will currently build against 17.05 or newer, but the redSensorToCloud app that’s part of mangOH Red’s SDEF won’t work properly unless you’re on 17.06 or newer.