Skip to content

Conversation

kernle32dll
Copy link

No description provided.

@hardillb
Copy link
Contributor

The resize to 2GB is only going to work with the Lite image by the look of things

@hardillb
Copy link
Contributor

And it will need to check the size of a passed in image as well for the VM only build.

hardillb added a commit to hardillb/dockerpi that referenced this pull request Nov 28, 2020
Also include changes needed for Qemu 5.1 from lukechilds#20 as needed for
USB support.

Device comes up as usb0 but close enough to get started
@@ -89,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-2019-09-30/2019-09-26-raspbian-buster-lite.zip"
ARG FILESYSTEM_IMAGE_CHECKSUM="a50237c2f718bd8d806b96df5b9d2174ce8b789eda1f03434ed2213bbca6c6ff"
ARG FILESYSTEM_IMAGE_URL="http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2020-02-14/2020-02-13-raspbian-buster-lite.zip"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this change isn't required to update to QEMU 5.1? If so, best to update the image in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but given how old the previous image was it made sense to move up as well.

@@ -10,6 +10,8 @@ if [ ! -e $image_path ]; then
echo "Extracting fresh filesystem..."
unzip $zip_path
mv -- *.img $image_path

qemu-img resize $image_path 2G
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning behind this? Just to increase the filesystem size for normal use? Or is it required for QEMU 5.1?

If not required, it should be a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required for 64 bit based CPUs and is required for all at qemu 5.2

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

So there's just a hard limit that all images must be no less that 2GB in size? Do you have source you could point me to so I can read more about that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been so long I can't remember if it's in the docs but I know it fails with an error message if you try with anything that is not a multiple of 2g

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found it: mail-archive.com/qemu-devel@nongnu.org/msg723028.html

@hardillb
Copy link
Contributor

The other PR #21 is better suited to be merged as it adds all this and network support the Pi2 and Pi3 based systems and jumps straight to qemu 5.2

@lukechilds
Copy link
Owner

Yeah I've seen that PR, it looks great!

However I prefer to keep PRs down to a single atomic change. So one change = one PR = one squashed commit merged into master.

I've seen QEMU 6.0.0 is out so just testing that locally. Once that's merged it would be great to rebase #21 on to master just adding network support for the Pis without changing QEMU or Raspbian images.

@hardillb
Copy link
Contributor

But 5.2 is needed for the network change, so nearly everything in the other PR is required

@lukechilds
Copy link
Owner

Fair point, ok lets merge it as one PR then.

@lukechilds
Copy link
Owner

Closed in favour of #21

@lukechilds lukechilds closed this May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants