All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup
@ 2023-06-19 13:54 Trevor Gamblin
  2023-06-19 14:03 ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Trevor Gamblin @ 2023-06-19 13:54 UTC (permalink / raw)
  To: openembedded-core

Without this, runqemu-gen-tapdevs fails with the following error:

[tgamblin@megalith build]$ sudo /workspace/yocto/manual/poky/scripts/runqemu-gen-tapdevs 1000 1002 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
Creating 4 tap devices for UID: 1000 GID: 1002...
Creating tap0
Error bringing up interface: sudo runqemu-ifup <uid> <gid> <native-sysroot-basedir>

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 scripts/runqemu-gen-tapdevs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
index ec3ecb03b9..dc730e413d 100755
--- a/scripts/runqemu-gen-tapdevs
+++ b/scripts/runqemu-gen-tapdevs
@@ -79,7 +79,7 @@ fi
 echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..."
 for ((index=0; index < $COUNT; index++)); do
 	echo "Creating tap$index"
-	if ! ifup=`$RUNQEMU_IFUP $TUID $GID 2>&1`; then
+	if ! ifup=`$RUNQEMU_IFUP $TUID $GID $STAGING_BINDIR_NATIVE 2>&1`; then
 		echo "Error bringing up interface: $ifup"
 		exit 1
 	fi
-- 
2.40.1



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

* Re: [OE-core][PATCH] runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup
  2023-06-19 13:54 [OE-core][PATCH] runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup Trevor Gamblin
@ 2023-06-19 14:03 ` Richard Purdie
  2023-06-19 14:19   ` Trevor Gamblin
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2023-06-19 14:03 UTC (permalink / raw)
  To: Trevor Gamblin, openembedded-core

On Mon, 2023-06-19 at 09:54 -0400, Trevor Gamblin wrote:
> Without this, runqemu-gen-tapdevs fails with the following error:
> 
> [tgamblin@megalith build]$ sudo /workspace/yocto/manual/poky/scripts/runqemu-gen-tapdevs 1000 1002 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
> Creating 4 tap devices for UID: 1000 GID: 1002...
> Creating tap0
> Error bringing up interface: sudo runqemu-ifup <uid> <gid> <native-sysroot-basedir>
> 
> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
> ---
>  scripts/runqemu-gen-tapdevs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
> index ec3ecb03b9..dc730e413d 100755
> --- a/scripts/runqemu-gen-tapdevs
> +++ b/scripts/runqemu-gen-tapdevs
> @@ -79,7 +79,7 @@ fi
>  echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..."
>  for ((index=0; index < $COUNT; index++)); do
>  	echo "Creating tap$index"
> -	if ! ifup=`$RUNQEMU_IFUP $TUID $GID 2>&1`; then
> +	if ! ifup=`$RUNQEMU_IFUP $TUID $GID $STAGING_BINDIR_NATIVE 2>&1`; then
>  		echo "Error bringing up interface: $ifup"
>  		exit 1
>  	fi

I'm a bit puzzled as I removed the use of STAGING_BINDIR_NATIVE in that
script?

Are you mixing different releases?

Cheers,

Richard



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

* Re: [OE-core][PATCH] runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup
  2023-06-19 14:03 ` Richard Purdie
@ 2023-06-19 14:19   ` Trevor Gamblin
  2023-06-19 14:50     ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Trevor Gamblin @ 2023-06-19 14:19 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core


On 2023-06-19 10:03, Richard Purdie wrote:
> On Mon, 2023-06-19 at 09:54 -0400, Trevor Gamblin wrote:
>> Without this, runqemu-gen-tapdevs fails with the following error:
>>
>> [tgamblin@megalith build]$ sudo /workspace/yocto/manual/poky/scripts/runqemu-gen-tapdevs 1000 1002 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
>> Creating 4 tap devices for UID: 1000 GID: 1002...
>> Creating tap0
>> Error bringing up interface: sudo runqemu-ifup <uid> <gid> <native-sysroot-basedir>
>>
>> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
>> ---
>>   scripts/runqemu-gen-tapdevs | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
>> index ec3ecb03b9..dc730e413d 100755
>> --- a/scripts/runqemu-gen-tapdevs
>> +++ b/scripts/runqemu-gen-tapdevs
>> @@ -79,7 +79,7 @@ fi
>>   echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..."
>>   for ((index=0; index < $COUNT; index++)); do
>>   	echo "Creating tap$index"
>> -	if ! ifup=`$RUNQEMU_IFUP $TUID $GID 2>&1`; then
>> +	if ! ifup=`$RUNQEMU_IFUP $TUID $GID $STAGING_BINDIR_NATIVE 2>&1`; then
>>   		echo "Error bringing up interface: $ifup"
>>   		exit 1
>>   	fi
> I'm a bit puzzled as I removed the use of STAGING_BINDIR_NATIVE in that
> script?
STAGING_BINDIR_NATIVE is still present near the top of the script as a 
variable but isn't used anywhere. When I encountered the error and saw 
that the script wasn't passing a path, I thought including it again 
would fix it. It appears to do so on my Fedora build system.
>
> Are you mixing different releases?
I'm using the latest poky master.
>
> Cheers,
>
> Richard
>


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

