Message ID | 20230619135416.1640748-1-tgamblin@baylibre.com |
---|---|
State | New |
Headers | show |
Series | runqemu-gen-tapdevs: pass STAGING_BINDIR_NATIVE to ifup | expand |
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
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 >
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
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] > -=-=-=-=-=-=-=-=-=-=-=- > >
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
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
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(-)