PDA

View Full Version : Missing system.h



VikCyc
11th July 2012, 11:29 PM
Greetings,

I think I've found a problem, but I don't have a bug report account, so I'm hoping someone here can help tell me if it is real and report it, or tell me it's not a problem...

Yesterday, I "yum update"d my Fedora 16 x86_64 system and picked up the new kernel version 3.4.4-4. I've also got kernel-headers and kernel-devel installed on my system.

Today, I attempted to install a HW driver that requires system.h, but make gave an error saying it couldn't be found. Doing a locate system.h shows that I do not have a system.h for kernel 3.4.4-4. It says I do have one for the previous two kernels, in /usr/src/kernels/3.3.x-x.fc86_64/arch/x86/include/asm/.

I uninstalled kernel-headers and kernel-devel and tried to re-install, but system.h is still missing. Is this a real problem with the 3.4.4-4 rpm, or is there something I don't understand about distributions? If a real problem, how can it be fixed? (I tried copying system.h from an old kernel src directory to the new one, but that caused additional compile errors).

By the way, I re-booted to the 3.3.7-1 kernel, and the driver seems to have installed correctly.

Regards,
VikCyc

jlpierce
11th July 2012, 11:41 PM
Well, I don't have that file anywhere on my system either.

The current kernel from the update server is: 3.4.4-5.fc17.x86_64.

I did a quick google search and no one else is squawking about that file missing. Not sure what to tell you now.

Yellowman
11th July 2012, 11:45 PM
You will need to edit the HW driver files to suit the 3.3 kernel changes



- #include <asm/system.h>
+ #include <linux/version.h>
+#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)
+ #include <asm/switch_to.h>
+#else
+ #include <asm/system.h>
+#endif

jlpierce
12th July 2012, 12:05 AM
Okay, so where is the system.h file you referred to? Nowhere under the /usr/src/kernels/3.4.4-5.fc17.x86_64 is there a folder named asm/ with a file named system.h located in it.

Maybe I a missing something here.

Yellowman
12th July 2012, 12:11 AM
Okay, so where is the system.h file you referred to? Nowhere under the /usr/src/kernels/3.4.4-5.fc17.x86_64 is there a folder named asm/ with a file named system.h located in it.

Maybe I a missing something here.

The output posted is patch fomat, the lines prefixed with - are removed and the + lines are added.


asm/switch_to.h is the replacement for asm/system.h in 3.3 + kernels

jlpierce
12th July 2012, 12:30 AM
Cool, thank you Yellowman, that is nice to know. I am not a programmer, only ever rebuilt one or two kernels and just followed the instructions (with fingers crossed) and it all worked out.

From what I see above it is a conditional statement that says if the kernel version is greater than 3.3.0 then we will use a file named switch_to.h otherwise it will have a file named system.h, is that correct?

Yellowman
12th July 2012, 12:34 AM
Cool, thank you Yellowman, that is nice to know. I am not a programmer, only ever rebuilt one or two kernels and just followed the instructions (with fingers crossed) and it all worked out.

From what I see above it is a conditional statement that says if the kernel version is greater than 3.3.0 then we will use a file named switch_to.h otherwise it will have a file named system.h, is that correct?

Yes.........

stevea
12th July 2012, 01:16 AM
Short story - your driver is out-of-date and may well require more changes to be made to work on a modern kernel.

VikCyc
13th July 2012, 03:42 PM
Thank you Yellowman very much for the info - Very helpful!

I consider this one "solved".