lpenz / docker-debian-releases

Creates docker images of historic Debian-based distribution releases
https://www.lpenz.org/docker-debian-releases/
MIT License
23 stars 6 forks source link

Raspberry Pi OS for arm64 (and maybe armhf?) #6

Closed Jackenmen closed 2 years ago

Jackenmen commented 2 years ago

I've found this project through the raspbian-bullseye-armhf image and have been wondering if you could add Raspberry Pi OS for arm64 here (and maybe armhf?). It seems that this is largely automated so I figured it might not be that much additional work (but I can't say that I understand much of it so I might be very wrong). Whether that assumption is correct, you still might have a reason to not want to add it to the supported matrix which is fine but I won't know until I ask 😄

If I understand it correctly, RPi OS 32-bit is Raspbian base userland + custom Raspberry Pi kernels + different repository sources and RPi OS 64-bit is Debian arm64 base userland + custom Raspberry Pi kernels + additional repository sources.

lpenz commented 2 years ago

Yes, this is largely automated and adding an additional distribution usually requires only adding a new deb source to apt-mirrors-info and docker-create-debian-image. The scripts figure out the supported architectures and such.

Unfortunately, Raspberry Pi OS has some peculiarities that required additional work - pi-gen seems to use debootstrap and then manually do some things instead of embedding everything in Debian packages. I think I may have something working, but I'll leave it testing overnight. I'm using the prefix rpios for these images.

Hm from what I read, RPi OS 32-bit is just raspbian. Let me know if that's not the case.

Jackenmen commented 2 years ago

Hm from what I read, RPi OS 32-bit is just raspbian. Let me know if that's not the case.

It uses these sources:

# from /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# from /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ bullseye main

The first repository appears to be a mirror of https://archive.raspbian.org/raspbian/, at the very least the Release.gpg file for bullseye dist of both is the same. I'm unsure what exactly the second repository is for though but I imagine this would be the one containing the potential additional packages that might not be in the base repositories of Debian/Raspbian.

I think I may have something working, but I'll leave it testing overnight. I'm using the prefix rpios for these images.

That sounds great 👀

Jackenmen commented 2 years ago

RPi OS bullseye images for armhf and arm64 seem to work fine from my testing.

RPi OS buster image (armhf as well as arm64) on the other hand holds broken packages out of the box:

# apt install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:8.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I haven't tested the rest of the builds.

lpenz commented 2 years ago

Ah yes, silly me, raspi.list had "bullseye" hard-coded. The image works (it's tested) but installation of some things won't. I've fixed it now, we should get better images tomorrow. Thanks you for testing this and letting me know.

Jackenmen commented 2 years ago

The buster image now works correctly when trying to install packages on it, thanks!

Personally, I'm very happy with the current images, feel free to close this.

lpenz commented 2 years ago

Awesome, thanks for all the help