LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Newbie Guide To Compiling A Kernel! (https://www.linuxquestions.org/questions/linux-general-1/newbie-guide-to-compiling-a-kernel-73436/)

andy18 09-22-2003 04:17 PM

hi Drozz,

thanks for the tip..yep now I see the .config file in the /oldkernel directory after running the make oldconfig , but is through the locate command , I am not able to get it while I do a ls command in the /oldkernel directory..any command which I should issue to enable me to see the file?

andy18 09-22-2003 04:22 PM

ok..I copy the file to another directory and saved it with another file name and it shows up..:D

andy18 09-22-2003 04:41 PM

Hi Drozz,

I have copied the old config file to the new kernel source and run the make config command,I was being prompted for the Q&A , is this the correct procedure?Doesnt that it will auto use the old config and skip the Q&A?

DrOzz 09-22-2003 05:02 PM

well see thats the thing, if your using the old config then it really isn't that necesary to do make config because its already there, get it :D
i just pointed it out in the above post because i said, if you do end up running make config, then it will automatically pick up the settings in the oldconfig file, and you can if you want add more things to your kernel, or if you want remove a couple things you may not want....if all you want to do is go straight from the old config and use it with your new kernel then the next step after copying the config to the new kernel source directory, is do to the make dep, make clean, etc, etc.....
hopefully this explanation will clear things up..

andy18 09-22-2003 05:24 PM

hi Drozz,

Sorry for my stupidness :D ..I am clear for all your instructions now...thank you...

andy18 09-22-2003 06:11 PM

after running make dep :

gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/mkdep scripts/mkdep.c
make[1]: Entering directory `/usr/src/linux-2.4.22/arch/i386/boot'
make[1]: Nothing to be done for `dep'.
make[1]: Leaving directory `/usr/src/linux-2.4.22/arch/i386/boot'
rm -f .depend .hdepend
make _sfdep_kernel _sfdep_drivers _sfdep_mm _sfdep_fs _sfdep_net _sfdep_ipc _sfdep_lib _sfdep_crypto _sfdep_arch/i386/kernel _sfdep_arch/i386/mm _sfdep_arch/i386/lib _sfdep_arch/i386/math-emu _FASTDEP_ALL_SUB_DIRS="kernel drivers mm fs net ipc lib crypto arch/i386/kernel arch/i386/mm arch/i386/lib arch/i386/math-emu"
make[1]: Entering directory `/usr/src/linux-2.4.22'
make -C kernel fastdep
make[2]: Entering directory `/usr/src/linux-2.4.22/kernel'
make[2]: *** No rule to make target `/usr/src/linux-2.4.22/include/linux/autoconf.h', needed by `/usr/src/linux-2.4.22/include/linux/modules/signal.ver'. Stop.
make[2]: Leaving directory `/usr/src/linux-2.4.22/kernel'
make[1]: *** [_sfdep_kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.22'
make: *** [dep-files] Error 2


:confused: :confused:

andy18 09-22-2003 06:58 PM

just found out that I will have to run the "make oldconfig" in the new kernel directory after copied the old .config to the new kernel directory then make dep , make clean ...etc ...

yohooo ...my new kernel is up and running without any errors !!!!:p

Scruff 09-22-2003 08:00 PM

Hey DrOzz, thanx for the kernel how-to.

Peace

DrOzz 09-22-2003 09:28 PM

sorry andy for forgetting to say that, but in turn i am glad you figured it out :D
and very glad to hear that this tutorial helped you scruff....:D and thx for posting saying you thought it was helpful also ...

andy18 09-23-2003 10:12 AM

no problem , Drozz ! I believe your tutorial will help most of the newbie out there ..such as me :p ..

thanks again any way !

Dr. Ephemeron 12-11-2003 10:12 PM

FYI

Mandrake 9.2 uses these by default:

Code:

/boot/initrd.img -> /boot/initrd-x.x.x.img
/boot/config -> /boot/config-x.x.x

But you don't HAVE to worry about changing the config-x.x.x file... I read that sometimes the /usr/src/linux/.config is copied to /boot/config just for personal reference.


DrOzz 12-17-2003 07:17 AM

well thanks for your info
and it may just be how i am reading how you wrote your post, but you make it sound like i missed this info, and that your correcting me...
and if that is the case, then you'll have to realize this was written back in july and mandy 9.2 didn't exist...
and if this wasn't what your implying, forget what i just said :p

and i am not sure actually now that i think of it what you are getting at, cause a) /boot/initrd-x.x-x.img was used in the instructions, and b) by how you explain "config-x.x.x" it seems irrelevant to have it or not to have it....then again i may have missed your point that you are trying to get across..

Dr. Ephemeron 12-17-2003 01:09 PM

in your instructions, there is no simlink to initrd-x.x.x.img is all and I am just pointing it out for noobs so they don't break it when they don't have to.

if you are a noob and go in and see a simlink to config, you might think "WTF is that?" and if you read my message now you know what it is, what it is there for, and you don't have to mess with it.

irrelevent info is only irrelevent to those who know it is irrelevent. :p

now if anyone wonders, they know what it is when they see it.

pr0gm3r 12-17-2003 01:15 PM

That is very nice guide. I planning to get the new kernel going 2.6 but no idea how to imply the kernel src. I hope I can get it through.

make xconfig -> should be nice working GUI to work with (this is nice)

:) :Pengy:

sirpelidor 12-21-2003 04:20 PM

Hi DrOzz:

i'd like to take this chance to thank you for such clear and easy follow mini-howto, following your instruction. i was able to compile a kernel for my first time. YAY!

i have no idea why i can't compile it follow by the instruction from kernel-howto (in google) the way how they explain editing lilo.conf was such a mess. easiliy receive kernel panic.

one question though, i'm running linux-2.4.19-16 atm, and i was able to add a few function while doing xconfig. (i added apm, acpi, and fame buffer, and i changed processer from i686 to PIII)
and compiled successfully while following your instruction.

how can i verify if its taking affect? i am trying to make sure if my kernel now support acpi, and PIII. but when i do: cat /boot/config | grep APM | grep ACPI
the result i got was same as before compile (which was without those enabled)
here's what its look like:

[root@localhost boot]# cat config | grep APM
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
CONFIG_APM_DO_ENABLE=y
CONFIG_APM_CPU_IDLE=y
# CONFIG_APM_DISPLAY_BLANK is not set
CONFIG_APM_RTC_IS_GMT=y
# CONFIG_APM_ALLOW_INTS is not set
# CONFIG_APM_REAL_MODE_POWER_OFF is not set

here's acpi:

[root@localhost boot]# cat config | grep ACPI
# CONFIG_HOTPLUG_PCI_ACPI is not set
# CONFIG_ACPI is not set

they look exactly same as before kernel was compiled. i'm trying to get my computer power down when halt. i was trying to fix that by enabling # CONFIG_APM_REAL_MODE_POWER_OFF to y instead of not set.

just wanna make sure i'm running to new compiled kernel, here's what my lilo.conf looks like:

root@localhost etc]# cat lilo.conf
boot=/dev/hda
map=/boot/map
default=custom-kernel
keytable=/boot/us-latin1.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
ignore-table
image=/boot/vmlinuz-2.4.19-16mdk
label=custom-kernel
root=/dev/hdb5
initrd=/boot/initrd.img
append="devfs=mount hdc=ide-scsi apm=power-off"
read-only
image=/boot/vmlinuz
label=linux
root=/dev/hdb5
initrd=/boot/initrd.img
append="devfs=mount hdc=ide-scsi"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hdb5
initrd=/boot/initrd.img
append="devfs=nomount hdc=ide-scsi failsafe"
read-only
other=/dev/hda1
label=dos
table=/dev/hda
other=/dev/fd0
label=floppy
unsafe

as you see, customer-kernel is the one i compiled, and i wanted to make sure it is enabled the things i changed in make xconfig.

thanks for your time and advise :)


All times are GMT -5. The time now is 08:16 PM.