This is a complete install of libcamera 0.7.1 and a matching millipixels build on a Librem 5 running stock PureOS crimson. The new libcamera adds software-ISP autofocus (IPASoftAutoFocus) and GPU debayering (DebayerEGL). You install only the packages needed for that; you do not add galilley’s Crimson Backports repository, which is unsigned and contains about 1,400 packages.
This is not a Purism, PureOS, or libcamera release. The libcamera 0.7.1 packages are galilley’s, announced in “Librem 5 camera to use everywhere”, post #27. millipixels is the PureOS crimson 0.24.0-0pureos1 source, rebuilt against that libcamera. No source patch was needed; the only change is a debian/changelog entry. The current package version string is 0.24.0-0pureos1+seth1. That +seth1 suffix is only a packaging mark and may be renamed later.
The millipixels package, its source, the build recipe, and the checksums are at https://emerald-lemon-q564.here.now/.
Test status (2026-11-23): this set was installed on a real Librem 5 (kernel 6.18.0-1-librem5). cam -l listed both cameras through libcamera 0.7.1. Using millipixels on the hardware (preview, autofocus, photo, and video) was not verified and is still untested. GPU debayer on the Librem 5 GPU (Vivante GC7000L) was also not verified.
What you get
- libcamera 0.7.1-af2, cherry-picked unchanged from galilley’s Crimson Backports, including the soft-ISP autofocus and GPU debayer code.
- millipixels
0.24.0-0pureos1+seth1, rebuilt so it linkslibcamera.so.0.7instead of the stock 0.0.3 library. - The stock
libcamera0.0.3package stays installed. crimson’sgstreamer1.0-libcamera0.0.3 andpipewire-libcamera0.3.65 keep using 0.0.3.
This HOWTO does not install the PipeWire 1.6 / GStreamer 0.7 camera-sharing stack from the backports repo. Those packages need a much newer GLib or a full PipeWire upgrade, so they are not safe on stock crimson. Camera-in-every-app (Firefox, Decoder, and so on) is therefore out of scope here.
Requirements
- A Librem 5 on PureOS crimson (arm64). Byzantium is not covered.
- A kernel with
CONFIG_DMABUF_HEAPS=yandCONFIG_DMABUF_HEAPS_CMA=y(see forum post #22). Both were set on the test phone’s6.18.0-1-librem5kernel. - A terminal on the phone, your sudo password, and network access. The ten
.debfiles below are about 4 MB in total;aptwill also pull some extra packages from crimson. - Do not add galilley’s repo to
/etc/apt/sources.listfor this.
1. Check the kernel
zcat /proc/config.gz | grep DMABUF_HEAPS
ls -l /dev/dma_heap/
You want both CONFIG_DMABUF_HEAPS=y and CONFIG_DMABUF_HEAPS_CMA=y. On the test phone, /dev/dma_heap was already usable by the user, so no udev rule was added. If your /dev/dma_heap/* nodes are owned by root with mode 0600, add the rule from forum post #9 after the install (see Troubleshooting).
2. Back up the current camera packages
mkdir -p ~/camera-rollback ~/lc07
cd ~/camera-rollback
dpkg -l | awk '/^ii/ && $2 ~ /libcamera|millipixels|pipewire-libcamera|libcpuinfo0/ {print $2"="$3}' | tee installed-before.txt
apt-get download $(cat installed-before.txt)
dpkg --get-selections > selections-before.txt
Stock crimson at the time of this write-up used libcamera 0.0.3-6, millipixels 0.24.0-0pureos1, and libcpuinfo0 0.0~git20220617.082deff-1+deb12u1. Saving the packages that are actually on your phone is safer than relying on those version numbers later.
3. Download and verify the packages
Download nine cherry-picked debs from galilley’s repo, and millipixels from the page above. Use the raw Codeberg URLs, not the HTML file pages. If sha256sum does not print OK for every file, stop and do not install.
These SHA256 hashes matched galilley’s Packages index dated 2026-11-07, and the same files downloaded again from his repo on 2026-11-23 still matched. They were also checked against local copies of the debs when this HOWTO was written.
| Package | Version | SHA256 |
|---|---|---|
| libcamera0.7 | 0.7.1-af2 | c36bb8f5e6bf39afebfabd61c0d201f593a561c517c369fa0b874ca424416ed5 |
| libcamera-ipa | 0.7.1-af2 | bbc21f901adaff741100e0a316278412532acd74808c739ff2939bbfc5014172 |
| libcamera-v4l2 | 0.7.1-af2 | 97278127339771e1b2e9265c5fcf52f49a8ad3bf24164e4c894c0eae1766823f |
| libcamera-tools | 0.7.1-af2 | ef862d08521e5cb1f004dd34e36a080956c006a555e30178fb7cedd638bebef4 |
| libpisp1 | 1.2.1-2 | a4b140aa8b4fc8c66eb58bdb9975712f87cac7c54c621524258b90f817dd8ce5 |
| libpisp-common | 1.2.1-2 (all) | 17bf3e96865d3a6497ab7617cd2d55f04fe09cac8cbb2f89105f65c0c2d4f10a |
| libtensorflow-lite2.14.1 | 2.14.1+dfsg-3.1 | 8b0175a6ec6f2e5b8d3fd10eb60e63ddc762d1d894890feceb73ef0ae8c66916 |
| libabsl20240722 | 20240722.0-4 | 24e5d389b8a5121eee80da3f3a1bb11426fdaa9a7c8a80273e859c9635aa6a49 |
| libcpuinfo0 | 0.0~git20250327.39ea79a-1 | 1e14a95ec33612aa1e75da8db6b7fb5ae64e2219fa03d02f2e1d9aa6418d79c1 |
| millipixels | 0.24.0-0pureos1+seth1 | 968cdd1dd12c9897e62bd5667f0b98b3ea4c63af71d495eef549b0e2d03ab097 |
libcamera0.7 installs alongside crimson’s libcamera0.0.3, with no file overlaps. libcpuinfo0 is the only upgrade of a package crimson already has (from 0.0~git20220617.082deff-1+deb12u1). libtensorflow-lite2.14.1 and libabsl20240722 are needed only because galilley’s libcamera-ipa links tflite; only the Raspberry Pi IPA uses it.
cd ~/lc07
B=https://codeberg.org/galilley/librem5-crimson-backports/raw/branch/master/debs
wget https://emerald-lemon-q564.here.now/source/build-recipe/galilley-debs.SHA256SUMS
for f in libcamera0.7_0.7.1-af2_arm64.deb libcamera-ipa_0.7.1-af2_arm64.deb \
libcamera-v4l2_0.7.1-af2_arm64.deb libcamera-tools_0.7.1-af2_arm64.deb \
libpisp1_1.2.1-2_arm64.deb libpisp-common_1.2.1-2_all.deb \
libtensorflow-lite2.14.1_2.14.1+dfsg-3.1_arm64.deb \
libabsl20240722_20240722.0-4_arm64.deb \
'libcpuinfo0_0.0~git20250327.39ea79a-1_arm64.deb'; do
wget "$B/$f"
done
sha256sum --ignore-missing -c galilley-debs.SHA256SUMS
--ignore-missing is there because that SHA256SUMS file also lists libcamera-dev, which you only need if you are rebuilding millipixels yourself. All nine packages above must print OK.
cd ~/lc07
wget https://emerald-lemon-q564.here.now/millipixels_0.24.0-0pureos1+seth1_arm64.deb
echo "968cdd1dd12c9897e62bd5667f0b98b3ea4c63af71d495eef549b0e2d03ab097 millipixels_0.24.0-0pureos1+seth1_arm64.deb" | sha256sum -c
4. Install and hold
Read apt’s summary before you confirm. It must remove nothing, and it must not upgrade glib, gtk, gstreamer, pipewire, mesa, or libc.
cd ~/lc07
sudo apt install --no-install-recommends ./libcamera0.7_*.deb ./libcamera-ipa_*.deb ./libcamera-v4l2_*.deb \
./libcamera-tools_*.deb ./libpisp1_*.deb ./libpisp-common_*.deb ./libtensorflow-lite2.14.1_*.deb \
./libabsl20240722_*.deb ./libcpuinfo0_*.deb
Then install millipixels:
sudo apt install --no-install-recommends ./millipixels_0.24.0-0pureos1+seth1_arm64.deb
On the test phone, apt reported 1 upgraded, 28 newly installed, 0 removed. The upgrade was millipixels. The new packages were the nine cherry-picked debs plus stock crimson packages such as Qt 6.4, Boost 1.74, libyuv0, libfarmhash0, and libpthreadpool0. GLib stayed at 2.74.6. Your counts may differ if some of those crimson packages are already installed.
Hold the backported packages so a later apt upgrade cannot replace them. A future PureOS millipixels (for example 0.24.0-0pureos2) would sort higher than +seth1 and would need libcamera 0.0.3 again.
sudo apt-mark hold libcamera0.7 libcamera-ipa libcamera-v4l2 libcamera-tools libcpuinfo0 millipixels
Leave libcamera0.0.3 installed. Ignore apt’s autoremove suggestion for it until you are sure you will not roll back.
5. Test and usage
cam -l
On the test phone this listed the front hi846 and back s5k3l6xx through the simple pipeline (soft ISP). It warned “no sensor helper” for both, which is expected for this build.
You can also try a still capture, then open millipixels:
cam -c1 -C5 -F/tmp/frame#.ppm
millipixels
Check that the millipixels log mentions libcamera v0.7.1, then try preview, autofocus, photo, and video. Please report how that goes; those steps were not verified on the test phone when this was written.
Troubleshooting
apt wants to remove packages, or to upgrade GLib, GTK, GStreamer, PipeWire, Mesa, or libc. Abort. You have the wrong set of debs, or a package that does not belong in this cherry-pick.
Do not install galilley’s millipixels 0.24.0-0pureos2 or gstreamer1.0-libcamera 0.7.1-af2. Both need GLib 2.80 or newer; crimson has 2.74.6, and installing them would pull GLib 2.86.
Do not install pipewire-libcamera or libspa-0.2-libcamera 1.6.9-3-cbu. Those need libspa-0.2-modules (= 1.6.9-3-cbu), which means a full PipeWire 1.6.9 upgrade, and would overwrite a file from crimson’s pipewire-libcamera 0.3.65.
sha256sum does not say OK. The file on Codeberg or the millipixels page may have been replaced. Stop. Do not install it.
Invalid archive signature when installing a .deb. The download is probably a Codeberg HTML page. Use the raw URL from the commands above and check the hash.
cam -l says “no sensor helper”. Expected for this build.
Permission denied on /dev/dma_heap. Add the udev rule from forum post #9:
echo 'SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"' | sudo tee /etc/udev/rules.d/90-libcamera.rules
sudo udevadm control --reload && sudo udevadm trigger -s dma_heap
The kernel has no CONFIG_DMABUF_HEAPS. Soft-ISP / GPU debayer needs it. This HOWTO does not cover rebuilding the kernel.
I wanted the camera in every app (Firefox, Decoder, GNOME Camera, and so on). That path uses PipeWire camera sharing and is what the original thread is about. It is out of scope here, because the backports PipeWire camera packages are not installable on stock crimson without a full PipeWire 1.6 upgrade.
Uninstall / rollback to stock libcamera and millipixels
Just millipixels:
sudo apt-mark unhold millipixels
sudo apt install --allow-downgrades millipixels=0.24.0-0pureos1
Or, from the backup you saved in step 2:
sudo apt-mark unhold millipixels
sudo apt install --allow-downgrades ~/camera-rollback/millipixels_0.24.0-0pureos1_arm64.deb
Everything:
sudo apt-mark unhold libcamera0.7 libcamera-ipa libcamera-v4l2 libcamera-tools libcpuinfo0 millipixels
sudo apt install --allow-downgrades libcamera-ipa=0.0.3-6 libcamera-v4l2=0.0.3-6 libcamera-tools=0.0.3-6 \
libcpuinfo0=0.0~git20220617.082deff-1+deb12u1 millipixels=0.24.0-0pureos1
Or, from the saved debs:
sudo apt-mark unhold libcamera0.7 libcamera-ipa libcamera-v4l2 libcamera-tools libcpuinfo0 millipixels
sudo apt install --allow-downgrades ~/camera-rollback/*.deb
Then remove the packages crimson does not need, and the udev rule if you added one:
sudo apt purge libcamera0.7 libpisp1 libpisp-common libtensorflow-lite2.14.1 libabsl20240722
sudo rm -f /etc/udev/rules.d/90-libcamera.rules
diff <(dpkg --get-selections) ~/camera-rollback/selections-before.txt
Credits
- galilley, for the libcamera 0.7.1-af2 packages and Crimson Backports. Announcement and discussion: Librem 5 camera to use everywhere, post #27. There is also a Crimson Backports thread.
- NekoCWD, for the soft-ISP autofocus work that af2 is built on (gitlab.com/NekoCWD/libcamera, branch
nekocwd/softisp-playground). - millipixels by Purism / PureOS (source.puri.sm/Librem5/megapixels).
- libcamera.
- Grok Bot for HOWTO write-up.
millipixels is GPL-3.0-or-later. The rebuild and its corresponding source are at https://emerald-lemon-q564.here.now/source/. The libcamera packages are galilley’s and are not redistributed there, because that repo publishes no source packages or license statement.