compiling kernel module

2015-03-03 Thread Erez D
hi

i have a rooted lenovo vibe x2. i want to compile a kernel module for it.

i did a 'make ARCH=arm CROSS_COMPILE=... M=subdir' and got my module.ko

when i insmod, i get: exec format error
and dmesg:
version magic '3.10.35 mod_unload modversions ARMv7 p2v8 ' should be
'3.10.35 SMP preempt mod_unload ARMv7 '

i tried playing with configuration, and got to '3.10.35 SMP preempt
mod_unload ARMv7 p2v8 '
however i can not loose the p2v8

this seems to come from: CONFIG_ARM_PATCH_PHYS_VIRT,if i comment out the
CONFIG_ARM_PATCH_PHYS_VIRT, it reenables it when i compile.

looking further i found:

Symbol: ARM_PATCH_PHYS_VIRT [=y]
Type  : boolean
Prompt: Patch physical to virtual translations at runtime
Defined at arch/arm/Kconfig:219
Depends on: !XIP_KERNEL [=n] && MMU [=y] && (!ARCH_REALVIEW [=n] ||
!SPARSEMEM [=n])
Selected by: ARCH_MXC [=n] || ARCH_PICOXCELL [=n] || ARCH_MULTIPLATFORM
[=y] &&  && MMU

i can not disable MMU, as it changes to armv5
disabling ARCH_MULTIPLATFORM  means i need to select a processor type
any of the 'ARM Ltd.' either doesn't compile or is ignored
and i do not know what the '' is

i tried downloading source from lenovo.
they have instructions to compile with:
./mk x2ap n k

however i cannot find 'mk' anywhere, not in their tar, not in android sdk
nor ndk etc.
and can't find any specific config file.
compiling with their source gives the same magic '3.10.35 mod_unload
modversions ARMv7 p2v8 ' as the vanilla does

any idea anyone ?
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: compiling kernel module

2015-03-04 Thread Leon Romanovsky
>
> i tried downloading source from lenovo.
> they have instructions to compile with:
> ./mk x2ap n k
>
> however i cannot find 'mk' anywhere, not in their tar, not in android sdk
> nor ndk etc.
>
./mk is a symlink to ./makeMtk script which is part of Mediatek build
system.
The script is located at mediatek/build folder.


-- 
Leon Romanovsky | Independent Linux Consultant
www.leon.nu | l...@leon.nu
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: compiling kernel module

2015-03-04 Thread Erez D
On Wed, Mar 4, 2015 at 11:09 AM, Leon Romanovsky  wrote:

> i tried downloading source from lenovo.
>> they have instructions to compile with:
>> ./mk x2ap n k
>>
>> however i cannot find 'mk' anywhere, not in their tar, not in android sdk
>> nor ndk etc.
>>
> ./mk is a symlink to ./makeMtk script which is part of Mediatek build
> system.
> The script is located at mediatek/build folder.
>
> thanks,
where do i get  Mediatek build system from ?

>
> --
> Leon Romanovsky | Independent Linux Consultant
> www.leon.nu | l...@leon.nu
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: compiling kernel module

2015-03-04 Thread Leon Romanovsky
On Wed, Mar 4, 2015 at 11:12 AM, Erez D  wrote:
>
>
>
> On Wed, Mar 4, 2015 at 11:09 AM, Leon Romanovsky  wrote:
>>>
>>> i tried downloading source from lenovo.
>>> they have instructions to compile with:
>>> ./mk x2ap n k
>>>
>>> however i cannot find 'mk' anywhere, not in their tar, not in android sdk 
>>> nor ndk etc.
>>
>> ./mk is a symlink to ./makeMtk script which is part of Mediatek build system.
>> The script is located at mediatek/build folder.
>>
> thanks,
> where do i get  Mediatek build system from ?
AFAIK It depends on phone/tablet manufacturer, since the build system
is not GPL.
Generally, you can try to setup it by yourself:
1. Take one of the available builds for other MTK chipset based phones [1].
2. Download source code which was provided by Lenovo [2].
3. Built new kernel with platform config from Lenovo's package [3]

[1] https://github.com/suribi/Thunder-Kernel
[2] 
http://support.lenovo.com/us/en/products/phones/vibe-series/vibe-x2/downloads/DS101342
[3] bsp/mediatek/config/mt6595/autoconfig/kconfig/platform

