Problem on recompiling kernel
Hi folks,
Building LiveCD on BLFS 6.1 Preliminary steps; Formating /dev/hda7 (a spare partition for building LiveCD) and duplicating /dev/hda6 (BLFS 6.1) on it. Rebooted to LiveCD making sure it working the same way as /dev/hda6 (BLFS 6.1). Rebooted again and started FC3. Following; Beginners Guide To Creating A Live CD With LFS 6.0 http://www.linuxfromscratch.org/hint...-udev-nptl.txt to build LiveCD After recompiling kernel rebooted FC3 and started LiveCD to continue building LiveCD. Now the problem came. "loop" and "sound" seemingly can't co-exist as "module". I almost spent half day to recompile kernel meeting certain difficulty Steps performed # make clean/distclean (tried both) # make mrproper # make menuconfig # make # make modules_install The .config file seemed not storing data saved. $ ls -al /usr/src/linux-2.6.11.12/ | grep config Code:
-rw-r--r-- 1 root root 29707 Oct 22 16:40 .config 1) File systems --> Miscellaneous filesystems --> <*> SquashFS 2.2 - Squashed file system support(NEW) 2) Device drivers --> Block devices --> <*> RAM disk support[*] Initial RAM disk (initrd) support 3) Device drivers --> Block devices --> <M> Loopback device support (not <*> as suggested) (Remark: it must be enabled as Module. <*> did not work) 4) To enable PPP support Device Drivers ---> Networking support ---> <*> PPP (point-to-point protocol) support 5) Sound Device Drivers --> Sound --> Adcance Linux Sound Architecture (On selecting "Adcanced Linux Sound Architecture as <M> all following <M> prompted <M> Advanced Linux Sound Architecture <M> Sequencer support < > Sequencer dummy client <M> OSS Mixer API <M> OSS PCM (digital audio) API[*] OSS Sequencer API 6) Device Drivers --> Sound --> Adcance Linux Sound Architecture ---> PCI ---> <M> VIA 82C686A/B, 8233/8235 AC97 Controller 7) Processor type and features ---> Processor family (Athlon/Duron/K7) ---> ---> (X) Athlon/Duron/K7 (Remark: it is only allowed to select one item here)[*] Generic x86 support On running; # make modules_install Code:
INSTALL drivers/acpi/ibm_acpi.ko # cp arch/i386/boot/bzImage /boot/lfscdkernel && cp System.map /boot/ # depmod -a # modprobe loop Code:
FATAL: Error inserting loop (/lib/modules/2.6.11.12-sound/kernel/drivers/block/loop.ko): Invalid module format Code:
WARNING: Error inserting snd (/lib/modules/2.6.11.12-sound/kernel/sound/core/snd.ko): Invalid module format Code:
WARNING: Error inserting snd (/lib/modules/2.6.11.12-sound/kernel/sound/core/snd.ko): Invalid module format Any suggestion? TIA (Remark: "squashfs2.2-r2" has been installed and patched to the kernel. Would it be the cause?) BR satimis |
Quote:
# make clean && make mrproper # make menuconfig # make bzImage or make <------- compiles the kernel # make modules <--------------- you forgot this! This option compiles the modules # make modules_install < this installs/copies the modules to the proper location. You get the error because the modules aren't compiled Quote:
|
Hi mr_demilord,
Tks for your advice. Problem still remained. Step performed as follows; # make clean && make mrproper # make menuconfig Here I can't resolve why the items previously selected either as modules OR enabled disappeared. All became unselected < > / [ ]. It seems they can't be saved before existing menuconfig. # make modules Code:
CHK include/linux/version.h Code:
INSTALL drivers/acpi/ibm_acpi.ko Code:
FATAL: Module loop not found. Code:
WARNING: Error inserting snd Code:
WARNING: Error inserting snd modprobe them again, still the same errors BR satimis |
Try boot your system with new compiled kernel and then modprobe again.
Good luck! |
If you recompile the kernel, remember to delete the config file and kernel from the /boot directory and also the lob/modules/version directory.
Also remove the .config file from the kernel source, because if you do make menuconfig, it will look for a previous config file |
Hi mr_demilord,
Tks for your advice. "make mrproper" already deletes ".config". I only know it recently. I need to retain the original .config and enable some additional items only. I don't expect to start from the very beginning. My recent discovery is I can't enable both "sound" and "loop" as modules simultaneously. I can only enable either of them as module. B.R. satimis |
Add this to the modprobe.conf in the /etc directory.
Code:
install snd-pcm modprobe -i snd-pcm ; modprobe \ This should be in the modprobe.conf There is also something wrong with the path wich I cannot explain. The path should be Code:
/lib/modules/2.6.11.12/kernel/sound/core Code:
/lib/modules/2.6.11.12-sound/kernel/sound/core/ That could explain why you cannot load the modules. I am not sure but can you post the most recent .config file? |
Hi mr_demilord,
Tks for your advice. I'm replying this posting while running FC3, the host. Quote:
# cat /mnt/livecd/etc/modprobe.conf Code:
install snd-pcm modprobe -i snd-pcm ; modprobe snd-pcm-oss ; true # cat /mnt/livecd/etc/sysconfig/modules Code:
snd-pcm-oss Quote:
# ls /mnt/livecd/lib/modules/2.6.11.12/kernel/sound/core/ Code:
seq snd-hwdep.ko snd-rawmidi.ko Code:
oss seq snd.ko snd-page-alloc.ko snd-pcm.ko snd-rawmidi.ko snd-timer.ko Quote:
# modprobe snd-pcm-oss Code:
WARNING: Error inserting snd (/lib/modules/2.6.11.12-sound/kernel/sound/core/snd.ko): Invalid module format Code:
WARNING: Error inserting snd (/lib/modules/2.6.11.12-sound/kernel/sound/core/snd.ko): Invalid module format Code:
FATAL: Error inserting loop (/lib/modules/2.6.11.12-sound/kernel/drivers/block/loop.ko): Invalid module format Quote:
Code:
..... satimis |
# General setup
# CONFIG_LOCALVERSION="" <=========== strange this doesn't make sence with the /lib/modules/2.6.11.12-sound/ ... ... CONFIG_CC_ALIGN_LOOPS=0 ... ... # Block devices # CONFIG_BLK_DEV_FD=y <========== this can be set as module # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m <=========== is good ... ... # Sound # CONFIG_SOUND=y <=============== this can be set a module # # Advanced Linux Sound Architecture # CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m CONFIG_SND_RAWMIDI=m CONFIG_SND_SEQUENCER=m # CONFIG_SND_SEQ_DUMMY is not set CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m CONFIG_SND_SEQUENCER_OSS=y # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set ... ... # Generic devices # CONFIG_SND_MPU401_UART=m # CONFIG_SND_DUMMY is not set # CONFIG_SND_VIRMIDI is not set # CONFIG_SND_MTPAV is not set # CONFIG_SND_SERIAL_U16550 is not set # CONFIG_SND_MPU401 is not set ... ... If you are going to recompile the kernel check to be sure the /boot partition doesn't contain a config file and also be sure to remove the old obsolate .config~ like files in the kernel source directory. Also delete the directory /lib/modules/2.6.11.12-sound and/or /lib/modules/2.6.11.12 |
Hi mr_demilord,
<snip> Quote:
Quote:
Code:
-rw-r--r-- 1 root root 29707 Oct 22 22:03 .config Quote:
# ls -al /mnt/livecd/lib/modules/2.6.11.12 Code:
total 52 Code:
total 60 satimis |
You have to recompile the kernel to get it working properly, if you don't delete the /lib/modules/2.6.11.12 and /lib/modules/2.6.11.12-sound you will run into serious troubles, it's also wise to remove older .config files to keep the stuff organised and avoid unneeded problems.
BTW you do compile the kernel in a chroot environment don't you? |
Hi mr_demilord,
Quote:
1) /lib/modules/2.6.11.12 (that is "2.6.11.12" directory including all subdirectories and files) and 2) /lib/modules/2.6.11.12-sound (that is "2.6.11.12-sound" directory including all subdirectories and files) I can move them to another location to test. Then is it necessary to recompile the kernel thereafter. I just recompiled the kernel a while ago checking all necessary items selected. Quote:
Now the problem is not the modules not working but only can't enable all of them as module at the same time, i.e. snd-pcm-oss (as module) snd-seq-oss (as module) CONFIG_BLK_DEV_LOOP=y Sound worked without problem but loop did not work OR snd-pcm-oss=y snd-seq-oss=y CONFIG_BLK_DEV_LOOP=m Then loop worked without problem but NO SOUND. B.R. satimis |
Try compile them both as modules, in a chroot environment.
It is really recommed to compile in a chroot environment to avoid the host systems influence. |
Hi mr_demilord
Quote:
If enable loop=y modprobe "snd-pcm-oss"/"snd-seq-oss" without problem. Sound worked but loop did not work. If enable both "snd-pcm-oss" and "snd-seq-oss =y modprobe loop without problem. Sound did work but loop worked satimis |
All times are GMT -5. The time now is 11:41 PM. |