Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Pi-CI – A RasPi 5 emulator in a Docker image for creating and flashing configs (github.com/ptrsr)
98 points by Curiositry on Aug 23, 2024 | hide | past | favorite | 11 comments


Super interesting! Thank you for this. I was working on a hardware project that this probably would have helped a lot with. I was writing some python but the package couldn't be compiled on my local machine so I had to run a dev server off my pi directly. I wonder if this can help.


This is awesome, I've had a need for this for quite a while, and had cooked up something similar before, but will probably swap to using this.


I had the same need and also cobbled something together to do it. This project looks far easier to use, so I will also likely switch.

Checking the Dockerfile this also uses qemu to run the actual ARM binaries, I really liked how easy it was to set this up back then. All I had to do was loop mount the RPi image and then chroot into it. Everything else was handled transparently by qemu. Of course, I didn't have nice things like resize, so I was limited to making small additions.


This is exactly what I was trying to do a few months ago, but all the RPi VMs I found were a pain in the ass and I never got it to work. Ansible deployments are conveniently but take forever on RPi, golden images are great for distribution but suck to make. Using Ansible to deploy to a VM and then exporting that image for flashing is the best of both approaches.


This seems similar to https://github.com/solo-io/packer-plugin-arm-image

I believe that can also work in non-RPi images, but I didn't get very far in the Pi-CI docs so maybe that does too.


This looks useful, I usually use guestfish to put files into the image before flashing but this could be a lot more flexible.


Neat!

> The default image is 2 gigabytes in size. This can be increased (but not decreased!) through the resize command.

Is this the smallest size of an industrial SD card these days?


Smallest Swissbit do is 512MB, but that's as it's SLC flash so far lower capacity. https://www.swissbit.com/en/products/product-finder/products...

Looking at pricing, 1GB is only about 25% more in unit quantity.

https://www.mouser.co.uk/ProductDetail/Swissbit/SFSD1024N1AS...

MLC/TLC flash will be 2GB and up, and most consumer cards you can buy.


So it may still be worth it to support smaller images.


how does this compare to gokrazy?


This looks like a more general use system whereas gokrazy is Go-specific.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: