LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can't compile a driver without header files present? (https://www.linuxquestions.org/questions/linux-general-1/cant-compile-a-driver-without-header-files-present-884605/)

dkathrens77 06-05-2011 01:51 AM

Can't compile a driver without header files present?
 
Background info

I'm working with a GuruPlug...maybe you've heard of them.

I'm trying to get EasyCap DC60 drivers installed on it
(easycap_dc60.0.9.tar.gz), but in the README file I see that the "header files" must be present.

Unfortunately they are not. This little wall wart runs Debian/Lenny, probably some server oriented build.

uname -r reports:

2.6.32-00007-g56678ec

It boots to RunLevel 2 and stays there, incidentally.

I tried apt-get install linux-headers-$(uname -r) but I am told "file not found" or something similar.

Does anyone have ideas about how to proceed?

business_kid 06-05-2011 04:03 AM

Kernel headers should be in /usr/include/linux, mainly.
Have you includes? can't you copy them in?

dkathrens77 06-12-2011 12:51 PM

GuruPlug -- no includes, and no room to copy them if I did.
 
The GuruPlug only has 500 Mb of flash nand for a "hard drive"
the debian/lenny distro is "horribly foreshortened" and I don't
have any access to "includes".

My head is spinning with all the advice I've seen on the net about
"cross compiling" on a different machine and copying the driver files
manually to the GuruPlug.

I DOESN'T HELP ONE BIT that Xmarks keeps eating all my bookmarks in Firefox either.

business_kid 06-13-2011 02:49 AM

Quote:

Originally Posted by dkathrens77 (Post 4376669)
I tried apt-get install linux-headers-$(uname -r) but I am told "file not found" or something similar.

Does anyone have ideas about how to proceed?

If you can grab/find some kernel source (2.6.32.x or near it) and cd into the top source dir, there are 2 commands
make headers_check
make headers_install

One of which installs a set of headers. The worrying thing is, though, that you compile with 3 tools
1. gcc
2. glibc (libraries & includes)
3. kernel headers

Now if you haven't got headers, they didn't set your distro up to compile, so I'd wonder about the other 2. Check
ls -l /usr/bin/cc

onebuck 06-13-2011 08:40 AM

Hi,

Maybe this will help: Building ARM GNU Cross compiler …

Compiling Linux Kernel for the Plug Computer - PlugWiki especially: 2 Crosscompiling the kernel

I'm giving up on Google; duckduckgo

BTW, builds for ARM are done all the time. Why depend on the plug to do the compile when you can build on a faster system with more resource(s)?
:hattip:

dkathrens77 06-14-2011 11:03 AM

Wow I didn't know that.
 
Thanks for all this good info. I'm amazed not only how much there is to learn,
but that Linux/Ubuntu makes all this functionality available.

This is how I usually learn...I have a goal in mind and I learn what I need
to achieve it--asking questions along the way of course.

Thanks again for sharing your expertise with me.


All times are GMT -5. The time now is 01:20 AM.