diff --git a/local/sources/base b/local/sources/base index 30d6014165..2055dcdd44 160000 --- a/local/sources/base +++ b/local/sources/base @@ -1 +1 @@ -Subproject commit 30d6014165ca0b051e103e21f42317b63a732c11 +Subproject commit 2055dcdd443735e507ca7b51cff9c0bb8c32d0dc diff --git a/recipes/core/base-initfs/recipe.toml b/recipes/core/base-initfs/recipe.toml index 19f21c5835..043c7964a4 100644 --- a/recipes/core/base-initfs/recipe.toml +++ b/recipes/core/base-initfs/recipe.toml @@ -124,6 +124,17 @@ else cp -v "${COOKBOOK_BUILD}/${TARGET}/release/bootstrap" "${COOKBOOK_BUILD}/bootstrap" fi +# Build the loop_mnt discovery helper as a separate target so the +# initfs can fall back to scanning for the live medium at runtime +# (analogous to CachyOS's archiso_loop_mnt hook). Cross-compile +# directly so we don't need a runtime libstd. +CARGO_PROFILE_RELEASE_OPT_LEVEL=s CARGO_PROFILE_RELEASE_PANIC=abort \ +"${COOKBOOK_CARGO}" build ${build_flags} \ + --manifest-path "${COOKBOOK_SOURCE}/initfs/tools/Cargo.toml" \ + --target "${TARGET}" \ + --bin loop_mnt +cp -v "target/${TARGET}/${build_type}/loop_mnt" "${COOKBOOK_BUILD}/initfs/bin/loop_mnt" + env -u CARGO -u RUSTFLAGS cargo run --manifest-path "${COOKBOOK_SOURCE}/initfs/tools/Cargo.toml" --bin redox-initfs-ar -- "${COOKBOOK_BUILD}/initfs" "${COOKBOOK_BUILD}/bootstrap" -o "${COOKBOOK_BUILD}/initfs.img" mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"