Jump to content

Recommended Posts

Posted

I'm trying to compile the tv.ko driver for the NanoPi M1 (to see if I can bake overscan compensation into it).

 

First I compiled the whole of Armbian to see if I can produce the .ko in such a roundabout way, but besides being a very dumb/slow way of going about it, I can't find any file called "tv.ko" after running all of that (it probably gets cleaned up).

 

Short of mounting the generated Armbian image manually and extracting tv.ko, is there a way to compile just the driver?

 

It normally sits at:

/lib/modules/3.4.112-sun8i/kernel/drivers/video/sunxi/disp2/tv/tv.ko

And sources for it are under:

sources/linux-sun8i/sun8i/drivers/video/sunxi/disp2/tv/

The modinfo is:

filename:       /lib/modules/3.4.112-sun8i/kernel/drivers/video/sunxi/disp2/tv/tv.ko
alias:          platform:tv
license:        GPL
description:    tv driver
author:         zengqi
depends:
intree:         Y
vermagic:       3.4.112-sun8i SMP preempt mod_unload modversions ARMv7 p2v8
I tried to insmod "tv.o" but that's not it... (yes, I have no idea what I'm doing)
Posted

Thanks. I did manage to get drivers/video/sunxi/disp2/tv/tv.ko to compile, through compiling the whole thing.

 

Still, it takes a lot of time because it really is compiling everything. So I spent a few moments each day looking at how to just compile the driver.

 

Is it even possible to just compile one driver? I ask this because maybe I shouldn't be trying to do it. (The toolchain patches stuff on the fly and does so many things... it is amazing but at the same time something I'm not used to).

Posted

Also, wanted to add that compiling the tv.ko module works, but I get

modprobe: ERROR: could not insert 'tv': Exec format error

Which is strange because modprobe --force works, the module can be compiled and made to work.

 

Is it some sort of signature thing where I should add a permission somewhere? (I just replaced the file at /lib/modules/3.4.112-sun8i/kernel/drivers/video/sunxi/disp2/tv/tv.ko - I can't seem to make it load just like that with /etc/modules though)

 

Posted

What Igor meant is that in newer version of Armbian TV driver is hardcoded into kernel and it is not module anymore. This means that it should work by changing only script.bin. I don't think you can properly load driver as a module if same driver is part of the kernel.

Posted

What Igor meant is that in newer version of Armbian TV driver is hardcoded into kernel and it is not module anymore. This means that it should work by changing only script.bin. I don't think you can properly load driver as a module if same driver is part of the kernel.

But the image I'm using (Armbian_5.20_Nanopim1_Debian_jessie_3.4.112_desktop.img) has the driver as a module, so that was a recent change right?

 

(I wonder if even if I edit a module and somehow get it to load without modprobe --force, will it get superseded by a dist-upgrade?)

 

Thanks for the reply either way.

Posted

Unfortunately, you need to compile your own kernel if you want to play around here.

I'm willing to accept that, but there's just one thing I'm not understanding. When apt-get updates the kernel, it doesn't update every module, right? tv.ko and the other .kos would remain untouched and still work, is this correct?

 

(I'm asking this because I presume compiling my own kernel means I won't be able to rely on apt-get for updates after that)

Posted

I'm willing to accept that, but there's just one thing I'm not understanding. When apt-get updates the kernel, it doesn't update every module, right? tv.ko and the other .kos would remain untouched and still work, is this correct?

 

(I'm asking this because I presume compiling my own kernel means I won't be able to rely on apt-get for updates after that)

 

Yes, it updates / overwrites modules too.

 

If changes you made are generally useful, push then upstream and let others enjoy too and you don't need to worry about this.

Posted

Just wanted to thank all the great users/devs of this community for helping out but at the end I just couldn't manage to find a way to compile the kernel module and gave up.

 

Posted

I am sure it's possible to compile a kernel module :wacko:

 

apt-get -y install git git clone

https://github.com/igorpecovnik/lib --depth 1

cp lib/compile.sh .

./compile.sh

 

 

On a hosted webserver it works perfectly !!!!! (not behind a proxy)

So, all is ok for me at this step :D


The patch I need :

https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sun7i-default/0050-lircgpio_and_raw.patch

 

And now I see that I've lost some buildroot knowledges....

Is there an apply-patch.sh ? May I put the patch in ~/crosscompile/userpatches ?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines