summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-export-rootfs
Commit message (Collapse)AuthorAgeFilesLines
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-091-11/+1
| | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: don't change RPC portsCody P Schafer2017-06-121-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPC ports (also known as rpc program numbers) are values: - given to rpcbind (aka portmapper) to allow nfsv3 clients that don't know the tcp/udp port number of nfsd and mountd to look it up the tcp/udp port number, and to - allow a single transport (ie: tcp/udp port) to provide multiple sunrpc services. OE has carried patches to nfsutils & linux for some time to support the mountprog & nfsprog options. In the case of runqemu-export-rootfs, we don't need to use custom rpc program numbers because runqemu-export-rootfs tells unfsd not to register with the portmapper, and unfsd runs the nfs and mount rpc services on tcp/udp ports unfsd binds itself (iow: the tcp/udp ports are not shared in the sunrpc sense). Linux's nfs client does not query rpcbind when tcp/udp port numbers are specified (in net/sunrpc/clnt.c, call_bind checks for the tcp/udp port with xprt_bound() and skips the call to rpcbind if xprtsock.c's xs_setup_udp() or xs_setup_tcp() has found a non-zero tcp/udp port). The program numbers _are_ sent over the mount & nfs protocol (really, over sunrpc), and checked to match at both ends. As a result, even when rpcbind is unused, using different program numbers in unfsd vs linux nfs client causes mounts to fail (and nfsroot mounts to timeout). The result is that specifying custom program numbers in runqemu-export-rootfs doesn't solve any conflicts, it simply requires that users of runqemu-export-rootfs carry a kernel patch & adds 2 extra parameters to the kernel command line unnecessarily. Change runqemu-export-rootfs to use the default program numbers. For now, I have not dropped the custom program number patches to linux, nfs-utils, and unfsd just in case someone is using them in a non-runqemu-export-rootfs context. CC: Bruce Ashfield <bruce.ashfield@gmail.com> CC: Mark Hatle <mark.hatle@windriver.com> (From OE-Core rev: 9c91df324dfe58273f5a1d1d33dba1d34a180db7) Signed-off-by: Cody P Schafer <dev@codyps.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-find-native-sysroot: work with RSSRobert Yang2017-04-131-1/+1
| | | | | | | | | | | | | | | | The generic STAGING_DIR_NATIVE is gone since RSS, so when find OECORE_NATIVE_SYSROOT, the user has to specify which recipe's STAGING_DIR_NATIVE will be used as OECORE_NATIVE_SYSROOT. * The usage is changed from ". oe-find-native-sysroot" to ". oe-find-native-sysroot <recipe>". * The oe-run-native's usage has changed from "oe-run-native tool" to "oe-run-native native-recipe tool". (From OE-Core rev: e2f6d937bd897083779507ecb9ecd15513b35f1f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: support multiple qemus running when nfsRobert Yang2017-01-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed: * In build1: $ runqemu nfs qemux86-64 In build2: $ runqemu nfs qemux86-64 It would fail before since the port numerbs and conf files are conflicted, now make runqemu-export-rootfs work together with runqemu to fix the problem. * And we don't need export PSEUDO_LOCALSTATEDIR in runqemu, the runqemu-export-rootfs can handle it well based on NFS_EXPORT_DIR. * Remove "async" option from unfsd to fix warning in syslog: Warning: unknown exports option `async' ignored * Fixed typos Both slirp and tap can work. (From OE-Core rev: 84b2281595bbdb497daa42640e3ee4658bf0bed8) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: fix inconsistent var namesRobert Yang2017-01-191-12/+9
| | | | | | | | | | | | | | | | | | | | Fixed: $ runqemu nfs qemux86-64 [snip] On your target please remember to add the following options for NFS nfsroot=IP_ADDRESS:/path/to/nfsroot,nfsvers=3,port=,mountprog=,nfsprog=,udp,mountport= [snip] Note that the values are null, this is because their var names are inconsistent. [YOCTO #10519] (From OE-Core rev: 10c136a382006c0ec2679a70f47ff2446c10372c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: update location of unfsd binaryMaxin B. John2015-10-291-4/+4
| | | | | | | | | | | | | | | | | oe-core commit: 24b80d211f3808a0ffebee426932f11b8d4d46e0 sets sbindir = "${bindir}" in the nativesdk class. So, update the location of unfsd binary from "/usr/sbin" to "/usr/bin" in runqemu-export-rootfs. Also update unfs3-native to install unfsd under "bin" directory so the binary is always in the same location. [YOCTO #8315] (From OE-Core rev: 2e98b80a3a11798145f58c8ccc8b873cd713f4f2) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "runqemu-export-rootfs: update location of unfsd binary"Ross Burton2015-10-271-4/+4
| | | | | | | | | | | | unfsd appears to be moving around and is in sbin for at least two different users, so revert the change to expect it in bin. This reverts commit e56bda210e216251c04d872211081a89ac06dde6. (From OE-Core rev: 2e065b02a3e65c8db8a26788fdc4d7f65d5a2a8f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: update location of unfsd binaryMaxin B. John2015-09-281-4/+4
| | | | | | | | | | | | | Update the location of unfsd binary from "/usr/sbin" to "/usr/bin" in runqemu-export-rootfs [YOCTO #8315] (From OE-Core rev: e56bda210e216251c04d872211081a89ac06dde6) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: Fix missing # in commentSaul Wold2014-02-201-1/+1
| | | | | | | (From OE-Core rev: 38785af0ca0b020574b32b9e3b21129469a35c94) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: update for unfs3Jason Wessel2014-01-281-2/+2
| | | | | | | | | | | | | | The unfs3 no longer has an rpc.mountd component. There is just a single server for mountd and nfsd requests. This means changing the name of the server in the scripts that check for it. [YOCTO #5639] (From OE-Core rev: ea126a7d4a63e27755046ddd2eb0be079e20c334) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Use the newer unfs3 for serving user space nfsSaul Wold2014-01-281-48/+5
| | | | | | | | | | | | | This new version correctly handles the 64bit ext3 / ext4 issues we were seeing with the older unfs-server which did not handle 64bit file systems correctly, producing the duplicate cookies. [YOCTO #5639] (From OE-Core rev: 2a59d55f712bbd79b1edf3ccb90ccabf609c9f0d) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: allow multiple unfs instances to run simultaneouslyScott Garman2012-10-041-2/+2
| | | | | | | | | | | | | | | A miscalculation in the way the port numbers of mountd and nfsd are created was causing conflicts when starting multiple instances of qemu using userspace nfs. Thanks to Rudolf Streif for proposing this fix! Fixes [YOCTO #1969] (From OE-Core rev: 94eef772c283170d19ba92c8de0054cd093fc487) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: improve rpcbind error detectionScott Garman2012-10-041-9/+24
| | | | | | | | | | | mountd requires rpcbind or portmap. Check that one of these services is running before doing anything else, and report a user-friendly error when they are not found. (From OE-Core rev: 16d6ec51f4b976c9b86a8b6bf6251089df2d2732) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: use consistent whitespaceScott Garman2012-10-041-47/+47
| | | | | | | (From OE-Core rev: b05185240669e0ae811a23620913b35ca99493fb) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs and friends: don't put pseudo db in target fsPeter Seebach2012-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | In a few places, we have scripts which use <rootfs>/var/pseudo for the pseudo state directory controlling a given filesystem. This seems possibly risky because it means that stuff running under qemu or whatnot could wipe out the data being used to handle that rootfs. Move this to: <rootfs>/../$(basename_rootfs).pseudo_state to avoid problems. This also solves at least one case (not directly hit by yocto's tree) wherein you could end up trying to remove a rootfs while pseudo was using a database inside that rootfs, and thus the remove would fail. (From OE-Core rev: aa5d6bd006d3b4eede21d8987451876ed3385ab8) Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Allow user mode NFS server to run without rpcbind / portmapJason Wessel2011-10-101-1/+3
| | | | | | | | | | | | | | | and nfsroot mount without the need to talk to an RPC info server as long as the port numbers for mountd and nfsd are known in advance. This patch updates the qemu startup scripts and the user mode NFS server to have the ability to start without the need to use rpcbind or portmap services. (From OE-Core rev: 3b1346c607c41a2d592c48594457c32153cb2314) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-export-rootfs: Add HOW-TO for ubuntu 11.10 for rpcbind problemKhem Raj2011-10-041-0/+3
| | | | | | | | | | | | | The existing instruction to tackle RPC: Authentication error; why = Client credential too weak Are not applicable to ubuntu 11.10 especially Therefore add the magic needed for ubuntu 11.10 (From OE-Core rev: faae191e8c1920745e0ea9abf7b8b26eb4561096) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Show sensible warning messages if expected binaries don't existRichard Purdie2011-09-021-1/+1
| | | | | | | | [YOCTO #1438] (From OE-Core rev: 6b5706d1f9ce7a3fd4d8f819ff8f3fd789665647) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Use OECORE_DISTRO_VERSION instead of POKY_DISTRO_VERSIONOtavio Salvador2011-08-231-1/+1
| | | | | | | (From OE-Core rev: 6890c02ec4538b82b694deaba39e9921af4e3f47) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-setup-builddir: Fix up OE-Core/Poky mismatch for now (and fix ↵Richard Purdie2011-04-211-0/+0
| | | | | | permissions) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Further cleanup of various poky referencesRichard Purdie2011-04-211-1/+1
| | | | | | (From OE-Core rev: fe73ea8c510877fe4e3c117985e8f3d0b79ddf1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Rename ~/.poky-sdk/ temp workdir to ~/.runqemu-sdk/Richard Purdie2011-04-211-6/+6
| | | | | | (From OE-Core rev: 69a0bfb8d7203db1c477dc28974287fda35d1a50) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Rename the remaining poky-* scripts to oe-* or runqemu-*Richard Purdie2011-04-211-0/+186
(From OE-Core rev: 877b3d84597fcfc3abf5aa332019d412f2717896) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>