Recompile standard kernel - loads of errors
Hi there,
I'm still in the learning process with compiling and driver install so I thought it would be a good idea to practice with a recompile of the standard kernel without changing any settings. I followed all instructions for kernel recompile to the T but then at 'make modules' I see lots and lots of errors, often error 2, sometimes error 1. BTW I started the process with --ignore-erros just to get through the run and see what it did. How is it possible for a kernel to run properly with THAT many errors? I didn't modify anything, I just installed the source from the Mandriva DVD and did xconfig etc. without changing any parametre. :confused: The reason why I ask is that I need to install a driver update for my TV card which was not supported up to 01/2006. I'm just wondering if any attempt to do so will become a total disaster since even the boxed kernel source is so full of errors. any hint appreciated cheers |
when i encountered those kind of errors, I simply went back to 'make menuconfig' and unchecked the modules causing the error. Most of the time, I was simply tryin to compile old and unneeded modules in my kernel. Since then I have learnt to compile only those modules that were specifically needed by my system and nothing else. I have found this results in a compact kernel and the mem used when i just boot is also very low compared to the default ones also the machine I feel responds faster.
|
Nice one prozac! I'll try that :)
Just a remark: I'm not a developer (I'm actually coming from SAP) and I know ABAP/4 (SAP language) well enough to know that things like 'undeclared arguments' are quite serious errors. - Actually ABAP won't even let you activate (release) the source code for compiling unless you have corrected all syntax and plausibility errors from dependent objects like includes, function modules etc. That's why it really baffles me that an OS :!: lets you release buggy source code into a compile run. Anyway I'll try again. cheers |
you know what i too have been thinking the same. 'unused variables', 'defined but not used' messages are really creepy. I am thinking then, the developers who wrote the drivers must have got lazy and decided not to correct those (after all they are just warnings!). It has got nothing to do with the kernel developers-they just include those drivers in the kernels. maybe somebody could explain more clearly.
|
also try the output of 'lspci' and 'lsmod'. I have found them quite helpful in determining my exact devices and the modules they use.
|
cheers prozac, much appreciated
|
Quote:
As for compiling your kernel try getting the kernel SRPM, not the kernel-source RPM. Goto any of the http or ftp mirrors listed for the main repo at easyurpmi.zarb.org and go up a few levels to find the SRPMS folder for main. In there you'll find the kernel SRPM, just download it, install it, make your changes and rebuild. http://qa.mandriva.com/twiki/bin/vie...ing_source_RPM You could also just download the vanilla kernel source from kernel.org and at the make xconfig stage make sure to load the current config from the Mandriva kernel that you're using (look in /boot). If you do this do a make rpm instead of just make so that at the end it spits out a nice RPM that you can easily install. |
Quote:
Quote:
|
Quote:
Therefore its impossible to have an unused variable that isn't Garbage Collected - you have to assign a variable to something (a new'ed/malloc'ed block of memory) first before you can cause a memory leak. As annoying and bad looking as those unused variables are all they really amount to is 32-bits (4 bytes) or so of wasted memory each. Even if there's say 1000 of them in your kernel that's only 4KB of wasted memory. Of course I'm writing this off the top of my head so I could be wrong :) but I highly doubt that the kernel maintainers leave dozens or hundreds of memory leaks in their code that are visible as simple compiler warnings. Quote:
|
Quote:
Quote:
tkedwards, I am sorry but i am not convinced. |
Quote:
Quote:
|
Quote:
|
Excuse my very rusty C:
Code:
afunction { Code:
averybadfunction { In other words its impossible to have an unassigned variable leak memory because as soon as you use malloc/calloc/new your variable is assigned a value: Code:
j = malloc(1000); |
all what u have said was right,i want just to add an idea:
when using the new operator or whatever(dynamic allocation)then not using the delete operator(freeing memory operators)the moment u quit the program the O.S then freeing automatically the ammount of memory allocated. i think u forgot somethings in ur code: Code:
int* j;//j should be pointer |
Quote:
|
All times are GMT -5. The time now is 08:32 PM. |