Re: [beagleboard] How could I compile a hello.ko that can run on my BBB?

2015-10-20 Thread Mian Tang
I reply myself. It's fixed.

And now, I plan to switch to kernel 4.1.1. It seems that 3.8.13 is an 
old version and will be replaced sooner or later...

On Saturday, October 17, 2015 at 10:44:29 PM UTC-4, Mian Tang wrote:
>
> I downloaded the bb-kernel-3.8.13-bone79, and hello sample driver to my PC.
>
> Compiled it without problem. When using modinfo to see hello.ko, it 
> displays:
>
> filename:   hello.ko
> version:0.1
> description:A simple Linux driver for the BBB.
> author: Derek Molloy
> license:GPL
> srcversion: 0DD9FE0DE42157F9221E608
> depends:
> vermagic:   3.8.13+ SMP mod_unload modversions ARMv7 thumb2 p2v8 
> parm:   name:The name to display in /var/log/kern.log (charp)
>
>
> The "vermagic" is "3.8.13+ SMP.", it should be 3.8.13-bone79, right?
>
>
> Best Regards,
> Mian
>
>
>
>
>
> On Friday, October 16, 2015 at 6:09:50 PM UTC-4, Mian Tang wrote:
>>
>> OK. This is the error:
>>
>> root@beaglebone:~# insmod hello.ko
>> Error: could not insert module hello.ko: Invalid module format
>>
>> And I checked the current version below:
>>
>> root@beaglebone:~# uname -r
>> 3.8.13-bone79
>>
>> Could you please tell me where I can get the kernel source which has the 
>> same version as my BBB board?
>>
>>
>>
>> On Friday, October 16, 2015 at 5:39:09 PM UTC-4, Przemek Klosowski wrote:
>>>
>>>
>>>
>>> On Fri, Oct 16, 2015 at 2:53 PM, Mian Tang  wrote:
>>>
 Hi,

 I connect my BBB to internet do update. When I use "uname -r" to check 
 the version, it displays: 3.8.13-bone79.

 Now, I hope to compile a hello.ko module driver on PC and run it on the 
 board.

>>> You seem to have a test kernel module that you want to compile and 
>>> insert into a running kernel. Normally, you'd just 'make hello.ko' and 
>>> 'insmod hello.ko'. This wouldn't work if the kernel API used by the module 
>>> was so different that it wouldn't work with the header files used by your 
>>> current kernel (btw. for this to work, your system has to have kernel 
>>> development packages installed).
>>> Try this and report if you encounter errors--it'll be much easier to 
>>> help if you say in detail what you did and what happened as a result.
>>>
>>

-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] How could I compile a hello.ko that can run on my BBB?

2015-10-17 Thread Mian Tang
I downloaded the bb-kernel-3.8.13-bone79, and hello sample driver to my PC.

Compiled it without problem. When using modinfo to see hello.ko, it 
displays:

filename:   hello.ko
version:0.1
description:A simple Linux driver for the BBB.
author: Derek Molloy
license:GPL
srcversion: 0DD9FE0DE42157F9221E608
depends:
vermagic:   3.8.13+ SMP mod_unload modversions ARMv7 thumb2 p2v8 
parm:   name:The name to display in /var/log/kern.log (charp)


The "vermagic" is "3.8.13+ SMP.", it should be 3.8.13-bone79, right?


Best Regards,
Mian





On Friday, October 16, 2015 at 6:09:50 PM UTC-4, Mian Tang wrote:
>
> OK. This is the error:
>
> root@beaglebone:~# insmod hello.ko
> Error: could not insert module hello.ko: Invalid module format
>
> And I checked the current version below:
>
> root@beaglebone:~# uname -r
> 3.8.13-bone79
>
> Could you please tell me where I can get the kernel source which has the 
> same version as my BBB board?
>
>
>
> On Friday, October 16, 2015 at 5:39:09 PM UTC-4, Przemek Klosowski wrote:
>>
>>
>>
>> On Fri, Oct 16, 2015 at 2:53 PM, Mian Tang  wrote:
>>
>>> Hi,
>>>
>>> I connect my BBB to internet do update. When I use "uname -r" to check 
>>> the version, it displays: 3.8.13-bone79.
>>>
>>> Now, I hope to compile a hello.ko module driver on PC and run it on the 
>>> board.
>>>
>> You seem to have a test kernel module that you want to compile and insert 
>> into a running kernel. Normally, you'd just 'make hello.ko' and 'insmod 
>> hello.ko'. This wouldn't work if the kernel API used by the module was so 
>> different that it wouldn't work with the header files used by your current 
>> kernel (btw. for this to work, your system has to have kernel development 
>> packages installed).
>> Try this and report if you encounter errors--it'll be much easier to help 
>> if you say in detail what you did and what happened as a result.
>>
>

-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] How could I compile a hello.ko that can run on my BBB?

2015-10-16 Thread Mian Tang
OK. This is the error:

root@beaglebone:~# insmod hello.ko
Error: could not insert module hello.ko: Invalid module format

And I checked the current version below:

root@beaglebone:~# uname -r
3.8.13-bone79

Could you please tell me where I can get the kernel source which has the 
same version as my BBB board?



On Friday, October 16, 2015 at 5:39:09 PM UTC-4, Przemek Klosowski wrote:
>
>
>
> On Fri, Oct 16, 2015 at 2:53 PM, Mian Tang  > wrote:
>
>> Hi,
>>
>> I connect my BBB to internet do update. When I use "uname -r" to check 
>> the version, it displays: 3.8.13-bone79.
>>
>> Now, I hope to compile a hello.ko module driver on PC and run it on the 
>> board.
>>
> You seem to have a test kernel module that you want to compile and insert 
> into a running kernel. Normally, you'd just 'make hello.ko' and 'insmod 
> hello.ko'. This wouldn't work if the kernel API used by the module was so 
> different that it wouldn't work with the header files used by your current 
> kernel (btw. for this to work, your system has to have kernel development 
> packages installed).
> Try this and report if you encounter errors--it'll be much easier to help 
> if you say in detail what you did and what happened as a result.
>

-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] How could I compile a hello.ko that can run on my BBB?

2015-10-16 Thread Przemek Klosowski
On Fri, Oct 16, 2015 at 2:53 PM, Mian Tang  wrote:

> Hi,
>
> I connect my BBB to internet do update. When I use "uname -r" to check the
> version, it displays: 3.8.13-bone79.
>
> Now, I hope to compile a hello.ko module driver on PC and run it on the
> board.
>
You seem to have a test kernel module that you want to compile and insert
into a running kernel. Normally, you'd just 'make hello.ko' and 'insmod
hello.ko'. This wouldn't work if the kernel API used by the module was so
different that it wouldn't work with the header files used by your current
kernel (btw. for this to work, your system has to have kernel development
packages installed).
Try this and report if you encounter errors--it'll be much easier to help
if you say in detail what you did and what happened as a result.

-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] How could I compile a hello.ko that can run on my BBB?

2015-10-16 Thread Mian Tang
Hi,

I connect my BBB to internet do update. When I use "uname -r" to check the 
version, it displays: 3.8.13-bone79.

Now, I hope to compile a hello.ko module driver on PC and run it on the 
board.

Could someone please tell me how to get the correct version of kernel  and 
compile it?



Best Regards,
Mian

-- 
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.