Move to qemu 5.2

This commit is contained in:
Ben Hardill 2021-04-11 10:48:05 +01:00
parent 2960ba495d
commit 2414a742e4
No known key found for this signature in database
GPG key ID: 74DD076979ABB1E7
2 changed files with 13 additions and 13 deletions

View file

@ -1,6 +1,6 @@
# Build stage for qemu-system-arm
FROM debian:stable-slim AS qemu-builder
ARG QEMU_VERSION=5.1.0
ARG QEMU_VERSION=5.2.0
ENV QEMU_TARBALL="qemu-${QEMU_VERSION}.tar.xz"
WORKDIR /qemu
@ -23,7 +23,7 @@ RUN tar xvf "${QEMU_TARBALL}"
RUN # Build source
# These seem to be the only deps actually required for a successful build
RUN apt-get -y install python build-essential libglib2.0-dev libpixman-1-dev
RUN apt-get -y install python build-essential libglib2.0-dev libpixman-1-dev ninja-build
# These don't seem to be required but are specified here: https://wiki.qemu.org/Hosts/Linux
RUN apt-get -y install libfdt-dev zlib1g-dev
# Not required or specified anywhere but supress build warnings
@ -90,8 +90,8 @@ ENTRYPOINT ["./entrypoint.sh"]
# It's just the VM image with a compressed Raspbian filesystem added
FROM dockerpi-vm as dockerpi
LABEL maintainer="Luke Childs <lukechilds123@gmail.com>"
ARG FILESYSTEM_IMAGE_URL="http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2020-02-14/2020-02-13-raspbian-buster-lite.zip"
ARG FILESYSTEM_IMAGE_CHECKSUM="12ae6e17bf95b6ba83beca61e7394e7411b45eba7e6a520f434b0748ea7370e8"
ARG FILESYSTEM_IMAGE_URL="https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip"
ARG FILESYSTEM_IMAGE_CHECKSUM="ea92412af99ec145438ddec3c955aa65e72ef88d84f3307cea474da005669d39"
ADD $FILESYSTEM_IMAGE_URL /filesystem.zip

View file

@ -15,6 +15,13 @@ if [ ! -e $image_path ]; then
fi
fi
echo "Rounding image size up to a multiple of 2G"
image_size=`du -m $image_path | cut -f1`
new_size=$(( ( ( image_size / 2048 ) + 1 ) * 2 ))
echo "from ${image_size}M to ${new_size}G"
qemu-img resize $image_path "${new_size}G"
if [ "${target}" = "pi1" ]; then
emulator=qemu-system-arm
kernel="/root/qemu-rpi-kernel/kernel-qemu-4.19.50-buster"
@ -26,22 +33,15 @@ if [ "${target}" = "pi1" ]; then
nic='--net nic --net user,hostfwd=tcp::5022-:22'
elif [ "${target}" = "pi2" ]; then
emulator=qemu-system-arm
machine=raspi2
machine=raspi2b
memory=1024m
kernel_pattern=kernel7.img
dtb_pattern=bcm2709-rpi-2-b.dtb
extra='dwc_otg.fiq_fsm_enable=0'
nic='-netdev user,id=net0,hostfwd=tcp::5022-:22 -device usb-net,netdev=net0'
elif [ "${target}" = "pi3" ]; then
echo "Rounding image size up to a multiple of 2G"
image_size=`du -m $image_path | cut -f1`
new_size=$(( ( ( image_size / 2048 ) + 1 ) * 2 ))
echo "from ${image_size}M to ${new_size}G"
qemu-img resize $image_path "${new_size}G"
emulator=qemu-system-aarch64
machine=raspi3
machine=raspi3b
memory=1024m
kernel_pattern=kernel8.img
dtb_pattern=bcm2710-rpi-3-b-plus.dtb