Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for adding a ramdisk to the disk image #301

Closed
wants to merge 3 commits into from

Conversation

jasoncouture
Copy link
Contributor

This adds support for adding a ramdisk file to the disk image.

I will follow up in a future PR to add support for loading and passing this to the kernel in a future PR.

Copy link
Member

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting, looks good overall! I left some inline comments below.

src/lib.rs Outdated Show resolved Hide resolved
Comment on lines +159 to +161
if has_rd_path {
files.insert(RAMDISK_FILE_NAME, ramdisk_path);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above (use if let and avoid the additional bindings in lines 151-154).

src/lib.rs Outdated Show resolved Hide resolved
Comment on lines +111 to 116
pub fn with_ramdisk(&self, ramdisk_path: &Path) -> Self {
Self {
kernel: self.kernel.clone(),
ramdisk: Some(ramdisk_path.to_owned()),
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: set_ramdisk(&mut self, ramdisk_path: &Path) -> &mut Self.

@phil-opp
Copy link
Member

phil-opp commented Jan 2, 2023

This change only makes sense in combination with #302, so maybe we should close this PR and use #302 for the combined changes?

jasoncouture and others added 2 commits January 2, 2023 11:26
Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
jasoncouture added a commit to jasoncouture/bootloader that referenced this pull request Jan 2, 2023
Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
jasoncouture added a commit to jasoncouture/bootloader that referenced this pull request Jan 3, 2023
Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants