LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
0.8.4.1: Settings → Board firmware (rpi-eeprom-status/-update), rpi-eeprom mirrored in the APT repository (arm64, pinned and verified), browsers and the ISO's system packages in the Pi image
Federico Pereira9796cda39724
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a9a5f27..505288b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,71 @@ of the matching [GitHub release](https://github.com/lordbasex/LordOS/releases),## [Unreleased]+## [0.8.4.1-beta] - 2026-10-25++An update of 0.8.4 for the Raspberry Pi 5: its bootloader from Settings, the browsers in the Pi image,+and the Pi image itself, which 0.8.4 held back.++### Added++- **Settings → Board firmware (Raspberry Pi 5).** A new page, only on a Raspberry Pi 5 (and Pi 500,+ Compute Module 5), for the bootloader that lives in the board's EEPROM: the installed version, the+ newest one available, whether it is up to date, and **Update**. After updating it says a restart+ finishes the job and offers **Restart…**; the board installs the new bootloader as it starts,+ keeping its recovery path. This is LordOS's replacement for the bootloader part of+ `raspi-config` (ignore `rpi-eeprom-update`'s hint to run it). It runs only the system's+ `rpi-eeprom-update` with a fixed set of options, through two closed admin actions: reading the+ status is open to everyone, updating needs an administrator (`docs/SETTINGS.md`, "Board+ firmware").+- **The bootloader updater in the LordOS repository.** `rpi-eeprom` (the bootloader images and+ `rpi-eeprom-update`) and the few Raspberry Pi packages it needs (`raspi-utils` and its parts,+ `raspinfo`, `kms++`) are now mirrored in `lordos.org/apt` for arm64, copied from Raspberry Pi's+ archive only after its signature and every file's SHA-256 check out against a pinned list+ (`tools/release/rpi-mirror.list`). A Pi with only the LordOS and Debian repositories gets new+ bootloaders with the usual updates; PCs never see these packages (`docs/UPDATES.md`, "Raspberry+ Pi firmware packages").+- **Browsers in the Raspberry Pi image.** Chromium and Firefox ESR come preinstalled, as on the ISO,+ with the same defaults: a single bar with their tabs and LordOS's window buttons, the LordOS GTK+ theme and the video settings of Settings → Displays → Video (the defaults are now one script+ shared by both images, `tools/iso/browser-defaults.sh`).+- **The rest of the ISO's system packages in the Pi image:** automatic time (`systemd-timesyncd`),+ printing (`cups`, `avahi-daemon`), exFAT and NTFS drives, power profiles, the MIME database and+ the GTK settings schemas. The first user is also allowed to manage printers (`lpadmin`), as on a PC.++### Fixed++- **Raspberry Pi 5 on an HDMI monitor stayed on the text console** ("no display device with KMS").+ The firmware ignored the display driver line in the image's `config.txt` because it came before+ the `display_auto_detect` and `camera_auto_detect` lines; it now comes after them. Together with+ 0.8.4's longer wait for the display driver, the desktop shows on HDMI at the first boot.+- **The Pi image's clock.** The board keeps no time without a battery and the image had no network+ time client, so it started months behind and every update failed with "not valid yet". It now+ sets the time from the network at boot.++### Known issues and limitations++- **A Pi set up from the 0.8.3 image** has no network time client: if Store → Updates fails, set the+ time in Settings → Date & Time first, then install `systemd-timesyncd` from the Store.+- **The bootloader release** (*Default* or *Latest*) is shown but not changed from Settings: it is+ `/etc/default/rpi-eeprom-update`, a file of the `rpi-eeprom` package.+- **Raspberry Pi archive on the Pi image.** The image still lists Raspberry Pi's archive, limited by+ apt priorities to the firmware, kernel tools and utilities; the Store's own package engine does+ not read apt priorities yet, so "Update all" there may take Raspberry Pi's builds of a few+ packages (such as Chromium or BlueZ) instead of Debian's. `apt` follows the priorities.+- **`install.sh` does not install browsers** (on a Raspberry Pi OS Lite or any Debian 13): install+ Chromium or Firefox ESR from the Store if the system has none (`docs/INSTALL-DEBIAN.md`).++### Upgrading++- **From 0.8.4 (and 0.8.3 to 0.8.1):** Store → Updates shows "LordOS 0.8.4.1 is available" with+ these notes; **Update** installs it and a restart finishes it. `sudo apt update && sudo apt+ upgrade` does the same. No migration runs (`ls /var/lib/lordos/migrations` is unchanged from+ 0.8.4); your settings are kept. On a PC nothing else changes.+- **Raspberry Pi 5:** after the update, Settings shows **Board firmware**. If it says+ "The bootloader tools are not installed", **Install** adds `rpi-eeprom` from the LordOS+ repository. The browsers and the other image packages above are not added to a board that is+ already set up: install them from the Store.+## [0.8.4-beta] - 2026-10-19### Added@@ -1246,7 +1311,8 @@ we published. See [docs/SIGNING.md](docs/SIGNING.md).Never published; superseded by 0.8.0-beta.-[Unreleased]: https://github.com/lordbasex/LordOS/compare/v0.8.4-beta...HEAD+[Unreleased]: https://github.com/lordbasex/LordOS/compare/v0.8.4.1-beta...HEAD+[0.8.4.1-beta]: https://github.com/lordbasex/LordOS/compare/v0.8.4-beta...v0.8.4.1-beta[0.8.4-beta]: https://github.com/lordbasex/LordOS/compare/v0.8.3-beta...v0.8.4-beta[0.8.3-beta]: https://github.com/lordbasex/LordOS/compare/v0.8.2-beta...v0.8.3-beta[0.8.2-beta]: https://github.com/lordbasex/LordOS/compare/v0.8.1-beta...v0.8.2-betadiff --git a/apps/settings/Firmware.jsx b/apps/settings/Firmware.jsxnew file mode 100644index 0000000..ae8f56e--- /dev/null+++ b/apps/settings/Firmware.jsx@@ -0,0 +1,98 @@+// Settings → Board firmware (only on a BCM2712 board: Raspberry Pi 5, 500, CM5): the bootloader in+// the board's EEPROM, the newest one the installed rpi-eeprom package carries, and Update. Two closed+// admin actions do the work (server/src/hw/hw_admin.c): rpi-eeprom-status (read-only, anyone) and+// rpi-eeprom-update (administrators), both running only /usr/bin/rpi-eeprom-update with a fixed+// argument list; the reply is "<uptodate|available|pending> <current> <latest> <release>". The+// update is finished by the board itself at the next restart. See docs/SETTINGS.md, "Board firmware".+import { View, Text, useTheme, useLocale, Button, admin, session, useSystemInfo, spacing, typeScale } from '@lordos/sdk';+import { useEffect, useState } from 'react';+import { GroupBox, ValueRow, Note, Stack, StatusDot, Actions, tint } from './ui.jsx';++const PACKAGE = 'rpi-eeprom';+const RELEASES = ['default', 'latest'];++// The helper's OK line, checked again here (it comes from the root side, already validated there).+export function parseEepromStatus(line) {+ const m = /^(uptodate|available|pending) (\d{1,10}) (\d{1,10}) ([a-z]{1,15})$/.exec(String(line || ''));+ if (!m) return null;+ return { state: m[1], current: Number(m[2]), latest: Number(m[3]), release: m[4] };+}++export function FirmwareSettings() {+ const t = useTheme();+ const { t: tr, formatDate } = useLocale();+ const info = useSystemInfo(60000);+ const [st, setSt] = useState(undefined); // undefined: asking; null: failed (err says why)+ const [err, setErr] = useState(null);+ const [busy, setBusy] = useState(''); // '' | 'check' | 'update' | 'install'+ const isAdmin = !!info.admin && admin.available();++ const check = () => {+ setBusy('check');+ return admin.run('rpi-eeprom-status', '', null, { quiet: true }).then((ok) => {+ const s = parseEepromStatus(ok);+ setSt(s);+ setErr(s ? null : { code: 'hw.eepromFailed', text: tr('errors.hw.eepromFailed') });+ }, (e) => { setSt(null); setErr({ code: e.code, text: e.message }); }).finally(() => setBusy(''));+ };+ useEffect(() => { check(); }, []);++ const update = () => {+ setBusy('update');+ admin.run('rpi-eeprom-update', '', null, { quiet: true }).then((ok) => {+ const s = parseEepromStatus(ok);+ if (s) { setSt(s); setErr(null); } else check();+ }, (e) => setErr({ code: e.code, text: e.message })).finally(() => setBusy(''));+ };++ // rpi-eeprom missing (a board set up by hand): offer it, with the package engine+ const install = () => {+ setBusy('install');+ const go = () => admin.run('pkg-install', PACKAGE);+ go().catch((e) => {+ if (e.code !== 'pkg.noIndex') throw e;+ return admin.run('pkg-update', '').then(go);+ }).then(() => check(), (e) => { setErr({ code: e.code, text: e.message }); setBusy(''); });+ };++ const day = (ts) => (ts ? formatDate(new Date(ts * 1000), 'long') : tr('settings.firmware.unknown'));+ const missing = err?.code === 'hw.noEeprom';+ const canRestart = typeof session.canPower === 'function' && session.canPower();+ const state = st?.state;+ const color = state === 'uptodate' ? tint.ok : state === 'available' ? tint.warn : state === 'pending' ? tint.warn : tint.off;+ const stateText = state ? tr(`settings.firmware.state.${state}`) : busy === 'check' ? tr('settings.firmware.checking') : '—';+ const releaseText = st ? (RELEASES.includes(st.release) ? tr(`settings.firmware.release.${st.release}`) : st.release) : '—';++ return (+ <Stack>+ <GroupBox title={tr('settings.firmware.bootloader')} footer={tr('settings.firmware.hint')}>+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: spacing.s, paddingVertical: spacing.m }}>+ <StatusDot color={color} size={10} />+ <Text style={{ flex: 1, minWidth: 0, fontSize: typeScale.headline, fontWeight: 600, color: t.text, textAlign: 'start' }}>{stateText}</Text>+ </View>+ <ValueRow label={tr('settings.firmware.current')} value={st ? day(st.current) : '—'} />+ <ValueRow label={tr('settings.firmware.latest')} value={st ? day(st.latest) : '—'} />+ <ValueRow label={tr('settings.firmware.releaseLabel')} value={releaseText} />+ <Actions style={{ paddingVertical: spacing.s }}>+ <Button small label={tr('settings.firmware.check')} onClick={check} disabled={!!busy} />+ {state === 'available' && (+ <Button small primary label={busy === 'update' ? tr('settings.firmware.updating') : tr('settings.firmware.update')}+ onClick={update} disabled={!!busy || !isAdmin} />+ )}+ {state === 'pending' && canRestart && <Button small primary label={tr('settings.firmware.restart')} onClick={() => session.restart()} />}+ </Actions>+ </GroupBox>+ {state === 'pending' && <Note tone="warn">{tr(canRestart ? 'settings.firmware.pendingHint' : 'settings.firmware.pendingHow')}</Note>}+ {state === 'available' && !isAdmin && <Note>{tr('settings.firmware.needAdmin')}</Note>}+ {busy === 'update' && <Note>{tr('settings.firmware.updatingHint')}</Note>}+ {missing ? (+ <GroupBox footer={tr('settings.firmware.missingHint')}>+ <ValueRow label={tr('settings.firmware.missing')} value="">+ <Button small label={busy === 'install' ? tr('settings.firmware.installing') : tr('settings.firmware.install')}+ onClick={install} disabled={!!busy || !isAdmin} />+ </ValueRow>+ </GroupBox>+ ) : err ? <Note tone="error">{err.text}</Note> : null}+ </Stack>+ );+}diff --git a/apps/settings/index.jsx b/apps/settings/index.jsxindex c165ed8..451d6bf 100644--- a/apps/settings/index.jsx+++ b/apps/settings/index.jsx@@ -27,6 +27,7 @@ import { CoolingSettings } from './Cooling.jsx';import { NotificationsSettings } from './Notifications.jsx';import { DateTimeSettings } from './DateTime.jsx';import { DefaultAppsSettings } from './DefaultApps.jsx';+import { FirmwareSettings } from './Firmware.jsx';import { Stack, Section, SettingRow, ValueRow, Badge, Note, Message, Actions, PopUp, shade } from './ui.jsx';export function Icon({ size: s }) {@@ -519,16 +520,33 @@ function FanGlyph() {);}+// A chip: a square body with three pins on each side.+function ChipGlyph() {+ return (+ <View style={{ width: 14, height: 14, direction: 'ltr' }}>+ <View style={{ position: 'absolute', left: 3, top: 3, width: 8, height: 8, borderRadius: 1.5, backgroundColor: '#fff' }} />+ {[4, 6.5, 9].map((y) => (+ <View key={y}>+ <View style={{ position: 'absolute', left: 0, top: y - 0.5, width: 3, height: 1.5, backgroundColor: '#fff' }} />+ <View style={{ position: 'absolute', left: 11, top: y - 0.5, width: 3, height: 1.5, backgroundColor: '#fff' }} />+ </View>+ ))}+ </View>+ );+}+// Sidebar groups (as in TangoOS): [id, component, icon color, symbol (a glyph or a component)].const GROUPS = [[['general', General, '#8e8e93', 'i'], ['appearance', Appearance, '#3a3a3c', '◐'], ['wallpaper', Wallpapers, '#30b0c7', '▣'], ['dock', DockSettings, '#3a3a3c', '▁'], ['displays', DisplaysSettings, '#0a84ff', '▭']],[['network', NetworkSettings, '#0a84ff', '⇅'], ['bluetooth', BluetoothSettings, '#0a84ff', 'ᛒ'], ['sound', SoundSettings, '#ff375f', '♪'], ['notifications', NotificationsSettings, '#ff3b30', '◉'], ['printers', PrintersSettings, '#636366', '⎙'], ['clipboard', ClipboardSettings, '#5e5ce6', '⎘'], ['sharing', SharingSettings, '#34c759', '⇄']],[['language', LanguageRegion, '#30b0c7', 'A'], ['datetime', DateTimeSettings, '#0a84ff', '◷'], ['keyboard', Keyboard, '#8e8e93', '⌨'], ['trackpad', TrackpadSettings, '#8e8e93', '▭'], ['defaultapps', DefaultAppsSettings, '#8e8e93', '◫']],- [['power', PowerSettings, '#30d158', BoltGlyph], ['cooling', CoolingSettings, '#32ade6', FanGlyph], ['privacy', PrivacySettings, '#0a84ff', LockGlyph], ['users', UsersSettings, '#0a84ff', '☺'], ['updates', Updates, '#8e8e93', '↻'], ['themes', Themes, '#ff9f0a', '◧'], ['session', Session, '#ff453a', '↪']],+ [['power', PowerSettings, '#30d158', BoltGlyph], ['cooling', CoolingSettings, '#32ade6', FanGlyph], ['firmware', FirmwareSettings, '#5e5ce6', ChipGlyph], ['privacy', PrivacySettings, '#0a84ff', LockGlyph], ['users', UsersSettings, '#0a84ff', '☺'], ['updates', Updates, '#8e8e93', '↻'], ['themes', Themes, '#ff9f0a', '◧'], ['session', Session, '#ff453a', '↪']],];const SECTIONS = GROUPS.flat();-// Trackpad only if there is a touchpad (lord-sessiond lends them with the monitor)-const sectionShown = (id, hasPad) => id !== 'trackpad' || hasPad;+// Trackpad only if there is a touchpad (lord-sessiond lends them with the monitor); Board firmware+// only on a BCM2712 board (Raspberry Pi 5, 500, CM5: lord.system.info().board)+const isPi5 = () => { try { return lord.system.info().board === 'pi5'; } catch (e) { return false; } };+const sectionShown = (id, hasPad, pi5 = isPi5()) => (id !== 'trackpad' || hasPad) && (id !== 'firmware' || pi5);// The Dock's right-click menu lists every section, in the sidebar's order and with its names; one// opens Settings on that page (sdk/dock.js, quick actions). Built from SECTIONS, so it never drifts.@@ -581,7 +599,8 @@ export default function Settings() {const q = query.trim().toLowerCase();// Trackpad only if there is a touchpad (lord-sessiond lends them with the monitor)const hasPad = useTrackpads().some((d) => d.kind === 'touchpad');- const visible = (id) => sectionShown(id, hasPad) && `${tr(`settings.section.${id}`)} ${tr(`settings.keywords.${id}`)}`.toLowerCase().includes(q);+ const [pi5] = useState(isPi5);+ const visible = (id) => sectionShown(id, hasPad, pi5) && `${tr(`settings.section.${id}`)} ${tr(`settings.keywords.${id}`)}`.toLowerCase().includes(q);const groups = GROUPS.map((g) => g.filter(([id]) => visible(id))).filter((g) => g.length);return (<View style={{ flex: 1, flexDirection: 'row' }}>diff --git a/assets/locales/en/errors.json b/assets/locales/en/errors.jsonindex 59413a7..17ecc64 100644--- a/assets/locales/en/errors.json+++ b/assets/locales/en/errors.json@@ -540,6 +540,10 @@"fan.unavailable": "The fan service is not running","hw.notRaspberryPi5": "This only works on a Raspberry Pi 5","hw.caseFailed": "Could not save the case settings",+ "hw.noEeprom": "The bootloader tools (rpi-eeprom) are not installed",+ "hw.eepromFailed": "Could not read the bootloader version",+ "hw.eepromFrozen": "The bootloader version is frozen in its configuration, so it is not updated",+ "hw.eepromUpdateFailed": "Could not update the bootloader (code {code})","fw.restricted.camera": "{app} is restricted from using the camera (Privacy → App network access)","fw.restricted.microphone": "{app} is restricted from using the microphone (Privacy → App network access)","fw.restricted.screen": "{app} is restricted from capturing the screen (Privacy → App network access)",diff --git a/assets/locales/en/settings.json b/assets/locales/en/settings.jsonindex 8f157d2..446d876 100644--- a/assets/locales/en/settings.json+++ b/assets/locales/en/settings.json@@ -268,6 +268,32 @@"keywords.defaultapps": "default apps browser mail music video images pdf text editor terminal open with mimeapps","section.cooling": "Cooling","keywords.cooling": "fan fans temperature cooling heat noise curve case full speed",+ "section.firmware": "Board firmware",+ "keywords.firmware": "firmware bootloader eeprom raspberry pi update boot",+ "firmware.bootloader": "Bootloader",+ "firmware.hint": "The bootloader lives in a chip on the board and starts it before the system. New versions come with system updates (the rpi-eeprom package); installing one takes effect at the next restart. Don't unplug the power while the board restarts.",+ "firmware.state.uptodate": "Up to date",+ "firmware.state.available": "Update available",+ "firmware.state.pending": "Update ready: restart to finish",+ "firmware.checking": "Checking…",+ "firmware.unknown": "Unknown",+ "firmware.current": "Installed",+ "firmware.latest": "Latest available",+ "firmware.releaseLabel": "Release",+ "firmware.release.default": "Default (recommended)",+ "firmware.release.latest": "Latest (newer features)",+ "firmware.check": "Check Again",+ "firmware.update": "Update",+ "firmware.updating": "Updating…",+ "firmware.updatingHint": "Preparing the new bootloader. This can take up to a minute.",+ "firmware.restart": "Restart…",+ "firmware.pendingHint": "The new bootloader is installed when the board restarts. Keep the power connected until the desktop is back.",+ "firmware.pendingHow": "The new bootloader is installed when the board restarts: log out and choose Restart on the login screen. Keep the power connected until it is back.",+ "firmware.needAdmin": "Only an administrator can update the bootloader.",+ "firmware.missing": "The bootloader tools are not installed",+ "firmware.missingHint": "LordOS updates the bootloader with the rpi-eeprom package, from the LordOS repository.",+ "firmware.install": "Install",+ "firmware.installing": "Installing…","reduceMotion": "Reduce motion","reduceMotionHint": "Stops decorative animations, like the spinning fan in Cooling.","scrollBars": "Show scroll bars",diff --git a/assets/locales/es/errors.json b/assets/locales/es/errors.jsonindex 1865a74..ea1e9b3 100644--- a/assets/locales/es/errors.json+++ b/assets/locales/es/errors.json@@ -540,6 +540,10 @@"fan.unavailable": "El servicio de ventiladores no está en marcha","hw.notRaspberryPi5": "Esto solo funciona en una Raspberry Pi 5","hw.caseFailed": "No se pudo guardar la configuración de la caja",+ "hw.noEeprom": "Las herramientas del cargador de arranque (rpi-eeprom) no están instaladas",+ "hw.eepromFailed": "No se pudo leer la versión del cargador de arranque",+ "hw.eepromFrozen": "La versión del cargador de arranque está congelada en su configuración, así que no se actualiza",+ "hw.eepromUpdateFailed": "No se pudo actualizar el cargador de arranque (código {code})","fw.restricted.camera": "{app} tiene restringido el uso de la cámara (Privacidad → Red de las apps)","fw.restricted.microphone": "{app} tiene restringido el uso del micrófono (Privacidad → Red de las apps)","fw.restricted.screen": "{app} tiene restringida la captura de pantalla (Privacidad → Red de las apps)",diff --git a/assets/locales/es/settings.json b/assets/locales/es/settings.jsonindex ba34e60..0680b7b 100644--- a/assets/locales/es/settings.json+++ b/assets/locales/es/settings.json@@ -268,6 +268,32 @@"keywords.defaultapps": "apps por defecto predeterminadas navegador correo música video imágenes pdf editor de texto terminal abrir con","section.cooling": "Refrigeración","keywords.cooling": "ventilador ventiladores temperatura refrigeración calor ruido curva caja a tope fan cooling",+ "section.firmware": "Firmware de la placa",+ "keywords.firmware": "firmware bootloader cargador de arranque eeprom raspberry pi actualizar arranque",+ "firmware.bootloader": "Cargador de arranque",+ "firmware.hint": "El cargador de arranque vive en un chip de la placa y la enciende antes que el sistema. Las versiones nuevas llegan con las actualizaciones del sistema (el paquete rpi-eeprom); instalar una tiene efecto en el próximo reinicio. No desconectes la alimentación mientras la placa se reinicia.",+ "firmware.state.uptodate": "Al día",+ "firmware.state.available": "Hay una actualización",+ "firmware.state.pending": "Actualización lista: reiniciá para terminar",+ "firmware.checking": "Comprobando…",+ "firmware.unknown": "Desconocida",+ "firmware.current": "Instalado",+ "firmware.latest": "Último disponible",+ "firmware.releaseLabel": "Versión",+ "firmware.release.default": "Predeterminada (recomendada)",+ "firmware.release.latest": "Última (funciones nuevas)",+ "firmware.check": "Comprobar de nuevo",+ "firmware.update": "Actualizar",+ "firmware.updating": "Actualizando…",+ "firmware.updatingHint": "Preparando el cargador de arranque nuevo. Puede tardar hasta un minuto.",+ "firmware.restart": "Reiniciar…",+ "firmware.pendingHint": "El cargador de arranque nuevo se instala cuando la placa se reinicia. Mantené la alimentación conectada hasta que vuelva el escritorio.",+ "firmware.pendingHow": "El cargador de arranque nuevo se instala cuando la placa se reinicia: cerrá la sesión y elegí Reiniciar en la pantalla de inicio. Mantené la alimentación conectada hasta que vuelva.",+ "firmware.needAdmin": "Solo un administrador puede actualizar el cargador de arranque.",+ "firmware.missing": "Las herramientas del cargador de arranque no están instaladas",+ "firmware.missingHint": "LordOS actualiza el cargador de arranque con el paquete rpi-eeprom, del repositorio de LordOS.",+ "firmware.install": "Instalar",+ "firmware.installing": "Instalando…","reduceMotion": "Reducir movimiento","reduceMotionHint": "Detiene las animaciones decorativas, como el ventilador que gira en Refrigeración.","scrollBars": "Mostrar barras de desplazamiento",diff --git a/assets/locales/pt/errors.json b/assets/locales/pt/errors.jsonindex ebe7491..ff831bc 100644--- a/assets/locales/pt/errors.json+++ b/assets/locales/pt/errors.json@@ -540,6 +540,10 @@"fan.unavailable": "O serviço de ventoinhas não está em execução","hw.notRaspberryPi5": "Isto só funciona em um Raspberry Pi 5","hw.caseFailed": "Não foi possível salvar as configurações do gabinete",+ "hw.noEeprom": "As ferramentas do carregador de inicialização (rpi-eeprom) não estão instaladas",+ "hw.eepromFailed": "Não foi possível ler a versão do carregador de inicialização",+ "hw.eepromFrozen": "A versão do carregador de inicialização está congelada na configuração dele, então não é atualizada",+ "hw.eepromUpdateFailed": "Não foi possível atualizar o carregador de inicialização (código {code})","fw.restricted.camera": "{app} está impedido de usar a câmera (Privacidade → Rede dos apps)","fw.restricted.microphone": "{app} está impedido de usar o microfone (Privacidade → Rede dos apps)","fw.restricted.screen": "{app} está impedido de capturar a tela (Privacidade → Rede dos apps)",diff --git a/assets/locales/pt/settings.json b/assets/locales/pt/settings.jsonindex a561538..3b70cb1 100644--- a/assets/locales/pt/settings.json+++ b/assets/locales/pt/settings.json@@ -268,6 +268,32 @@"keywords.defaultapps": "apps padrão navegador e-mail música vídeo imagens pdf editor de texto terminal abrir com","section.cooling": "Resfriamento","keywords.cooling": "ventoinha ventoinhas temperatura resfriamento calor ruído curva gabinete máxima fan cooling",+ "section.firmware": "Firmware da placa",+ "keywords.firmware": "firmware bootloader carregador de inicialização eeprom raspberry pi atualizar inicialização",+ "firmware.bootloader": "Carregador de inicialização",+ "firmware.hint": "O carregador de inicialização fica num chip da placa e a liga antes do sistema. As versões novas chegam com as atualizações do sistema (o pacote rpi-eeprom); instalar uma tem efeito na próxima reinicialização. Não desconecte a alimentação enquanto a placa reinicia.",+ "firmware.state.uptodate": "Atualizado",+ "firmware.state.available": "Atualização disponível",+ "firmware.state.pending": "Atualização pronta: reinicie para concluir",+ "firmware.checking": "Verificando…",+ "firmware.unknown": "Desconhecida",+ "firmware.current": "Instalado",+ "firmware.latest": "Mais recente disponível",+ "firmware.releaseLabel": "Versão",+ "firmware.release.default": "Padrão (recomendada)",+ "firmware.release.latest": "Mais recente (recursos novos)",+ "firmware.check": "Verificar de novo",+ "firmware.update": "Atualizar",+ "firmware.updating": "Atualizando…",+ "firmware.updatingHint": "Preparando o novo carregador de inicialização. Pode levar até um minuto.",+ "firmware.restart": "Reiniciar…",+ "firmware.pendingHint": "O novo carregador de inicialização é instalado quando a placa reinicia. Mantenha a alimentação conectada até a área de trabalho voltar.",+ "firmware.pendingHow": "O novo carregador de inicialização é instalado quando a placa reinicia: encerre a sessão e escolha Reiniciar na tela de login. Mantenha a alimentação conectada até ela voltar.",+ "firmware.needAdmin": "Só um administrador pode atualizar o carregador de inicialização.",+ "firmware.missing": "As ferramentas do carregador de inicialização não estão instaladas",+ "firmware.missingHint": "O LordOS atualiza o carregador de inicialização com o pacote rpi-eeprom, do repositório do LordOS.",+ "firmware.install": "Instalar",+ "firmware.installing": "Instalando…","reduceMotion": "Reduzir movimento","reduceMotionHint": "Para as animações decorativas, como a ventoinha girando em Resfriamento.","scrollBars": "Mostrar barras de rolagem",diff --git a/docs/COMPLIANCE.md b/docs/COMPLIANCE.mdindex 14bfc8f..04762da 100644--- a/docs/COMPLIANCE.md+++ b/docs/COMPLIANCE.md@@ -16,6 +16,16 @@ materials (SBOM) published with each release. The website summary is atwritten by `tools/iso/mkdeb.sh`), and each font ships its license text next to it(`assets/fonts/*-LICENSE.txt`).- Debian packages keep their own `/usr/share/doc/<package>/copyright` on the installed system.+- **Raspberry Pi packages mirrored in the LordOS APT repository** (arm64, since 0.8.4.1;+ `tools/release/rpi-mirror.list`, [UPDATES.md](UPDATES.md), "Raspberry Pi firmware packages") are+ copied byte for byte, each with its own `copyright` inside: `rpi-eeprom` (scripts BSD-3-Clause;+ bootloader images under Raspberry Pi's binary licence, which allows redistribution of unmodified+ binaries for use with Raspberry Pi devices with the notice), `raspi-utils` and its parts+ (BSD-3-Clause) and `kms++` (MPL-2.0). For the MPL-2.0 binaries the corresponding source is the+ `kms++` source package of the same version in Raspberry Pi's archive (`deb-src+ http://archive.raspberrypi.com/debian trixie main`) and upstream at+ `https://github.com/tomba/kmsxx`; before Raspberry Pi's archive drops that version, its source+ package has to be kept next to the binaries (open item).## The SBOMdiff --git a/docs/INSTALL-DEBIAN.md b/docs/INSTALL-DEBIAN.mdindex 8d138c1..ae787de 100644--- a/docs/INSTALL-DEBIAN.md+++ b/docs/INSTALL-DEBIAN.md@@ -68,7 +68,14 @@ this works even though the script itself comes through a pipe.(`NETWORK.md`). Only interfaces nobody manages get LordOS's DHCP;- **remote desktop**, which stays off (port 5673 closed; Settings → Sharing turns it on);- your home folder and your current desktop session. The display manager is only disabled for- the next boot; nothing is stopped while you are using it.+ the next boot; nothing is stopped while you are using it;+ - **browsers.** The ISO and the Raspberry Pi image preinstall Chromium and Firefox ESR; the+ installer doesn't (decided in 0.8.4.1): it also runs on servers and VPSs, where a few hundred+ megabytes of browsers are unwanted, and on a desktop Debian (or Raspberry Pi OS) the browser you+ already have keeps working inside LordOS. Install one from the Store if the system has none.+ Without the image's defaults (`tools/iso/browser-defaults.sh`) the browsers start with the+ LordOS frame; Settings → Appearance → «Browsers: tabs in the title bar» switches them to their+ own single bar.7. **Prints** what changed, how to start LordOS and how to uninstall.What it changed is recorded in `/var/lib/lordos-installer/state`, so `--uninstall` undoes exactlydiff --git a/docs/RASPBERRY.md b/docs/RASPBERRY.mdindex 6a1a3a4..35bd1eb 100644--- a/docs/RASPBERRY.md+++ b/docs/RASPBERRY.md@@ -56,7 +56,16 @@ SD card or an NVMe, and the same image boots on the Pi 5 and the Pi 4.### What it ships- **Debian 13 (trixie) arm64**, minbase, with the same LordOS packages as the ISO: PipeWire,- wpa_supplicant, OpenVPN, Noto, foot, FeatherPad.+ wpa_supplicant, OpenVPN, Noto, foot, FeatherPad, automatic time (`systemd-timesyncd`: the board+ has no clock that keeps time without a battery, and without it the clock started months behind,+ so every signed package index was refused as "not valid yet"), printing (`cups`, `avahi-daemon`),+ exFAT and NTFS drives, power profiles, the MIME database and the GSettings schemas (since 0.8.4.1).+- **Chromium and Firefox ESR** (Debian's arm64 builds, since 0.8.4.1), with the ISO's defaults from+ the same script, `tools/iso/browser-defaults.sh`: Chromium's `master_preferences` with+ `custom_chrome_frame` and the GTK theme, Firefox's `/etc/firefox-esr/lordos.js` (`inTitlebar` 1),+ so both draw a single bar with LordOS's window buttons; the GTK themes, the video extension and+ the video settings (`video-optimize`, Settings → Displays → Video) come with the lordos package.+ Measured cost in "Release test (0.8.4.1 Beta)".- **The LordOS build of the Raspberry Pi kernel** (see "The LordOS kernel"), when`tools/rpi/build-kernel.sh` has built it; otherwise Raspberry Pi's archive kernel, with a loudwarning (it has no Landlock, BPF LSM or BTF):@@ -70,7 +79,15 @@ SD card or an NVMe, and the same image boots on the Pi 5 and the Pi 4.- `firmware-brcm80211`: Wi-Fi (CYW43455);- `rpi-eeprom` and `raspi-utils` (`vcgencmd`, `pinctrl`), if available.- Everything else comes from Debian, Mesa included.+ Everything else comes from Debian, Mesa included. Since 0.8.4.1 `rpi-eeprom` and what it needs+ are also in the LordOS repository (`UPDATES.md`, "Raspberry Pi firmware packages"): the same+ files, so either source updates the bootloader images; with both, `apt` takes the Raspberry Pi+ archive's copy (priority 990) and the result is the same `.deb`. The Store's package engine does+ not read `/etc/apt/preferences.d` yet, so its "Update all" may take Raspberry Pi's builds of+ packages Debian also has (Chromium, BlueZ…); `apt` follows the priorities.+- **The bootloader** (in the board's EEPROM) is updated from **Settings → Board firmware**+ (`SETTINGS.md`, "Board firmware"), not `raspi-config`: `rpi-eeprom-update`'s hint to run+ `raspi-config` doesn't apply on LordOS.- **Bluetooth** (the CYW43455's Bluetooth half, on a UART; see "Bluetooth"), from Debian: `bluez`,`bluez-firmware` (the chip's patch, `brcm/BCM4345C0.hcd`), `libspa-0.2-bluetooth` (headsets inPipeWire) and `rfkill`, plus our SCO-routing helper (`lordos-rpi-bt@hciN`).diff --git a/docs/RELEASING.md b/docs/RELEASING.mdindex 93ed773..e6f3420 100644--- a/docs/RELEASING.md+++ b/docs/RELEASING.md@@ -13,6 +13,10 @@ The releases page is the project's public changelog: every release is documentedseparately (`"lordos": {"channel": "beta"}`; empty for a stable release). The file names usethat version: `lordos_0.8.0_amd64.deb`, `lordos-live-0.8.0-amd64.iso`,`lordos-0.8.0-rpi5-arm64.img.xz`.+- **An update of a published version** that only fixes it or completes it (no features planned for+ the next version) adds a fourth number: `0.8.4.1-beta` after `0.8.4-beta`, package `0.8.4.1`. dpkg+ sorts it after `0.8.4` and before `0.8.5`, so Store → Updates and apt offer it like any version.+ (Semantic Versioning has no fourth number; LordOS uses it only for these.)- The release title is **`LordOS <version>`**, for example `LordOS 0.8.0-beta`.- Every beta (any version with a suffix) is published as a **pre-release**. Only a version withouta suffix is a normal release.diff --git a/docs/SETTINGS.md b/docs/SETTINGS.mdindex 62b6ffb..0cc586f 100644--- a/docs/SETTINGS.md+++ b/docs/SETTINGS.md@@ -21,6 +21,7 @@ pairing, Sound with a Bluetooth headset, a Linux app's notification and Files' "| Default Apps | with Keyboard and Trackpad | `apps/settings/DefaultApps.jsx`, `sdk/defaults.js`, `hw/defaults.c`, `hw/mimeapps.c` || Energy (Battery) | with Privacy | `apps/settings/Power.jsx`, `hw/power.c`, `hw/ppd.c` || Cooling | after Energy | `apps/settings/Cooling.jsx`, `sdk/cooling.jsx`, `ui/js_fan.c` → `lord-fand` (`server/src/fan/`); see `FANS.md` |+| Board firmware | after Cooling, only on a Raspberry Pi 5 (BCM2712: Pi 5, Pi 500, CM5) | `apps/settings/Firmware.jsx`, `hw/hw_admin.c` (`rpi-eeprom-status`, `rpi-eeprom-update`) |Shared pieces: `apps/settings/ui.jsx` (a row with a hint, a pop-up button, the page header) on top ofthe SDK's `GroupBox` (`docs/DESIGN.md`). All text goes through `t()` in the `prefs` namespace@@ -45,7 +46,7 @@ the time fields keep `direction: 'ltr'`.▼ root work: closed admin actions (hw/hw_admin.c)admin.c ─ display-brightness, power-profile, power-suspend, power-buttons, time-ntp, time-set,bt-unblock, rpi-case, video-optimize, hw-firmware-missing (the Store's suggestions,- read-only)+ read-only), rpi-eeprom-status (read-only), rpi-eeprom-updateCooling: lord.fan (ui/js_fan.c) ── /run/lordos/fand.sock ── lord-fand (root service, src/fan)```@@ -231,6 +232,50 @@ managed by the firmware" with their RPM). Only administrators change anything: `the peer and reports `canChange`. Monitor has the same view read-only, with a history and a"Full speed for 30 min" button.+## Board firmware (Raspberry Pi 5)++LordOS's own page for the bootloader in the board's EEPROM, instead of `raspi-config`. It is in the+sidebar only on a BCM2712 board (`lord.system.info().board === 'pi5'`, from the device tree's+`compatible` list: Raspberry Pi 5, Pi 500, Compute Module 5). It shows:++- the **status**: *Up to date*, *Update available*, or *Update ready: restart to finish*;+- the **installed** bootloader (its build date) and the **latest available**, which is the newest+ image in the installed `rpi-eeprom` package for the configured release;+- the **release** (*Default*, Raspberry Pi's recommended one, or *Latest*);+- **Update** (administrators), and after it **Restart…** (the session's Restart dialog) with a note+ to keep the power connected. Without `rpi-eeprom` it offers to install it with the package engine.++New bootloader images arrive as updates of the `rpi-eeprom` package, from the LordOS repository+([UPDATES.md](UPDATES.md), "Raspberry Pi firmware packages") or Raspberry Pi's archive that the+image also configures. The work is two closed admin actions:++- **`rpi-eeprom-status`** (anyone, no argument, read-only) runs `/usr/bin/rpi-eeprom-update` with no+ options and parses its report strictly (`hw_eeprom_parse`): only the bootloader block, its+ `BOOTLOADER: update available|up to date` verdict, the time stamps in `CURRENT:` and `LATEST:`+ (between 2001 and 2096) and a lowercase release name; the verdict has to agree with the numbers,+ and anything else is `hw.eepromFailed`. The program's own text never reaches the UI (its hint to+ run `raspi-config` included: on LordOS this page is the way). "Pending" means+ `/run/rpi-eeprom-update-pending` exists (the program's root-owned marker on tmpfs: an update was+ written or staged during this boot). The reply is `OK <uptodate|available|pending> <current>+ <latest> <release>`, checked again by the page.+- **`rpi-eeprom-update`** (administrators, no argument) runs `/usr/bin/rpi-eeprom-update -A+ bootloader` (fixed argument list, no shell, no file, the bootloader only) and answers with the+ same report. Exit status 3 is `hw.eepromFrozen` (`FREEZE_VERSION=1` in the bootloader's+ configuration), any other failure `hw.eepromUpdateFailed`.++Both check the board first (`hw.notRaspberryPi5`) and that the program is root-owned and not+writable by others (`hw.noEeprom`). How the update is applied is `rpi-eeprom-update`'s decision: on+the LordOS image (no `flashrom`, no `rpieepromab`) it stages the image and `recovery.bin` on the boot+partition and the bootloader flashes itself at the next boot, keeping its recovery path; with+`rpieepromab` or `flashrom` installed it writes the EEPROM at once. Either way the new version runs+after a restart.++**Not exposed:** editing the bootloader's configuration (`rpi-eeprom-config`) and the release+choice. The release lives in `/etc/default/rpi-eeprom-update`, a conffile of `rpi-eeprom`: writing+it from LordOS would make dpkg ask about it on every package update (or drop the choice), so it stays+`default` unless an administrator edits the file. Tested on the Raspberry Pi 5 (ISO.md, "Release test+(0.8.4.1 Beta)").+## Notifications@@ -315,6 +360,8 @@ All in `server/src/hw/hw_admin.c`, in the `actions` table through `HW_ADMIN_ACTI| `time-set` | `YYYY-MM-DD HH:MM:SS` | admin | `/usr/bin/timedatectl set-time` || `bt-unblock` | — | anyone | rfkill "unblock all Bluetooth" on `/dev/rfkill` || `rpi-case` | `none` \| `argon-one-v5` | admin | Raspberry Pi 5 only: writes `/boot/firmware/lordos-case.txt` (fixed text, included from `config.txt`; see `FANS.md`) |+| `rpi-eeprom-status` | — | anyone | BCM2712 boards only, read-only: `/usr/bin/rpi-eeprom-update` (no options), report parsed strictly; `OK <uptodate\|available\|pending> <current> <latest> <release>` (see "Board firmware") |+| `rpi-eeprom-update` | — | admin | BCM2712 boards only: `/usr/bin/rpi-eeprom-update -A bootloader`, then the same report; the update is finished by the next restart || `hw-firmware-missing` | — | anyone | read-only: reads `/dev/kmsg` and returns only the validated names of firmware files a driver asked for and that are still missing (`LOG fw <file> <driver>`), for Store → Discover's suggestions (`hw/hwscan.c`, see `PACKAGES.md`) |The validators are unit-tested in `build/settings-hw-test`.@@ -324,7 +371,10 @@ The validators are unit-tested in `build/settings-hw-test`.- `build/settings-hw-test` (`make test`): EDID (QEMU's real block, serial/name identities, brokenchecksums), mode selection and refresh rates, Night Light math (temperature, ramp, sunrise andsunset in London, Buenos Aires, Tokyo and Svalbard, schedule across midnight, zone1970.tab),- mimeapps.list editing and globs2, the power_supply reader, the admin validators. 129 checks.+ mimeapps.list editing and globs2, the power_supply reader, the admin validators and the+ `rpi-eeprom-update` report parser (the real report from a Pi 5, verdicts that disagree with the+ numbers, repeated or missing lines, bad time stamps and release names, the Pi 4's VL805 block, the+ BCM2712 check).- `build/bt-test` (`make test`): BlueZ parsing. 32 checks.- `build/brframe-test` (`make test`): the browsers' title bar switch (Chromium `Preferences`,Firefox `user.js`, running browsers, hostile profile folders). 90 checks.diff --git a/docs/UPDATES.md b/docs/UPDATES.mdindex 14dc325..a4de8db 100644--- a/docs/UPDATES.md+++ b/docs/UPDATES.md@@ -209,6 +209,47 @@ Things that only need new files (a new unit, a new default config) ship in the pnew unit that must be enabled on upgraded systems needs a migration, since `postinst` only enables`lord-fand`.+## Raspberry Pi firmware packages++Since 0.8.4.1 the repository also carries, **for arm64 only**, the Raspberry Pi bootloader updater+and exactly what its `Depends` need that Debian 13 doesn't have, copied unchanged from Raspberry+Pi's archive (`archive.raspberrypi.com/debian`, trixie, main):++| Package | Why |+|---|---|+| `rpi-eeprom` | the bootloader images (`/usr/lib/firmware/raspberrypi/bootloader-2712/…`) and `rpi-eeprom-update`, used by Settings → Board firmware (`SETTINGS.md`) |+| `raspi-utils`, `raspi-utils-core`, `-dt`, `-eeprom`, `-otp`, `raspinfo`, `libgpiolib0`, `libdtovl0` | `rpi-eeprom` depends on `raspi-utils` (`vcgencmd`, used to read the running bootloader), which depends on these |+| `kms++-utils`, `libkms++0` | `raspinfo` depends on them |++Their recommendations (`flashrom`, `rpieepromab`) are not mirrored: without them a Pi 5 stages the+update for the bootloader to apply at the next boot. Raspberry Pi's whole archive is never added to a+system by LordOS's packages.++- **Pinned and verified.** `tools/release/rpi-mirror.list` names each package, version, architecture+ and SHA-256 (with its licence). `apt-repo.sh build <target> --rpi …` fetches Raspberry Pi's+ `InRelease`, verifies it with `gpgv` against `tools/release/raspberrypi-archive-keyring.pgp` (the+ key from Raspberry Pi's `raspberrypi-archive-keyring` package; the script checks its fingerprint,+ `CF8A 1AF5 02A2 AA2D 763B AE7E 82B1 2992 7FA3 303E`), checks `main/binary-arm64/Packages.gz`+ against it, and takes a file only when its SHA-256 matches both the index and the pinned line.+ Verified files are kept in `~/.local/share/lordos-apt/rpi-cache`, so a pinned version can still be+ published after Raspberry Pi's archive keeps only a newer one (it keeps one version per package).+ `apt-repo.sh rpi-fetch <target>` only fetches and verifies. A new upstream version is a new line+ in the list, reviewed like code; the pool only grows.+- **Only on arm64.** They live under `pool/rpi/` and only the `binary-arm64` index lists them (most+ are `Architecture: all`, which would otherwise appear on every PC's Store).+- **Licences** (each package's `debian/copyright`, shipped inside it): the scripts and `raspi-utils`+ are BSD-3-Clause; the bootloader images are under Raspberry Pi's binary licence (redistribution in+ unmodified binary form, for use with Raspberry Pi devices, with the notice: the `.deb` is copied+ as is); `kms++` is MPL-2.0, its source is Raspberry Pi's `kms++` source package of the pinned version+ ([COMPLIANCE.md](COMPLIANCE.md)).+- **Which source wins.** On the LordOS Pi image, which also lists Raspberry Pi's archive with+ priority 990 for these packages (`/etc/apt/preferences.d/raspberrypi`), apt takes the newest+ version among the 990 sources; ours mirrors the same files, so it only matters when a newer version+ is in one of them. No pin is needed for our copy: on a board without Raspberry Pi's archive it is+ the only candidate (priority 500), and our package engine takes the highest version of any+ source. A newer `rpi-eeprom` reaches a board through Store → Updates or `apt upgrade` like any+ other package.+## The Raspberry Pi kernelThe LordOS kernel for the Pi 5 (`linux-image-<version>-lordos-rpi-2712`, fromdiff --git a/package.json b/package.jsonindex ed4fd86..78ce237 100644--- a/package.json+++ b/package.json@@ -1,7 +1,7 @@{"name": "lordos","private": true,- "version": "0.8.4",+ "version": "0.8.4.1","description": "LordOS — React themes and apps for lord-server","lordos": {"channel": "beta"diff --git a/server/src/hw/hw_admin.c b/server/src/hw/hw_admin.cindex 6bbbfd4..e259a97 100644--- a/server/src/hw/hw_admin.c+++ b/server/src/hw/hw_admin.c@@ -260,6 +260,130 @@ void hw_act_rpi_case(const AdminReq *r, const char *arg, size_t len) {admin_ok("hw.caseSet", "case", id, NULL);}+/* ---- Raspberry Pi 5 bootloader (Settings → Board firmware, docs/SETTINGS.md) ---- */++/* Is this device tree "compatible" list (NUL-separated strings) a BCM2712 board (Pi 5, Pi 500,+ * CM5)? Those keep their bootloader in an EEPROM that rpi-eeprom-update can update. */+int hw_is_bcm2712(const char *compat, size_t n) {+ for (size_t i = 0; compat && i < n;) {+ size_t l = strnlen(compat + i, n - i);+ if (l == 12 && !memcmp(compat + i, "brcm,bcm2712", 12)) return 1;+ i += l + 1;+ }+ return 0;+}++static int board_is_bcm2712(void) {+ char b[512];+ int fd = open("/proc/device-tree/compatible", O_RDONLY | O_CLOEXEC);+ if (fd < 0) return 0;+ ssize_t n = read(fd, b, sizeof b);+ close(fd);+ return n > 0 && hw_is_bcm2712(b, (size_t)n);+}++/* "<words> (<seconds>)" at the end of a CURRENT:/LATEST: line: the build time stamp. */+static int eeprom_stamp(const char *v, long long *out) {+ const char *open_p = strrchr(v, '(');+ if (!open_p) return -1;+ char *e;+ errno = 0;+ long long t = strtoll(open_p + 1, &e, 10);+ if (errno || e == open_p + 1 || *e != ')' || e[1]) return -1;+ if (t < 1000000000LL || t > 4000000000LL) return -1; /* 2001 .. 2096 */+ *out = t;+ return 0;+}++/* rpi-eeprom-update's report (no options) → e. Only the bootloader block is read: the first+ * "BOOTLOADER:" line, then its CURRENT, LATEST and RELEASE lines, up to an empty line or the VL805+ * block (Pi 4). Anything unexpected makes it fail: the UI never shows the program's text. */+int hw_eeprom_parse(const char *out, HwEeprom *e) {+ memset(e, 0, sizeof *e);+ int state = -1, have_cur = 0, have_lat = 0, have_rel = 0;+ const char *p = out;+ while (p && *p) {+ const char *nl = strchr(p, '\n');+ size_t len = nl ? (size_t)(nl - p) : strlen(p);+ char line[256];+ if (len >= sizeof line) { if (state >= 0) return -1; p = nl ? nl + 1 : NULL; continue; }+ memcpy(line, p, len);+ line[len] = 0;+ p = nl ? nl + 1 : NULL;+ const char *l = line;+ while (*l == ' ') l++;+ if (state < 0) {+ if (!strcmp(l, "BOOTLOADER: update available")) state = 1;+ else if (!strcmp(l, "BOOTLOADER: up to date")) state = 0;+ continue;+ }+ if (!*l || !strncmp(l, "VL805", 5)) break;+ if (!strncmp(l, "CURRENT: ", 9)) {+ if (have_cur++) return -1;+ if (strcmp(l + 9, "unknown") && eeprom_stamp(l + 9, &e->current)) return -1;+ } else if (!strncmp(l, "LATEST: ", 8)) {+ if (have_lat++ || eeprom_stamp(l + 8, &e->latest)) return -1;+ } else if (!strncmp(l, "RELEASE: ", 9)) {+ if (have_rel++) return -1;+ size_t k = 0;+ for (const char *r = l + 9; *r >= 'a' && *r <= 'z'; r++) if (k < sizeof e->release - 1) e->release[k++] = *r; else return -1;+ e->release[k] = 0;+ if (!k || (l[9 + k] && l[9 + k] != ' ')) return -1;+ }+ /* other lines (the hint to change the release) are ignored */+ }+ if (state < 0 || !have_cur || !have_lat || !have_rel) return -1;+ /* the program's verdict has to agree with the numbers it printed */+ if (state != (e->current && e->latest > e->current)) return -1;+ e->update = state;+ return 0;+}++#define RPI_EEPROM_UPDATE "/usr/bin/rpi-eeprom-update"+#define RPI_EEPROM_PENDING "/run/rpi-eeprom-update-pending" /* the program's own marker (tmpfs: this boot) */++/* Runs the report and answers OK "<state> <current> <latest> <release>": state uptodate,+ * available or pending (an update was written or staged in this boot: restart to finish). */+static void eeprom_report(void) {+ const char *const argv[] = { RPI_EEPROM_UPDATE, NULL };+ char out[8192];+ int rc = admin_run_capture(argv, out, sizeof out);+ HwEeprom e;+ if ((rc != 0 && rc != 1) || hw_eeprom_parse(out, &e)) { admin_err("hw.eepromFailed", "code", lerr_int(rc), NULL); return; }+ struct stat st;+ int pending = lstat(RPI_EEPROM_PENDING, &st) == 0 && S_ISREG(st.st_mode) && st.st_uid == 0;+ admin_say("OK", "%s %lld %lld %s", pending ? "pending" : e.update ? "available" : "uptodate", /* i18n-ok: parsed by apps/settings/Firmware.jsx */+ e.current, e.latest, e.release);+}++static int eeprom_ready(void) {+ if (!board_is_bcm2712()) { admin_err("hw.notRaspberryPi5", NULL); return 0; }+ if (!file_ok(RPI_EEPROM_UPDATE)) { admin_err("hw.noEeprom", NULL); return 0; }+ return 1;+}++void hw_act_eeprom_status(const AdminReq *r, const char *arg, size_t len) {+ (void)r; (void)arg;+ if (len) { admin_err("admin.invalidArgument", NULL); return; }+ if (eeprom_ready()) eeprom_report();+}++/* Installs the newest bootloader of the configured release that is newer than the running one,+ * as rpi-eeprom-update decides: on a Pi 5 it stages it for the next boot (the bootloader flashes+ * itself, with its recovery path) or writes it at once with the A/B or flashrom update when those+ * are installed. Bootloader only (-A bootloader), no other option, no file. */+void hw_act_eeprom_update(const AdminReq *r, const char *arg, size_t len) {+ (void)r; (void)arg;+ if (len) { admin_err("admin.invalidArgument", NULL); return; }+ if (!eeprom_ready()) return;+ const char *const argv[] = { RPI_EEPROM_UPDATE, "-A", "bootloader", NULL };+ char out[16384];+ int rc = admin_run_capture(argv, out, sizeof out);+ if (rc == 3) { admin_err("hw.eepromFrozen", NULL); return; }+ if (rc != 0) { admin_err("hw.eepromUpdateFailed", "code", lerr_int(rc), NULL); return; }+ eeprom_report();+}+/* ---- missing firmware (the Store's suggestions, hwscan.c) ---- *//* Read-only: the session can't read the kernel log when kernel.dmesg_restrict=1. Takes nodiff --git a/server/src/hw/hw_admin.h b/server/src/hw/hw_admin.hindex 75bbcfd..39d00ef 100644--- a/server/src/hw/hw_admin.h+++ b/server/src/hw/hw_admin.h@@ -13,6 +13,13 @@* rpi-case none|argon-one-v5 Raspberry Pi 5 only: writes /boot/firmware/lordos-case.txt* (fixed text, included from config.txt; takes effect* after a restart) admin+ * rpi-eeprom-status (no arguments) BCM2712 boards (Pi 5, 500, CM5) only: runs+ * /usr/bin/rpi-eeprom-update (no options), parses its report+ * strictly and answers "OK <uptodate|available|pending>+ * <current> <latest> <release>"; read-only anyone+ * rpi-eeprom-update (no arguments) BCM2712 only: /usr/bin/rpi-eeprom-update -A+ * bootloader (the newest bootloader of the configured+ * release; finished by a restart), then the same report admin* hw-firmware-missing (no arguments) reads the kernel log (/dev/kmsg) and returns* only the validated names of firmware files a driver asked* for and that are still missing, as "LOG fw <file> <driver>"@@ -37,6 +44,16 @@ void hw_act_time_set(const AdminReq *r, const char *arg, size_t len);void hw_act_bt_unblock(const AdminReq *r, const char *arg, size_t len);void hw_act_rpi_case(const AdminReq *r, const char *arg, size_t len);void hw_act_firmware_missing(const AdminReq *r, const char *arg, size_t len);+void hw_act_eeprom_status(const AdminReq *r, const char *arg, size_t len);+void hw_act_eeprom_update(const AdminReq *r, const char *arg, size_t len);+/* rpi-eeprom-update's report, parsed (exposed for tests) */+typedef struct {+ long long current, latest; /* build time stamps (0: current unknown) */+ char release[16]; /* default, latest… ([a-z]) */+ int update; /* the program says an update is available */+} HwEeprom;+int hw_eeprom_parse(const char *out, HwEeprom *e);+int hw_is_bcm2712(const char *compat, size_t n); /* device tree "compatible" (NUL-separated) */const char *hw_rpi_case_text(const char *id); /* fixed file text of a known case, NULL otherwise */void hw_act_video(const AdminReq *r, const char *arg, size_t len);/* The two files video-optimize writes, from its argument; 0 if the argument is valid. */@@ -58,6 +75,8 @@ int hw_backlight_name_valid(const char *n);{ "bt-unblock", hw_act_bt_unblock, A_ANYONE }, \{ "rpi-case", hw_act_rpi_case, 0 }, \{ "hw-firmware-missing", hw_act_firmware_missing, A_ANYONE }, \+ { "rpi-eeprom-status", hw_act_eeprom_status, A_ANYONE | A_FORK }, \+ { "rpi-eeprom-update", hw_act_eeprom_update, A_FORK }, \{ "video-optimize", hw_act_video, A_ANYONE },#endifdiff --git a/server/src/ui/js_sys.c b/server/src/ui/js_sys.cindex 5b7b24c..db85777 100644--- a/server/src/ui/js_sys.c+++ b/server/src/ui/js_sys.c@@ -11,6 +11,7 @@* not possible to create a .desktop (the only thing lord.apps.launch runs), nor to install apps without* lpk.c, nor to overwrite the settings. lord.settings only writes to ~/.config/lordos/settings.json;* lord.themes only accepts simple names. */+#include "../hw/hw_admin.h"#include "js_sys.h"#include "js_err.h"#include "ui.h"@@ -256,6 +257,12 @@ static JSValue f_sys_info(JSContext *c, JSValueConst this_val, int argc, JSValueif (g && (!strcmp(g->gr_name, "sudo") || !strcmp(g->gr_name, "admin") || !strcmp(g->gr_name, "wheel"))) is_admin = 1;}JS_SetPropertyStr(c, o, "admin", JS_NewBool(c, is_admin));+ /* the board, where Settings has a page for it: "pi5" for a BCM2712 board (Pi 5, 500, CM5:+ * Settings → Board firmware), "" otherwise */+ size_t clen = 0;+ char *compat = read_small("/proc/device-tree/compatible", 512, &clen);+ JS_SetPropertyStr(c, o, "board", JS_NewString(c, compat && hw_is_bcm2712(compat, clen) ? "pi5" : ""));+ free(compat);/* live system (ISO): the installer shows up there */JS_SetPropertyStr(c, o, "live", JS_NewBool(c, access("/run/live/medium/live/filesystem.squashfs", F_OK) == 0));struct statvfs vs; /* system disk (/) */diff --git a/server/tests/settings_hw_test.c b/server/tests/settings_hw_test.cindex c273cf5..90e2b7b 100644--- a/server/tests/settings_hw_test.c+++ b/server/tests/settings_hw_test.c@@ -349,6 +349,52 @@ static void test_power(void) {/* the admin helper's functions hw_admin.c calls (not used by the validators) */void admin_say(const char *kind, const char *fmt, ...) { (void)kind; (void)fmt; }int admin_run(const char *const argv[]) { (void)argv; return -1; }+int admin_run_capture(const char *const argv[], char *out, size_t cap) { (void)argv; if (cap) out[0] = 0; return -1; }++/* rpi-eeprom-update's report: the strict parser behind rpi-eeprom-status */+static void test_eeprom(void) {+ /* as printed on the Raspberry Pi 5 (rpi-eeprom 28.34-1, 2026-10-25) */+ const char *avail =+ "*** UPDATE AVAILABLE ***\n\nRun \"sudo rpi-eeprom-update -a\" to install this update without a prompt.\n\n"+ "To configure the bootloader update policy run \"sudo raspi-config\"\n\n"+ "BOOTLOADER: update available\n"+ " CURRENT: Tue May 26 03:01:25 PM UTC 2026 (1779807685)\n"+ " LATEST: Fri Sep 25 03:59:09 PM UTC 2026 (1790351949)\n"+ " RELEASE: default (/usr/lib/firmware/raspberrypi/bootloader-2712/default)\n"+ " Use raspi-config to change the release.\n";+ HwEeprom e;+ CHECK(!hw_eeprom_parse(avail, &e) && e.update && e.current == 1779807685LL && e.latest == 1790351949LL && !strcmp(e.release, "default"));+ const char *same =+ "BOOTLOADER: up to date\n CURRENT: Fri Sep 25 03:59:09 PM UTC 2026 (1790351949)\n"+ " LATEST: Fri Sep 25 03:59:09 PM UTC 2026 (1790351949)\n RELEASE: latest (/usr/lib/firmware/raspberrypi/bootloader-2712/latest)\n"+ " Use raspi-config to change the release.\n";+ CHECK(!hw_eeprom_parse(same, &e) && !e.update && e.current == e.latest && !strcmp(e.release, "latest"));+ /* the running version unknown (a chroot): never "available" */+ CHECK(!hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: unknown\n LATEST: x (1790351949)\n RELEASE: default (/x)\n", &e) && !e.update && !e.current);+ CHECK(hw_eeprom_parse("BOOTLOADER: update available\n CURRENT: unknown\n LATEST: x (1790351949)\n RELEASE: default (/x)\n", &e));+ /* the verdict must agree with the numbers */+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (1779807685)\n LATEST: x (1790351949)\n RELEASE: default (/x)\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: update available\n CURRENT: x (1790351949)\n LATEST: x (1790351949)\n RELEASE: default (/x)\n", &e));+ /* the Pi 4's VL805 block after the bootloader's is not read */+ CHECK(!hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (1790351949)\n LATEST: x (1790351949)\n RELEASE: default (/x)\n\n"+ " VL805_FW: Dedicated VL805 EEPROM\n VL805: up to date\n CURRENT: 000138c0\n LATEST: 000138c0\n", &e) && !e.update);+ /* refused: missing lines, repeated lines, bad numbers, odd release names, nothing at all */+ CHECK(hw_eeprom_parse("", &e) && hw_eeprom_parse("garbage\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (1790351949)\n RELEASE: default (/x)\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (1790351949)\n CURRENT: x (1790351949)\n LATEST: x (1790351949)\n RELEASE: default (/x)\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (17903519490)\n LATEST: x (1790351949)\n RELEASE: default (/x)\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (1790351949) \n LATEST: x (1790351949)\n RELEASE: default (/x)\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (-1)\n LATEST: x (1790351949)\n RELEASE: default (/x)\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (1790351949)\n LATEST: x (1790351949)\n RELEASE: Default;rm (/x)\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (1790351949)\n LATEST: x (1790351949)\n RELEASE: averyveryverylongname (/x)\n", &e));+ CHECK(hw_eeprom_parse("BOOTLOADER: up to date\n CURRENT: x (1790351949)\n LATEST: x (1790351949)\n RELEASE: (/x)\n", &e));+ /* the board: BCM2712 in the device tree's compatible list */+ static const char pi5[] = "raspberrypi,5-model-b\0brcm,bcm2712\0";+ static const char pi4[] = "raspberrypi,4-model-b\0brcm,bcm2711\0";+ static const char trick[] = "brcm,bcm2712x\0xbrcm,bcm2712\0";+ CHECK(hw_is_bcm2712(pi5, sizeof pi5 - 1) && !hw_is_bcm2712(pi4, sizeof pi4 - 1) && !hw_is_bcm2712(trick, sizeof trick - 1));+ CHECK(!hw_is_bcm2712("brcm,bcm271", 11) && !hw_is_bcm2712(NULL, 0));+}static void test_admin(void) {CHECK(hw_time_valid("2026-10-18 03:15:00") && hw_time_valid("2028-02-29 23:59:59"));@@ -379,6 +425,7 @@ static void test_admin(void) {int main(void) {test_admin();+ test_eeprom();test_edid();test_modes();test_night();diff --git a/tools/iso/browser-defaults.sh b/tools/iso/browser-defaults.shnew file mode 100644index 0000000..9a94fec--- /dev/null+++ b/tools/iso/browser-defaults.sh@@ -0,0 +1,30 @@+#!/bin/sh+# browser-defaults.sh — the preinstalled browsers' LordOS defaults, written into a system tree being+# built (the live ISO, tools/iso/build.sh, and the Raspberry Pi image, tools/rpi/build-img.sh).+#+# sh tools/iso/browser-defaults.sh <root>+#+# - Chromium: new profiles draw their own bar (tabs in the title bar) with the GTK theme, so the+# window buttons are LordOS's traffic lights from LordOS's GTK theme (docs/WAYLAND.md). The user+# goes back to the LordOS frame with «Use system title bar and borders» (Settings → Appearance).+# - Firefox ESR: its own bar too (the user changes it in Customize Toolbar > Title Bar).+# The GTK themes, the video extension and the video settings (the video-optimize action) come with+# the lordos package; installed systems get these two defaults from migration 005.+set -eu+R=${1:?usage: browser-defaults.sh <root>}+[ -d "$R/etc" ] || { echo "browser-defaults.sh: $R is not a system tree" >&2; exit 1; }+if [ -f "$R/etc/chromium/master_preferences" ]; then+python3 - "$R/etc/chromium/master_preferences" <<'PY'+import json, sys+p = sys.argv[1]; d = json.load(open(p))+d.setdefault("browser", {})["custom_chrome_frame"] = True+d.setdefault("extensions", {}).setdefault("theme", {})["system_theme"] = 1 # 1 = GTK+json.dump(d, open(p, "w"), indent=2)+PY+fi+if [ -d "$R/usr/lib/firefox-esr" ] || [ -d "$R/etc/firefox-esr" ]; then+ install -d "$R/etc/firefox-esr"+ printf '%s\n' '// LordOS: Firefox draws its own bar, with the window buttons in LordOS'"'"'s order (see' \+ '// docs/WAYLAND.md); 0 gives it the LordOS frame instead (Customize Toolbar > Title Bar).' \+ 'pref("browser.tabs.inTitlebar", 1);' > "$R/etc/firefox-esr/lordos.js"+fidiff --git a/tools/iso/build.sh b/tools/iso/build.shindex 57b66ba..b14e6d5 100755--- a/tools/iso/build.sh+++ b/tools/iso/build.sh@@ -98,25 +98,10 @@ in_ch apt-get install -y -q --no-install-recommends $PKGS_BASE $PKGS_LORDOS $PKG>> "$WORK/apt.log" 2>&1 || { tail -30 "$WORK/apt.log"; exit 1; }cp "$DEB" "$CH/tmp/lordos.deb"in_ch apt-get install -y -q --no-install-recommends /tmp/lordos.deb >> "$WORK/apt.log" 2>&1 || { tail -30 "$WORK/apt.log"; exit 1; }-# Chromium: new profiles draw their own bar (tabs in the title bar) with the GTK theme, so the-# window buttons are LordOS's traffic lights from LordOS's GTK theme (docs/WAYLAND.md). The user-# goes back to the LordOS frame with «Use system title bar and borders» (Settings → Appearance).-if [ -f "$CH/etc/chromium/master_preferences" ]; then-python3 - "$CH/etc/chromium/master_preferences" <<'PY'-import json, sys-p = sys.argv[1]; d = json.load(open(p))-d.setdefault("browser", {})["custom_chrome_frame"] = True-d.setdefault("extensions", {}).setdefault("theme", {})["system_theme"] = 1 # 1 = GTK-json.dump(d, open(p, "w"), indent=2)-PY-fi-# Firefox ESR: its own bar too (the user changes it in Customize Toolbar > Title Bar)+# the browsers' defaults (their own bar with LordOS's window buttons), shared with the Pi image+sh tools/iso/browser-defaults.sh "$CH"install -D -m 644 tools/iso/rootfs/etc/wireplumber/wireplumber.conf.d/lordos-bluez.conf "$CH/etc/wireplumber/wireplumber.conf.d/lordos-bluez.conf"install -D -m 644 tools/iso/rootfs/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf "$CH/etc/pipewire/pipewire-pulse.conf.d/lordos-no-modules.conf"-install -d "$CH/etc/firefox-esr"-printf '%s\n' '// LordOS: Firefox draws its own bar, with the window buttons in LordOS'"'"'s order (see' \- '// docs/WAYLAND.md); 0 gives it the LordOS frame instead (Customize Toolbar > Title Bar).' \- 'pref("browser.tabs.inTitlebar", 1);' > "$CH/etc/firefox-esr/lordos.js"rm -f "$CH/tmp/lordos.deb"# 3. configurationdiff --git a/tools/release/apt-repo.sh b/tools/release/apt-repo.shindex d45ff7b..426949c 100755--- a/tools/release/apt-repo.sh+++ b/tools/release/apt-repo.sh@@ -1,9 +1,10 @@#!/bin/sh# apt-repo.sh — the signed LordOS APT repository on lordos.org (docs/UPDATES.md, docs/RELEASING.md).#-# tools/release/apt-repo.sh build <target> [--notes VERSION=SECTION]… <file.deb>…+# tools/release/apt-repo.sh build <target> [--notes VERSION=SECTION]… [--rpi] <file.deb>…# tools/release/apt-repo.sh publish <target># tools/release/apt-repo.sh verify <target>+# tools/release/apt-repo.sh rpi-fetch <target> (only fetches and verifies the --rpi packages)## <target> is "staging" (https://lordos.org/apt-staging, for tests) or "live" (https://lordos.org/apt,# what every LordOS system reads). Both have one suite, "stable", component "main", for amd64 and arm64.@@ -17,6 +18,13 @@# verify downloads InRelease over https AND http (the Store's package engine has no TLS of its# own and reads https sources over http), checks the signature and every index hash.#+# --rpi also adds the Raspberry Pi packages pinned in tools/release/rpi-mirror.list (rpi-eeprom and+# what it needs; arm64 only, under pool/rpi/), fetched from Raspberry Pi's archive and accepted only+# when Raspberry Pi's InRelease verifies with tools/release/raspberrypi-archive-keyring.pgp (its+# fingerprint checked), the index's SHA-256 matches InRelease, and the file's SHA-256 matches both+# the index and the pinned line. Verified files are kept in $WORKDIR/rpi-cache, so a pinned version+# can still be published after Raspberry Pi's archive has moved on (docs/UPDATES.md).+## --notes VERSION=SECTION takes the notes of lordos VERSION from CHANGELOG.md section SECTION (for# example 0.8.1~staging1=Unreleased). By default the section is "VERSION" or "VERSION-<suffix>".#@@ -37,10 +45,14 @@ KEYRING=$ROOT/packaging/keys/lordos-archive-keyring.gpgGNUPGHOME=${LORDOS_APT_GNUPGHOME:-$HOME/.config/lordos-release/apt-gnupg}WORKDIR=${LORDOS_APT_DIR:-$HOME/.local/share/lordos-apt}IMAGE=lordos-apt-tools:trixie+RPI_LIST=$ROOT/tools/release/rpi-mirror.list+RPI_KEYRING=$ROOT/tools/release/raspberrypi-archive-keyring.pgp+RPI_KEY_FPR=CF8A1AF502A2AA2D763BAE7E82B129927FA3303E+RPI_ARCHIVE=${RPI_ARCHIVE:-http://archive.raspberrypi.com/debian}export GNUPGHOMEdie() { echo "apt-repo.sh: $*" >&2; exit 1; }-usage() { sed -n '3,6p' "$0" >&2; exit 2; }+usage() { sed -n '3,7p' "$0" >&2; exit 2; }aws() { command aws --profile "$PROFILE" "$@"; }[ $# -ge 2 ] || usage@@ -97,18 +109,74 @@ notes_for() {sed -e 's/^$/./' -e 's/^/ /'}+# the pinned Raspberry Pi packages (rpi-mirror.list), verified, into $WORKDIR/rpi-cache; prints the paths+rpi_import() {+ cache=$WORKDIR/rpi-cache+ mkdir -p "$cache"+ t=$(mktemp -d)+ fpr=$(GNUPGHOME=$t gpg --batch --with-colons --show-keys "$RPI_KEYRING" 2>/dev/null | awk -F: '/^fpr/ { print $10; exit }')+ [ "$fpr" = "$RPI_KEY_FPR" ] || { rm -rf "$t"; die "$RPI_KEYRING has fingerprint $fpr, expected $RPI_KEY_FPR"; }+ have_index=0+ grep -v '^#' "$RPI_LIST" > "$t/list"+ while read -r name ver arch sum _; do+ [ -n "$name" ] || continue+ case "$name$ver$arch" in *[!A-Za-z0-9.+~:_-]*) rm -rf "$t"; die "rpi-mirror.list: bad line for $name" ;; esac+ printf %s "$sum" | grep -Eq '^[0-9a-f]{64}$' || { rm -rf "$t"; die "rpi-mirror.list: bad sha256 for $name"; }+ f="$cache/${name}_${ver#*:}_$arch.deb"+ if [ -f "$f" ] && [ "$(shasum -a 256 "$f" | cut -d' ' -f1)" = "$sum" ]; then echo "$f"; continue; fi+ if [ "$have_index" = 0 ]; then+ curl -fsS -o "$t/InRelease" "$RPI_ARCHIVE/dists/trixie/InRelease" || die "cannot download Raspberry Pi's InRelease"+ gpgv --keyring "$RPI_KEYRING" --output "$t/Release" "$t/InRelease" 2>/dev/null || die "Raspberry Pi's InRelease does not verify with $RPI_KEYRING"+ want=$(awk '/^SHA256:/ { s = 1; next } /^[^ ]/ { s = 0 } s && $3 == "main/binary-arm64/Packages.gz" { print $1 }' "$t/Release")+ [ -n "$want" ] || die "Raspberry Pi's Release lists no main/binary-arm64/Packages.gz"+ curl -fsS -o "$t/Packages.gz" "$RPI_ARCHIVE/dists/trixie/main/binary-arm64/Packages.gz" || die "cannot download Raspberry Pi's index"+ [ "$(shasum -a 256 "$t/Packages.gz" | cut -d' ' -f1)" = "$want" ] || die "Raspberry Pi's Packages.gz does not match its InRelease"+ gzip -dc "$t/Packages.gz" > "$t/Packages"+ have_index=1+ fi+ # the stanza of exactly that package, version and architecture+ line=$(awk -v n="$name" -v v="$ver" -v a="$arch" 'BEGIN { RS = "" } {+ pn = pv = pa = ps = pf = ""; k = split($0, L, "\n")+ for (i = 1; i <= k; i++) {+ if (L[i] ~ /^Package: /) pn = substr(L[i], 10); else if (L[i] ~ /^Version: /) pv = substr(L[i], 10)+ else if (L[i] ~ /^Architecture: /) pa = substr(L[i], 15); else if (L[i] ~ /^SHA256: /) ps = substr(L[i], 9)+ else if (L[i] ~ /^Filename: /) pf = substr(L[i], 11)+ }+ if (pn == n && pv == v && pa == a) print ps, pf }' "$t/Packages")+ [ -n "$line" ] || die "$name $ver ($arch) is no longer in Raspberry Pi's archive and not in $cache: keep the cache or pin the new version"+ isum=${line%% *}; path=${line#* }+ [ "$isum" = "$sum" ] || die "$name $ver: Raspberry Pi's index says $isum, rpi-mirror.list pins $sum"+ case "$path" in pool/main/*.deb) ;; *) die "$name: unexpected Filename $path" ;; esac+ curl -fsS -o "$f.part" "$RPI_ARCHIVE/$path" || die "cannot download $path"+ [ "$(shasum -a 256 "$f.part" | cut -d' ' -f1)" = "$sum" ] || { rm -f "$f.part"; die "$path: SHA-256 does not match"; }+ mv "$f.part" "$f"+ echo "$f"+ done < "$t/list"+ rm -rf "$t"+}++# is this package one of the mirrored Raspberry Pi packages? (they go to pool/rpi, arm64 index only)+is_rpi_pkg() { grep -v '^#' "$RPI_LIST" | awk -v n="$1" '$1 == n { f = 1 } END { exit !f }'; }+do_build() {- NOTES_MAP=""+ NOTES_MAP=""; RPI=0while [ $# -gt 0 ]; docase "$1" in--notes) [ $# -ge 2 ] || die "--notes needs VERSION=SECTION"; NOTES_MAP="$NOTES_MAP $2"; shift ;;--notes=*) NOTES_MAP="$NOTES_MAP ${1#*=}" ;;+ --rpi) RPI=1 ;;-*) die "unknown option $1" ;;*) break ;;esacshiftdonecheck_key+ if [ "$RPI" = 1 ]; then+ rpis=$(rpi_import) || exit 1+ echo " Raspberry Pi packages verified: $(echo "$rpis" | wc -l | tr -d ' ')"+ # shellcheck disable=SC2086+ set -- "$@" $rpis+ fimkdir -p "$TREE/pool/main"# the pool is append-only: start from what is published (old versions stay installable)if [ -z "${LORDOS_APT_OFFLINE:-}" ]; then@@ -123,7 +191,9 @@ do_build() {ver=$(debtool dpkg-deb -f "incoming/$b" Version)arch=$(debtool dpkg-deb -f "incoming/$b" Architecture)case "$name" in lib?*) dir=$(printf %s "$name" | cut -c1-4) ;; *) dir=$(printf %s "$name" | cut -c1) ;; esac- dest="pool/main/$dir/$name/${name}_${ver#*:}_$arch.deb"+ comp=main+ is_rpi_pkg "$name" && comp=rpi+ dest="pool/$comp/$dir/$name/${name}_${ver#*:}_$arch.deb"if [ -f "$TREE/$dest" ] && ! cmp -s "$TREE/incoming/$b" "$TREE/$dest"; thendie "$dest is already published with different contents: a version is never replaced (bump it)"fi@@ -138,6 +208,10 @@ do_build() {for a in $ARCHES; domkdir -p "$TREE/$D/main/binary-$a"debtool apt-ftparchive --arch "$a" packages pool/main > "$TREE/$D/main/binary-$a/Packages"+ # the Raspberry Pi packages (pool/rpi) only in the arm64 index: "all" packages would show up on PCs+ if [ "$a" = arm64 ] && [ -d "$TREE/pool/rpi" ]; then+ debtool apt-ftparchive --arch "$a" packages pool/rpi >> "$TREE/$D/main/binary-$a/Packages"+ fixz -9 -k -f "$TREE/$D/main/binary-$a/Packages"gzip -9 -n -k -f "$TREE/$D/main/binary-$a/Packages"printf 'Archive: %s\nOrigin: LordOS\nLabel: LordOS\nComponent: main\nArchitecture: %s\n' "$SUITE" "$a" > "$TREE/$D/main/binary-$a/Release"@@ -240,5 +314,6 @@ case "$cmd" inbuild) do_build "$@" ;;publish) do_publish ;;verify) do_verify ;;+ rpi-fetch) rpi_import ;; # only fetch and verify the pinned Raspberry Pi packages (prints their paths)*) usage ;;esacdiff --git a/tools/release/raspberrypi-archive-keyring.pgp b/tools/release/raspberrypi-archive-keyring.pgpnew file mode 100644index 0000000..e0ada06Binary files /dev/null and b/tools/release/raspberrypi-archive-keyring.pgp differdiff --git a/tools/release/rpi-mirror.list b/tools/release/rpi-mirror.listnew file mode 100644index 0000000..bf62de2--- /dev/null+++ b/tools/release/rpi-mirror.list@@ -0,0 +1,20 @@+# rpi-mirror.list — the Raspberry Pi packages LordOS mirrors into its own APT repository (arm64 only):+# the bootloader EEPROM updater and exactly what its Depends need that Debian 13 does not have.+# docs/UPDATES.md, "Raspberry Pi firmware packages". Imported by `tools/release/apt-repo.sh build+# <target> --rpi …`, which accepts a file only if its SHA-256 is the one below AND the one in+# Raspberry Pi's signed index (InRelease, key tools/release/raspberrypi-archive-keyring.pgp,+# fingerprint CF8A 1AF5 02A2 AA2D 763B AE7E 82B1 2992 7FA3 303E). A new upstream version is a new+# line here (the old one may stay: the pool only grows), reviewed like any other change.+#+# package version arch sha256 (of the .deb) licence (debian/copyright)+rpi-eeprom 28.34-1 all 7c0be1a22e9fb6e947a3f438faa588222453ad1cf1b1c985d747a49187aa2a1f scripts BSD-3; bootloader images: Raspberry Pi licence (unmodified binaries, for Raspberry Pi devices)+raspi-utils 20260626-1 all 2bdb73a551a1a3c155303d1b3486ae8ed1858729e4b1b85f791ae987e1d278b6 BSD-3-Clause+raspi-utils-core 20260626-1 arm64 3df579a81d76081e283409840beb9b1df26a9487c50aef95293743a4ba689fb9 BSD-3-Clause+raspi-utils-dt 20260626-1 arm64 068adfdf78097ca0429da2adac0f35769e217e8db20045c0090536e690b2d606 BSD-3-Clause+raspi-utils-eeprom 20260626-1 arm64 276832e9247838114cfb251a71750b4eeb878934a16af60a78db07cc8a483f01 BSD-3-Clause+raspi-utils-otp 20260626-1 all a11c106825fbdc5e664ebe30f6fff32c049931e976a8eb58edba8156fb88d0e8 BSD-3-Clause+raspinfo 20260626-1 all 3d926e453d15779abe6df66164d71a205353d700d8a93a0c46dba752a96d2867 BSD-3-Clause+libgpiolib0 20260626-1 arm64 594956f65e16d1fcbfd7b76046e11800ff12c0784936ed6fc3b792e707cee8f9 BSD-3-Clause+libdtovl0 20260626-1 arm64 4b81f914be83ca68cba2da4d8d4d70bdfe3ee9b3006b7e049e86c46d29968225 BSD-3-Clause+kms++-utils 0~git20250807.1813ada-1 arm64 a4c2cfe1d6e9458d43c508344c2516b672033135d373392a646a3084fbcc7f11 MPL-2.0 (source: archive.raspberrypi.com deb-src kms++)+libkms++0 0~git20250807.1813ada-1 arm64 1a22a36750d8133c1f30868c18c22ab3d5ac526f4183bfb050a34ee1c46da8db MPL-2.0 (source: archive.raspberrypi.com deb-src kms++)diff --git a/tools/rpi/build-img.sh b/tools/rpi/build-img.shindex a5dbf7b..2e256d8 100755--- a/tools/rpi/build-img.sh+++ b/tools/rpi/build-img.sh@@ -51,7 +51,7 @@ RPI="$ROOT/tools/rpi/rootfs"KERNEL_DEBS=${KERNEL_DEBS:-/var/tmp/lordos-kernel/out}T0=$(date +%s)-for t in debootstrap dpkg-deb sfdisk losetup mkfs.vfat mkfs.ext4 xz curl gpg partx; do+for t in debootstrap dpkg-deb sfdisk losetup mkfs.vfat mkfs.ext4 xz curl gpg partx python3; docommand -v "$t" >/dev/null || { echo "build-img.sh: missing $t (see docs/RASPBERRY.md, build packages)" >&2; exit 1; }donecase "$(uname -m)" in@@ -64,10 +64,17 @@ esac# Packages. LordOS's and the sample apps are the same as the ISO's (tools/iso/build.sh); the# kernel and firmware change (Raspberry Pi) and there is no live-boot, grub or disk installer.PKGS_BASE="initramfs-tools systemd-sysv udev kmod dbus dbus-user-session sudo locales tzdata- iproute2 iputils-ping less nano ca-certificates apt dpkg passwd procps e2fsprogs fdisk dosfstools util-linux"+ iproute2 iputils-ping less nano ca-certificates apt dpkg passwd procps e2fsprogs fdisk dosfstools util-linux+ systemd-timesyncd"PKGS_LORDOS="libwayland-server0 libxkbcommon0 xkb-data pipewire pipewire-pulse pipewire-alsa wireplumber rtkitalsa-ucm-conf wpasupplicant openvpn fonts-noto-core fonts-noto-cjk fonts-noto-color-emoji libthai-data- skkdic rime-data-pinyin-simp fonts-dejavu-core xwayland"+ skkdic rime-data-pinyin-simp fonts-dejavu-core xwayland+ cups avahi-daemon exfatprogs ntfs-3g power-profiles-daemon shared-mime-info gsettings-desktop-schemas"+# The board has no clock that survives without a battery: systemd-timesyncd sets the time from the+# network at boot (Settings → Date & Time, "Automatic time"); without it the clock starts months+# behind and every signed package index is refused as "not valid yet". The rest is the same as the+# ISO (printing, exFAT/NTFS drives, power profiles, the MIME database, and the GSettings schemas GTK+# apps need to read LordOS's GTK theme).# Raspberry Pi: boot firmware (start*.elf are not used on the Pi 5: its firmware lives in the# EEPROM) and Wi-Fi (CYW43455, firmware-brcm80211); kernels belowPKGS_RPI="raspi-firmware firmware-brcm80211 rsync"@@ -87,7 +94,9 @@ for fl in 2712 v8; dodone# Debian 13 Mesa: v3d (OpenGL ES 3.1 on the Pi 5), v3dv (Vulkan 1.2/1.3) and kmsro (vc4 + v3d)PKGS_GPU="libgl1-mesa-dri libegl1 libgles2 libgbm1 mesa-vulkan-drivers mesa-utils vulkan-tools glmark2-es2-wayland"-PKGS_APPS="foot featherpad qt6-wayland"+# the same apps as the ISO, browsers included (Debian's arm64 builds; they draw their own bar with+# LordOS's window buttons: tools/iso/browser-defaults.sh, docs/WAYLAND.md)+PKGS_APPS="foot featherpad qt6-wayland chromium firefox-esr"# the SSH server ships off; the `ssh` switch file on the boot partition (rpi/firstboot) or RPI_SSH=1 turns it onPKGS_SSH="openssh-server"# the boot splash (the LordOS Plymouth theme comes in the lordos package; plymouth-label draws the@@ -269,6 +278,8 @@ in_root "$CH" apt-get install -y -q --no-install-recommends $PKGS_RPI_EXTRA >> "cp "$DEB" "$CH/tmp/lordos.deb"in_root "$CH" apt-get install -y -q --no-install-recommends /tmp/lordos.deb >> "$WORK/apt.log" 2>&1 || { tail -30 "$WORK/apt.log"; exit 1; }rm -f "$CH/tmp/lordos.deb"+# the browsers' defaults, the same as the ISO's+sh "$ROOT/tools/iso/browser-defaults.sh" "$CH"# ---- 3. configuration (same as the ISO, minus the live parts) ----echo "== configuration"diff --git a/tools/rpi/rootfs/usr/lib/lordos/rpi/firstboot b/tools/rpi/rootfs/usr/lib/lordos/rpi/firstbootindex 02e82f0..6261133 100755--- a/tools/rpi/rootfs/usr/lib/lordos/rpi/firstboot+++ b/tools/rpi/rootfs/usr/lib/lordos/rpi/firstboot@@ -184,7 +184,10 @@ if [ -e "$STATE/firstboot-pending" ]; thenfiif [ "$OK" = 1 ]; thenlog "creating user $U (from $(basename "$F"))"- useradd --create-home --shell /bin/bash --user-group --comment "${FULL:-$U}" -G sudo,audio,video,input,render "$U"+ # lpadmin: an administrator manages printers too (CUPS, docs/PRINTING.md), as on the ISO+ GROUPS_U=sudo,audio,video,input,render+ for g in lpadmin plugdev; do getent group "$g" > /dev/null && GROUPS_U="$GROUPS_U,$g"; done+ useradd --create-home --shell /bin/bash --user-group --comment "${FULL:-$U}" -G "$GROUPS_U" "$U"if [ -n "$HASH" ]; then usermod -p "$HASH" "$U"else printf '%s:%s\n' "$U" "$PASS" | chpasswd; fi # chpasswd: yescrypt, like Debian: > "/var/lib/systemd/linger/$U"