carlosperate / rpi-os-custom-image

Raspberry Pi OS images with autologin and ssh enabled
MIT License
8 stars 4 forks source link

image difference regarding pi1, pi2, pi3 #4

Closed FengJi2021 closed 1 year ago

FengJi2021 commented 1 year ago

i noticed the custimise_os.py run docker with following command docker_cmd = " ".join([ "docker", "run", "-it", "--rm", "--name {}".format(docker_container_name), "-v {}:/sdcard/filesystem.img".format(img_path), DOCKER_IMAGE ]) which i think in default will be run in a pi1 environment, if i have a pi3, i think the code shall add one flag with pi3

carlosperate commented 1 year ago

Yeah, that's right, by default this will run on pi1 emulation and there are additional flags that could be used for the other models as documented in the dockerpi project: https://github.com/lukechilds/dockerpi#which-machines-are-supported

The Raspberry Pi OS is configured so that the same image works in all Raspberry Pi versions, and by running the emulator in pi1 mode we can also ensure any software installed during this procress is compatible with all Raspberry Pi versions. So you should be able to use the images created in this project (configured for pi1) and run them on a Raspberry Pi 3 without issues.

Hope that clarified things, let me know if you have any other questions! 👍

FengJi2021 commented 1 year ago

Thanks for the reply, the image is all model capable. The only possible shortcoming using default pi1 is the computing capacity, especially memory shortage(256MB). So as i customize the image with my own application, the installing run out of memory. And for a speed up in cicd, better go with pi3 i think.

carlosperate commented 1 year ago

Yeah, if speed is an important requirement configuring it as a pi3 is a good option. 👍

As general info, in one of my usecases for this image we are packaging an application that fetches pre-compiled packages, so emulating the armv6 CPU of the pi1 is useful to ensure the build doesn't accidentally fetch incompatible armv7/v8 pacakges. To be fair, there is usually ways to configure the package managers to force a specific platform, but running on the same platform you are targetting is more bullet proof for this specific use-case.

FengJi2021 commented 1 year ago

i am little bit curious about the ways to configure the package managers in OS level. seems for the qemu it is not so hard.