- 
                Notifications
    You must be signed in to change notification settings 
- Fork 221
Add support for adding a ramdisk to the disk image #301
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
Conversation
5685cda    to
    96abe5e      
    Compare
  
    8c6294a    to
    f9033f8      
    Compare
  
    There was a problem hiding this 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.
| if has_rd_path { | ||
| files.insert(RAMDISK_FILE_NAME, ramdisk_path); | ||
| } | 
There was a problem hiding this comment.
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).
| pub fn with_ramdisk(&self, ramdisk_path: &Path) -> Self { | ||
| Self { | ||
| kernel: self.kernel.clone(), | ||
| ramdisk: Some(ramdisk_path.to_owned()), | ||
| } | ||
| } | 
There was a problem hiding this comment.
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.
Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
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.