summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-ifdown
AgeCommit message (Collapse)Author
2023-06-28runqemu-ifdown: catch up with ifupAdrian Freihofer
- Drop the native-sysroot-basedir parameter still allow it to keep backward compatibility write a warning to stderr - Add a space after ! in the if as suggested by shellcheck - Support the new OE_TAP_NAME variable as well Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-16runqemu-if*: Rename confusing variable nameRichard Purdie
The IFCONFIG variable is really the path to ip and hasn't been ifconfig for a long time. Rename the variable to something less confusing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-16runqemu/qemu-helper: Drop tunctlRichard Purdie
ip tuntap provides the functionality that we obtained from tunctl. We only needed tunctl when ifconfig was more available than ip. That isn't the case now so we can drop tunctl and all the hoops we need to jump through to build and provide it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-13runqemu-ifupdown/get-tapdevs: Add support for ip tuntapJörg Sommer
The *ip* command supports the creation and destruction of TAP devices since 2009 and might be more likely installed on systems then *tunctl*. Therefore it should be tried to setup or teardown the TAP interface with *ip* before falling back to *tunctl*. https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=580fbd88f75cc9eea0d28a48c025b090eb9419a7 Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2022-02-05scripts/runqemu-ifdown: Don't treat the last iptables command as specialDaniel Müller
The runqemu-ifup script performs a bunch of setup steps that runqemu-ifdown attempts to undo later on. While a bunch of said setup operations are considered fatal should they fail, the iptables based NAT setup notably is not. The tear down procedure in runqemu-ifdown, however, has the iptables based tear down as the last operation, with the status of it determining the overall status of the script. Hence, if this step fails, the script is considered a failure overall. That is arguably inconsistent: If the NAT setup did not succeed, the tear down cannot succeed either. To ensure similarity of the two paths, let's not treat the last iptables tear down operation any special and allow it to fail the runqemu-ifdown script, but just ignore failures. Background: we have seen a NAT related setup problem on the ifup path (which didn't cause script failure), but then saw an issue bubbled up when this operation was meant to be undone on the ifdown path. Signed-off-by: Daniel Müller <muellerd@fb.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18runqemu-ifdown: ensure to clean up TAPChen Qi
In runqemu-ifup, ip command is used to add TAP; in runqemu-ifdown, we should do the reversed logic, using ip command to delete TAP, to make sure TAP is cleaned up by ourselves. I can see that in runqemu-ifdown script, 'tunctl -d' and 'iptables' commands are used to deal with TAP, but these two commands cannot make sure that the TAP is cleaned up. runqemu-ifup uses 'ip' to set up TAP, we really need to do the opposite in runqemu-ifdown. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12runqemu: use bindir_native property to run ifup/down scriptsEd Bartosh
Used self.bindir_native to point out to the native sysroot when running runqemu-ifup and runqemu-ifdown scripts. [YOCTO #11266] [YOCTO #11193] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30runqemu-ifdown: clean up the remaining iptables rulesChen Qi
The iptables rules for the tap interface are added by runqemu-ifup everytime we use runqemu to start a qemu target. But it's not cleaned up when runqemu exits. This patch cleans up the remaining iptables rules for the tap interface in runqemu-ifdown. [YOCTO #5047] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-13runqemu: when tunctl can't be found, say what package builds itRoss Burton
If runqemu is used without actually building any qemu images (i.e. you downloaded the images) it's likely that qemu-helper-native hasn't been built. Instead of just saying what command can't be found, tell the user how to solve their problem. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-04-21Further cleanup of various poky referencesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-20Rename poky-qemu to runqemuRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>