* Re: [OE-core][PATCH] runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup
  2023-06-19 14:19   ` Trevor Gamblin
@ 2023-06-19 14:50     ` Richard Purdie
  2023-06-21  0:21       ` Alejandro Hernandez
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2023-06-19 14:50 UTC (permalink / raw)
  To: Trevor Gamblin, openembedded-core

On Mon, 2023-06-19 at 10:19 -0400, Trevor Gamblin wrote:
> On 2023-06-19 10:03, Richard Purdie wrote:
> > On Mon, 2023-06-19 at 09:54 -0400, Trevor Gamblin wrote:
> > > Without this, runqemu-gen-tapdevs fails with the following error:
> > > 
> > > [tgamblin@megalith build]$ sudo /workspace/yocto/manual/poky/scripts/runqemu-gen-tapdevs 1000 1002 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
> > > Creating 4 tap devices for UID: 1000 GID: 1002...
> > > Creating tap0
> > > Error bringing up interface: sudo runqemu-ifup <uid> <gid> <native-sysroot-basedir>
> > > 
> > > Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
> > > ---
> > >   scripts/runqemu-gen-tapdevs | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
> > > index ec3ecb03b9..dc730e413d 100755
> > > --- a/scripts/runqemu-gen-tapdevs
> > > +++ b/scripts/runqemu-gen-tapdevs
> > > @@ -79,7 +79,7 @@ fi
> > >   echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..."
> > >   for ((index=0; index < $COUNT; index++)); do
> > >   	echo "Creating tap$index"
> > > -	if ! ifup=`$RUNQEMU_IFUP $TUID $GID 2>&1`; then
> > > +	if ! ifup=`$RUNQEMU_IFUP $TUID $GID $STAGING_BINDIR_NATIVE 2>&1`; then
> > >   		echo "Error bringing up interface: $ifup"
> > >   		exit 1
> > >   	fi
> > I'm a bit puzzled as I removed the use of STAGING_BINDIR_NATIVE in that
> > script?
> STAGING_BINDIR_NATIVE is still present near the top of the script as a 
> variable but isn't used anywhere. When I encountered the error and saw 
> that the script wasn't passing a path, I thought including it again 
> would fix it. It appears to do so on my Fedora build system.
> > 
> > Are you mixing different releases?
> I'm using the latest poky master.
> 

My testing environment was corrupt, testing "build1" when the code was
in "build".

I've sent a couple of patches, one to fix the script parameters (the
bindir isn't used anymore) and one to fix the issue with more than 10
tap devices.

Cheers,

Richard




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

* Re: [OE-core][PATCH] runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup
  2023-06-19 14:50     ` Richard Purdie
