Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add network support to Pi2/3 #21

Merged
merged 17 commits into from May 16, 2021
Merged

Conversation

hardillb
Copy link
Contributor

Also include most of the changes needed for Qemu 5.1 from #20 as needed for USB support (with the resize increased to 4G and moved to apply to passed in images as well as the included one).

Should have the included image updated to match latest at time of release.

Device comes up as usb0 but close enough to get started.

I did test with Qemu 5.2-rc3 to see if Pi4 support was included but doesn't look like it yet.

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
These ports are not actually exported in the Dockerfile, but may
still be useful
This is only needed for the 64bit build

Also now only rounds up to the nearest 2G not fixed at 4G
2020-02-13-raspbian-buster-lite.zip
@hardillb
Copy link
Contributor Author

hardillb commented Dec 30, 2020

I've moved the resize to only be applied for Pi3 (64bit builds) as it's only needed there and it now resizes the image to the closest next 2G increment rather than fixed at 4G (the lite image is good at 2G)

I also bumped to the latest 32bit Lite image for the full build with included disk image

@davystrong
Copy link

Any chance of this getting merged?

@jeremypoulter
Copy link

For what it is worth I tried this and can confirm it is working

@hardillb hardillb mentioned this pull request May 11, 2021
@lukechilds
Copy link
Owner

Thanks for the review @jeremypoulter and thanks again for working on this @hardillb. Apologies for how long it's taken for me to review, I'm really busy with @getumbrel at the moment. No promises, but I've put a note in my calendar to try and take the time to review, test and merge this at the weekend.

@hardillb hardillb mentioned this pull request May 16, 2021
Copy link
Owner

@lukechilds lukechilds left a comment

Choose a reason for hiding this comment

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

Thanks for this awesome PR!

Some small changes.

Dockerfile Outdated Show resolved Hide resolved
entrypoint.sh Show resolved Hide resolved
entrypoint.sh Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Copy link
Owner

@lukechilds lukechilds left a comment

Choose a reason for hiding this comment

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

Thanks so much for your help with this @hardillb!

This looks all good to me now, are you able to give my latest changes a quick eyeball and let me know if anything looks off to you?

@hardillb
Copy link
Contributor Author

I'm out and about for a few hours, I can give it a proper look when i get back home

@hardillb
Copy link
Contributor Author

All looks good

The only thing I noticed, it looks like the pi3 option will only work with the 64bit RaspiOS builds not the 32bit builds because it's using the kernel8.img but looking at the history this would have been the case before the merge so not a regression.

@lukechilds
Copy link
Owner

I think the current images are 32bit, they're working ok for me.

@lukechilds
Copy link
Owner

kernel8.img is included in the image so wouldn't this be 32 bit or 64 bit depending on which image is being used?

@hardillb
Copy link
Contributor Author

You can get 64bit images here https://downloads.raspberrypi.org/raspios_arm64/images/ they are just not listed on the download pages yet.

Running the vm image against a 32bit image hangs and maxes out the CPUs for me.
e.g.

docker run --name dockerpi -it --rm -v `pwd`/2021-03-04-raspios-buster-armhf-lite.img:/sdcard/filesystem.img ben/dockerpi:vm pi3

Hangs here:

...
Searching for kernel='kernel8.img'
Searching for dtb='bcm2710-rpi-3-b-plus.dtb'
Booting QEMU machine "raspi3b" with kernel=/fat/kernel8.img dtb=/fat/bcm2710-rpi-3-b-plus.dtb

@lukechilds
Copy link
Owner

Strange, 32 bit works fine for me: 2021-03-04-raspios-buster-armhf-lite.zip

But I get a kernel panic (no hanging) with 64 bit: 2021-03-04-raspios-buster-arm64.zip.

Ah well, like you said, this is already the current behaviour, so I'll go ahead and merge this PR. Thanks again for your help!

@lukechilds lukechilds merged commit 6c1ac8e into lukechilds:master 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.

None yet

4 participants