LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   errors encountered during kernel compile (https://www.linuxquestions.org/questions/linux-software-2/errors-encountered-during-kernel-compile-82287/)

superbondbond 08-15-2003 11:40 AM

errors encountered during kernel compile
 
I am currently tweaking my kernel (2.4.20) so I can learn more about the kernel configuration, and to add support for my Sharp Zaurus.

While I'm not having problems with the steps involved with compiling the kernel, I do encounter frequent errors during the make bzImage, so I go back and re-configure, based on the errors I receive.

What I've noticed is sometimes I will change a setting (make menuconfig), and it will output an error message (during make bzImage) for a completely different item than what was changed in the .config file. I suspect dependency issues, although nothing stands out when I run make dep.

What other factors could affect the outcome of the compiling?
For example, if I were to compile a working kernel, and then immediately compile an identical one based on the same .config, is there anything that could possibly generate an error that didn't the first go round? I've seen different people insert a 'make clean' in different places in the process. When is the ideal time for this step?

I'm just trying to gain a broader knowledge of the process and how to best approach it.
Thanks

jqcaducifer 08-15-2003 11:49 AM

Make distclean is more...clean than make clean; it deletes every unimportant file in the /usr/src/linux folder (or something like that).

It also deletes the .config file, so I made a script
Code:

#!/bin/bash
set -e
cp .config ../dot.config
make distclean
cp ../dot.config .config
make oldconfig
make dep
make bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/bzImage.2.4.20-8

try that script (and change the last /boot/bzImage.2.4.20-8 to whatever name you want, and will need to put that name in your grub.conf file to load up...

jqcaducifer 08-15-2003 11:49 AM

Make distclean is more...clean than make clean; it deletes every unimportant file in the /usr/src/linux folder (or something like that).

It also deletes the .config file, so I made a script
Code:

#!/bin/bash
set -e
cp .config ../dot.config
make distclean
cp ../dot.config .config
make oldconfig
make dep
make bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/bzImage.2.4.20-8

try that script (and change the last /boot/bzImage.2.4.20-8 to whatever name you want, and will need to put that name in your grub.conf file to load up...

superbondbond 08-15-2003 03:20 PM

Thanks, I'll give that a try.

I guess what I'm wondering is, what would be causing these errors to begin with? If I don't readily notice any problems with the output of make dep, then there (in theory) shouldn't be any dependency issues when running make bzImage. I would think if that were the case, then I would have a much higher success rate at the compile step, rather than the 1/5 or so I seem to be getting.
I'm a patient person, and I tend to think logically that if there is an error during the compile, then I must have screwed up something in the configuration to cause it to happen. But as I said before, it's not apparent to me that this is the case, since I would change a single setting in the kernel config, and receive a seemingly unrelated error dealing with a separate driver of option.
Just fishing for possible causes I guess.......

jqcaducifer 08-15-2003 03:40 PM

its maybe because if you didn't do make clean or similar, then there remains temporary files floating around in the /usr/src/linux folder, and maybe some scripts or programs are made to detect if a file exists, and if it does, then it is programmed to do something else different from what it is supposed to do when compiling a fresh kernel. Thats one (and the only) reason i can come up with why make clean/distclean are necessary.

superbondbond 08-15-2003 04:38 PM

That seems logical. I'll have to be sure to do a make (dist)clean more often.


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