Robert: I'm hoping you might have some advice for this issue I'm 
encountering.

Peter's pull request for Adafruit_BBIO uses LINUX_VERSION_CODE to determine 
if the kernel is 4.1 or newer:
https://github.com/adafruit/adafruit-beaglebone-io-python/pull/96#issuecomment-222343880

When I build Adafruit_BBIO, LINUX_VERSION_CODE is set to old version 
200711.  It appears to come from:

/usr/include/linux/version.h:#define LINUX_VERSION_CODE 200711
/usr/src/linux-headers-4.1.17-ti-rt-r46/include/generated/uapi/linux/version.h:#define
 
LINUX_VERSION_CODE 262417

I'm using image "BeagleBoard.org Debian Image 2016-02-07" with Linux kernel 
4.1.25-ti-r62 and Debian 8.4.  "/usr/include/linux/version.h" appears to 
come from linux-libc-dev:armhf 3.16.7-ckt25-2.  
"/usr/src/linux-headers-4.1.17-ti-rt-r46/include/generated/uapi/linux/version.h"
 
comes from linux-headers-4.1.17-ti-rt-r46.

What would be the proper way to update /usr/include/linux/version.h to 
reflect 4.1+?

Related gist:
https://gist.github.com/pdp7/193cb6252440850926297ac79ed39acc

Thanks,
Drew

On Thursday, April 28, 2016 at 9:36:36 PM UTC-5, Peter Lawler wrote:
>
> Hi folks, 
> Just a quick note to let you know I've spent some time tracking down the 
> differences between 3.8 and later versions for the Adafruit BBIO Python 
> library. 
>
> I first noted this post 
> https://forums.adafruit.com/viewtopic.php?f=49&t=91903&p=468811#p469266 
> which discusses that the 3.8 Adafruit library won't work on 4.1, and 
> that there were some fixes out in the wild so to speak but that Adafruit 
> weren't in a rush to get them happening. 
>
> So I took a look at one of the solutions, by grizmio, and it Just Worked 
> for me. 
>
> I've now shoved a bunch of ifdef's around the changes in the C code that 
> grizmio made, so I am *hoping* it's simultaneously 3.8 and 4.1 friendly. 
>
> I don't have a spare 3.8 machine at hand right now, but if there's 
> anyone out there who could try it out and see what happens, it'd be 
> appreciated. All I know is bad C and that it compiles. Please don't 
> shoot me for doing things wrong ;) 
>
>
> https://github.com/PeteLawler/adafruit-beaglebone-io-python 
>
> Regards, 
>
> Pete. 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6dfd7521-cf7e-48b4-b6fc-5ba2d1461d36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to