summaryrefslogtreecommitdiffstats
path: root/meta/classes/qemuboot.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* qemuboot.bbclass: save relative paths in conf filebrian avery2017-04-201-0/+7
| | | | | | | | | | | | | | 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] (From OE-Core rev: 235243d7be5df57df4767e4710b846e83f0aa9fd) Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: write native sysroot of qemu-helper into qemuboot.confEd Bartosh2017-04-131-1/+8
| | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 0f207bfc1f7a4fd509b78d32bbe1a8d4ebea8053) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: do not rely on grepping imagesRobert Yang2017-04-121-0/+3
| | | | | | | | | | | | | Fixed when the image is large and not enough memory: grep: memory exhausted Aborted [YOCTO #11073] (From OE-Core rev: a99deb30a0138594147ae28aab016fe4b74b8959) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: add blank lines in commentsRobert Yang2017-01-231-0/+18
| | | | | | | | | Add blank lines in comments to make it easy for readind and updating. (From OE-Core rev: 3f3344d1c063b0013a9ae7203bac30ab8f4ea17c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: fixes for slirp, network device and hostfwdRobert Yang2017-01-231-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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> (From OE-Core rev: 7dddd090806914a62d977730440d803e48f44763) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: use IMGDEPLOYDIRRobert Yang2017-01-191-2/+3
| | | | | | | | | | So that "bitbake <image> -ccleansstate" can remove qemuboot.conf (From OE-Core rev: 0704f15d1ad7483f80ffa18fa32b6115923641cf) 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>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-4/+4
| | | | | | | | | | | | | 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\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: do not hook into do_rootfsPatrick Ohly2016-11-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: c8260447ed115bc5be7df9b25e449a7744d9f2df) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: Setup the vardeps for write_qemuboot_confNathan Rossi2016-11-061-12/+9
| | | | | | | | | | | | | | 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). (From OE-Core rev: c568f6ce06512a108cada5c7100eb1f6de73f2ff) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Remove RM_OLD_IMAGE, it's no longer usefulJoshua Lock2016-10-151-3/+0
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 93631befe8b962bf99524746b49f4ebca336175c) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: don't fail when QB_DEFAULT_KERNEL isn't symlinkMartin Jansa2016-09-301-1/+1
| | | | | | | | | | | | | | | | | | * 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' (From OE-Core rev: a11d0d8641b7dfb05c78645cf21f2c04a08c4822) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: don't fail on very first buildAndré Draszik2016-09-201-0/+1
| | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: ee4697350a553a36ca17b9376911e56eee43a465) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: also write the kernel link name to the conf fileJoshua Lock2016-09-201-2/+3
| | | | | | | | | | This will allow runqemu to fall back to trying the link name when a file matching the full name can't be found. (From OE-Core rev: 3ccbaaad75f0a53d8bcf6a5c748ec80c96a383bd) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: write the full kernel filename, not the link nameJoshua Lock2016-09-201-0/+8
| | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: d57bdacab13605ada4cd9e9159c18fdcd6eeacbc) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot.bbclass: add it for runqemuRobert Yang2016-09-091-0/+75
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. (From OE-Core rev: 1675e9b89e00b875d0da13411a2a939aa4ba5298) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>