From 6bd533fe149b3f4d382052f1c7960d33760fb390 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 8 Oct 2025 17:13:04 -0400 Subject: [PATCH] Drop support for embedding type1 entries directly in an image We're not going to use this in bootc and right now we just error if we encounter it, and I am not aware of a good use case. Signed-off-by: Colin Walters --- crates/composefs-boot/src/bootloader.rs | 5 ----- crates/composefs-boot/src/lib.rs | 2 +- crates/composefs-boot/src/write_boot.rs | 15 +-------------- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/crates/composefs-boot/src/bootloader.rs b/crates/composefs-boot/src/bootloader.rs index bf5cab1..e7856a1 100644 --- a/crates/composefs-boot/src/bootloader.rs +++ b/crates/composefs-boot/src/bootloader.rs @@ -404,20 +404,15 @@ initrd /{id}/initramfs.img #[derive(Debug)] pub enum BootEntry { - Type1(Type1Entry), Type2(Type2Entry), UsrLibModulesVmLinuz(UsrLibModulesVmlinuz), } pub fn get_boot_resources( image: &FileSystem, - repo: &Repository, ) -> Result>> { let mut entries = vec![]; - for e in Type1Entry::load_all(&image.root, repo)? { - entries.push(BootEntry::Type1(e)); - } for e in Type2Entry::load_all(&image.root)? { entries.push(BootEntry::Type2(e)); } diff --git a/crates/composefs-boot/src/lib.rs b/crates/composefs-boot/src/lib.rs index 791c40d..b8f82b3 100644 --- a/crates/composefs-boot/src/lib.rs +++ b/crates/composefs-boot/src/lib.rs @@ -50,7 +50,7 @@ impl BootOps for FileSystem { &mut self, repo: &Repository, ) -> Result>> { - let boot_entries = get_boot_resources(self, repo)?; + let boot_entries = get_boot_resources(self)?; for d in REQUIRED_TOPLEVEL_TO_EMPTY_DIRS { let d = self.root.get_directory_mut(d.as_ref())?; d.stat.st_mtim_sec = 0; diff --git a/crates/composefs-boot/src/write_boot.rs b/crates/composefs-boot/src/write_boot.rs index 46b54ce..a2eac71 100644 --- a/crates/composefs-boot/src/write_boot.rs +++ b/crates/composefs-boot/src/write_boot.rs @@ -20,6 +20,7 @@ use crate::{ uki, }; +/// Write a BLS Type 1 entry. pub fn write_t1_simple( mut t1: Type1Entry, bootdir: &Path, @@ -119,20 +120,6 @@ pub fn write_boot_simple( cmdline_extra: &[&str], ) -> Result<()> { match entry { - BootEntry::Type1(mut t1) => { - if let Some(name) = entry_id { - t1.relocate(boot_subdir, name); - } - write_t1_simple( - t1, - boot_partition, - boot_subdir, - root_id, - insecure, - cmdline_extra, - repo, - )?; - } BootEntry::Type2(mut t2) => { if let Some(name) = entry_id { t2.rename(name);