sector-f-linux

Sector F Linux
git clone https://git.sectorflabs.com/sector-f-linux.git
Log | Files | Refs | README | LICENSE

commit 997f4a08cfd72f552197415445f7e2c3a86b40b3
parent 7ad4d4dc3ea362a19572d68240ebe9cdbcce895c
Author: Divan Visagie <me@divanv.com>
Date:   Sat, 21 Nov 2026 09:41:39 +0100

installer: flask at 24 fps; make targets for the components and the ISO

Diffstat:
MMakefile | 36+++++++++++++++++++++++++++++++++++-
Minstaller/src/app.rs | 6+++++-
Minstaller/src/flask.rs | 11+++++------
3 files changed, 45 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile @@ -5,7 +5,7 @@ VM := linux/vm/vm.sh DISK := linux/out/disk.raw .DEFAULT_GOAL := help -.PHONY: help build publish disk run console stop ssh view screenshot log upgrade rollback clean distclean +.PHONY: help build desktop greeter installer iso iso-release iso-run iso-stop iso-shot iso-ssh iso-reset check publish disk run console stop ssh view screenshot log upgrade rollback clean distclean help: ## List the targets @grep -E '^[a-zA-Z_-]+:.*## ' $(MAKEFILE_LIST) | \ @@ -14,6 +14,40 @@ help: ## List the targets build: ## Build the desktop, greeter and image, and push it to the registry (QUICK=1 skips the first two) linux/vm/build.sh +desktop: ## Build only the Patina desktop into linux/build/desktop/ + linux/desktop/build.sh + +greeter: ## Build only the greeter into linux/build/greeter/ (in the Fedora builder) + linux/greeter-build.sh + +installer: ## Build only the installer into linux/build/installer/ (in the Fedora builder) + linux/installer-build.sh + +iso: ## Build the live install ISO to linux/out/iso/ from the dev image, with SSH for the rig (builds in the VM; takes a while) + LIVE_DEBUG=1 TARGET_IMGREF=registry.example.com/sectorf-linux-dev:latest linux/live/build.sh + +iso-release: ## Build the live install ISO from the published image (sectorf-linux), no SSH, no test user (same output file) + PAYLOAD=registry.example.com/sectorf-linux:latest TARGET_IMGREF=registry.example.com/sectorf-linux:latest linux/live/build.sh + +iso-run: ## Boot the ISO in QEMU with two blank drives (VNC localhost:5902) + linux/live/try.sh start + +iso-stop: ## Power the ISO's VM off + linux/live/try.sh stop + +iso-shot: ## Save the ISO VM's screen to linux/out/iso/screen.png + linux/live/try.sh screenshot + +iso-ssh: ## A root shell in the ISO VM (dev ISO only; or: make iso-ssh CMD='lsblk') + linux/live/try.sh ssh $(CMD) + +iso-reset: ## Stop the ISO VM and blank its two drives + linux/live/try.sh reset + +check: ## Tests and clippy for the greeter and the installer + $(MAKE) -C greeter check + $(MAKE) -C installer check + publish: ## Build the real image (not the VM's dev one) and push it to registry.example.com (tailnet only) linux/publish.sh diff --git a/installer/src/app.rs b/installer/src/app.rs @@ -193,7 +193,11 @@ impl App { }); let busy = self.screen == Screen::Installing || self.screenshot.is_some(); ui.ctx() - .request_repaint_after(Duration::from_millis(if busy { 50 } else { 500 })); + .request_repaint_after(Duration::from_millis(if busy { + 1000 / flask::FPS as u64 + } else { + 500 + })); } fn heading(ui: &mut Ui, title: &str, sub: &str) { diff --git a/installer/src/flask.rs b/installer/src/flask.rs @@ -7,9 +7,12 @@ use std::fmt::Write; use egui::{Color32, Ui, vec2}; -pub const FRAMES: usize = 60; +/// Frames a second: the loop is drawn at this rate and no faster, since a computer with no GPU +/// (software rendering) would spend the install's CPU on drawing. +pub const FPS: usize = 24; /// Seconds for one loop. pub const LOOP: f64 = 3.0; +pub const FRAMES: usize = FPS * LOOP as usize; const OUTER: &str = "M388,385 V515 L252,697 Q222,738 222,785 Q230,900 510,905 Q790,900 798,785 \ Q798,738 768,697 L632,515 V385 Z"; @@ -99,12 +102,8 @@ pub fn show(ui: &mut Ui, seconds: f64, height: f32, animate: bool) { .fit_to_exact_size(vec2(height * 700.0 / 835.0, height)), ); if animate { - // One frame of the loop is 50 ms: no need to draw faster, and on a computer with no GPU - // (software rendering) drawing at the screen's rate takes the CPU from the install. ui.ctx() - .request_repaint_after(std::time::Duration::from_millis( - 1000 * LOOP as u64 / FRAMES as u64, - )); + .request_repaint_after(std::time::Duration::from_millis(1000 / FPS as u64)); } }