patching continues
Hi all,
I have gone through the kernel patching steps and all seems to go well. Except...
1
I don't seem to get an initrd from the make process and my system does not have a mkinitrd on it. Is this normal? I get the vmlinux though which I am very happy about :)
2
Then the make modules install generates the lib/modules/2.6.16-pipe directory but it has only a very few modules. Not nearly as many as the current kernel seems to have.
Might anyone be able to give some hints as to what I could be doing wrong?
Kind regards,
Roland.
2007/2/19, Roland Tollenaar <[email protected]>:
Quoted 9 lines
Hi all,
I have gone through the kernel patching steps and all seems to go well. Except...
1
I don't seem to get an initrd from the make process and my system does not have a mkinitrd on it. Is this normal? I get the vmlinux though which I am very happy about :)
I don't know how you did compile your kernel but if you "only" did:
make YYYYconfig
make
make modules_install
you won't get initrd from this.
you need to do it yourself for example with
/sbin/mkinitrd -v -f /what_ever_dir_is/boot/initrd-2.6.16-pipe.img 2.6.16-pipe
which will create (OR REPLACE if it exists) your initrd file for kernel version
2.6.16-pipe
Note that you still to update your lilo.conf / grub.conf file for adding your freshly
compiled kernel.
Quoted 5 lines
2
Then the make modules install generates thelib/modules/2.6.16-pipedirectory but it has only a very few modules. Not nearly as many as the current kernel seems to have.
It really depends on what you chose during
make YYYYconfig
step.
you may try to diff the .config obtained for your currently running kernel with the one used for xenomai-patched kernel.
Quoted 2 lines
Might anyone be able to give some hints as to what I could be doing wrong?
What is wrong did you manage to boot?
I don't if my answer are appropriate since I don't know exactly what step you did for compiling your kernel.
May be you can tell us what you did exactly (command lines) and what you expected that does not work
(missing files, kernel does not boot, no new kernel boot menu...)
Signature · 1 line
Erk
Hi Eric and List,
This is what I did:
1-copy kernel code from linux-2.6.16 into a new directory under /usr/src/linux-2.6.16-ipipe 2-Extract xenomai (latest) in /usr/src/xenomai<version>
3-Place adeos patch 2.6.16-1.5-02 into tmp
4-cd /usr/src/xenomai<version>5-prepare-kerne.sh --linux=/usr/src/linux-2.6.16-ipipe --adeos=/tmp/adeos<version>.patch --arch=i386 6-cd /usr/src/linux-2.6.16-ipipe
7-cp /usr/src/linux-2.6.16-ipipe/somewhere/defconfig /usr/src/linux-2.6.16-ipipe/.config 8-make menuconfig (load .config, switch off powermanagement, select CAN module & PEAK parallel port module) 9-make all
10-make modules_install
11-find bzImage remane to vmlinuz (what current kernel is called) copy it to /boot. 12-reboot
result
runs until I get this message:
VFS Cannot open root device
"ram0"or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic-not syncing:VFS: unable to mount root fs on unknown -block(0,0)
Keep in mind that my Slax USB uses neither grub nor lilo but syslinux. I realize that i should do something to initrd but do not know what
mkinitrd is not on my system. Where must I get it?
Thanks for the help, I really need it. :(
Regards,
Roland
Quoted 58 lines · Eric Noulard
2007/2/19, Roland Tollenaar <[email protected]>:
Quoted 9 lines
Hi all,
I have gone through the kernel patching steps and all seems to go well. Except...
1
I don't seem to get an initrd from the make process and my system does not have a mkinitrd on it. Is this normal? I get the vmlinux though which I am very happy about :)I don't know how you did compile your kernel but if you "only" did:
make YYYYconfig
make
makemodules_installyou won't get initrd from this.
you need to do it yourself for example with
/sbin/mkinitrd-v -f /what_ever_dir_is/boot/initrd-2.6.16-pipe.img 2.6.16-pipewhich will create (OR REPLACE if it exists) your initrd file for kernel version
2.6.16-pipe
Note that you still to update your lilo.conf / grub.conf file for adding your freshly
compiled kernel.Quoted 5 lines
2
Then the make modules install generates thelib/modules/2.6.16-pipedirectory but it has only a very few modules. Not nearly as many as the current kernel seems to have.It really depends on what you chose during
make YYYYconfig
step.
you may try to diff the .config obtained for your currently running kernel with the one used for xenomai-patched kernel.
Quoted 2 lines
Might anyone be able to give some hints as to what I could be doing wrong?
What is wrong did you manage to boot?
I don't if my answer are appropriate since I don't know exactly what step you did for compiling your kernel.
May be you can tell us what you did exactly (command lines) and what you expected that does not work
(missing files, kernel does not boot, no new kernel boot menu...)
2007/2/20, Roland Tollenaar <[email protected]>:
Quoted 4 lines
Hi Eric and List,
This is what I did:
Quoted 10 lines
1-copy kernel code from linux-2.6.16 into a new directory under
/usr/src/linux-2.6.16-ipipe
2-Extract xenomai (latest) in /usr/src/xenomai<version> 3-Place adeos patch 2.6.16-1.5-02 into tmp
4-cd /usr/src/xenomai<version>5-prepare-kerne.sh--linux=/usr/src/linux-2.6.16-ipipe --adeos=/tmp/adeos<version>.patch --arch=i386
6-cd/usr/src/linux-2.6.16-ipipe
7-cp/usr/src/linux-2.6.16-ipipe/somewhere/defconfig/usr/src/linux-2.6.16-ipipe/.config
That step may be a wrong choice.
You should try to start with the .config your running system is currently working with and then update it for Xenomai support.
You may find such file may somewhere in /boot directory.
Quoted 2 lines
8-make menuconfig (load .config, switch off powermanagement, select CAN module & PEAK parallel port module)
Loading the previous .config you may make small changes for Xenomai support.
Quoted 5 lines
9-make all
10-makemodules_install
11-find bzImage remane to vmlinuz (what current kernel is called) copy it to /boot.
12-reboot
After you recompile your kernel may may retry this.
But the trouble with this scheme is that you have no kernel choice at boot time...
I'm no syslinux expert but I may be possible to keep 2 kernels in order to ease debug cycle since once
you have overwritten your booting kernel with a non-booting one you are stuck no?
Quoted 5 lines
result runs until I get this message:
VFS Cannot open root device
"ram0"or unknown-block(0,0)
Please append a correct "root=" boot optionKernel panic-not syncing:VFS: unable to mount root fs on unknown -block(0,0)
The kernel should be missing some builting FS support for your the FS you root device is on.
Quoted 2 lines
Keep in mind that my Slax USB uses neither grub nor lilo but syslinux. I realize that i should do something to initrd but do not know what
You should get your hand on the syslinux config file and verify that if the default kernel is using initrd or not.
If YES then you should find some initrd file under /boot so you have to do (after your make modules_install step)
/sbin/mkinitrd -v -f /boot/<theinitrdfiletoreplace> 2.6.16-ipipe
If NO then you should be able to build a xenomai kernel that does not need initrd.
Quoted 2 lines
mkinitrd is not on my system. Where must I get it?
If it is not I'm pretty sure you should be able to build
a kernel that does not need it with an appropriate kernel .config file.
Signature · 1 line
Erk
Hi Eric, Wolfgang and list,
Thanks you gave me plenty of hope with this. I think I might know where to find the correct ./config file.
I am working on a live USB (which makes things a bit more complicated) but I can always get to the kernel if I messed up.
I will incorporate your advice and try again.
I will post my problems soon. :)
Sorry to be such a hassle.
Thanks again.
Roland
Quoted 72 lines · Eric Noulard
2007/2/20, Roland Tollenaar <[email protected]>:
Quoted 4 lines
Hi Eric and List,
This is what I did:
Quoted 10 lines
1-copy kernel code from linux-2.6.16 into a new directory under
/usr/src/linux-2.6.16-ipipe
2-Extract xenomai (latest) in /usr/src/xenomai<version> 3-Place adeos patch 2.6.16-1.5-02 into tmp
4-cd /usr/src/xenomai<version>5-prepare-kerne.sh--linux=/usr/src/linux-2.6.16-ipipe --adeos=/tmp/adeos<version>.patch --arch=i386
6-cd/usr/src/linux-2.6.16-ipipe
7-cp/usr/src/linux-2.6.16-ipipe/somewhere/defconfig/usr/src/linux-2.6.16-ipipe/.configThat step may be a wrong choice.
You should try to start with the .config your running system is currently working with and then update it for Xenomai support.You may find such file may somewhere in /boot directory.
Quoted 2 lines
8-make menuconfig (load .config, switch off powermanagement, select CAN module & PEAK parallel port module)
Loading the previous .config you may make small changes for Xenomai support.
Quoted 5 lines
9-make all
10-makemodules_install
11-find bzImage remane to vmlinuz (what current kernel is called) copy it to /boot.
12-rebootAfter you recompile your kernel may may retry this.
But the trouble with this scheme is that you have no kernel choice at boot time...I'm no syslinux expert but I may be possible to keep 2 kernels in order to ease debug cycle since once
you have overwritten your booting kernel with a non-booting one you are stuck no?Quoted 6 lines
result runs until I get this message:
VFS Cannot open root device
"ram0"or unknown-block(0,0)
Please append a correct "root=" boot optionKernel panic-not syncing:VFS: unable to mount root fs on unknown-block(0,0)
The kernel should be missing some builting FS support for your the FS you root device is on.
Quoted 2 lines
Keep in mind that my Slax USB uses neither grub nor lilo but syslinux. I realize that i should do something to initrd but do not know what
You should get your hand on the syslinux config file and verify that if the default kernel is using initrd or not.
If YES then you should find some initrd file under /boot so you have to do (after your make
modules_installstep)
/sbin/mkinitrd-v -f /boot/<theinitrdfiletoreplace> 2.6.16-ipipeIf NO then you should be able to build a xenomai kernel that does not need initrd.
Quoted 2 lines
mkinitrd is not on my system. Where must I get it?
If it is not I'm pretty sure you should be able to build
a kernel that does not need it with an appropriate kernel .config file.
Quoted 2 lines · Roland Tollenaar
7-cp
/usr/src/linux-2.6.16-ipipe/somewhere/defconfig/usr/src/linux-2.6.16-ipipe/.config
Make sure CONFIG_SYSFS, CONFIG_TMPFS, and CONFIG_RAMFS are all enabled (all under Psuedo filesystems). The latter is required for initrd support ad should be built in rather than compiled as a module.. As has been pointed out elsewhere, it is usually better to start with the config from a known, working kernel - Usually found in /boot/config-uname -r and/or sometimes under /proc/config.gz.
Regards, Paul.
Quoted 22 lines · Eric Noulard
2007/2/19, Roland Tollenaar <[email protected]>:
Quoted 9 lines
Hi all,
I have gone through the kernel patching steps and all seems to go well. Except...
1
I don't seem to get an initrd from the make process and my system does not have a mkinitrd on it. Is this normal? I get the vmlinux though which I am very happy about :)I don't know how you did compile your kernel but if you "only" did:
make YYYYconfig
make
makemodules_installyou won't get initrd from this.
you need to do it yourself for example with
/sbin/mkinitrd-v -f /what_ever_dir_is/boot/initrd-2.6.16-pipe.img 2.6.16-pipe
Quoted 7 lines
which will create (OR REPLACE if it exists) your initrd file for kernel version
2.6.16-pipe
Note that you still to update your lilo.conf / grub.conf file for adding your freshly
compiled kernel.
On my FC5 distro I simply do:
$ make bzImage $ make modules # make modules_install # make install
Then I reboot and select the new entry in the grub boot loader. I guess this works for other distros as well.
Quoted 5 lines
Quoted 4 lines
2
Then the make modules install generates thelib/modules/2.6.16-pipedirectory but it has only a very few modules. Not nearly as many as the current kernel seems to have.
Quoted 8 lines
It really depends on what you chose during
make YYYYconfig
step.
you may try to diff the .config obtained for your currently running kernel with the one used for xenomai-patched kernel.
Copy the .config from you vanilla kernel to the Xenomai/iPipe kernel and do "make menuconfig" selecting Xenomai options. On FC5 I can find the .config for my running kernel in /boot or it might be visible via PROC file system (/proc/config.gz if CONFIG_IKCONFIG is set). Unfortunately this selects plenty of modules and building them takes very long.
Quoted 13 lines
Quoted 2 lines
Might anyone be able to give some hints as to what I could be doing wrong?
What is wrong did you manage to boot?
I don't if my answer are appropriate since I don't know exactly what step you did for compiling your kernel.
May be you can tell us what you did exactly (command lines) and what you expected that does not work
(missing files, kernel does not boot, no new kernel boot menu...)
2007/2/20, Wolfgang Grandegger <[email protected]>:
Quoted 9 lines
Quoted 4 lines · Eric Noulard
Note that you still to update your lilo.conf / grub.conf file for adding your freshly
compiled kernel.On my FC5 distro I simply do:
Quoted 7 lines
$ make bzImage $ make modules # make modules_install # make installThen I reboot and select the new entry in the grub boot loader. I guess this works for other distros as well.
You are right
make install step usually calls a script
as shown by "make help" you may call in a configured linux kernel [build] tree
Quoted 1 line
Quoted 1 line
Quoted 1 line
install - Install kernel using
(your) ~/bin/installkernel or (distribution) /sbin/installkernel or install to $(INSTALL_PATH) and run lilo
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signature · 1 line
Erk
Hi,
As my distro is using syslinux and not lilo or grub the install part does not work. In documentation of slax it appears that vmlinuz ,initrd.gz and kernel_01.mo must be adapted.
I have found the correct .config file I think and since I am using the kernel src that belongs to the distro I would expect not even to have to change initrd or the kernel_01.mo (latter copies the modules to the lib/module directory I think)
If I understand correctly xenomai is statically built into the kernel if I use * instead of M. So I am hoping to be able to run off the same modules. In fact even skip the make module and make module_install
steps?
Or am I misunderstanding something and is this stupid?
I must be because on trying the kernel that results it gives
error inserting module ehci-hdc(1) for your kernel 2.6.16 error inserting module ohci-hdc(1) for your kernel 2.6.16 error inserting module uhci-hdc(1) for your kernel 2.6.16 error inserting module usb-storage for your kernel 2.6.16
which means it cannot find the usb after that (which is almost ridiculous because it loads syslinux and the kernel and initrd from it to get to that stage)
Kind regards,
Roland.
Quoted 31 lines · Eric Noulard
2007/2/20, Wolfgang Grandegger <[email protected]>:
Quoted 9 lines
Quoted 4 lines · Eric Noulard
Note that you still to update your lilo.conf / grub.conf file for adding your freshly
compiled kernel.On my FC5 distro I simply do:
Quoted 7 lines
$ make bzImage $ make modules # make modules_install # make installThen I reboot and select the new entry in the grub boot loader. I guess this works for other distros as well.
You are right
make install step usually calls a script
as shown by "make help" you may call in a configured linux kernel [build] treeQuoted 1 line
Quoted 1 line
Quoted 1 line
install - Install kernel using
(your) ~/bin/installkernel or (distribution)/sbin/installkernelor install to $(INSTALL_PATH) and run liloQuoted 1 line
Quoted 1 line
Quoted 1 line