diff options
author | Xiangyu Chen <xiangyu.chen@windriver.com> | 2023-01-17 10:05:03 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-26 22:22:53 +0000 |
commit | 6bc30dd4a7d4fdad53d6b5fab3cb574d095ca774 (patch) | |
tree | 5bfd548a3d80e862138a342ddba1eef3342319ea /scripts | |
parent | 45f278ed23f117a38e0706d1898e61cafcc86e96 (diff) | |
download | poky-6bc30dd4a7d4fdad53d6b5fab3cb574d095ca774.tar.gz |
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
(From OE-Core rev: 43a97f5bf3f90c5c1fd603f7dca2b3db2c0e3040)
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index ccc557f308..5907390573 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -1022,7 +1022,11 @@ class BaseConfig(object): | |||
1022 | # Use '%s' since they are integers | 1022 | # Use '%s' since they are integers |
1023 | os.putenv(k, '%s' % v) | 1023 | os.putenv(k, '%s' % v) |
1024 | 1024 | ||
1025 | self.unfs_opts="nfsvers=3,port=%s,tcp,mountport=%s" % (nfsd_port, mountd_port) | 1025 | qb_nfsrootfs_extra_opt = self.get("QB_NFSROOTFS_EXTRA_OPT") |
1026 | if qb_nfsrootfs_extra_opt and not qb_nfsrootfs_extra_opt.startswith(","): | ||
1027 | qb_nfsrootfs_extra_opt = "," + qb_nfsrootfs_extra_opt | ||
1028 | |||
1029 | self.unfs_opts="nfsvers=3,port=%s,tcp,mountport=%s%s" % (nfsd_port, mountd_port, qb_nfsrootfs_extra_opt) | ||
1026 | 1030 | ||
1027 | # Extract .tar.bz2 or .tar.bz if no nfs dir | 1031 | # Extract .tar.bz2 or .tar.bz if no nfs dir |
1028 | if not (self.rootfs and os.path.isdir(self.rootfs)): | 1032 | if not (self.rootfs and os.path.isdir(self.rootfs)): |