* [PATCH] initrdscripts: fix udevd path
@ 2012-11-01 14:32 Alex DAMIAN
2012-11-01 19:31 ` Richard Purdie
2012-11-13 16:32 ` Otavio Salvador
0 siblings, 2 replies; 10+ messages in thread
From: Alex DAMIAN @ 2012-11-01 14:32 UTC (permalink / raw)
To: openembedded-core, ross.burton
From: Ross Burton <ross.burton@intel.com>
udevd moved location and isn't in $PATH anymore, so use an absolute path to
start it.
The control socket path moved too, so mkdir the directory it's in.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-core/initrdscripts/files/init-live.sh | 50 +++++++++++++++++---
.../initrdscripts/initramfs-framework/udev | 6 +--
.../initrdscripts/initramfs-framework_1.0.bb | 2 +
.../initrdscripts/initramfs-live-boot_1.0.bb | 2 +-
4 files changed, 50 insertions(+), 10 deletions(-)
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 5682fd1..fdea892 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -19,7 +19,8 @@ early_setup() {
modprobe isofs 2> /dev/null
mkdir -p /run
- udevd --daemon
+ mkdir -p /var/run
+ /lib/udev/udevd --daemon
udevadm trigger --action=add
}
@@ -68,13 +69,49 @@ fatal() {
early_setup
+# wait for the udevd to settle
+echo "Waiting for udev to settle..."
+sleep 3
+
[ -z "$CONSOLE" ] && CONSOLE="/dev/console"
read_args
-echo "Waiting for removable media..."
-while true
+# boot partiton menu, if one or more bootable partitions exist
+BOOTMENU=`ls /media/sd*/sbin/init 2>/dev/null | wc -l`
+if [ $BOOTMENU -gt 0 ]; then
+ choice=0
+ while [ $choice -le 0 ]; do
+ echo "1). boot live ramfs image"
+ count=2
+ for i in `ls /media/sd*/sbin/init 2>/dev/null | cut -d "/" -f 3`; do
+ echo $count"). boot /dev/"$i
+ choicecmd[$count]=$i
+ count=$(( count + 1))
+ done
+ echo
+ echo -n "Your choice: "
+ read choice
+ done
+
+ if [ $choice -gt 1 ]; then
+ #ROOT_MOUNT=/media/${choicecmd[${choice}]}
+ ROOT_MOUNT=none #testing
+ echo "Booting local root ... $ROOT_MOUNT"
+ if [ -d $ROOT_MOUNT ]; then
+ boot_live_root
+ else
+ fatal "Rootfs partition not mounted"
+ fi
+ fi
+fi
+
+echo -n "Waiting for removable media... "
+CNT=0
+while [ $CNT -le 3 ];
do
+ echo -n "$CNT "
+ CNT=$(( $CNT + 1 ))
for i in `ls /media 2>/dev/null`; do
if [ -f /media/$i/$ROOT_IMAGE ] ; then
found="yes"
@@ -82,7 +119,7 @@ do
elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then
found="yes"
ISOLINUX="isolinux"
- break
+ break
fi
done
if [ "$found" = "yes" ]; then
@@ -90,13 +127,14 @@ do
fi
sleep 1
done
+if [ "$found" != "yes" ]; then
+ fatal "...could not mount removable media, drop to shell"
+fi
case $label in
boot)
mkdir $ROOT_MOUNT
mknod /dev/loop0 b 7 0 2>/dev/null
-
-
if [ "$UNIONFS" = "yes" ]; then
mkdir /rootfs-tmp
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev
index 9ea8aa3..15a1d5b 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
@@ -3,8 +3,8 @@
# Licensed on MIT
udev_enabled() {
- if [ ! -e /sbin/udevd ]; then
- debug "/sbin/udev doesn't exist"
+ if [ ! -e /lib/udev/udevd ]; then
+ debug "/lib/udev/udev doesn't exist"
return 1
fi
@@ -14,7 +14,7 @@ udev_enabled() {
udev_run() {
mkdir -p /run
- udevd --daemon > /dev/null
+ /lib/udev/udevd --daemon > /dev/null
udevadm trigger --action=add
udevadm settle
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 58e41d4..45d6592 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -3,6 +3,8 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS = "busybox"
+PR = "r1"
+
inherit allarch
SRC_URI = "file://init \
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
index 137a401..55a8600 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
@@ -5,7 +5,7 @@ RDEPENDS = "udev"
DEPENDS = "virtual/kernel"
SRC_URI = "file://init-live.sh"
-PR = "r10"
+PR = "r11"
do_compile() {
#if grep -q "CONFIG_UNION_FS=y" ${STAGING_KERNEL_DIR}/.config; then
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-01 14:32 [PATCH] initrdscripts: fix udevd path Alex DAMIAN
@ 2012-11-01 19:31 ` Richard Purdie
2012-11-02 13:07 ` Damian, Alexandru
2012-11-13 16:32 ` Otavio Salvador
1 sibling, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2012-11-01 19:31 UTC (permalink / raw)
To: Alex DAMIAN; +Cc: openembedded-core
On Thu, 2012-11-01 at 16:32 +0200, Alex DAMIAN wrote:
> From: Ross Burton <ross.burton@intel.com>
>
> udevd moved location and isn't in $PATH anymore, so use an absolute path to
> start it.
>
> The control socket path moved too, so mkdir the directory it's in.
This patch looks to do a little more than that...
Cheers,
Richard
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> meta/recipes-core/initrdscripts/files/init-live.sh | 50 +++++++++++++++++---
> .../initrdscripts/initramfs-framework/udev | 6 +--
> .../initrdscripts/initramfs-framework_1.0.bb | 2 +
> .../initrdscripts/initramfs-live-boot_1.0.bb | 2 +-
> 4 files changed, 50 insertions(+), 10 deletions(-)
>
> diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
> index 5682fd1..fdea892 100644
> --- a/meta/recipes-core/initrdscripts/files/init-live.sh
> +++ b/meta/recipes-core/initrdscripts/files/init-live.sh
> @@ -19,7 +19,8 @@ early_setup() {
> modprobe isofs 2> /dev/null
>
> mkdir -p /run
> - udevd --daemon
> + mkdir -p /var/run
> + /lib/udev/udevd --daemon
> udevadm trigger --action=add
> }
>
> @@ -68,13 +69,49 @@ fatal() {
>
> early_setup
>
> +# wait for the udevd to settle
> +echo "Waiting for udev to settle..."
> +sleep 3
> +
> [ -z "$CONSOLE" ] && CONSOLE="/dev/console"
>
> read_args
>
> -echo "Waiting for removable media..."
> -while true
> +# boot partiton menu, if one or more bootable partitions exist
> +BOOTMENU=`ls /media/sd*/sbin/init 2>/dev/null | wc -l`
> +if [ $BOOTMENU -gt 0 ]; then
> + choice=0
> + while [ $choice -le 0 ]; do
> + echo "1). boot live ramfs image"
> + count=2
> + for i in `ls /media/sd*/sbin/init 2>/dev/null | cut -d "/" -f 3`; do
> + echo $count"). boot /dev/"$i
> + choicecmd[$count]=$i
> + count=$(( count + 1))
> + done
> + echo
> + echo -n "Your choice: "
> + read choice
> + done
> +
> + if [ $choice -gt 1 ]; then
> + #ROOT_MOUNT=/media/${choicecmd[${choice}]}
> + ROOT_MOUNT=none #testing
> + echo "Booting local root ... $ROOT_MOUNT"
> + if [ -d $ROOT_MOUNT ]; then
> + boot_live_root
> + else
> + fatal "Rootfs partition not mounted"
> + fi
> + fi
> +fi
> +
> +echo -n "Waiting for removable media... "
> +CNT=0
> +while [ $CNT -le 3 ];
> do
> + echo -n "$CNT "
> + CNT=$(( $CNT + 1 ))
> for i in `ls /media 2>/dev/null`; do
> if [ -f /media/$i/$ROOT_IMAGE ] ; then
> found="yes"
> @@ -82,7 +119,7 @@ do
> elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then
> found="yes"
> ISOLINUX="isolinux"
> - break
> + break
> fi
> done
> if [ "$found" = "yes" ]; then
> @@ -90,13 +127,14 @@ do
> fi
> sleep 1
> done
> +if [ "$found" != "yes" ]; then
> + fatal "...could not mount removable media, drop to shell"
> +fi
>
> case $label in
> boot)
> mkdir $ROOT_MOUNT
> mknod /dev/loop0 b 7 0 2>/dev/null
> -
> -
> if [ "$UNIONFS" = "yes" ]; then
> mkdir /rootfs-tmp
>
> diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev
> index 9ea8aa3..15a1d5b 100644
> --- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
> +++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
> @@ -3,8 +3,8 @@
> # Licensed on MIT
>
> udev_enabled() {
> - if [ ! -e /sbin/udevd ]; then
> - debug "/sbin/udev doesn't exist"
> + if [ ! -e /lib/udev/udevd ]; then
> + debug "/lib/udev/udev doesn't exist"
> return 1
> fi
>
> @@ -14,7 +14,7 @@ udev_enabled() {
> udev_run() {
> mkdir -p /run
>
> - udevd --daemon > /dev/null
> + /lib/udev/udevd --daemon > /dev/null
> udevadm trigger --action=add
> udevadm settle
>
> diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
> index 58e41d4..45d6592 100644
> --- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
> +++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
> @@ -3,6 +3,8 @@ LICENSE = "MIT"
> LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> RDEPENDS = "busybox"
>
> +PR = "r1"
> +
> inherit allarch
>
> SRC_URI = "file://init \
> diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
> index 137a401..55a8600 100644
> --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
> +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
> @@ -5,7 +5,7 @@ RDEPENDS = "udev"
> DEPENDS = "virtual/kernel"
> SRC_URI = "file://init-live.sh"
>
> -PR = "r10"
> +PR = "r11"
>
> do_compile() {
> #if grep -q "CONFIG_UNION_FS=y" ${STAGING_KERNEL_DIR}/.config; then
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-01 19:31 ` Richard Purdie
@ 2012-11-02 13:07 ` Damian, Alexandru
2012-11-02 13:31 ` Damian, Alexandru
0 siblings, 1 reply; 10+ messages in thread
From: Damian, Alexandru @ 2012-11-02 13:07 UTC (permalink / raw)
To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 5884 bytes --]
I submitted a new patch in a separate mail, with proper description.
Alex
On Thu, Nov 1, 2012 at 9:31 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2012-11-01 at 16:32 +0200, Alex DAMIAN wrote:
> > From: Ross Burton <ross.burton@intel.com>
> >
> > udevd moved location and isn't in $PATH anymore, so use an absolute path
> to
> > start it.
> >
> > The control socket path moved too, so mkdir the directory it's in.
>
> This patch looks to do a little more than that...
>
> Cheers,
>
> Richard
>
> > Signed-off-by: Ross Burton <ross.burton@intel.com>
> > ---
> > meta/recipes-core/initrdscripts/files/init-live.sh | 50
> +++++++++++++++++---
> > .../initrdscripts/initramfs-framework/udev | 6 +--
> > .../initrdscripts/initramfs-framework_1.0.bb | 2 +
> > .../initrdscripts/initramfs-live-boot_1.0.bb | 2 +-
> > 4 files changed, 50 insertions(+), 10 deletions(-)
> >
> > diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh
> b/meta/recipes-core/initrdscripts/files/init-live.sh
> > index 5682fd1..fdea892 100644
> > --- a/meta/recipes-core/initrdscripts/files/init-live.sh
> > +++ b/meta/recipes-core/initrdscripts/files/init-live.sh
> > @@ -19,7 +19,8 @@ early_setup() {
> > modprobe isofs 2> /dev/null
> >
> > mkdir -p /run
> > - udevd --daemon
> > + mkdir -p /var/run
> > + /lib/udev/udevd --daemon
> > udevadm trigger --action=add
> > }
> >
> > @@ -68,13 +69,49 @@ fatal() {
> >
> > early_setup
> >
> > +# wait for the udevd to settle
> > +echo "Waiting for udev to settle..."
> > +sleep 3
> > +
> > [ -z "$CONSOLE" ] && CONSOLE="/dev/console"
> >
> > read_args
> >
> > -echo "Waiting for removable media..."
> > -while true
> > +# boot partiton menu, if one or more bootable partitions exist
> > +BOOTMENU=`ls /media/sd*/sbin/init 2>/dev/null | wc -l`
> > +if [ $BOOTMENU -gt 0 ]; then
> > + choice=0
> > + while [ $choice -le 0 ]; do
> > + echo "1). boot live ramfs image"
> > + count=2
> > + for i in `ls /media/sd*/sbin/init 2>/dev/null | cut -d "/"
> -f 3`; do
> > + echo $count"). boot /dev/"$i
> > + choicecmd[$count]=$i
> > + count=$(( count + 1))
> > + done
> > + echo
> > + echo -n "Your choice: "
> > + read choice
> > + done
> > +
> > + if [ $choice -gt 1 ]; then
> > + #ROOT_MOUNT=/media/${choicecmd[${choice}]}
> > + ROOT_MOUNT=none #testing
> > + echo "Booting local root ... $ROOT_MOUNT"
> > + if [ -d $ROOT_MOUNT ]; then
> > + boot_live_root
> > + else
> > + fatal "Rootfs partition not mounted"
> > + fi
> > + fi
> > +fi
> > +
> > +echo -n "Waiting for removable media... "
> > +CNT=0
> > +while [ $CNT -le 3 ];
> > do
> > + echo -n "$CNT "
> > + CNT=$(( $CNT + 1 ))
> > for i in `ls /media 2>/dev/null`; do
> > if [ -f /media/$i/$ROOT_IMAGE ] ; then
> > found="yes"
> > @@ -82,7 +119,7 @@ do
> > elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then
> > found="yes"
> > ISOLINUX="isolinux"
> > - break
> > + break
> > fi
> > done
> > if [ "$found" = "yes" ]; then
> > @@ -90,13 +127,14 @@ do
> > fi
> > sleep 1
> > done
> > +if [ "$found" != "yes" ]; then
> > + fatal "...could not mount removable media, drop to shell"
> > +fi
> >
> > case $label in
> > boot)
> > mkdir $ROOT_MOUNT
> > mknod /dev/loop0 b 7 0 2>/dev/null
> > -
> > -
> > if [ "$UNIONFS" = "yes" ]; then
> > mkdir /rootfs-tmp
> >
> > diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev
> b/meta/recipes-core/initrdscripts/initramfs-framework/udev
> > index 9ea8aa3..15a1d5b 100644
> > --- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
> > +++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
> > @@ -3,8 +3,8 @@
> > # Licensed on MIT
> >
> > udev_enabled() {
> > - if [ ! -e /sbin/udevd ]; then
> > - debug "/sbin/udev doesn't exist"
> > + if [ ! -e /lib/udev/udevd ]; then
> > + debug "/lib/udev/udev doesn't exist"
> > return 1
> > fi
> >
> > @@ -14,7 +14,7 @@ udev_enabled() {
> > udev_run() {
> > mkdir -p /run
> >
> > - udevd --daemon > /dev/null
> > + /lib/udev/udevd --daemon > /dev/null
> > udevadm trigger --action=add
> > udevadm settle
> >
> > diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bbb/meta/recipes-core/initrdscripts/
> initramfs-framework_1.0.bb
> > index 58e41d4..45d6592 100644
> > --- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
> > +++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
> > @@ -3,6 +3,8 @@ LICENSE = "MIT"
> > LIC_FILES_CHKSUM =
> "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> > RDEPENDS = "busybox"
> >
> > +PR = "r1"
> > +
> > inherit allarch
> >
> > SRC_URI = "file://init \
> > diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bbb/meta/recipes-core/initrdscripts/
> initramfs-live-boot_1.0.bb
> > index 137a401..55a8600 100644
> > --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
> > +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
> > @@ -5,7 +5,7 @@ RDEPENDS = "udev"
> > DEPENDS = "virtual/kernel"
> > SRC_URI = "file://init-live.sh"
> >
> > -PR = "r10"
> > +PR = "r11"
> >
> > do_compile() {
> > #if grep -q "CONFIG_UNION_FS=y" ${STAGING_KERNEL_DIR}/.config; then
>
>
>
[-- Attachment #2: Type: text/html, Size: 8225 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-02 13:07 ` Damian, Alexandru
@ 2012-11-02 13:31 ` Damian, Alexandru
2012-11-05 10:15 ` Damian, Alexandru
0 siblings, 1 reply; 10+ messages in thread
From: Damian, Alexandru @ 2012-11-02 13:31 UTC (permalink / raw)
To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 6266 bytes --]
Just a heads-up, actually I've submitted the wrong file in the first place
:(
Alex
On Fri, Nov 2, 2012 at 3:07 PM, Damian, Alexandru <
alexandru.damian@intel.com> wrote:
> I submitted a new patch in a separate mail, with proper description.
>
> Alex
>
>
>
> On Thu, Nov 1, 2012 at 9:31 PM, Richard Purdie <
> richard.purdie@linuxfoundation.org> wrote:
>
>> On Thu, 2012-11-01 at 16:32 +0200, Alex DAMIAN wrote:
>> > From: Ross Burton <ross.burton@intel.com>
>> >
>> > udevd moved location and isn't in $PATH anymore, so use an absolute
>> path to
>> > start it.
>> >
>> > The control socket path moved too, so mkdir the directory it's in.
>>
>> This patch looks to do a little more than that...
>>
>> Cheers,
>>
>> Richard
>>
>> > Signed-off-by: Ross Burton <ross.burton@intel.com>
>> > ---
>> > meta/recipes-core/initrdscripts/files/init-live.sh | 50
>> +++++++++++++++++---
>> > .../initrdscripts/initramfs-framework/udev | 6 +--
>> > .../initrdscripts/initramfs-framework_1.0.bb | 2 +
>> > .../initrdscripts/initramfs-live-boot_1.0.bb | 2 +-
>> > 4 files changed, 50 insertions(+), 10 deletions(-)
>> >
>> > diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh
>> b/meta/recipes-core/initrdscripts/files/init-live.sh
>> > index 5682fd1..fdea892 100644
>> > --- a/meta/recipes-core/initrdscripts/files/init-live.sh
>> > +++ b/meta/recipes-core/initrdscripts/files/init-live.sh
>> > @@ -19,7 +19,8 @@ early_setup() {
>> > modprobe isofs 2> /dev/null
>> >
>> > mkdir -p /run
>> > - udevd --daemon
>> > + mkdir -p /var/run
>> > + /lib/udev/udevd --daemon
>> > udevadm trigger --action=add
>> > }
>> >
>> > @@ -68,13 +69,49 @@ fatal() {
>> >
>> > early_setup
>> >
>> > +# wait for the udevd to settle
>> > +echo "Waiting for udev to settle..."
>> > +sleep 3
>> > +
>> > [ -z "$CONSOLE" ] && CONSOLE="/dev/console"
>> >
>> > read_args
>> >
>> > -echo "Waiting for removable media..."
>> > -while true
>> > +# boot partiton menu, if one or more bootable partitions exist
>> > +BOOTMENU=`ls /media/sd*/sbin/init 2>/dev/null | wc -l`
>> > +if [ $BOOTMENU -gt 0 ]; then
>> > + choice=0
>> > + while [ $choice -le 0 ]; do
>> > + echo "1). boot live ramfs image"
>> > + count=2
>> > + for i in `ls /media/sd*/sbin/init 2>/dev/null | cut -d
>> "/" -f 3`; do
>> > + echo $count"). boot /dev/"$i
>> > + choicecmd[$count]=$i
>> > + count=$(( count + 1))
>> > + done
>> > + echo
>> > + echo -n "Your choice: "
>> > + read choice
>> > + done
>> > +
>> > + if [ $choice -gt 1 ]; then
>> > + #ROOT_MOUNT=/media/${choicecmd[${choice}]}
>> > + ROOT_MOUNT=none #testing
>> > + echo "Booting local root ... $ROOT_MOUNT"
>> > + if [ -d $ROOT_MOUNT ]; then
>> > + boot_live_root
>> > + else
>> > + fatal "Rootfs partition not mounted"
>> > + fi
>> > + fi
>> > +fi
>> > +
>> > +echo -n "Waiting for removable media... "
>> > +CNT=0
>> > +while [ $CNT -le 3 ];
>> > do
>> > + echo -n "$CNT "
>> > + CNT=$(( $CNT + 1 ))
>> > for i in `ls /media 2>/dev/null`; do
>> > if [ -f /media/$i/$ROOT_IMAGE ] ; then
>> > found="yes"
>> > @@ -82,7 +119,7 @@ do
>> > elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then
>> > found="yes"
>> > ISOLINUX="isolinux"
>> > - break
>> > + break
>> > fi
>> > done
>> > if [ "$found" = "yes" ]; then
>> > @@ -90,13 +127,14 @@ do
>> > fi
>> > sleep 1
>> > done
>> > +if [ "$found" != "yes" ]; then
>> > + fatal "...could not mount removable media, drop to shell"
>> > +fi
>> >
>> > case $label in
>> > boot)
>> > mkdir $ROOT_MOUNT
>> > mknod /dev/loop0 b 7 0 2>/dev/null
>> > -
>> > -
>> > if [ "$UNIONFS" = "yes" ]; then
>> > mkdir /rootfs-tmp
>> >
>> > diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev
>> b/meta/recipes-core/initrdscripts/initramfs-framework/udev
>> > index 9ea8aa3..15a1d5b 100644
>> > --- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
>> > +++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
>> > @@ -3,8 +3,8 @@
>> > # Licensed on MIT
>> >
>> > udev_enabled() {
>> > - if [ ! -e /sbin/udevd ]; then
>> > - debug "/sbin/udev doesn't exist"
>> > + if [ ! -e /lib/udev/udevd ]; then
>> > + debug "/lib/udev/udev doesn't exist"
>> > return 1
>> > fi
>> >
>> > @@ -14,7 +14,7 @@ udev_enabled() {
>> > udev_run() {
>> > mkdir -p /run
>> >
>> > - udevd --daemon > /dev/null
>> > + /lib/udev/udevd --daemon > /dev/null
>> > udevadm trigger --action=add
>> > udevadm settle
>> >
>> > diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bbb/meta/recipes-core/initrdscripts/
>> initramfs-framework_1.0.bb
>> > index 58e41d4..45d6592 100644
>> > --- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
>> > +++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
>> > @@ -3,6 +3,8 @@ LICENSE = "MIT"
>> > LIC_FILES_CHKSUM =
>> "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>> > RDEPENDS = "busybox"
>> >
>> > +PR = "r1"
>> > +
>> > inherit allarch
>> >
>> > SRC_URI = "file://init \
>> > diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bbb/meta/recipes-core/initrdscripts/
>> initramfs-live-boot_1.0.bb
>> > index 137a401..55a8600 100644
>> > --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
>> > +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
>> > @@ -5,7 +5,7 @@ RDEPENDS = "udev"
>> > DEPENDS = "virtual/kernel"
>> > SRC_URI = "file://init-live.sh"
>> >
>> > -PR = "r10"
>> > +PR = "r11"
>> >
>> > do_compile() {
>> > #if grep -q "CONFIG_UNION_FS=y" ${STAGING_KERNEL_DIR}/.config;
>> then
>>
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 8744 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-02 13:31 ` Damian, Alexandru
@ 2012-11-05 10:15 ` Damian, Alexandru
2012-11-07 0:01 ` Otavio Salvador
0 siblings, 1 reply; 10+ messages in thread
From: Damian, Alexandru @ 2012-11-05 10:15 UTC (permalink / raw)
To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 7225 bytes --]
Hello guys,
Sorry about the previously confusing message.
To clear things up, I've submitted two patches about the udev 182 not
starting properly in the live image. First submission was in fact
incorrect, having sent an intermediary patch file.
The second submission is the correct patch, that fixes the udev problems,
and adds a couple of features to the initrd file - allows you to use as
root a partition instead of the rootfs.img for recovering an old install,
and fails safe when no rootfs is found, dropping the user to a shell if
something goes wrong.
Please review the second patch and disregard the first one.
Alex
On Fri, Nov 2, 2012 at 3:31 PM, Damian, Alexandru <
alexandru.damian@intel.com> wrote:
> Just a heads-up, actually I've submitted the wrong file in the first place
> :(
>
>
> Alex
>
>
> On Fri, Nov 2, 2012 at 3:07 PM, Damian, Alexandru <
> alexandru.damian@intel.com> wrote:
>
>> I submitted a new patch in a separate mail, with proper description.
>>
>> Alex
>>
>>
>>
>> On Thu, Nov 1, 2012 at 9:31 PM, Richard Purdie <
>> richard.purdie@linuxfoundation.org> wrote:
>>
>>> On Thu, 2012-11-01 at 16:32 +0200, Alex DAMIAN wrote:
>>> > From: Ross Burton <ross.burton@intel.com>
>>> >
>>> > udevd moved location and isn't in $PATH anymore, so use an absolute
>>> path to
>>> > start it.
>>> >
>>> > The control socket path moved too, so mkdir the directory it's in.
>>>
>>> This patch looks to do a little more than that...
>>>
>>> Cheers,
>>>
>>> Richard
>>>
>>> > Signed-off-by: Ross Burton <ross.burton@intel.com>
>>> > ---
>>> > meta/recipes-core/initrdscripts/files/init-live.sh | 50
>>> +++++++++++++++++---
>>> > .../initrdscripts/initramfs-framework/udev | 6 +--
>>> > .../initrdscripts/initramfs-framework_1.0.bb | 2 +
>>> > .../initrdscripts/initramfs-live-boot_1.0.bb | 2 +-
>>> > 4 files changed, 50 insertions(+), 10 deletions(-)
>>> >
>>> > diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh
>>> b/meta/recipes-core/initrdscripts/files/init-live.sh
>>> > index 5682fd1..fdea892 100644
>>> > --- a/meta/recipes-core/initrdscripts/files/init-live.sh
>>> > +++ b/meta/recipes-core/initrdscripts/files/init-live.sh
>>> > @@ -19,7 +19,8 @@ early_setup() {
>>> > modprobe isofs 2> /dev/null
>>> >
>>> > mkdir -p /run
>>> > - udevd --daemon
>>> > + mkdir -p /var/run
>>> > + /lib/udev/udevd --daemon
>>> > udevadm trigger --action=add
>>> > }
>>> >
>>> > @@ -68,13 +69,49 @@ fatal() {
>>> >
>>> > early_setup
>>> >
>>> > +# wait for the udevd to settle
>>> > +echo "Waiting for udev to settle..."
>>> > +sleep 3
>>> > +
>>> > [ -z "$CONSOLE" ] && CONSOLE="/dev/console"
>>> >
>>> > read_args
>>> >
>>> > -echo "Waiting for removable media..."
>>> > -while true
>>> > +# boot partiton menu, if one or more bootable partitions exist
>>> > +BOOTMENU=`ls /media/sd*/sbin/init 2>/dev/null | wc -l`
>>> > +if [ $BOOTMENU -gt 0 ]; then
>>> > + choice=0
>>> > + while [ $choice -le 0 ]; do
>>> > + echo "1). boot live ramfs image"
>>> > + count=2
>>> > + for i in `ls /media/sd*/sbin/init 2>/dev/null | cut -d
>>> "/" -f 3`; do
>>> > + echo $count"). boot /dev/"$i
>>> > + choicecmd[$count]=$i
>>> > + count=$(( count + 1))
>>> > + done
>>> > + echo
>>> > + echo -n "Your choice: "
>>> > + read choice
>>> > + done
>>> > +
>>> > + if [ $choice -gt 1 ]; then
>>> > + #ROOT_MOUNT=/media/${choicecmd[${choice}]}
>>> > + ROOT_MOUNT=none #testing
>>> > + echo "Booting local root ... $ROOT_MOUNT"
>>> > + if [ -d $ROOT_MOUNT ]; then
>>> > + boot_live_root
>>> > + else
>>> > + fatal "Rootfs partition not mounted"
>>> > + fi
>>> > + fi
>>> > +fi
>>> > +
>>> > +echo -n "Waiting for removable media... "
>>> > +CNT=0
>>> > +while [ $CNT -le 3 ];
>>> > do
>>> > + echo -n "$CNT "
>>> > + CNT=$(( $CNT + 1 ))
>>> > for i in `ls /media 2>/dev/null`; do
>>> > if [ -f /media/$i/$ROOT_IMAGE ] ; then
>>> > found="yes"
>>> > @@ -82,7 +119,7 @@ do
>>> > elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then
>>> > found="yes"
>>> > ISOLINUX="isolinux"
>>> > - break
>>> > + break
>>> > fi
>>> > done
>>> > if [ "$found" = "yes" ]; then
>>> > @@ -90,13 +127,14 @@ do
>>> > fi
>>> > sleep 1
>>> > done
>>> > +if [ "$found" != "yes" ]; then
>>> > + fatal "...could not mount removable media, drop to shell"
>>> > +fi
>>> >
>>> > case $label in
>>> > boot)
>>> > mkdir $ROOT_MOUNT
>>> > mknod /dev/loop0 b 7 0 2>/dev/null
>>> > -
>>> > -
>>> > if [ "$UNIONFS" = "yes" ]; then
>>> > mkdir /rootfs-tmp
>>> >
>>> > diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev
>>> b/meta/recipes-core/initrdscripts/initramfs-framework/udev
>>> > index 9ea8aa3..15a1d5b 100644
>>> > --- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
>>> > +++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
>>> > @@ -3,8 +3,8 @@
>>> > # Licensed on MIT
>>> >
>>> > udev_enabled() {
>>> > - if [ ! -e /sbin/udevd ]; then
>>> > - debug "/sbin/udev doesn't exist"
>>> > + if [ ! -e /lib/udev/udevd ]; then
>>> > + debug "/lib/udev/udev doesn't exist"
>>> > return 1
>>> > fi
>>> >
>>> > @@ -14,7 +14,7 @@ udev_enabled() {
>>> > udev_run() {
>>> > mkdir -p /run
>>> >
>>> > - udevd --daemon > /dev/null
>>> > + /lib/udev/udevd --daemon > /dev/null
>>> > udevadm trigger --action=add
>>> > udevadm settle
>>> >
>>> > diff --git a/meta/recipes-core/initrdscripts/
>>> initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/
>>> initramfs-framework_1.0.bb
>>> > index 58e41d4..45d6592 100644
>>> > --- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
>>> > +++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
>>> > @@ -3,6 +3,8 @@ LICENSE = "MIT"
>>> > LIC_FILES_CHKSUM =
>>> "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>>> > RDEPENDS = "busybox"
>>> >
>>> > +PR = "r1"
>>> > +
>>> > inherit allarch
>>> >
>>> > SRC_URI = "file://init \
>>> > diff --git a/meta/recipes-core/initrdscripts/
>>> initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/
>>> initramfs-live-boot_1.0.bb
>>> > index 137a401..55a8600 100644
>>> > --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
>>> > +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
>>> > @@ -5,7 +5,7 @@ RDEPENDS = "udev"
>>> > DEPENDS = "virtual/kernel"
>>> > SRC_URI = "file://init-live.sh"
>>> >
>>> > -PR = "r10"
>>> > +PR = "r11"
>>> >
>>> > do_compile() {
>>> > #if grep -q "CONFIG_UNION_FS=y" ${STAGING_KERNEL_DIR}/.config;
>>> then
>>>
>>>
>>>
>>
>
[-- Attachment #2: Type: text/html, Size: 9826 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-05 10:15 ` Damian, Alexandru
@ 2012-11-07 0:01 ` Otavio Salvador
2012-11-12 16:13 ` Burton, Ross
0 siblings, 1 reply; 10+ messages in thread
From: Otavio Salvador @ 2012-11-07 0:01 UTC (permalink / raw)
To: Damian, Alexandru; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
On Mon, Nov 5, 2012 at 8:15 AM, Damian, Alexandru <
alexandru.damian@intel.com> wrote:
> Hello guys,
>
> Sorry about the previously confusing message.
>
> To clear things up, I've submitted two patches about the udev 182 not
> starting properly in the live image. First submission was in fact
> incorrect, having sent an intermediary patch file.
>
> The second submission is the correct patch, that fixes the udev problems,
> and adds a couple of features to the initrd file - allows you to use as
> root a partition instead of the rootfs.img for recovering an old install,
> and fails safe when no rootfs is found, dropping the user to a shell if
> something goes wrong.
>
> Please review the second patch and disregard the first one.
Please split the patch in two: one fixing udevd and another with new
features; please tag it properly as v3 so it is easy to spoit it.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 1571 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-07 0:01 ` Otavio Salvador
@ 2012-11-12 16:13 ` Burton, Ross
2012-11-12 16:21 ` Burton, Ross
2012-11-12 16:46 ` Damian, Alexandru
0 siblings, 2 replies; 10+ messages in thread
From: Burton, Ross @ 2012-11-12 16:13 UTC (permalink / raw)
To: Alexandru Damian; +Cc: Patches and discussions about the oe-core layer
On 7 November 2012 00:01, Otavio Salvador <otavio@ossystems.com.br> wrote:
> Please split the patch in two: one fixing udevd and another with new
> features; please tag it properly as v3 so it is easy to spoit it.
Alex - ping?
Ross
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-12 16:13 ` Burton, Ross
@ 2012-11-12 16:21 ` Burton, Ross
2012-11-12 16:46 ` Damian, Alexandru
1 sibling, 0 replies; 10+ messages in thread
From: Burton, Ross @ 2012-11-12 16:21 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 12 November 2012 16:13, Burton, Ross <ross.burton@intel.com> wrote:
> On 7 November 2012 00:01, Otavio Salvador <otavio@ossystems.com.br> wrote:
>> Please split the patch in two: one fixing udevd and another with new
>> features; please tag it properly as v3 so it is easy to spoit it.
I JFDI'd because we've got broken images, and submitted a patch (V3)
that just consists of the critical fixes. Alex, please rebase the
features and submit those separately.
Ross
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-12 16:13 ` Burton, Ross
2012-11-12 16:21 ` Burton, Ross
@ 2012-11-12 16:46 ` Damian, Alexandru
1 sibling, 0 replies; 10+ messages in thread
From: Damian, Alexandru @ 2012-11-12 16:46 UTC (permalink / raw)
To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
I'm working on it now. Expect the patches shortly.
Alex
On Mon, Nov 12, 2012 at 6:13 PM, Burton, Ross <ross.burton@intel.com> wrote:
> On 7 November 2012 00:01, Otavio Salvador <otavio@ossystems.com.br> wrote:
> > Please split the patch in two: one fixing udevd and another with new
> > features; please tag it properly as v3 so it is easy to spoit it.
>
> Alex - ping?
>
> Ross
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
[-- Attachment #2: Type: text/html, Size: 1430 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] initrdscripts: fix udevd path
2012-11-01 14:32 [PATCH] initrdscripts: fix udevd path Alex DAMIAN
2012-11-01 19:31 ` Richard Purdie
@ 2012-11-13 16:32 ` Otavio Salvador
1 sibling, 0 replies; 10+ messages in thread
From: Otavio Salvador @ 2012-11-13 16:32 UTC (permalink / raw)
To: Alex DAMIAN; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
On Thu, Nov 1, 2012 at 12:32 PM, Alex DAMIAN <alexandru.damian@intel.com>wrote:
> +# wait for the udevd to settle
> +echo "Waiting for udev to settle..."
> +sleep 3
>
This doesn't work for all machines as the time need depends on the machine
performance and the number of devices connected.
You can use the trigger --settle in udevadm.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 1144 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-11-13 16:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01 14:32 [PATCH] initrdscripts: fix udevd path Alex DAMIAN
2012-11-01 19:31 ` Richard Purdie
2012-11-02 13:07 ` Damian, Alexandru
2012-11-02 13:31 ` Damian, Alexandru
2012-11-05 10:15 ` Damian, Alexandru
2012-11-07 0:01 ` Otavio Salvador
2012-11-12 16:13 ` Burton, Ross
2012-11-12 16:21 ` Burton, Ross
2012-11-12 16:46 ` Damian, Alexandru
2012-11-13 16:32 ` Otavio Salvador
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.