From fefc668694382881fa43e7afaf2a445c867a5df2 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Mon, 21 Aug 2017 14:15:01 +0300 Subject: ostree_git.bb: Depends on xz for liblzma Move Yocto/OE recipe xz from the run-time dependencies to the dependencies because liblzma is required for the successful configuration of OSTree. Signed-off-by: Leon Anavi --- recipes-sota/ostree/ostree_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index 84e86e2..8937e5e 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -16,11 +16,11 @@ S = "${WORKDIR}/git" BBCLASSEXTEND = "native" -DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse libsoup-2.4 e2fsprogs gtk-doc-native curl" +DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse libsoup-2.4 e2fsprogs gtk-doc-native curl xz" DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" DEPENDS_remove_class-native = "systemd-native" -RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap xz bash" +RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash" RDEPENDS_${PN}_remove_class-native = "python-native" EXTRA_OECONF = "--with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl" -- cgit v1.2.3-54-g00ecf From c37424f1cb7cb4e8780b22ba628bb38ab77ab6b6 Mon Sep 17 00:00:00 2001 From: Jon Oster Date: Tue, 5 Sep 2017 12:13:54 +0200 Subject: PRO-3923 Add persistence option to run-qemu script --- scripts/run-qemu-ota | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/scripts/run-qemu-ota b/scripts/run-qemu-ota index 181558c..7f84d08 100755 --- a/scripts/run-qemu-ota +++ b/scripts/run-qemu-ota @@ -75,6 +75,7 @@ class QemuCommand(object): self.gui = not args.no_gui self.gdb = args.gdb self.pcap = args.pcap + self.overlay = args.overlay def command_line(self): netuser = 'user,hostfwd=tcp:0.0.0.0:%d-:22,restrict=off' % self.ssh_port @@ -82,8 +83,11 @@ class QemuCommand(object): netuser += ',hostfwd=tcp:0.0.0.0:2159-:2159' cmdline = [ "qemu-system-x86_64", - "-bios", self.bios, - "-drive", "file=%s,if=ide,format=raw,snapshot=on" % self.image, + "-bios", self.bios + ] + if not self.overlay: + cmdline += ["-drive", "file=%s,if=ide,format=raw,snapshot=on" % self.image] + cmdline += [ "-serial", "tcp:127.0.0.1:%d,server,nowait" % self.serial_port, "-m", "1G", "-usb", @@ -103,6 +107,16 @@ class QemuCommand(object): cmdline.append('-enable-kvm') else: cmdline += ['-cpu', 'Haswell'] + if self.overlay: + cmdline.append(self.overlay) + return cmdline + + def img_command_line(self): + cmdline = [ + "qemu-img", "create", + "-o", "backing_file=%s" % self.image, + "-f", "qcow2", + self.overlay] return cmdline @@ -121,6 +135,7 @@ def main(): parser.add_argument('--no-gui', help='Disable GUI', action='store_true') parser.add_argument('--gdb', help='Export gdbserver port 2159 from the image', action='store_true') parser.add_argument('--pcap', default=None, help='Dump all network traffic') + parser.add_argument('-o', '--overlay', type=str, metavar='file.cow', help='Use an overlay storage image file. Will be created if it does not exist. This option lets you have a persistent image without modifying the underlying image file, permitting multiple different persistent machines.') parser.add_argument('-n', '--dry-run', help='Print qemu command line rather then run it', action='store_true') args = parser.parse_args() try: @@ -136,6 +151,14 @@ def main(): print(" nc localhost %d" % qemu_command.serial_port) cmdline = qemu_command.command_line() + if args.overlay and not exists(args.overlay): + print("Image file %s does not yet exist, creating." % args.overlay) + img_cmdline = qemu_command.img_command_line() + if args.dry_run: + print(" ".join(img_cmdline)) + else: + Popen(img_cmdline) + if args.dry_run: print(" ".join(cmdline)) else: -- cgit v1.2.3-54-g00ecf