Skip to content

Commit

Permalink
QEMU 8.1.2
Browse files Browse the repository at this point in the history
change-type: patch
  • Loading branch information
ab77 committed Nov 16, 2023
1 parent 2ea96a9 commit d809c67
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN set -x; arch=$(echo ${TARGETARCH} | sed 's/amd/x/g') \
# --- build QEMU and Python venv
FROM qemu-build-${TARGETARCH} AS qemu-build

ARG QEMU_VERSION=6.2.0
ARG QEMU_VERSION=8.1.2

WORKDIR /opt

Expand All @@ -38,6 +38,7 @@ RUN install_packages \
libfdt-dev \
libglib2.0-dev \
libpixman-1-dev \
libslirp-dev \
ninja-build \
zlib1g-dev

Expand All @@ -50,9 +51,9 @@ COPY requirements.txt .
RUN pip install -r requirements.txt

RUN wget -q https://download.qemu.org/qemu-${QEMU_VERSION}.tar.xz \
&& echo "68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45 qemu-${QEMU_VERSION}.tar.xz" | sha256sum -c - \
&& echo "541526a764576eb494d2ff5ec46aeb253e62ea29035d1c23c0a8af4e6cd4f087 qemu-${QEMU_VERSION}.tar.xz" | sha256sum -c - \
&& tar -xf qemu-${QEMU_VERSION}.tar.xz && cd qemu-${QEMU_VERSION} \
&& ./configure --target-list=x86_64-softmmu && make -j"$(nproc)" \
&& ./configure --target-list=x86_64-softmmu --enable-slirp && make -j"$(nproc)" \
&& make install


Expand All @@ -65,17 +66,18 @@ ENV PATH="${VIRTUAL_ENV}/bin:/usr/local/bin:${PATH}"

RUN install_packages \
git \
openssh-client \
rsync \
minicom \
systemd \
libxml2 \
libfdt1 \
libglib2.0-0 \
libjpeg62-turbo \
libpixman-1-0 \
libpng16-16 \
libjpeg62-turbo \
libglib2.0-0 \
libfdt1 \
libslirp0 \
libxml2 \
minicom \
openssh-client \
ovmf \
rsync \
systemd \
zlib1g

COPY --from=cli-build /opt/balena-cli /opt/balena-cli
Expand Down
4 changes: 2 additions & 2 deletions resources/qemu.robot
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Run "${image}" with "${memory}" MB memory "${cpus}" cpus and "${serial_port_path
Run Keyword And Return If '${result.stdout}' != '0' Run image with KVM enabled

Run image with KVM enabled
${handle} = Start Process qemu-system-x86_64 -device ahci,id\=ahci -drive file\=${image_copy},media\=disk,cache\=none,format\=raw,if\=none,id\=disk -device ide-hd,drive\=disk,bus\=ahci.0 -device virtio-net-pci,netdev\=n1 -netdev \"user,id\=n1,dns\=127.0.0.1,guestfwd\=tcp:10.0.2.100:80-cmd:netcat haproxy 80,guestfwd\=tcp:10.0.2.100:443-cmd:netcat haproxy 443\" -m ${memory} -nographic -machine type\=q35,accel\=kvm -smp ${cpus} -chardev socket,id\=serial0,path\=${serial_port_path},server,nowait -serial chardev:serial0 -bios "/usr/share/ovmf/OVMF.fd" -nodefaults \ shell=yes
${handle} = Start Process qemu-system-x86_64 -device ahci,id\=ahci -drive file\=${image_copy},media\=disk,cache\=none,format\=raw,if\=none,id\=disk -device ide-hd,drive\=disk,bus\=ahci.0 -device virtio-net-pci,netdev\=n1 -netdev \"user,id\=n1,dns\=127.0.0.1,guestfwd\=tcp:10.0.2.100:80-cmd:netcat haproxy 80,guestfwd\=tcp:10.0.2.100:443-cmd:netcat haproxy 443\" -m ${memory} -nographic -machine type\=q35,accel\=kvm -smp ${cpus} -chardev socket,id\=serial0,path\=${serial_port_path},server=on,wait=off -serial chardev:serial0 -bios "/usr/share/ovmf/OVMF.fd" -nodefaults \ shell=yes
Return From Keyword ${handle}

Run image with KVM disabled
${handle} = Start Process qemu-system-x86_64 -device ahci,id\=ahci -drive file\=${image_copy},media\=disk,cache\=none,format\=raw,if\=none,id\=disk -device ide-hd,drive\=disk,bus\=ahci.0 -device virtio-net-pci,netdev\=n1 -netdev \"user,id\=n1,dns\=127.0.0.1,guestfwd\=tcp:10.0.2.100:80-cmd:netcat haproxy 80,guestfwd\=tcp:10.0.2.100:443-cmd:netcat haproxy 443\" -m ${memory} -nographic -machine type\=q35 -smp ${cpus} -chardev socket,id\=serial0,path\=${serial_port_path},server,nowait -serial chardev:serial0 -bios "/usr/share/ovmf/OVMF.fd" -nodefaults \ shell=yes shell=yes
${handle} = Start Process qemu-system-x86_64 -device ahci,id\=ahci -drive file\=${image_copy},media\=disk,cache\=none,format\=raw,if\=none,id\=disk -device ide-hd,drive\=disk,bus\=ahci.0 -device virtio-net-pci,netdev\=n1 -netdev \"user,id\=n1,dns\=127.0.0.1,guestfwd\=tcp:10.0.2.100:80-cmd:netcat haproxy 80,guestfwd\=tcp:10.0.2.100:443-cmd:netcat haproxy 443\" -m ${memory} -nographic -machine type\=q35 -smp ${cpus} -chardev socket,id\=serial0,path\=${serial_port_path},server=on,wait=off -serial chardev:serial0 -bios "/usr/share/ovmf/OVMF.fd" -nodefaults \ shell=yes shell=yes
Return From Keyword ${handle}

0 comments on commit d809c67

Please sign in to comment.