* [PATCH] runqemu: Ensure ROOTFS path is absolute
@ 2014-02-20 20:57 Saul Wold
2014-02-22 5:57 ` Khem Raj
0 siblings, 1 reply; 7+ messages in thread
From: Saul Wold @ 2014-02-20 20:57 UTC (permalink / raw)
To: openembedded-core; +Cc: scott.garman
There is a problem if a relative path is passed to the kernel for NFS usage
that it will not correctly find it, so ensure that the ROOTFS path is absolute.
[YOCTO #2807]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
scripts/runqemu | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 0db7ad6..57c5de4 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -462,7 +462,9 @@ if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then
error "Unable to determine default rootfs for MACHINE [$MACHINE]"
fi
fi
-# ROOTFS is now set for all cases
+# ROOTFS is now set for all cases, now expand it to be an absolute path, it should exist at this point
+
+ROOTFS=`realpath $ROOTFS`
echo ""
echo "Continuing with the following parameters:"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] runqemu: Ensure ROOTFS path is absolute
2014-02-20 20:57 [PATCH] runqemu: Ensure ROOTFS path is absolute Saul Wold
@ 2014-02-22 5:57 ` Khem Raj
2014-02-22 12:55 ` Paul Eggleton
0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2014-02-22 5:57 UTC (permalink / raw)
To: Saul Wold; +Cc: scott.garman, Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
On Feb 20, 2014, at 12:57 PM, Saul Wold <sgw@linux.intel.com> wrote:
> There is a problem if a relative path is passed to the kernel for NFS usage
> that it will not correctly find it, so ensure that the ROOTFS path is absolute.
>
> [YOCTO #2807]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
> scripts/runqemu | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 0db7ad6..57c5de4 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -462,7 +462,9 @@ if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then
> error "Unable to determine default rootfs for MACHINE [$MACHINE]"
> fi
> fi
> -# ROOTFS is now set for all cases
> +# ROOTFS is now set for all cases, now expand it to be an absolute path, it should exist at this point
> +
> +ROOTFS=`realpath $ROOTFS`
I think this change also means we need to add dependency on realpath package as prerequisite for build host.
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] runqemu: Ensure ROOTFS path is absolute
2014-02-22 5:57 ` Khem Raj
@ 2014-02-22 12:55 ` Paul Eggleton
2014-02-22 16:21 ` Paul Barker
2014-02-22 16:34 ` Khem Raj
0 siblings, 2 replies; 7+ messages in thread
From: Paul Eggleton @ 2014-02-22 12:55 UTC (permalink / raw)
To: Khem Raj, Saul Wold; +Cc: scott.garman, openembedded-core
On Friday 21 February 2014 21:57:37 Khem Raj wrote:
> On Feb 20, 2014, at 12:57 PM, Saul Wold <sgw@linux.intel.com> wrote:
> > There is a problem if a relative path is passed to the kernel for NFS
> > usage
> > that it will not correctly find it, so ensure that the ROOTFS path is
> > absolute.
> >
> > [YOCTO #2807]
> >
> > Signed-off-by: Saul Wold <sgw@linux.intel.com>
> > ---
> > scripts/runqemu | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/runqemu b/scripts/runqemu
> > index 0db7ad6..57c5de4 100755
> > --- a/scripts/runqemu
> > +++ b/scripts/runqemu
> > @@ -462,7 +462,9 @@ if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then
> >
> > error "Unable to determine default rootfs for MACHINE [$MACHINE]"
> >
> > fi
> >
> > fi
> > -# ROOTFS is now set for all cases
> > +# ROOTFS is now set for all cases, now expand it to be an absolute path,
> > it should exist at this point +
> > +ROOTFS=`realpath $ROOTFS`
>
> I think this change also means we need to add dependency on realpath package
> as prerequisite for build host.
realpath is part of coreutils. Another alternative would be readlink -f (but
that also appears to be part of coreutils.)
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] runqemu: Ensure ROOTFS path is absolute
2014-02-22 12:55 ` Paul Eggleton
@ 2014-02-22 16:21 ` Paul Barker
2014-02-22 16:34 ` Khem Raj
1 sibling, 0 replies; 7+ messages in thread
From: Paul Barker @ 2014-02-22 16:21 UTC (permalink / raw)
To: Paul Eggleton; +Cc: openembedded-core, scott.garman
On 22 February 2014 12:55, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> On Friday 21 February 2014 21:57:37 Khem Raj wrote:
>> On Feb 20, 2014, at 12:57 PM, Saul Wold <sgw@linux.intel.com> wrote:
>> > There is a problem if a relative path is passed to the kernel for NFS
>> > usage
>> > that it will not correctly find it, so ensure that the ROOTFS path is
>> > absolute.
>> >
>> > [YOCTO #2807]
>> >
>> > Signed-off-by: Saul Wold <sgw@linux.intel.com>
>> > ---
>> > scripts/runqemu | 4 +++-
>> > 1 file changed, 3 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/scripts/runqemu b/scripts/runqemu
>> > index 0db7ad6..57c5de4 100755
>> > --- a/scripts/runqemu
>> > +++ b/scripts/runqemu
>> > @@ -462,7 +462,9 @@ if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then
>> >
>> > error "Unable to determine default rootfs for MACHINE [$MACHINE]"
>> >
>> > fi
>> >
>> > fi
>> > -# ROOTFS is now set for all cases
>> > +# ROOTFS is now set for all cases, now expand it to be an absolute path,
>> > it should exist at this point +
>> > +ROOTFS=`realpath $ROOTFS`
>>
>> I think this change also means we need to add dependency on realpath package
>> as prerequisite for build host.
>
> realpath is part of coreutils. Another alternative would be readlink -f (but
> that also appears to be part of coreutils.)
>
Looks like busybox should provide realpath:
http://www.busybox.net/downloads/BusyBox.html#realpath
Thanks,
--
Paul Barker
Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] runqemu: Ensure ROOTFS path is absolute
2014-02-22 12:55 ` Paul Eggleton
2014-02-22 16:21 ` Paul Barker
@ 2014-02-22 16:34 ` Khem Raj
2014-02-25 15:10 ` Alexandru Palalau
1 sibling, 1 reply; 7+ messages in thread
From: Khem Raj @ 2014-02-22 16:34 UTC (permalink / raw)
To: Paul Eggleton; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]
On Feb 22, 2014, at 4:55 AM, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> On Friday 21 February 2014 21:57:37 Khem Raj wrote:
>> On Feb 20, 2014, at 12:57 PM, Saul Wold <sgw@linux.intel.com> wrote:
>>> There is a problem if a relative path is passed to the kernel for NFS
>>> usage
>>> that it will not correctly find it, so ensure that the ROOTFS path is
>>> absolute.
>>>
>>> [YOCTO #2807]
>>>
>>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>>> ---
>>> scripts/runqemu | 4 +++-
>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/runqemu b/scripts/runqemu
>>> index 0db7ad6..57c5de4 100755
>>> --- a/scripts/runqemu
>>> +++ b/scripts/runqemu
>>> @@ -462,7 +462,9 @@ if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then
>>>
>>> error "Unable to determine default rootfs for MACHINE [$MACHINE]"
>>>
>>> fi
>>>
>>> fi
>>> -# ROOTFS is now set for all cases
>>> +# ROOTFS is now set for all cases, now expand it to be an absolute path,
>>> it should exist at this point +
>>> +ROOTFS=`realpath $ROOTFS`
>>
>> I think this change also means we need to add dependency on realpath package
>> as prerequisite for build host.
>
> realpath is part of coreutils.
realpath is package of its own not coreutils, at least on ubuntu
> Another alternative would be readlink -f (but
> that also appears to be part of coreutils.)
this might be better options since coreutils is more or less
given on any distro
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] runqemu: Ensure ROOTFS path is absolute
2014-02-22 16:34 ` Khem Raj
@ 2014-02-25 15:10 ` Alexandru Palalau
2014-02-25 15:16 ` Alexandru Palalau
0 siblings, 1 reply; 7+ messages in thread
From: Alexandru Palalau @ 2014-02-25 15:10 UTC (permalink / raw)
To: Khem Raj, Paul Eggleton; +Cc: openembedded-core
On 2/22/2014 6:34 PM, Khem Raj wrote:
>
> On Feb 22, 2014, at 4:55 AM, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
>
>> On Friday 21 February 2014 21:57:37 Khem Raj wrote:
>>> On Feb 20, 2014, at 12:57 PM, Saul Wold <sgw@linux.intel.com> wrote:
>>>> There is a problem if a relative path is passed to the kernel for NFS
>>>> usage
>>>> that it will not correctly find it, so ensure that the ROOTFS path is
>>>> absolute.
>>>>
>>>> [YOCTO #2807]
>>>>
>>>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>>>> ---
>>>> scripts/runqemu | 4 +++-
>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/scripts/runqemu b/scripts/runqemu
>>>> index 0db7ad6..57c5de4 100755
>>>> --- a/scripts/runqemu
>>>> +++ b/scripts/runqemu
>>>> @@ -462,7 +462,9 @@ if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then
>>>>
>>>> error "Unable to determine default rootfs for MACHINE [$MACHINE]"
>>>>
>>>> fi
>>>>
>>>> fi
>>>> -# ROOTFS is now set for all cases
>>>> +# ROOTFS is now set for all cases, now expand it to be an absolute path,
>>>> it should exist at this point +
>>>> +ROOTFS=`realpath $ROOTFS`
>>>
>>> I think this change also means we need to add dependency on realpath package
>>> as prerequisite for build host.
>>
>> realpath is part of coreutils.
>
> realpath is package of its own not coreutils, at least on ubuntu
On CentOS 6.5 realpath is not part of coreutils and is not part of a
default repo. I could find it only on RPMforge.
>
>> Another alternative would be readlink -f (but
>> that also appears to be part of coreutils.)
>
>
> this might be better options since coreutils is more or less
> given on any distro
>
>>
>> Cheers,
>> Paul
>>
>> --
>>
>> Paul Eggleton
>> Intel Open Source Technology Centre
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
--
Alexandru Palalau
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] runqemu: Ensure ROOTFS path is absolute
2014-02-25 15:10 ` Alexandru Palalau
@ 2014-02-25 15:16 ` Alexandru Palalau
0 siblings, 0 replies; 7+ messages in thread
From: Alexandru Palalau @ 2014-02-25 15:16 UTC (permalink / raw)
To: Khem Raj, Paul Eggleton; +Cc: openembedded-core
On 2/25/2014 5:10 PM, Alexandru Palalau wrote:
> On 2/22/2014 6:34 PM, Khem Raj wrote:
>>
>> On Feb 22, 2014, at 4:55 AM, Paul Eggleton
>> <paul.eggleton@linux.intel.com> wrote:
>>
>>> On Friday 21 February 2014 21:57:37 Khem Raj wrote:
>>>> On Feb 20, 2014, at 12:57 PM, Saul Wold <sgw@linux.intel.com> wrote:
>>>>> There is a problem if a relative path is passed to the kernel for NFS
>>>>> usage
>>>>> that it will not correctly find it, so ensure that the ROOTFS path is
>>>>> absolute.
>>>>>
>>>>> [YOCTO #2807]
>>>>>
>>>>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>>>>> ---
>>>>> scripts/runqemu | 4 +++-
>>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/scripts/runqemu b/scripts/runqemu
>>>>> index 0db7ad6..57c5de4 100755
>>>>> --- a/scripts/runqemu
>>>>> +++ b/scripts/runqemu
>>>>> @@ -462,7 +462,9 @@ if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" ]; then
>>>>>
>>>>> error "Unable to determine default rootfs for MACHINE
>>>>> [$MACHINE]"
>>>>>
>>>>> fi
>>>>>
>>>>> fi
>>>>> -# ROOTFS is now set for all cases
>>>>> +# ROOTFS is now set for all cases, now expand it to be an absolute
>>>>> path,
>>>>> it should exist at this point +
>>>>> +ROOTFS=`realpath $ROOTFS`
>>>>
>>>> I think this change also means we need to add dependency on realpath
>>>> package
>>>> as prerequisite for build host.
>>>
>>> realpath is part of coreutils.
>>
>> realpath is package of its own not coreutils, at least on ubuntu
>
> On CentOS 6.5 realpath is not part of coreutils and is not part of a
> default repo. I could find it only on RPMforge.
Added https://bugzilla.yoctoproject.org/show_bug.cgi?id=5879 on this matter.
>
>>
>>> Another alternative would be readlink -f (but
>>> that also appears to be part of coreutils.)
>>
>>
>> this might be better options since coreutils is more or less
>> given on any distro
>>
>>>
>>> Cheers,
>>> Paul
>>>
>>> --
>>>
>>> Paul Eggleton
>>> Intel Open Source Technology Centre
>>
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>
>
--
Alexandru Palalau
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-02-25 15:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-20 20:57 [PATCH] runqemu: Ensure ROOTFS path is absolute Saul Wold
2014-02-22 5:57 ` Khem Raj
2014-02-22 12:55 ` Paul Eggleton
2014-02-22 16:21 ` Paul Barker
2014-02-22 16:34 ` Khem Raj
2014-02-25 15:10 ` Alexandru Palalau
2014-02-25 15:16 ` Alexandru Palalau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox