[OpenWrt-Devel] [ramips] Linkit Smart 7688 and libmraa

Ivan Hörler ivanhoerler at gmail.com
Tue Sep 24 05:24:03 EDT 2019


Hi
I opend a issue in the mraa git repo and got some new information about why and where libmraa breaks.
It seams related to a change in the system. At some point openWRT must have dropped  or changed some parts of `/dev/mem`.
This now makes libmraa break and maybe not only for my target.
Im not the C dev that can handel such a thing. 
May somebody with C knowledge have a minute to look in to it and tell me what possibilities i have and how many targets possibly are affected by this?
https://github.com/intel-iot-devkit/mraa/issues/983 <https://github.com/intel-iot-devkit/mraa/issues/983>
Thanks, Ivan 

> Am 20.09.2019 um 15:10 schrieb Ivan Hörler <ivanhoerler at gmail.com>:
> 
> I tried to compile the package libmraa as single and have some problems with the dependencies:
> 
> Followed this: https://openwrt.org/docs/guide-developer/single.package <https://openwrt.org/docs/guide-developer/single.package>
> First i searched for all dependencies:
> 
> root at OpenWrt:/# opkg info libmraa
> Package: libmraa
> Version: 2.0.0-2
> Depends: libc, libstdcpp6, libjson-c4
> Status: install user installed
> Section: libs
> Architecture: mipsel_24kc
> Size: 64409
> Filename: libmraa_2.0.0-2_mipsel_24kc.ipk
> 
> root at OpenWrt:/# opkg info libc
> Package: libc
> Version: 1.1.23-2
> Depends: libgcc1
> Status: install hold installed
> Essential: yes
> Architecture: mipsel_24kc
> Installed-Time: 1568571183
> 
> then i tried to make menuconfig so i can tick the dependencies but i did not find the dependencie of libc named libgcc1. 
> A try to compile after installing tools and toolchain fails as well:
> 
> novski at ubuntu:~/Documents/openwrt$ make package/libgcc1/compile V=s
> make[1]: Entering directory '/home/novski/Documents/openwrt'
> make[1]: *** No rule to make target 'package/libgcc1/compile'.  Stop.
> make[1]: Leaving directory '/home/novski/Documents/openwrt'
> /home/novski/Documents/openwrt/include/toplevel.mk:216: recipe for target 'package/libgcc1/compile' failed
> make: *** [package/libgcc1/compile] Error 2
> 
> Why do i not find the dependency libgcc1 in 'make menuconfig' search (/)?
> 
> Thanks, Ivan 
> 
> 
>> Am 19.09.2019 um 20:18 schrieb Ivan Hörler <ivanhoerler at gmail.com <mailto:ivanhoerler at gmail.com>>:
>> 
>> Hi
>> I have problems makeing libmraa working on Linkit Smart 7688.
>> The installation worked without problems and i tested with a python script. See details below:
>> 
>> what i did: 
>> - Compiled a openWRT 18.6
>> - opkg update 
>> - opkg install libmraa
>> - opkg install python3-light
>> - opkg install libmraa-python3
>> 
>> - copied this skript to /root: 
>> 
>> import mraa
>> import time
>> 
>> try:
>>     print (mraa.getVersion())
>> except:
>>     print("no mraa available")
>> 
>> # Refer to the pin-out digram for the GPIO number to silk print mapping
>> # in this example the number 44 maps to Wi-Fi LED.
>> pin = mraa.Gpio(2)
>> pin.dir(mraa.DIR_OUT)
>> while True:
>>     pin.write(1)
>>     time.sleep(1)
>>     pin.write(0)
>>     time.sleep(1)
>> 
>> - and executed:
>> root at OpenWrt:~# python3 mraa-test-simple.py 
>> v2.0.0
>> Traceback (most recent call last):
>>   File "mraa-test-simple.py", line 11, in <module>
>>     pin = mraa.Gpio(2)
>>   File "/usr/lib/python3.7/site-packages/mraa.py", line 391, in __init__
>>     _mraa.Gpio_swiginit(self, _mraa.new_Gpio(pin, owner, raw))
>> ValueError: Invalid GPIO pin specified
>> 
>> 
>> - checked with a LED on pin2 like this if GPIO2 works:
>> root at OpenWrt:~# cd /sys/class/gpio/
>> root at OpenWrt:/sys/class/gpio# ls
>> export      gpiochip0   gpiochip32  gpiochip64  unexport
>> root at OpenWrt:/sys/class/gpio# echo 2 > export
>> root at OpenWrt:/sys/class/gpio# ls
>> export      gpio2       gpiochip0   gpiochip32  gpiochip64  unexport
>> root at OpenWrt:/sys/class/gpio# cd gpio2
>> root at OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2# echo "out" > direction
>> root at OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2# cat value
>> 0
>> root at OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2# echo 1 > value
>> 
>> - redone previous step with no changes in error output.
>> 
>> what am i missing?
>> 
>> Thanks for comments, Ivan Hörler
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org <mailto:openwrt-devel at lists.openwrt.org>
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190924/8c423b71/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list