@ 2023-06-21  0:21       ` Alejandro Hernandez
  2023-06-21  8:07         ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Alejandro Hernandez @ 2023-06-21  0:21 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Trevor Gamblin, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3615 bytes --]

Hello,

Just to add more information to this, I've noticed a failure on my test
environment today while trying to run -c testimage, apparently due to one
of these fixes:

Command '('sudo', '/home/vsts/poky/scripts/runqemu-ifup', '1001', '123',
'/home/vsts/poky/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin')'
returned non-zero exit status 1

As Richard mentioned the bindir isnt used anymore, and the patches
mentioned (
https://git.yoctoproject.org/poky/commit/?id=51063c1e6ac214b4ef43c88c8091c909a7cab2cb)
fixes the check for the extra parameter, however, I can clearly see that a
third parameter is being passed to runqemu-ifup, which I believe is being
called here:
https://git.yoctoproject.org/poky/tree/scripts/runqemu#n1185

I'll be sending a patch to fix the call to runqemu-ifup with the correct
amount of arguments.

Alejandro

On Mon, 19 Jun 2023 at 08:50, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Mon, 2023-06-19 at 10:19 -0400, Trevor Gamblin wrote:
> > On 2023-06-19 10:03, Richard Purdie wrote:
> > > On Mon, 2023-06-19 at 09:54 -0400, Trevor Gamblin wrote:
> > > > Without this, runqemu-gen-tapdevs fails with the following error:
> > > >
> > > > [tgamblin@megalith build]$ sudo
> /workspace/yocto/manual/poky/scripts/runqemu-gen-tapdevs 1000 1002 4
> tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
> > > > Creating 4 tap devices for UID: 1000 GID: 1002...
> > > > Creating tap0
> > > > Error bringing up interface: sudo runqemu-ifup <uid> <gid>
> <native-sysroot-basedir>
> > > >
> > > > Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
> > > > ---
> > > >   scripts/runqemu-gen-tapdevs | 2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/scripts/runqemu-gen-tapdevs
> b/scripts/runqemu-gen-tapdevs
> > > > index ec3ecb03b9..dc730e413d 100755
> > > > --- a/scripts/runqemu-gen-tapdevs
> > > > +++ b/scripts/runqemu-gen-tapdevs
> > > > @@ -79,7 +79,7 @@ fi
> > > >   echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..."
> > > >   for ((index=0; index < $COUNT; index++)); do
> > > >           echo "Creating tap$index"
> > > > - if ! ifup=`$RUNQEMU_IFUP $TUID $GID 2>&1`; then
> > > > + if ! ifup=`$RUNQEMU_IFUP $TUID $GID $STAGING_BINDIR_NATIVE 2>&1`;
> then
> > > >                   echo "Error bringing up interface: $ifup"
> > > >                   exit 1
> > > >           fi
> > > I'm a bit puzzled as I removed the use of STAGING_BINDIR_NATIVE in that
> > > script?
> > STAGING_BINDIR_NATIVE is still present near the top of the script as a
> > variable but isn't used anywhere. When I encountered the error and saw
> > that the script wasn't passing a path, I thought including it again
> > would fix it. It appears to do so on my Fedora build system.
> > >
> > > Are you mixing different releases?
> > I'm using the latest poky master.
> >
>
> My testing environment was corrupt, testing "build1" when the code was
> in "build".
>
> I've sent a couple of patches, one to fix the script parameters (the
> bindir isn't used anymore) and one to fix the issue with more than 10
> tap devices.
>
> Cheers,
>
> Richard
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#183119):
> https://lists.openembedded.org/g/openembedded-core/message/183119
> Mute This Topic: https://lists.openembedded.org/mt/99623609/3619605
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alejandro@enedino.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 6466 bytes --]

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

* Re: [OE-core][PATCH] runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup
  2023-06-21  0:21       ` Alejandro Hernandez
@ 2023-06-21  8:07         ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2023-06-21  8:07 UTC (permalink / raw)
  To: Alejandro Hernandez; +Cc: Trevor Gamblin, openembedded-core

On Tue, 2023-06-20 at 18:21 -0600, Alejandro Hernandez wrote:
> Just to add more information to this, I've noticed a failure on my
> test environment today while trying to run -c testimage, apparently
> due to one of these fixes:
> 
> Command '('sudo', '/home/vsts/poky/scripts/runqemu-ifup', '1001',
> '123', '/home/vsts/poky/build/tmp/work/x86_64-linux/qemu-helper-
> native/1.0-r1/recipe-sysroot-native/usr/bin')' returned non-zero exit
> status 1 
> 
> As Richard mentioned the bindir isnt used anymore, and the patches
> mentioned
> (https://git.yoctoproject.org/poky/commit/?id=51063c1e6ac214b4ef43c88
> c8091c909a7cab2cb) fixes the check for the extra parameter, however,
> I can clearly see that a third parameter is being passed to runqemu-
> ifup, which I believe is being called here:
> https://git.yoctoproject.org/poky/tree/scripts/runqemu#n1185
> 
> I'll be sending a patch to fix the call to runqemu-ifup with the
> correct amount of arguments.

Thanks, I had a feeling I'd missed a reference somewhere!

In the long run, removing the need for the staging directories should
help usability so it is the right direction now we no longer need it.

Cheers,

Richard


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

end of thread, other threads:[~2023-06-21  8:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-19 13:54 [OE-core][PATCH] runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup Trevor Gamblin
2023-06-19 14:03 ` Richard Purdie
2023-06-19 14:19   ` Trevor Gamblin
2023-06-19 14:50     ` Richard Purdie
2023-06-21  0:21       ` Alejandro Hernandez
2023-06-21  8:07         ` Richard Purdie

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.