summaryrefslogtreecommitdiffstats
path: root/meta/classes/qemuboot.bbclass
AgeCommit message (Collapse)Author
2017-11-21qemuboot: Improve relative path handlingRichard Purdie
qemuconf files are currently written relative to TOPDIR. What makes more sense is to write paths relative to the location of the file. This makes moving them around and decoding the end paths in runqemu much easier. The effect of this should allow less use of bitbake to determine variables and allow us to simplify runqemu. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-25classes: drop image dependencies on TOPDIR variablePaul Eggleton
We don't need a dependency on this variable changing, and having one causes locked signature warnings during eSDK installation if you have INITRAMFS_IMAGE_* set (since TOPDIR will always be different between the eSDK and the environment in which it was built). Relates to [YOCTO #12102]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-30qemuboot.bbclass: create deterministic qemuboot.conf fileJuro Bystricky
The lines in qemuboot.conf are in random order. This patch fixes this by printing the lines in sorted order. This makes it easier to compare two different builds for any differences. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-18qemuboot.bbclass: Prevent creating a link loopMike Looijmans
When IMAGE_NAME and IMAGE_LINK_NAME are equal, do_write_qemuboot_conf will create a symlink that links to itself. Check if this is the case before creating the link. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20qemuboot.bbclass: save relative paths in conf filebrian avery
This saves relative paths in the qemuboot.conf file instead of absolute paths. This is to allow the images and kernels to be relocated and still have the testimage and runqemu work. [YOCTO #11375] Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-12qemuboot: write native sysroot of qemu-helper into qemuboot.confEd Bartosh
Native sysroot of qemu-helper contains all required tools (qemu-system and tunctl atm) for runqemu to work. It's not removed by rm_dir and should always exist. It makes sense to write it into qemuboot.conf to make runqemu to use it as a default directory for native tools. This should also speed up runqemu as it doesn't need to run to run 'bitbake qemu-helper -e' to get its native sysroot. [YOCTO #11266] [YOCTO #11193] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11runqemu: do not rely on grepping imagesRobert Yang
Fixed when the image is large and not enough memory: grep: memory exhausted Aborted [YOCTO #11073] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23qemuboot.bbclass: add blank lines in commentsRobert Yang
Add blank lines in comments to make it easy for readind and updating. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-01-23runqemu: fixes for slirp, network device and hostfwdRobert Yang
Fixed: - Add QB_NETWORK_DEVICE to set network device, it will be used by both slirp and tap. - Set QB_NETWORK_DEVICE to "-device virtio-net-pci" in qemuboot.bbclass but runqemu will default to "-device e1000" when QB_NETWORK_DEVICE is not set, this is because oe-core's qemu targets support virtio-net-pci, but the one outside of oe-core may not, "-device e1000" is more common. - Set hostfwd by default: 2222 -> 22, 2323 -> 23, and it will choose a usable port when the one like 222 is being used. This can avoid conflicts when multilib slirp qemus are running. We can forward more ports by default if needed, and bsp.conf can custom it. - Use different mac sections for slirp and tap to fix conflicts when running both of them on the same host. [YOCTO #7887] CC: Nathan Rossi <nathan@nathanrossi.com> CC: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-01-19qemuboot.bbclass: use IMGDEPLOYDIRRobert Yang
So that "bitbake <image> -ccleansstate" can remove qemuboot.conf Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-30qemuboot.bbclass: do not hook into do_rootfsPatrick Ohly
Writing qemuboot.conf in write_qemuboot_conf() does not modify the rootfs and thus conceptually shouldn't be executed as part of rootfs creation. Running it as separate task is cleaner and fixes the problem of missing qemuboot.conf files for meta-swupd virtual images; those images replace do_rootfs and ROOTFS_POSTPROCESS_COMMANDs don't run at all. The task gets added such that it runs roughly at the same time as before. Probably it doesn't actually need to depend on do_rootfs, but this way we don't write a useless qemuboot.conf in cases where do_rootfs fails. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-06qemuboot.bbclass: Setup the vardeps for write_qemuboot_confNathan Rossi
Setting up the vardeps on write_qemuboot_conf forces the updating of variables in qemuboot.conf when machine/deploy configuration changes. This is particularly useful when developing or setting up the qemuboot (e.g. changing QB_* variables) for new targets or when changing deployment variables (e.g. KERNEL_IMAGETYPE). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-15Remove RM_OLD_IMAGE, it's no longer usefulJoshua Lock
Since the move to put image deployment under sstate control in d54339d4b1a7e884de636f6325ca60409ebd95ff old images are automatically removed before a new image is deployed (the default behaviour of the sstate logic). RM_OLD_IMAGE is therefore no longer required to provide this behaviour, remove the variable and its users. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-28qemuboot: don't fail when QB_DEFAULT_KERNEL isn't symlinkMartin Jansa
* in some cases we might set QB_DEFAULT_KERNEL to the real filename instead of symlink and then this whole readlink work around actually breaks the build, because os.readlink fails on normal files: >>> os.readlink('deploy/images/qemux86/bzImage-linux-yocto-qemux86-master-20160927084848.bin') 'bzImage-linux-yocto-qemux86.bin' >>> os.readlink('deploy/images/qemux86/bzImage-linux-yocto-qemux86.bin') Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 22] Invalid argument: '/jenkins/mjansa/build-starfish-master-mcf/BUILD/deploy/images/qemux86/bzImage-linux-yocto-qemux86.bin' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20qemuboot.bbclass: don't fail on very first buildAndré Draszik
During the very first build, the DEPLOY_DIR_IMAGE directory might not have been created yet, causing the creation of the qemuboot.conf config file to fail. This is because write_qemuboot_conf() runs at rootfs creation time, i.e. before deploy. So let's create the directory if necessary before trying to write the config file. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19qemuboot: also write the kernel link name to the conf fileJoshua Lock
This will allow runqemu to fall back to trying the link name when a file matching the full name can't be found. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-19qemuboot: write the full kernel filename, not the link nameJoshua Lock
KERNEL_IMAGETYPE gives the filename of a symlink to the kernel, which may not be available i.e. if the user downloads some build artefacts to run on a local machine. It's also possible that the link will point to a newer kernel than was intended for use with the rootfs in the qemuboot.conf. It's much more reliable to read the name of the file KERNEL_IMAGETYPE is linking to and assign the full filename to QB_DEFAULT_KERNEL. [YOCTO #10285] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-09qemuboot.bbclass: add it for runqemuRobert Yang
It saves vars in ${DEPLOY_DIR_IMAGE}/<image>.qemuboot.conf, and runqemu will read it. The bsp which can be boot by runqemu will inherit it. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>