aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-internal
AgeCommit message (Collapse)Author
2015-05-07runqemu-internal: correctly set format for root FS as rawCristian Iorga
qemu guesses via probing the format of root FS, but gives a warning and restricts write operations on block 0. So fix it by setting correctly the format as raw. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20runqemu-internal: Add cpio support for qemux86 so that we can boot poky-tiny ↵Richard Purdie
images poky-tiny generates cpio.gz images, add support for these so we can boot them using runqemu. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-21runqemu: Specify rootfstype to qemu to avoid QA warningsRichard Purdie
With the change to ext4 filesystems for qemu, we get boot warnings from where it tried to mount the ext4 fileystem as ext2 and ext3 first. Avoid these by specifying the rootfs type directly on the kernel commandline for ext* images. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03runqemu-internal: get rid of annoying but harmless error messageChen Qi
If tap0 interface has been created by other users on the system, we would get error messages when using runqemu. Error messages are like below. Acquiring lockfile for tap0... touch: cannot touch ‘/tmp/qemu-tap-locks/tap0.lock’: Permission denied /buildarea2/chenqi/poky/scripts/runqemu-internal: line 139: /tmp/qemu-tap-locks/tap0.lock: Permission denied flock: 8: Bad file descriptor The system can still boot up because runqemu would try to create a new tap interface. So the error message above is harmless, yet somewhat annoying. This patch fixes the above problem. With this patch, the output would be as follows. Acquiring lockfile for tap0... Acquiring lockfile for /tmp/qemu-tap-locks/tap0.lock failed Setting up tap interface under sudo Acquiring lockfile for tap1... Running qemu-system-arm... Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-25runqemu-internal: increase memory for qemuarm64Kai Kang
Increase memory to 512M for qemuarm64. The original size 126M can't make task testimage pass, neither 256M. [YOCTO #7102] Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-22runqemu-internal: Fix qemu networking for qemuarm64Richard Purdie
This brings qemuarm64 into feature parity with the other qemu machines and enables the automated testing on the autobuilder. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-22runqemu: add qemuarm64 support.Kai Kang
Update scripts runqemu and runqemu-internal to support to boot qemuarm64. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-21runqemu-internal: add "console=ttyS0" to ramfs image kernel parametersChen Qi
We need this kernel command parameter so that when we start a ramfs image, we can actually get some output. Although we can make this happen by specifying the 'bootparams' for the 'runqemu' command, it's better to make this the default behaviour. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-17runqemu: add ability to skip using an existing tap deviceScott Garman
Support the sitauation where a user could have another VM running which uses tap devices. To prevent runqemu from trying to use the same tap device, runqemu will skip using a tap device if it finds a filename tapX.skip within its lock directory. This fixes [YOCTO #5815] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-13runqemu: enforce right CPU type for qemux86/x86-64Cristian Iorga
Set in accordance with qemu machines configs. Fixes [YOCTO #5817]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28scripts/runqemu-internal: use -cpu core2duo for qemux86-64Stefan Stanacar
Now that the tune for qemux86-64 changed to core2-64 we need to tell the emulator to use a proper CPU model. With the default setting of qemu64 we'll get things like: root@qemux86-64:~# smart --help traps: python[758] trap invalid opcode ip:7f2af01f6be7 sp:7fff49466ef0 error:0 in strop.so[7f2af01f5000+6000] Illegal instruction If the tune for qemux86 changes, that needs to be updated too. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28runqemu, runqemu-internal: Allow slirp for NFS and KVM useJason Wessel
The default slirp address for the NFS server is 10.0.2.2. If not using a tap interface this address must be used or the target system cannot connect properly. Also the ip=... kernel arguments need to be set to dhcp when using slirp or the root NFS will not get setup properly. The call to cleanup() results in a routine which is not defined when setting up the NFS because it is called before acquire() for the locking of the tap interfaces, the solution being to simply not call cleanup() that early. When using slirp, kvm should not execute the vhost net checks because the vhost net will not be configure or used. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-01-28runqemu: Use the newer unfs3 for serving user space nfsSaul Wold
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] Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-20runqemu: Allow user to set -vga option with qemuparamsValentin Popa
At the moment, the user cannot to set -vga other then vmware (because "vmware" is set by default); and the first argument in qemuparams has higher precedence. Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-09-20runqemu: set qemuarm memory size back to 128MBLaurentiu Palcu
The following commit, 6ccd4d6, increased the RAM size for qemu machines to 256MB due to some smart sanity tests failing on autobuilder because more memory was needed. Unfortunately this leads to various, potentially dangerous, issues like the one observed during sudoku-savant project compilation: collect: relinking collect2: error: '_ZNK6sudoku5ClearINS_6SquareEEclERS1_' was assigned to 'board.rpo', but was not defined during recompilation, or vice versa board.o:(.rodata+0x8): undefined reference to `sudoku::Clear<sudoku::Square>::operator()(sudoku::Square&) const' board.o:(.rodata+0x20): undefined reference to `sudoku::Clear<sudoku::Sequence>::operator()(sudoku::Sequence&) const' board.o:(.rodata+0x34): undefined reference to `typeinfo for sudoku::Action<sudoku::Sequence>' ...AND THE LIST CONTINUES... collect2: error: ld returned 1 exit status make: *** [sudoku-savant] Error 1 After some tests, I found that the maximum amount of memory needed for sudoku to compile properly is 146MB(!?!). My attempts to create a simpler test case (using templates), in order to replicate and isolate the issue failed. All the tests compiled just fine. So, my guess is that this problem is certainly memory related but the cause might be hidden in any of the following: qemu versatile hw model, in the kernel or, highly unlikely but not impossible, the toolchain itself. The reason I don't really think the cause is in the toolchain is the fact that the compilation completes just fine for 128MB on qemuarm but also on other qemu machines (with 256MB of memory). Since this issue might need lots of time to have a proper fix, I'll revert back to using 128MB for qemuarm for the time being. [YOCTO #5133] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-02runqemu: set memory size to 256M for most qemu machinesPaul Eggleton
Set memory size to 256M for qemuarm, qemux86, qemux86-64, qemumips, qemumips64, and qemuppc. This allows the smart automated tests to run on machines with a GUI environment (such as Sato) running at the same time, for which 128M is too limiting. Setting this in runqemu allows users manually using runqemu to avoid the same out-of-memory issues under similar conditions using smart, on-target compilation or other uses. Fixes [YOCTO #5045]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30runqemu-internal: provide more info if a preconfigured tap is usedChen Qi
We should provide the user more information if a preconfigured tap is used. This is because the user might have manually set up the tap interface to be used by other qemu binaries. So at a minimum, we should let the user know how to make runqemu skip that tap interface. [YOCTO #5047] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30runqemu-internal: don't bring down preconfigured tap interfaceChen Qi
runqemu-ifup and runqemu-ifdown should be pairs. If we're using a preconfigured tap interface, the runqemu-ifdown should not be invoked to bring it down. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16runqemu-internal: fix to start X correctly in live imagesChen Qi
The QEMUOPTIONS for ISOFS was not complete, leading to failures when trying to start X in live images. This patch fixes this problem. [YOCTO #4103] [YOCTO #4884] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09scripts/runqemu: Add support for 'qemumicroblaze' machineNathan Rossi
* Add support to boot the 'qemumicroblaze' machine in qemu-system-microblazeel * Use the specific machine model for a MicroBlaze system 'petalogix-ml605' * Use the DTB generated from the kernel build as the DTB for boot * Force use of initrd rootfs (either in ext or cpio formats) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09scripts/runqemu: Add support for 'qemuzynq' machineNathan Rossi
* Add support to boot the 'qemuzynq' machine in qemu-system-arm * Use the specific machine model for Zynq 'xilinx-zynq-a9' * Use the DTB generated from the kernel build as the DTB for boot * Force use of initrd rootfs (either in ext or cpio formats) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-30runqemu: Replaced "stty sane" with saved stty settingsAndrei Dinu
stty manual says : "sane - Resets all modes to reasonable values for interactive terminal use." But reasonable isn't the most viable solution, because we want to keep the original stty settings before running runqemu. Saving the stty settings and setting them at the end of the runqemu script solves the terminal settings differences after the script ran. [Yocto #4512] Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> [Added filename info in commit subject - sgw] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24SLiRP support in runqemuAndrei Dinu
runqemu script now takes argument "slirp" in order to run networking on the qemu machine, without root privileges. changed the runqemu-internal script in order not to activate the tap devices if the option is set. [YOCTO #1474] Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-16runqemu: Replace use of ifconfig with ipKhem Raj
ifconfig and its ilk (net-tools package) is deprecated in favour of iproute2 package and is now removed by many distro's e.g. Archlinux. So we replace ifconfig with ip utility Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-12runqemu-internal: support for ext2 and ext4 not only ext3Stefan Stanacar
Don't check only for ext3 fstype, we can boot ext2 and ext4 just as well. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-16runqemu-internal: Drop distcc supportRichard Purdie
The distcc support is clearly unused and broken, might as well drop the remaining code fragements. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10qemu script: explicitly set 32 bit depth for x86-64Alexandru DAMIAN
This patch is the same as 6c22c591374d258228f74814cded34a24b4bf2d3, but for x86-64 targets which exhibit the same problem. Qemu update from 1.2 to 1.4 now allows for 16bit depth in guests, whereby previously only 32bit depth was supported. However, the new support is broken, so we force 32bit depth in all cases. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03qemu script: explicitly set 32 bit depthAlexandru DAMIAN
Qemu update from 1.2 to 1.4 now allows for 16bit depth in guests, whereby previously only 32bit depth was supported. However, the new support is broken, so we force 32bit depth in all cases. MUST_REVERT: on qemu update, if 16bit depth support is working ok Fixes [YOCTO #3828] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03runqemu-internal: use MACHINE_SUBTYPE variable for qemuarm*Martin Jansa
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-03-20scripts/runqemu-internal: Fix lock racesRichard Purdie
There are two problems here. Firstly the grep command is unanchored so pid 345 will match against 12345 and so on. The second issue is that there are several context switched between attempting the lock and then writing the pid to it. Between the two issues, there were issues appearing on the autobuilder due to these conflicts. This patch replaces the mechanism with flock on fd 8 which should be a safer mechanism to use. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-20runqemu: Improve error handling/exit codesRichard Purdie
runqemu-internal is sourced so should be returning with an error code in case of errors. runqemu needs to deal with this. This patch fixes up the various error paths so we're consistent and get a sane exit status for runqemu which helps a lot in its use in the qemu runtime testing on the autobuilder. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16runqemu scripts: add support for booting an ISO imageChen Qi
Add support for booting an ISO image for runqemu scripts. [YOCTO #3710] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-01-09runqemu-internal: add 'debugshell' as a default kernel optionChen Qi
Add 'debugshell' as a default kernel option for ramfs booting. If rootfs.img cannot be found under /media, init-live.sh loops forever without showing any information. Silently looping forever and blocking users is inappropriate. Now that the 'debugshell' feature has been implemented in init-live.sh, It's reasonable to add it to the kernel option when booting a ramfs-based image. In this way, the system doesn't loop forever and instead drops to a shell after a default timeout (30 seconds). Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-25runqemu: change terminal's INTR key in 'serial' modeTrevor Woerner
If you are using an image in '-serial stdio' mode, temporarily change the terminal's interrupt character to 'Ctrl-]' for the duration of the image run. In this way, hitting 'Ctrl-C' for something running in the image doesn't accidentally abort the entire qemu session. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-14runqemu: add support for FSTYPE=vmdkTrevor Woerner
Allow vmdk images to be run through the 'runqemu' facility. Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-14Disabling audio on when running runqemu qemuarmAndrei Dinu
Added the change that prevented runqemu to throw sound errors. [YOCTO #3528] Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-04runqemu: allow multiple unfs instances to run simultaneouslyScott Garman
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] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-28runqemu-internal: don't append an empty element to PATHScott Garman
Bitbake fails to run when an empty element exists in $PATH. Avoid creating this situation when $CROSSPATH is not set. This fixes bug [YOCTO #3101] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-24runqemu: work with tap device names that end with a colonScott Garman
On Fedora systems (and likely others), ifconfig returns interface names that end with a colon. Make sure we strip the colon off the tap device name before using it. This fixes [YOCTO #3028] Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20qemux86-64: Support for KVM, paravirt and virtio addedCristian Iorga
KVM, paravirtualization and virtio drivers are now activated in runqemu using the kvm option flag for qemux86-64. Host CPU features are also exported to guest OS (Yocto Linux). Usage example: runqemu qemux86-64 core-image-x11 kvm Implements [YOCTO #2550]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-20qemux86: Support for KVM, paravirt and virtio addedCristian Iorga
KVM, paravirtualization and virtio drivers are now activated in runqemu using the kvm option flag for qemux86. Host CPU features are also exported to guest OS (Yocto Linux). Usage example: runqemu qemux86 core-image-x11 kvm Implements [YOCTO #2550]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-09-10runqemu-internal: New qemu calls it qemu-system-i386 for x86Khem Raj
New qemu calls the x86 system emulator to be qemu-system-i386 which is consistent now so change it in scripts Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-20scripts/runqueue-internal: Drop enable-gl optionRichard Purdie
This is no longer necessary since we've dropped the GL passthrough patches. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17runqemu: support booting ramfs-based imagesScott Garman
Added support for booting ramfs-based images (e.g, poky-tiny) which do not have block device support. This fixes [YOCTO #2612]. Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-16runqemu: Fix running qemu when build without glKhem Raj
When gl is disabled in PACKAGECONFIG then we dont need to check for supporting libs to be present before running qemu. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-16runqemu/mips: adjust runqemu script to support mipsel machineDennis Lan
Signed-off-by: Dennis Lan <dennis.yxun@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-06-25runqemu-internal: qemu fails to run on ext2 imageKang Kai
[Yocto 2579] When set DISTRO to poky-tiny, only ext2 image is created. But runqemu-internal doesn't set QEMUOPTIONS for ext2 image that make qemu fail to boot. Fix it for qemux86 arch since poky-tiny can only build for qemux86 now. Signed-off-by: Kang Kai <kai.kang@windriver.com>
2012-05-20runqemu: Add qemush4 and qemumips64 knowledgeKhem Raj
New machines need to be added and they also have different kernel commandlines Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-05-06runqemu: be sh neutralBernhard Reutner-Fischer
Now runs with dash and busybox' ash as well as with bash Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-03runqemu: Fix TAP='TUNSETGROUP: Invalid argument' by falling back to tunctl -uJason Wessel
By default the runqemu script tries to set the group permissions on any tap device it creates. The TUNSETGROUP ioctl is not implemented on some popular host enterprise linux distributions. Internally the script will exit as follows: ++ /opt/qemux86/bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/tunctl -b -g 100 + TAP='TUNSETGROUP: Invalid argument' + STATUS=1 + '[' 1 -ne 0 ']' + echo 'tunctl failed:' tunctl failed: + echo TUNSETGROUP: Invalid argument This patch implements a fallback to using the userid as the owner of the tap device which is supported by all 2.6 kernels, the default remains to try and use the groupid first. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>