>>
>>
>> --
>> Leon Romanovsky | Independent Linux Consultant
>> www.leon.nu | l...@leon.nu
>
>



-- 
Leon Romanovsky | Independent Linux Consultant
www.leon.nu | l...@leon.nu

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: compiling kernel module

2015-03-04 Thread Erez D
On Wed, Mar 4, 2015 at 11:55 AM, Leon Romanovsky  wrote:

> On Wed, Mar 4, 2015 at 11:12 AM, Erez D  wrote:
> >
> >
> >
> > On Wed, Mar 4, 2015 at 11:09 AM, Leon Romanovsky  wrote:
> >>>
> >>> i tried downloading source from lenovo.
> >>> they have instructions to compile with:
> >>> ./mk x2ap n k
> >>>
> >>> however i cannot find 'mk' anywhere, not in their tar, not in android
> sdk nor ndk etc.
> >>
> >> ./mk is a symlink to ./makeMtk script which is part of Mediatek build
> system.
> >> The script is located at mediatek/build folder.
> >>
> > thanks,
> > where do i get  Mediatek build system from ?
> AFAIK It depends on phone/tablet manufacturer, since the build system
> is not GPL.
> Generally, you can try to setup it by yourself:
> 1. Take one of the available builds for other MTK chipset based phones [1].
> 2. Download source code which was provided by Lenovo [2].
> 3. Built new kernel with platform config from Lenovo's package [3]
>
> [1] https://github.com/suribi/Thunder-Kernel
> [2]
> http://support.lenovo.com/us/en/products/phones/vibe-series/vibe-x2/downloads/DS101342
> [3] bsp/mediatek/config/mt6595/autoconfig/kconfig/platform
>

do you have a link for [3] ?

thanks for your help

>
> >>
> >>
> >> --
> >> Leon Romanovsky | Independent Linux Consultant
> >> www.leon.nu | l...@leon.nu
> >
> >
>
>
>
> --
> Leon Romanovsky | Independent Linux Consultant
> www.leon.nu | l...@leon.nu
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: compiling kernel module

2015-03-04 Thread Leon Romanovsky
On Wed, Mar 4, 2015 at 2:21 PM, Erez D  wrote:
>
>
> On Wed, Mar 4, 2015 at 11:55 AM, Leon Romanovsky  wrote:
>>
>> On Wed, Mar 4, 2015 at 11:12 AM, Erez D  wrote:
>> >
>> >
>> >
>> > On Wed, Mar 4, 2015 at 11:09 AM, Leon Romanovsky  wrote:
>> >>>
>> >>> i tried downloading source from lenovo.
>> >>> they have instructions to compile with:
>> >>> ./mk x2ap n k
>> >>>
>> >>> however i cannot find 'mk' anywhere, not in their tar, not in android
>> >>> sdk nor ndk etc.
>> >>
>> >> ./mk is a symlink to ./makeMtk script which is part of Mediatek build
>> >> system.
>> >> The script is located at mediatek/build folder.
>> >>
>> > thanks,
>> > where do i get  Mediatek build system from ?
>> AFAIK It depends on phone/tablet manufacturer, since the build system
>> is not GPL.
>> Generally, you can try to setup it by yourself:
>> 1. Take one of the available builds for other MTK chipset based phones
>> [1].
>> 2. Download source code which was provided by Lenovo [2].
>> 3. Built new kernel with platform config from Lenovo's package [3]
>>
>> [1] https://github.com/suribi/Thunder-Kernel
>> [2]
>> http://support.lenovo.com/us/en/products/phones/vibe-series/vibe-x2/downloads/DS101342
>> [3] bsp/mediatek/config/mt6595/autoconfig/kconfig/platform
>
>
> do you have a link for [3] ?
I downloaded lenovo_x2_osc_20141013.zip file from link [2] and unzipped it.
The platform config will be there.

>
> thanks for your help
>>
>>
>> >>
>> >>
>> >> --
>> >> Leon Romanovsky | Independent Linux Consultant
>> >> www.leon.nu | l...@leon.nu
>> >
>> >
>>
>>
>>
>> --
>> Leon Romanovsky | Independent Linux Consultant
>> www.leon.nu | l...@leon.nu
>
>



-- 
Leon Romanovsky | Independent Linux Consultant
www.leon.nu | l...@leon.nu

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il