From 47a44d794c907278b64a996fbc94df89b988c341 Mon Sep 17 00:00:00 2001 From: Vasilito Date: Thu, 23 Apr 2026 00:35:51 +0100 Subject: [PATCH] Fix build system: full commit hash, git clean, remove absent USB BINS from base-initfs - Use full 40-char commit hash in base recipe.toml so the cookbook's caching logic correctly recognizes already-fetched sources (short hashes always missed the cache, causing patches to re-apply on top of already-patched source). - Add git clean -fd before git reset --hard in fetch.rs so untracked files from previous patch applications are removed before re-patching. - Remove ehcid/ohcid/uhcid from base-initfs BINS list (same fix as base recipe, these drivers don't exist in the current upstream). With these fixes, redbear-live-mini builds and boots to login prompt in QEMU. --- recipes/core/base-initfs/recipe.toml | 2 +- recipes/core/base/recipe.toml | 2 +- src/cook/fetch.rs | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/core/base-initfs/recipe.toml b/recipes/core/base-initfs/recipe.toml index 4428ef9f..1062539c 100644 --- a/recipes/core/base-initfs/recipe.toml +++ b/recipes/core/base-initfs/recipe.toml @@ -35,7 +35,7 @@ virt_bins() x86_common_bins() { - BINS+=(ahcid ehcid ohcid uhcid ided ps2d usbhidd usbscsid usbhubd xhcid vesad) + BINS+=(ahcid ided ps2d usbhidd usbscsid usbhubd xhcid vesad) virt_bins } diff --git a/recipes/core/base/recipe.toml b/recipes/core/base/recipe.toml index cdbd6091..d15aaf98 100644 --- a/recipes/core/base/recipe.toml +++ b/recipes/core/base/recipe.toml @@ -1,6 +1,6 @@ [source] git = "https://gitlab.redox-os.org/redox-os/base.git" -rev = "463f76b9" +rev = "463f76b9608a896e6f6c9f63457f57f6409873c7" patches = ["redox.patch", "P2-boot-runtime-fixes.patch", "P2-acpi-i2c-resources.patch"] [build] diff --git a/src/cook/fetch.rs b/src/cook/fetch.rs index dc614062..be446208 100644 --- a/src/cook/fetch.rs +++ b/src/cook/fetch.rs @@ -450,6 +450,11 @@ pub fn fetch(recipe: &CookRecipe, check_source: bool, logger: &PtyOut) -> Result recipe_dir.display() ); } else { + let mut clean_cmd = Command::new("git"); + clean_cmd.arg("-C").arg(&source_dir); + clean_cmd.arg("clean").arg("-fd"); + let _ = run_command(clean_cmd, logger); + // Hard reset let mut command = Command::new("git"); command.arg("-C").arg(&source_dir);