Skip to content

Commit

Permalink
Set of fixes to run with custom QEMU
Browse files Browse the repository at this point in the history
  • Loading branch information
artpol84 committed Oct 8, 2020
1 parent 6c7219c commit 3197355
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 50 deletions.
86 changes: 46 additions & 40 deletions docker/fc31/support-qemu.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
# ---
# git_url: [email protected]:artpol84/qemu.git
# git_commit: 0261e73224a48e99b2dabb065437ae21b3e08944
# bkp_git_commit: 0261e73224a48e99b2dabb065437ae21b3e08944
# git_commit: 16d97a001da
# git_modules: yes

cat <<EOF > mlx-qemu.spec
Expand All @@ -17,47 +18,52 @@ License: Proprietary
%build
ls
./configure \
--prefix=/opt/qemu-sr \
'--block-drv-ro-whitelist=vmdk,vhdx,vpc' \
'--block-drv-rw-whitelist=qcow,qcow2,raw,file,host_device,nbd,iscsi,vvfat' \
'--disable-brlapi' \
'--disable-capstone' \
'--disable-curl' \
'--disable-curses' \
'--disable-debug-tcg' \
'--disable-docs' \
'--disable-guest-agent' \
'--disable-glusterfs' \
'--disable-gtk' \
'--disable-libusb' \
'--disable-live-block-migration' \
'--disable-nettle' \
'--disable-qom-cast-debug' \
'--disable-rdma' \
'--disable-replication' \
'--disable-sparse' \
'--disable-smartcard' \
'--disable-sdl' \
'--disable-strip' \
'--disable-tools' \
'--disable-vde' \
'--disable-vhost-scsi' \
'--disable-vnc-jpeg' \
'--disable-vnc-png' \
'--disable-vnc-sasl' \
'--disable-xen' \
'--enable-fdt' \
'--enable-kvm' \
'--enable-linux-aio' \
'--enable-seccomp' \
'--enable-spice' \
'--enable-trace-backend=dtrace' \
'--enable-usb-redir' \
'--enable-vnc' \
--prefix=/opt/qemu-sr \
--disable-strip \
--disable-qom-cast-debug \
--extra-ldflags="-pie -Wl,-z,relro -Wl,-z,now" \
--extra-cflags="-fPIE -DPIE" \
--enable-trace-backends=simple,dtrace \
--with-trace-file=/var/log/traces \
--enable-werror \
--disable-xen \
--disable-virtfs \
--enable-kvm \
--enable-libusb \
--enable-spice \
--enable-seccomp \
--disable-fdt \
--disable-docs \
--disable-sdl \
--disable-debug-tcg \
--disable-sparse \
--disable-brlapi \
--disable-vde \
--disable-curses \
--disable-curl \
--enable-vnc-sasl \
--enable-linux-aio \
--enable-lzo \
--enable-snappy \
--enable-usb-redir \
--enable-vnc-png \
--disable-vnc-jpeg \
--disable-vhost-scsi \
--target-list=x86_64-softmmu \
--block-drv-rw-whitelist=qcow2,raw,file,host_device,blkdebug,nbd,iscsi,gluster,rbd \
--block-drv-ro-whitelist=vmdk,vhdx,vpc \
--enable-debug-info \
# '--enable-virtfs' \
# --enable-debug
# --audio-drv-list=alsa \
# --enable-rbd \
# --disable-bluez \
# --enable-glusterfs \
./scripts/git-submodule.sh update
make %{?_smp_mflags}
Expand Down
4 changes: 4 additions & 0 deletions docker/fc31/support.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ RUN dnf install -y \
uuid-devel \
valgrind-devel \
zlib-devel \
lzo-devel \
snappy-devel \
cyrus-sasl-devel \
libpng-devel \
&& dnf clean dbcache packages
21 changes: 12 additions & 9 deletions plugins/cmd_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,17 @@ def _fetch_git(self):
except subprocess.CalledProcessError:
shutil.rmtree(self.git_dir)

with in_directory(self.git_dir):
self.git_id = git_commit_id(git_ref, fail_is_none=True)
if self.git_id is None:
git_call(["fetch", "--tags", git_url])
if not self.git_modules:
with in_directory(self.git_dir):
self.git_id = git_commit_id(git_ref, fail_is_none=True)
if self.git_id is None:
git_call(["fetch", "--tags", git_url])
self.git_id = git_commit_id(git_ref)
else:
with in_directory(self.git_dir):
git_call(["fetch"])
self.git_id = git_commit_id(git_ref)

with in_directory(self.git_dir):
if self.git_modules:
git_call(["checkout", "-b", "work", self.git_id ])
git_call(["checkout", self.git_id ])
git_call(["submodule", "update", "--init", "--recursive"])


Expand Down Expand Up @@ -181,7 +183,8 @@ def _setup_git(self, dfn):
else:
subprocess.check_call([
"tar", "--create", "--mtime=Jan 1 2010", "--file", self.tarfn,
"--exclude", ".git", "--transform", "s|^|opt/src/|", "."])
"--transform", "s|^|opt/src/|", "."])
# "--exclude", ".git", "--transform", "s|^|opt/src/|", "."])

def _setup_nfs(self, dfn):
for nfs_fn, inf in self.spec.get("nfs_files", {}).items():
Expand Down
2 changes: 1 addition & 1 deletion plugins/mkt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def set_def_qemu_args():
#
# This is really annoying, disable it by telling SeaBIOS to use a bogus
# serial port for its output.
"-fw_cfg": ["etc/sercon-port,string=2"],
"-fw_cfg": ["opt/sercon-port,string=2"],
"-smp": "%s" % int( multiprocessing.cpu_count() / 2)
}
return qemu_args
Expand Down

0 comments on commit 3197355

Please sign in to comment.