All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] patching continues
@ 2007-02-19 19:15 Roland Tollenaar
  2007-02-20  7:23 ` Eric Noulard
  0 siblings, 1 reply; 9+ messages in thread
From: Roland Tollenaar @ 2007-02-19 19:15 UTC (permalink / raw)
  To: Xenomai-help

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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-help] patching continues
  2007-02-19 19:15 [Xenomai-help] patching continues Roland Tollenaar
@ 2007-02-20  7:23 ` Eric Noulard
  2007-02-20  9:47   ` Roland Tollenaar
  2007-02-20 10:16   ` Wolfgang Grandegger
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Noulard @ 2007-02-20  7:23 UTC (permalink / raw)
  To: rolandtollenaar; +Cc: Xenomai-help

2007/2/19, Roland Tollenaar <rwatollenaar@domain.hid>:
> 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.

>
> 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.

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.

>
> 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...)


-- 
Erk


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-help] patching continues
  2007-02-20  7:23 ` Eric Noulard
@ 2007-02-20  9:47   ` Roland Tollenaar
  2007-02-20 10:16     ` Eric Noulard
  2007-02-20 11:00     ` Paul
  2007-02-20 10:16   ` Wolfgang Grandegger
  1 sibling, 2 replies; 9+ messages in thread
From: Roland Tollenaar @ 2007-02-20  9:47 UTC (permalink / raw)
  To: Eric Noulard; +Cc: Xenomai-help

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



Eric Noulard wrote:
> 2007/2/19, Roland Tollenaar <rwatollenaar@domain.hid>:
>> 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.
> 
>>
>> 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.
> 
> 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.
> 
>>
>> 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...)
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-help] patching continues
  2007-02-20  7:23 ` Eric Noulard
  2007-02-20  9:47   ` Roland Tollenaar
@ 2007-02-20 10:16   ` Wolfgang Grandegger
  2007-02-20 13:11     ` Eric Noulard
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Grandegger @ 2007-02-20 10:16 UTC (permalink / raw)
  To: Eric Noulard; +Cc: Xenomai-help

Eric Noulard wrote:
> 2007/2/19, Roland Tollenaar <rwatollenaar@domain.hid>:
>> 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.

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.

>> 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.
> 
> 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.

>>
>> 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...)
> 
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-help] patching continues
  2007-02-20  9:47   ` Roland Tollenaar
@ 2007-02-20 10:16     ` Eric Noulard
  2007-02-20 10:34       ` Roland Tollenaar
  2007-02-20 11:00     ` Paul
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Noulard @ 2007-02-20 10:16 UTC (permalink / raw)
  To: rolandtollenaar; +Cc: Xenomai-help

2007/2/20, Roland Tollenaar <rwatollenaar@domain.hid>:
> 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

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.

> 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.

> 9-make all
> 10-make modules_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?

> 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)

The kernel should be missing some builting FS support for your
the FS you root device is on.

> 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.

>
> 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.

-- 
Erk


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-help] patching continues
  2007-02-20 10:16     ` Eric Noulard
@ 2007-02-20 10:34       ` Roland Tollenaar
  0 siblings, 0 replies; 9+ messages in thread
From: Roland Tollenaar @ 2007-02-20 10:34 UTC (permalink / raw)
  To: Eric Noulard; +Cc: Xenomai-help

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

Eric Noulard wrote:
> 2007/2/20, Roland Tollenaar <rwatollenaar@domain.hid>:
>> 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
> 
> 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.
> 
>> 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.
> 
>> 9-make all
>> 10-make modules_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?
> 
>> 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)
> 
> The kernel should be missing some builting FS support for your
> the FS you root device is on.
> 
>> 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.
> 
>>
>> 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.
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-help] patching continues
  2007-02-20  9:47   ` Roland Tollenaar
  2007-02-20 10:16     ` Eric Noulard
@ 2007-02-20 11:00     ` Paul
  1 sibling, 0 replies; 9+ messages in thread
From: Paul @ 2007-02-20 11:00 UTC (permalink / raw)
  To: xenomai, rolandtollenaar

On Tuesday 20 February 2007 09:47, Roland Tollenaar wrote:
> 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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-help] patching continues
  2007-02-20 10:16   ` Wolfgang Grandegger
@ 2007-02-20 13:11     ` Eric Noulard
  2007-02-20 16:08       ` Roland Tollenaar
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Noulard @ 2007-02-20 13:11 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Xenomai-help

2007/2/20, Wolfgang Grandegger <wg@domain.hid>:
> Eric Noulard wrote:

> >
> > 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.

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
>>>
  install       - Install kernel using
                   (your) ~/bin/installkernel or
                   (distribution) /sbin/installkernel or
                   install to $(INSTALL_PATH) and run lilo
>>>



-- 
Erk


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xenomai-help] patching continues
  2007-02-20 13:11     ` Eric Noulard
@ 2007-02-20 16:08       ` Roland Tollenaar
  0 siblings, 0 replies; 9+ messages in thread
From: Roland Tollenaar @ 2007-02-20 16:08 UTC (permalink / raw)
  To: Eric Noulard, Xenomai-help

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.

Eric Noulard wrote:
> 2007/2/20, Wolfgang Grandegger <wg@domain.hid>:
>> Eric Noulard wrote:
> 
>> >
>> > 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.
> 
> 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
>>>>
>  install       - Install kernel using
>                   (your) ~/bin/installkernel or
>                   (distribution) /sbin/installkernel or
>                   install to $(INSTALL_PATH) and run lilo
>>>>
> 
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-02-20 16:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 19:15 [Xenomai-help] patching continues Roland Tollenaar
2007-02-20  7:23 ` Eric Noulard
2007-02-20  9:47   ` Roland Tollenaar
2007-02-20 10:16     ` Eric Noulard
2007-02-20 10:34       ` Roland Tollenaar
2007-02-20 11:00     ` Paul
2007-02-20 10:16   ` Wolfgang Grandegger
2007-02-20 13:11     ` Eric Noulard
2007-02-20 16:08       ` Roland Tollenaar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.