From: Xiangyu Chen Date: Tue, 17 Jan 2023 02:05:03 +0000 (+0800) Subject: runqemu: add process of option QB_NFSROOTFS_EXTRA_OPT X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~1862 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43a97f5bf3f90c5c1fd603f7dca2b3db2c0e3040;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git runqemu: add process of option QB_NFSROOTFS_EXTRA_OPT This extra options to be appended to the nfs rootfs options in kernel boot arg. Example config with qemuppc64 in machine config: add r/w size in the nfs rootfs extra option: QB_NFSROOTFS_EXTRA_OPT = "wsize=524288,rsize=524288" re-build and runqemu with nfs again, we can observe the kernel command line added our defined value in QB_NFSROOTFS_EXTRA_OPT: Kernel command line: root=/dev/nfs nfsroot=10.0.2.2:/home/xchen5/testing/build/tmp-glibc/deploy/images/qemuppc64/testnfs,nfsvers=3,port=3049,tcp,mountport=3048,wsize=524288,rsize=524288 rw mem=256M ip=dhcp console=hvc0 console=hvc0 nohugevmalloc Signed-off-by: Xiangyu Chen Signed-off-by: Luca Ceresoli --- diff --git a/scripts/runqemu b/scripts/runqemu index ccc557f3085..59073905735 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -1022,7 +1022,11 @@ class BaseConfig(object): # Use '%s' since they are integers os.putenv(k, '%s' % v) - self.unfs_opts="nfsvers=3,port=%s,tcp,mountport=%s" % (nfsd_port, mountd_port) + qb_nfsrootfs_extra_opt = self.get("QB_NFSROOTFS_EXTRA_OPT") + if qb_nfsrootfs_extra_opt and not qb_nfsrootfs_extra_opt.startswith(","): + qb_nfsrootfs_extra_opt = "," + qb_nfsrootfs_extra_opt + + self.unfs_opts="nfsvers=3,port=%s,tcp,mountport=%s%s" % (nfsd_port, mountd_port, qb_nfsrootfs_extra_opt) # Extract .tar.bz2 or .tar.bz if no nfs dir if not (self.rootfs and os.path.isdir(self.rootfs)):