Name: fairphone-fp6-support Version: 0.1 Release: 11%{?dist} Summary: Device support for running Fedora on the Fairphone (Gen. 6) # Config snippets adapted from postmarketOS device-fairphone-fp6 / soc-qcom (MIT) License: MIT URL: https://github.com/milos-mainline/linux Source0: fp6-bootimg Source1: 95-fp6-bootimg.install Source2: fp6-boot.conf Source3: 90-fairphone-fp6.conf Source4: fp6-usb-gadget Source5: fp6-usb-gadget.service Source6: fp6-usb.nmconnection Source7: 80-fairphone-fp6.preset Source8: machine-info Source9: 50-fairphone-fp6-upower.conf Source10: 51-qcom.conf Source11: mm-quick-suspend-resume.conf Source12: modem-gnss.service Source13: fp6-remoteproc-start Source14: fp6-remoteproc-start.service # TEMPORARY: one-shot upgrade helper for development phones, drop in the next release Source15: fp6-fixup Source16: fp6-charge-test # Only scripts and config files: noarch (fixes the empty debuginfo error) BuildArch: noarch BuildRequires: systemd-rpm-macros # Boot image creation Requires: android-tools Requires: dracut Requires: util-linux Requires: systemd-udev # Qualcomm remote processor helpers Requires: qrtr Requires: rmtfs Requires: tqftpserv Requires: qbootctl # USB networking Requires: NetworkManager Requires: dnsmasq Requires: kmod Recommends: kernel-fp6 Recommends: fairphone-fp6-firmware Recommends: ModemManager Recommends: libqmi-utils %description Boot integration and hardware configuration for the Fairphone (Gen. 6): - kernel-install plugin that turns each kernel-fp6 + initramfs into an Android boot.img and flashes the newest one to the active boot slot - dracut settings (generic initramfs, early panel/touch drivers) - USB network gadget so the phone is reachable at 172.16.42.1 over the cable - Qualcomm service presets, ModemManager/GNSS, UPower and WirePlumber tweaks taken from postmarketOS. %prep %setup -q -c -T %build %install install -Dm0755 %{SOURCE0} %{buildroot}%{_libexecdir}/fp6-boot/fp6-bootimg install -Dm0755 %{SOURCE1} %{buildroot}%{_prefix}/lib/kernel/install.d/95-fp6-bootimg.install install -Dm0644 %{SOURCE2} %{buildroot}%{_datadir}/fp6-boot/fp6-boot.conf install -Dm0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/dracut/dracut.conf.d/90-fairphone-fp6.conf install -Dm0755 %{SOURCE4} %{buildroot}%{_libexecdir}/fp6-boot/fp6-usb-gadget install -Dm0644 %{SOURCE5} %{buildroot}%{_unitdir}/fp6-usb-gadget.service install -Dm0600 %{SOURCE6} %{buildroot}%{_prefix}/lib/NetworkManager/system-connections/fp6-usb.nmconnection install -Dm0644 %{SOURCE7} %{buildroot}%{_presetdir}/80-fairphone-fp6.preset install -Dm0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/machine-info install -Dm0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/UPower/UPower.conf.d/50-fairphone-fp6.conf install -Dm0644 %{SOURCE10} %{buildroot}%{_datadir}/wireplumber/wireplumber.conf.d/51-qcom.conf install -Dm0644 %{SOURCE11} %{buildroot}%{_unitdir}/ModemManager.service.d/quick-suspend-resume.conf install -Dm0644 %{SOURCE12} %{buildroot}%{_unitdir}/modem-gnss.service install -Dm0755 %{SOURCE13} %{buildroot}%{_libexecdir}/fp6-boot/fp6-remoteproc-start install -Dm0644 %{SOURCE14} %{buildroot}%{_unitdir}/fp6-remoteproc-start.service install -Dm0755 %{SOURCE15} %{buildroot}%{_bindir}/fp6-fixup install -Dm0755 %{SOURCE16} %{buildroot}%{_bindir}/fp6-charge-test # The phone boots an Android boot.img, not BLS entries: skip loader entries and # dracut rescue images that would only fill /boot install -d %{buildroot}%{_sysconfdir}/kernel/install.d ln -s /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/90-loaderentry.install ln -s /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/51-dracut-rescue.install %post %systemd_post fp6-usb-gadget.service modem-gnss.service fp6-remoteproc-start.service %preun %systemd_preun fp6-usb-gadget.service modem-gnss.service fp6-remoteproc-start.service %postun %systemd_postun fp6-usb-gadget.service modem-gnss.service fp6-remoteproc-start.service %files %{_libexecdir}/fp6-boot/ %{_bindir}/fp6-fixup %{_bindir}/fp6-charge-test %{_prefix}/lib/kernel/install.d/95-fp6-bootimg.install %{_datadir}/fp6-boot/ %{_prefix}/lib/dracut/dracut.conf.d/90-fairphone-fp6.conf %{_unitdir}/fp6-usb-gadget.service %{_unitdir}/modem-gnss.service %{_unitdir}/fp6-remoteproc-start.service %dir %{_unitdir}/ModemManager.service.d %{_unitdir}/ModemManager.service.d/quick-suspend-resume.conf %{_prefix}/lib/NetworkManager/system-connections/fp6-usb.nmconnection %{_presetdir}/80-fairphone-fp6.preset %config(noreplace) %{_sysconfdir}/machine-info %dir %{_sysconfdir}/UPower/UPower.conf.d %config(noreplace) %{_sysconfdir}/UPower/UPower.conf.d/50-fairphone-fp6.conf %{_datadir}/wireplumber/wireplumber.conf.d/51-qcom.conf %config(noreplace) %{_sysconfdir}/kernel/install.d/90-loaderentry.install %config(noreplace) %{_sysconfdir}/kernel/install.d/51-dracut-rescue.install %changelog * Sun Nov 08 2026 Steve Cossette - 0.1-11 - TEMPORARY fp6-charge-test: charging diagnostics + charge-limit test * Sun Nov 08 2026 Steve Cossette - 0.1-10 - TEMPORARY fp6-fixup: apply the 0.1-7..0.1-9 fixes on an already-flashed phone and write a battery/charging diagnostics report. Remove in the next release. * Sat Nov 07 2026 Steve Cossette - 0.1-9 - fp6-bootimg: find the active slot via FP6_SLOT, /proc/cmdline, /proc/bootconfig or qbootctl (the bootloader no longer puts androidboot.slot_suffix on the cmdline) * Sat Nov 07 2026 Steve Cossette - 0.1-8 - dracut: keep qcom_q6v5_pas out of the initramfs (ADSP/CDSP firmware load failed there with -2 and was never retried -> no battery gauge, audio DSP, CDSP) - fp6-remoteproc-start.service: start any remoteproc still offline after boot * Sat Nov 07 2026 Steve Cossette - 0.1-7 - Preset: enable only rmtfs.service (not rmtfs-dir), like pmOS; both together made the modem crash-loop. Don't enable tqftpserv-populate-readwrite. * Sat Nov 07 2026 Steve Cossette - 0.1-6 - USB gadget: wait up to 30s for the USB controller instead of failing at boot * Sat Nov 07 2026 Steve Cossette - 0.1-5 - boot.img: add AVB hash footer, write full partition images (bootloader needs the footer to know the image size; without it: "Load Error") - USB gadget: switch the port to device role so the phone is reachable over USB * Sat Nov 07 2026 Steve Cossette - 0.1-4 - dracut: no firmware in the initramfs (41 MB of Adreno/qcom fw), omit crypt/TPM/ i18n/resume/live modules * Sat Nov 07 2026 Steve Cossette - 0.1-3 - dracut: only panel + SPI modules in the initramfs (like pmOS), drop network/LVM/RAID modules; boot.img was 86 of 96 MiB * Sat Nov 07 2026 Steve Cossette - 0.1-2 - Make noarch (no compiled code, debuginfo generation failed) * Sat Nov 07 2026 Steve Cossette - 0.1-1 - Initial package