ev3dev / ev3dev-lang

(deprecated) language bindings for ev3dev sensors, motors, LEDs, etc.
GNU General Public License v2.0
56 stars 39 forks source link

[autogen][python] Include spec and supported kernel versions into ev3dev.__version__ #74

Closed ddemidov closed 9 years ago

ddemidov commented 9 years ago

This results in the following output in python:

>>> import ev3dev
>>> ev3dev.__version__
0.1.1.post6 (spec: 0.9.2-pre-r3, kernel: v3.16.7-ckt10-4-ev3dev-ev3)
dlech commented 9 years ago

This is going to get a bit more "interesting" when we start supporting BrickPi. The RPi currently uses a 3.18 kernel, so it's kernel version looks like v3.18.11-4-ev3dev-rpi. And, although it is not really used that I know of, we have a DKMS package with ev3dev drivers that can be installed on any recent kernel.

The important number here is the 4 right before ev3dev (also the DKMS package version). I think we may need to develop some new terminology here. Maybe we could do like Android and call this the "API" level" or a variant such as "ev3dev kernel driver level" something like that.

ddemidov commented 9 years ago

We could easily change the version info to a struct when required (together with meta class in spec.json).

I guess the BrickPi is binary compatible with ev3, and we won't need to provide two versions of binary python module?

dlech commented 9 years ago

I guess the BrickPi is binary compatible with ev3

Short answer is no, they are not binary compatible.

This gets a bit "interesting" as well. The EV3 supports the armv5 instruction set, however, we are using Debian armel which uses the armv4 instruction set. The Raspberry Pi version of ev3dev uses Raspbian (not Debian) armhf, which uses the armv6 instruction set. And the Raspberry Pi 2 version of ev3dev will use Debian armhf, which uses the armv7 instruction set.

So, technically, it would be possible to run the armel stuff on the armhf stuff using multiarch (like running Debian i386 (32-bit) stuff on Debian amd64), but that would require installing a bunch of armel libraries on the armhf platforms.