Patchwork [07/37] modutils-initscripts: fix wrong order of module loading happening in udev

login
register
mail settings
Submitter Gary Thomas
Date April 25, 2011, 12:02 p.m.
Message ID <4DB562CF.1020100@mlbassoc.com>
Download mbox | patch
Permalink /patch/2819/
State New, archived
Headers show

Comments

Gary Thomas - April 25, 2011, 12:02 p.m.
On 04/23/2011 12:28 AM, Saul Wold wrote:
> From: =?UTF-8?q?Petr=20=C5=A0tetiar?=<ynezz@true.cz>
>
> In the current state, udev init script is loaded as 3rd and modutils.sh as
> 20th, so udevadm called in udev init script loads all kernel modules in some
> unpredictable order, not honoring in any way specified order of modules in
> /etc/modules. This causes some troubles mainly in the first boot. So to fix
> this we now move loading of the kernel modules just before we exec udev init
> script. Example of the current state:
>
> 	Starting udev
> 	rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc0
> 	rtc-m48t86 rtc-m48t86: battery ok
> 	ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc1
>
> 	root@ts72xx:~# cat /etc/modules
> 	rtc-ep93xx
> 	ohci-hcd
> 	ts72xx_sbcinfo
> 	rtc-m48t86
>
> As you can guess, this is really wrong behaviour, because I've rtc1 as the
> main time source for my system.
>
> 	root@ts72xx:~# cat /etc/default/hwclock
> 	HWCLOCKACCESS=yes
> 	HWCLOCKDEVICE=/dev/rtc1
>
> Expected behaviour with this patch applied:
>
> 	Please wait: booting...
> 	ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
> 	usbcore: registered new device driver usb
> 	ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> 	...
> 	rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1
> 	rtc-m48t86 rtc-m48t86: battery ok
> 	Starting udev
>
> Signed-off-by: Petr Štetiar<ynezz@true.cz>
>
> (based on http://patches.openembedded.org/patch/1917/)
> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
> Signed-off-by: Saul Wold<sgw@linux.intel.com>
> ---
>   .../modutils/modutils-initscripts.bb               |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-kernel/modutils/modutils-initscripts.bb b/meta/recipes-kernel/modutils/modutils-initscripts.bb
> index 1665955..5ae34b4 100644
> --- a/meta/recipes-kernel/modutils/modutils-initscripts.bb
> +++ b/meta/recipes-kernel/modutils/modutils-initscripts.bb
> @@ -4,10 +4,10 @@ LICENSE = "PD"
>   LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
>   SRC_URI = "file://modutils.sh \
>   	   file://PD.patch"
> -PR = "r4"
> +PR = "r5"
>
>   INITSCRIPT_NAME = "modutils.sh"
> -INITSCRIPT_PARAMS = "start 20 S ."
> +INITSCRIPT_PARAMS = "start 2 S ."
>
>   inherit update-rc.d
>

Should there not be a corresponding change to modutils_2.4.27.bb?  It's not clear to me
where there are these two separate recipes, but they should at least be kept in sync.
Saul Wold - April 25, 2011, 3:49 p.m.
On 04/25/2011 05:02 AM, Gary Thomas wrote:
> On 04/23/2011 12:28 AM, Saul Wold wrote:
>> From: =?UTF-8?q?Petr=20=C5=A0tetiar?=<ynezz@true.cz>
>>
>> In the current state, udev init script is loaded as 3rd and
>> modutils.sh as
>> 20th, so udevadm called in udev init script loads all kernel modules
>> in some
>> unpredictable order, not honoring in any way specified order of
>> modules in
>> /etc/modules. This causes some troubles mainly in the first boot. So
>> to fix
>> this we now move loading of the kernel modules just before we exec
>> udev init
>> script. Example of the current state:
>>
>> Starting udev
>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc0
>> rtc-m48t86 rtc-m48t86: battery ok
>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc1
>>
>> root@ts72xx:~# cat /etc/modules
>> rtc-ep93xx
>> ohci-hcd
>> ts72xx_sbcinfo
>> rtc-m48t86
>>
>> As you can guess, this is really wrong behaviour, because I've rtc1 as
>> the
>> main time source for my system.
>>
>> root@ts72xx:~# cat /etc/default/hwclock
>> HWCLOCKACCESS=yes
>> HWCLOCKDEVICE=/dev/rtc1
>>
>> Expected behaviour with this patch applied:
>>
>> Please wait: booting...
>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
>> usbcore: registered new device driver usb
>> ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
>> ...
>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1
>> rtc-m48t86 rtc-m48t86: battery ok
>> Starting udev
>>
>> Signed-off-by: Petr Štetiar<ynezz@true.cz>
>>
>> (based on http://patches.openembedded.org/patch/1917/)
>> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>> ---
>> .../modutils/modutils-initscripts.bb | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>> b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>> index 1665955..5ae34b4 100644
>> --- a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>> +++ b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>> @@ -4,10 +4,10 @@ LICENSE = "PD"
>> LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
>> SRC_URI = "file://modutils.sh \
>> file://PD.patch"
>> -PR = "r4"
>> +PR = "r5"
>>
>> INITSCRIPT_NAME = "modutils.sh"
>> -INITSCRIPT_PARAMS = "start 20 S ."
>> +INITSCRIPT_PARAMS = "start 2 S ."
>>
>> inherit update-rc.d
>>
>
> Should there not be a corresponding change to modutils_2.4.27.bb? It's
> not clear to me
> where there are these two separate recipes, but they should at least be
> kept in sync.
>
Gary,

Could you please resend this as a proper patch with Signed-off-by and 
commit info.

Thanks
	Sau!

> diff --git a/meta/recipes-kernel/modutils/modutils_2.4.27.bb
> b/meta/recipes-kernel/modutils/modutils_2.4.27.bb
> index 1ebc90c..2944201 100644
> --- a/meta/recipes-kernel/modutils/modutils_2.4.27.bb
> +++ b/meta/recipes-kernel/modutils/modutils_2.4.27.bb
> @@ -5,7 +5,7 @@ manageable for all users, administrators and
> distribution maintainers."
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
> DEPENDS = "bison-native"
> -PR = "r9"
> +PR = "r10"
>
> SRC_URI =
> "${KERNELORG_MIRROR}/linux/utils/kernel/modutils/v2.4/modutils-${PV}.tar.bz2
> \
> file://lex.l.diff;patch=1 \
> @@ -51,7 +51,7 @@ if test -n "$D"; then
> done
> fi
> fi
> -update-rc.d $D modutils.sh start 20 S .
> +update-rc.d $D modutils.sh start 2 S .
> }
>
> pkg_prerm_modutils () {
>
Koen Kooi - April 25, 2011, 4:35 p.m.
Is anyone still using 2.4 kernels? That's what modutils is for, module-init-tools is for 2.6 kernels

Op 25 apr. 2011 om 17:49 heeft Saul Wold <sgw@linux.intel.com> het volgende geschreven:

> On 04/25/2011 05:02 AM, Gary Thomas wrote:
>> On 04/23/2011 12:28 AM, Saul Wold wrote:
>>> From: =?UTF-8?q?Petr=20=C5=A0tetiar?=<ynezz@true.cz>
>>> 
>>> In the current state, udev init script is loaded as 3rd and
>>> modutils.sh as
>>> 20th, so udevadm called in udev init script loads all kernel modules
>>> in some
>>> unpredictable order, not honoring in any way specified order of
>>> modules in
>>> /etc/modules. This causes some troubles mainly in the first boot. So
>>> to fix
>>> this we now move loading of the kernel modules just before we exec
>>> udev init
>>> script. Example of the current state:
>>> 
>>> Starting udev
>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc0
>>> rtc-m48t86 rtc-m48t86: battery ok
>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc1
>>> 
>>> root@ts72xx:~# cat /etc/modules
>>> rtc-ep93xx
>>> ohci-hcd
>>> ts72xx_sbcinfo
>>> rtc-m48t86
>>> 
>>> As you can guess, this is really wrong behaviour, because I've rtc1 as
>>> the
>>> main time source for my system.
>>> 
>>> root@ts72xx:~# cat /etc/default/hwclock
>>> HWCLOCKACCESS=yes
>>> HWCLOCKDEVICE=/dev/rtc1
>>> 
>>> Expected behaviour with this patch applied:
>>> 
>>> Please wait: booting...
>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
>>> usbcore: registered new device driver usb
>>> ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
>>> ...
>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1
>>> rtc-m48t86 rtc-m48t86: battery ok
>>> Starting udev
>>> 
>>> Signed-off-by: Petr Štetiar<ynezz@true.cz>
>>> 
>>> (based on http://patches.openembedded.org/patch/1917/)
>>> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
>>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>>> ---
>>> .../modutils/modutils-initscripts.bb | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>> b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>> index 1665955..5ae34b4 100644
>>> --- a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>> +++ b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>> @@ -4,10 +4,10 @@ LICENSE = "PD"
>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
>>> SRC_URI = "file://modutils.sh \
>>> file://PD.patch"
>>> -PR = "r4"
>>> +PR = "r5"
>>> 
>>> INITSCRIPT_NAME = "modutils.sh"
>>> -INITSCRIPT_PARAMS = "start 20 S ."
>>> +INITSCRIPT_PARAMS = "start 2 S ."
>>> 
>>> inherit update-rc.d
>>> 
>> 
>> Should there not be a corresponding change to modutils_2.4.27.bb? It's
>> not clear to me
>> where there are these two separate recipes, but they should at least be
>> kept in sync.
>> 
> Gary,
> 
> Could you please resend this as a proper patch with Signed-off-by and commit info.
> 
> Thanks
>    Sau!
> 
>> diff --git a/meta/recipes-kernel/modutils/modutils_2.4.27.bb
>> b/meta/recipes-kernel/modutils/modutils_2.4.27.bb
>> index 1ebc90c..2944201 100644
>> --- a/meta/recipes-kernel/modutils/modutils_2.4.27.bb
>> +++ b/meta/recipes-kernel/modutils/modutils_2.4.27.bb
>> @@ -5,7 +5,7 @@ manageable for all users, administrators and
>> distribution maintainers."
>> LICENSE = "GPLv2"
>> LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
>> DEPENDS = "bison-native"
>> -PR = "r9"
>> +PR = "r10"
>> 
>> SRC_URI =
>> "${KERNELORG_MIRROR}/linux/utils/kernel/modutils/v2.4/modutils-${PV}.tar.bz2
>> \
>> file://lex.l.diff;patch=1 \
>> @@ -51,7 +51,7 @@ if test -n "$D"; then
>> done
>> fi
>> fi
>> -update-rc.d $D modutils.sh start 20 S .
>> +update-rc.d $D modutils.sh start 2 S .
>> }
>> 
>> pkg_prerm_modutils () {
>>
Gary Thomas - April 25, 2011, 5:07 p.m.
On 04/25/2011 10:35 AM, Koen Kooi wrote:
> Is anyone still using 2.4 kernels? That's what modutils is for, module-init-tools is for 2.6 kernels

Good question, hence my confusion over the two recipes.

BTW, I just built a 2.4 kernel today, so yes, there are still users...

> Op 25 apr. 2011 om 17:49 heeft Saul Wold<sgw@linux.intel.com>  het volgende geschreven:
>
>> On 04/25/2011 05:02 AM, Gary Thomas wrote:
>>> On 04/23/2011 12:28 AM, Saul Wold wrote:
>>>> From: =?UTF-8?q?Petr=20=C5=A0tetiar?=<ynezz@true.cz>
>>>>
>>>> In the current state, udev init script is loaded as 3rd and
>>>> modutils.sh as
>>>> 20th, so udevadm called in udev init script loads all kernel modules
>>>> in some
>>>> unpredictable order, not honoring in any way specified order of
>>>> modules in
>>>> /etc/modules. This causes some troubles mainly in the first boot. So
>>>> to fix
>>>> this we now move loading of the kernel modules just before we exec
>>>> udev init
>>>> script. Example of the current state:
>>>>
>>>> Starting udev
>>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc0
>>>> rtc-m48t86 rtc-m48t86: battery ok
>>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc1
>>>>
>>>> root@ts72xx:~# cat /etc/modules
>>>> rtc-ep93xx
>>>> ohci-hcd
>>>> ts72xx_sbcinfo
>>>> rtc-m48t86
>>>>
>>>> As you can guess, this is really wrong behaviour, because I've rtc1 as
>>>> the
>>>> main time source for my system.
>>>>
>>>> root@ts72xx:~# cat /etc/default/hwclock
>>>> HWCLOCKACCESS=yes
>>>> HWCLOCKDEVICE=/dev/rtc1
>>>>
>>>> Expected behaviour with this patch applied:
>>>>
>>>> Please wait: booting...
>>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
>>>> usbcore: registered new device driver usb
>>>> ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
>>>> ...
>>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1
>>>> rtc-m48t86 rtc-m48t86: battery ok
>>>> Starting udev
>>>>
>>>> Signed-off-by: Petr Štetiar<ynezz@true.cz>
>>>>
>>>> (based on http://patches.openembedded.org/patch/1917/)
>>>> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
>>>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>>>> ---
>>>> .../modutils/modutils-initscripts.bb | 4 ++--
>>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>> b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>> index 1665955..5ae34b4 100644
>>>> --- a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>> +++ b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>> @@ -4,10 +4,10 @@ LICENSE = "PD"
>>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
>>>> SRC_URI = "file://modutils.sh \
>>>> file://PD.patch"
>>>> -PR = "r4"
>>>> +PR = "r5"
>>>>
>>>> INITSCRIPT_NAME = "modutils.sh"
>>>> -INITSCRIPT_PARAMS = "start 20 S ."
>>>> +INITSCRIPT_PARAMS = "start 2 S ."
>>>>
>>>> inherit update-rc.d
>>>>
>>>
>>> Should there not be a corresponding change to modutils_2.4.27.bb? It's
>>> not clear to me
>>> where there are these two separate recipes, but they should at least be
>>> kept in sync.
>>>
>> Gary,
>>
>> Could you please resend this as a proper patch with Signed-off-by and commit info.
>>
>> Thanks
>>     Sau!
>>
>>> diff --git a/meta/recipes-kernel/modutils/modutils_2.4.27.bb
>>> b/meta/recipes-kernel/modutils/modutils_2.4.27.bb
>>> index 1ebc90c..2944201 100644
>>> --- a/meta/recipes-kernel/modutils/modutils_2.4.27.bb
>>> +++ b/meta/recipes-kernel/modutils/modutils_2.4.27.bb
>>> @@ -5,7 +5,7 @@ manageable for all users, administrators and
>>> distribution maintainers."
>>> LICENSE = "GPLv2"
>>> LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
>>> DEPENDS = "bison-native"
>>> -PR = "r9"
>>> +PR = "r10"
>>>
>>> SRC_URI =
>>> "${KERNELORG_MIRROR}/linux/utils/kernel/modutils/v2.4/modutils-${PV}.tar.bz2
>>> \
>>> file://lex.l.diff;patch=1 \
>>> @@ -51,7 +51,7 @@ if test -n "$D"; then
>>> done
>>> fi
>>> fi
>>> -update-rc.d $D modutils.sh start 20 S .
>>> +update-rc.d $D modutils.sh start 2 S .
>>> }
>>>
>>> pkg_prerm_modutils () {
>>>
Gary Thomas - April 25, 2011, 5:14 p.m.
On 04/25/2011 09:49 AM, Saul Wold wrote:
> On 04/25/2011 05:02 AM, Gary Thomas wrote:
>> On 04/23/2011 12:28 AM, Saul Wold wrote:
>>> From: =?UTF-8?q?Petr=20=C5=A0tetiar?=<ynezz@true.cz>
>>>
>>> In the current state, udev init script is loaded as 3rd and
>>> modutils.sh as
>>> 20th, so udevadm called in udev init script loads all kernel modules
>>> in some
>>> unpredictable order, not honoring in any way specified order of
>>> modules in
>>> /etc/modules. This causes some troubles mainly in the first boot. So
>>> to fix
>>> this we now move loading of the kernel modules just before we exec
>>> udev init
>>> script. Example of the current state:
>>>
>>> Starting udev
>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc0
>>> rtc-m48t86 rtc-m48t86: battery ok
>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc1
>>>
>>> root@ts72xx:~# cat /etc/modules
>>> rtc-ep93xx
>>> ohci-hcd
>>> ts72xx_sbcinfo
>>> rtc-m48t86
>>>
>>> As you can guess, this is really wrong behaviour, because I've rtc1 as
>>> the
>>> main time source for my system.
>>>
>>> root@ts72xx:~# cat /etc/default/hwclock
>>> HWCLOCKACCESS=yes
>>> HWCLOCKDEVICE=/dev/rtc1
>>>
>>> Expected behaviour with this patch applied:
>>>
>>> Please wait: booting...
>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
>>> usbcore: registered new device driver usb
>>> ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
>>> ...
>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1
>>> rtc-m48t86 rtc-m48t86: battery ok
>>> Starting udev
>>>
>>> Signed-off-by: Petr Štetiar<ynezz@true.cz>
>>>
>>> (based on http://patches.openembedded.org/patch/1917/)
>>> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
>>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>>> ---
>>> .../modutils/modutils-initscripts.bb | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>> b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>> index 1665955..5ae34b4 100644
>>> --- a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>> +++ b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>> @@ -4,10 +4,10 @@ LICENSE = "PD"
>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
>>> SRC_URI = "file://modutils.sh \
>>> file://PD.patch"
>>> -PR = "r4"
>>> +PR = "r5"
>>>
>>> INITSCRIPT_NAME = "modutils.sh"
>>> -INITSCRIPT_PARAMS = "start 20 S ."
>>> +INITSCRIPT_PARAMS = "start 2 S ."
>>>
>>> inherit update-rc.d
>>>
>>
>> Should there not be a corresponding change to modutils_2.4.27.bb? It's
>> not clear to me
>> where there are these two separate recipes, but they should at least be
>> kept in sync.
>>
> Gary,
>
> Could you please resend this as a proper patch with Signed-off-by and commit info.

Attached.  However, as Koen pointed out, perhaps this recipe should just be dropped,
at least for Poky?  I don't know that 2.4 kernels are built or supported?
Darren Hart - April 26, 2011, 5:47 a.m.
On 04/25/2011 10:14 AM, Gary Thomas wrote:
> On 04/25/2011 09:49 AM, Saul Wold wrote:
>> On 04/25/2011 05:02 AM, Gary Thomas wrote:
>>> On 04/23/2011 12:28 AM, Saul Wold wrote:
>>>> From: =?UTF-8?q?Petr=20=C5=A0tetiar?=<ynezz@true.cz>
>>>>
>>>> In the current state, udev init script is loaded as 3rd and
>>>> modutils.sh as
>>>> 20th, so udevadm called in udev init script loads all kernel modules
>>>> in some
>>>> unpredictable order, not honoring in any way specified order of
>>>> modules in
>>>> /etc/modules. This causes some troubles mainly in the first boot. So
>>>> to fix
>>>> this we now move loading of the kernel modules just before we exec
>>>> udev init
>>>> script. Example of the current state:
>>>>
>>>> Starting udev
>>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc0
>>>> rtc-m48t86 rtc-m48t86: battery ok
>>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc1
>>>>
>>>> root@ts72xx:~# cat /etc/modules
>>>> rtc-ep93xx
>>>> ohci-hcd
>>>> ts72xx_sbcinfo
>>>> rtc-m48t86
>>>>
>>>> As you can guess, this is really wrong behaviour, because I've rtc1 as
>>>> the
>>>> main time source for my system.
>>>>
>>>> root@ts72xx:~# cat /etc/default/hwclock
>>>> HWCLOCKACCESS=yes
>>>> HWCLOCKDEVICE=/dev/rtc1
>>>>
>>>> Expected behaviour with this patch applied:
>>>>
>>>> Please wait: booting...
>>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
>>>> usbcore: registered new device driver usb
>>>> ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
>>>> ...
>>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1
>>>> rtc-m48t86 rtc-m48t86: battery ok
>>>> Starting udev
>>>>
>>>> Signed-off-by: Petr Štetiar<ynezz@true.cz>
>>>>
>>>> (based on http://patches.openembedded.org/patch/1917/)
>>>> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
>>>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>>>> ---
>>>> .../modutils/modutils-initscripts.bb | 4 ++--
>>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>> b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>> index 1665955..5ae34b4 100644
>>>> --- a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>> +++ b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>> @@ -4,10 +4,10 @@ LICENSE = "PD"
>>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
>>>> SRC_URI = "file://modutils.sh \
>>>> file://PD.patch"
>>>> -PR = "r4"
>>>> +PR = "r5"
>>>>
>>>> INITSCRIPT_NAME = "modutils.sh"
>>>> -INITSCRIPT_PARAMS = "start 20 S ."
>>>> +INITSCRIPT_PARAMS = "start 2 S ."
>>>>
>>>> inherit update-rc.d
>>>>
>>>
>>> Should there not be a corresponding change to modutils_2.4.27.bb? It's
>>> not clear to me
>>> where there are these two separate recipes, but they should at least be
>>> kept in sync.
>>>
>> Gary,
>>
>> Could you please resend this as a proper patch with Signed-off-by and commit info.
> 
> Attached.  However, as Koen pointed out, perhaps this recipe should just be dropped,
> at least for Poky?  I don't know that 2.4 kernels are built or supported?


Right, so for clarification, for 2.4 kernels, images should be built
using just the modutils_2.4.27.bb recipe. For 2.6 kernels, images should
be built using module_init_tools and modutils-initscripts.

In oe-core, task-base requires module-init-tools and task-core-boot
requires modutils-initscripts. That actually seems backwards to me as
modutils-initscripts is useless without module-init-tools.

There is a considerable amount of cruft in the kernel base classes
related to older kernels which I'd like to see purged. Perhaps a
meta-linux-2.4 layer would be a good place to keep things like these as
well as the modutils_2.4.27 recipe.

However, in terms of the immediate issue, I agree with Gary's patch.
Khem Raj - April 26, 2011, 5:51 p.m.
On Mon, Apr 25, 2011 at 10:47 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> On 04/25/2011 10:14 AM, Gary Thomas wrote:
>> On 04/25/2011 09:49 AM, Saul Wold wrote:
>>> On 04/25/2011 05:02 AM, Gary Thomas wrote:
>>>> On 04/23/2011 12:28 AM, Saul Wold wrote:
>>>>> From: =?UTF-8?q?Petr=20=C5=A0tetiar?=<ynezz@true.cz>
>>>>>
>>>>> In the current state, udev init script is loaded as 3rd and
>>>>> modutils.sh as
>>>>> 20th, so udevadm called in udev init script loads all kernel modules
>>>>> in some
>>>>> unpredictable order, not honoring in any way specified order of
>>>>> modules in
>>>>> /etc/modules. This causes some troubles mainly in the first boot. So
>>>>> to fix
>>>>> this we now move loading of the kernel modules just before we exec
>>>>> udev init
>>>>> script. Example of the current state:
>>>>>
>>>>> Starting udev
>>>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc0
>>>>> rtc-m48t86 rtc-m48t86: battery ok
>>>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc1
>>>>>
>>>>> root@ts72xx:~# cat /etc/modules
>>>>> rtc-ep93xx
>>>>> ohci-hcd
>>>>> ts72xx_sbcinfo
>>>>> rtc-m48t86
>>>>>
>>>>> As you can guess, this is really wrong behaviour, because I've rtc1 as
>>>>> the
>>>>> main time source for my system.
>>>>>
>>>>> root@ts72xx:~# cat /etc/default/hwclock
>>>>> HWCLOCKACCESS=yes
>>>>> HWCLOCKDEVICE=/dev/rtc1
>>>>>
>>>>> Expected behaviour with this patch applied:
>>>>>
>>>>> Please wait: booting...
>>>>> ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
>>>>> usbcore: registered new device driver usb
>>>>> ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
>>>>> ...
>>>>> rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1
>>>>> rtc-m48t86 rtc-m48t86: battery ok
>>>>> Starting udev
>>>>>
>>>>> Signed-off-by: Petr Štetiar<ynezz@true.cz>
>>>>>
>>>>> (based on http://patches.openembedded.org/patch/1917/)
>>>>> Signed-off-by: Koen Kooi<koen@dominion.thruhere.net>
>>>>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>>>>> ---
>>>>> .../modutils/modutils-initscripts.bb | 4 ++--
>>>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>>> b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>>> index 1665955..5ae34b4 100644
>>>>> --- a/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>>> +++ b/meta/recipes-kernel/modutils/modutils-initscripts.bb
>>>>> @@ -4,10 +4,10 @@ LICENSE = "PD"
>>>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
>>>>> SRC_URI = "file://modutils.sh \
>>>>> file://PD.patch"
>>>>> -PR = "r4"
>>>>> +PR = "r5"
>>>>>
>>>>> INITSCRIPT_NAME = "modutils.sh"
>>>>> -INITSCRIPT_PARAMS = "start 20 S ."
>>>>> +INITSCRIPT_PARAMS = "start 2 S ."
>>>>>
>>>>> inherit update-rc.d
>>>>>
>>>>
>>>> Should there not be a corresponding change to modutils_2.4.27.bb? It's
>>>> not clear to me
>>>> where there are these two separate recipes, but they should at least be
>>>> kept in sync.
>>>>
>>> Gary,
>>>
>>> Could you please resend this as a proper patch with Signed-off-by and commit info.
>>
>> Attached.  However, as Koen pointed out, perhaps this recipe should just be dropped,
>> at least for Poky?  I don't know that 2.4 kernels are built or supported?
>
>
> Right, so for clarification, for 2.4 kernels, images should be built
> using just the modutils_2.4.27.bb recipe. For 2.6 kernels, images should
> be built using module_init_tools and modutils-initscripts.
>
> In oe-core, task-base requires module-init-tools and task-core-boot
> requires modutils-initscripts. That actually seems backwards to me as
> modutils-initscripts is useless without module-init-tools.
>
> There is a considerable amount of cruft in the kernel base classes
> related to older kernels which I'd like to see purged. Perhaps a
> meta-linux-2.4 layer would be a good place to keep things like these as
> well as the modutils_2.4.27 recipe.

Do we have usecases to even support 2.4 anymore ? I would suggest
to remove it if no use cases are reported.

>
> However, in terms of the immediate issue, I agree with Gary's patch.
>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Richard Purdie - April 28, 2011, 9:25 a.m.
On Tue, 2011-04-26 at 10:51 -0700, Khem Raj wrote:
> On Mon, Apr 25, 2011 at 10:47 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> > On 04/25/2011 10:14 AM, Gary Thomas wrote:
> >
> > Right, so for clarification, for 2.4 kernels, images should be built
> > using just the modutils_2.4.27.bb recipe. For 2.6 kernels, images should
> > be built using module_init_tools and modutils-initscripts.
> >
> > In oe-core, task-base requires module-init-tools and task-core-boot
> > requires modutils-initscripts. That actually seems backwards to me as
> > modutils-initscripts is useless without module-init-tools.
> >
> > There is a considerable amount of cruft in the kernel base classes
> > related to older kernels which I'd like to see purged. Perhaps a
> > meta-linux-2.4 layer would be a good place to keep things like these as
> > well as the modutils_2.4.27 recipe.
> 
> Do we have usecases to even support 2.4 anymore ? I would suggest
> to remove it if no use cases are reported.

I think the time has come for OE-Core to clean out kernel.bbclass of the
2.4 code. If anyone does want to support 2.4, they can do it with a
separate kernel-2.4 class.

Cheers,

Richard
Darren Hart - April 29, 2011, 4:25 a.m.
On 04/28/2011 02:25 AM, Richard Purdie wrote:
> On Tue, 2011-04-26 at 10:51 -0700, Khem Raj wrote:
>> On Mon, Apr 25, 2011 at 10:47 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>>> On 04/25/2011 10:14 AM, Gary Thomas wrote:
>>>
>>> Right, so for clarification, for 2.4 kernels, images should be built
>>> using just the modutils_2.4.27.bb recipe. For 2.6 kernels, images should
>>> be built using module_init_tools and modutils-initscripts.
>>>
>>> In oe-core, task-base requires module-init-tools and task-core-boot
>>> requires modutils-initscripts. That actually seems backwards to me as
>>> modutils-initscripts is useless without module-init-tools.
>>>
>>> There is a considerable amount of cruft in the kernel base classes
>>> related to older kernels which I'd like to see purged. Perhaps a
>>> meta-linux-2.4 layer would be a good place to keep things like these as
>>> well as the modutils_2.4.27 recipe.
>>
>> Do we have usecases to even support 2.4 anymore ? I would suggest
>> to remove it if no use cases are reported.
> 
> I think the time has come for OE-Core to clean out kernel.bbclass of the
> 2.4 code. If anyone does want to support 2.4, they can do it with a
> separate kernel-2.4 class.

Excellent. Added to my todo list for the not toooo distant future.

> 
> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-kernel/modutils/modutils_2.4.27.bb b/meta/recipes-kernel/modutils/modutils_2.4.27.bb
index 1ebc90c..2944201 100644
--- a/meta/recipes-kernel/modutils/modutils_2.4.27.bb
+++ b/meta/recipes-kernel/modutils/modutils_2.4.27.bb
@@ -5,7 +5,7 @@  manageable for all users, administrators and distribution maintainers."
  LICENSE = "GPLv2"
  LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
  DEPENDS = "bison-native"
-PR = "r9"
+PR = "r10"

  SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/modutils/v2.4/modutils-${PV}.tar.bz2 \
             file://lex.l.diff;patch=1 \
@@ -51,7 +51,7 @@  if test -n "$D"; then
                 done
         fi
  fi
-update-rc.d $D modutils.sh start 20 S .
+update-rc.d $D modutils.sh start 2 S .
  }

  pkg_prerm_modutils () {