pub struct BootManager { /* private fields */ }Implementations§
Source§impl BootManager
impl BootManager
pub fn new( paths: KernelPaths, keep_last_kernel: bool, last_kernel_suffix: Option<String>, ) -> Self
Sourcepub fn link_kernel_config(&self, kernel_path: &Path) -> Result<(), BuilderErr>
pub fn link_kernel_config(&self, kernel_path: &Path) -> Result<(), BuilderErr>
Link kernel config file to kernel source directory.
§Errors
Returns an error if file operations fail.
Sourcepub fn update_linux_symlink(
&self,
version_entry: &VersionEntry,
) -> Result<(), BuilderErr>
pub fn update_linux_symlink( &self, version_entry: &VersionEntry, ) -> Result<(), BuilderErr>
Update the /usr/src/linux symlink to point to the selected kernel.
§Errors
Returns an error if symlink operations fail.
Sourcepub fn check_new_config_options(
&self,
kernel_path: &Path,
) -> Result<bool, BuilderErr>
pub fn check_new_config_options( &self, kernel_path: &Path, ) -> Result<bool, BuilderErr>
Sourcepub fn run_olddefconfig(&self, kernel_path: &Path) -> Result<(), BuilderErr>
pub fn run_olddefconfig(&self, kernel_path: &Path) -> Result<(), BuilderErr>
Run make olddefconfig to integrate new kernel config options.
§Errors
Returns an error if olddefconfig fails.
Sourcepub fn build_kernel(
&self,
kernel_path: &Path,
threads: usize,
on_line: &mut dyn FnMut(&str),
) -> Result<(), BuilderErr>
pub fn build_kernel( &self, kernel_path: &Path, threads: usize, on_line: &mut dyn FnMut(&str), ) -> Result<(), BuilderErr>
Build the kernel with the specified number of threads.
Build output is streamed line by line to on_line rather than captured.
§Errors
Returns an error if the build fails.
Sourcepub fn install_kernel(
&self,
kernel_path: &Path,
replace: bool,
) -> Result<(), BuilderErr>
pub fn install_kernel( &self, kernel_path: &Path, replace: bool, ) -> Result<(), BuilderErr>
Install the compiled kernel to the boot partition.
§Errors
Returns an error if file operations fail.
Sourcepub fn install_modules(
&self,
kernel_path: &Path,
on_line: &mut dyn FnMut(&str),
) -> Result<(), BuilderErr>
pub fn install_modules( &self, kernel_path: &Path, on_line: &mut dyn FnMut(&str), ) -> Result<(), BuilderErr>
Install kernel modules.
Output is streamed line by line to on_line.
§Errors
Returns an error if modules_install fails.
Sourcepub fn get_current_kernel(&self) -> Option<PathBuf>
pub fn get_current_kernel(&self) -> Option<PathBuf>
Get the current kernel symlink target.
Sourcepub fn remove_kernel(&self, kernel_path: &Path) -> Result<(), BuilderErr>
pub fn remove_kernel(&self, kernel_path: &Path) -> Result<(), BuilderErr>
Remove a kernel directory and its build artifacts.
§Errors
Returns an error if directory removal fails.