-
Notifications
You must be signed in to change notification settings - Fork 55
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
loader: Re-organize module layout #197
Conversation
85b10c9
to
c1cf33f
Compare
Should we consider modify our CI to ignore changes not committed, or change our bench test code to skip download, use local binary? This setup is confusing while having a binary in our repo and download it from internet when testing 😵💫 |
I agree its a confusing/annoying, but I'm not sure about the license implications of including the kernel binary in the repository, so let's keep it the way it is for now :/ |
I don't know why after re-organizing the layout makes the In that run, I haven't remove the binary :( but it's changed somehow after the test downloaded it |
93491af
to
c1cf33f
Compare
Re-organize modules of `loader` to follow image format, enable reuse of code across different architectures. Its interface is unchanged. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
51e1a11
to
a099c14
Compare
Code in `fdt.rs` do not contain architecture specific code as of `aarch64`, it's only used by `aarch64`, move it one level up to allow reusing on riscv64 platform. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
cc8dec1
to
d5b8810
Compare
Code in `mod.rs` of `aarch64` do not contain architecture specific code as of `aarch64`, it's only used by `aarch64` to run benchmark tests, move it one level up and rename it to `fdt.rs` to allow reusing on riscv64 platform. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
d5b8810
to
073b198
Compare
Update: fixed by @roypat in rust-vmm/rust-vmm-ci#169 |
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.
In light of #190, I'm very much in favor of this change, but we need to definitely mention it in the changelog, pointing out how the modules were moved. It might even make sense to create some re-exports according to the old module structure, to avoid downstream users of this crate having to update, e.g.
pub mod x86_64 {
pub mod elf {
pub use crate::loader::elf::*;
}
}
and so on (which I just realize is what Rob also suggested in #190 :D)
Noted, I failed to understand that intent initially, I will work it out :) |
I tried to add this re-export, and I just find out the |
Update CHANGELOG.md to document the re-organization of `loader`, `configurator` and `benches` modules. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
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.
Ahh, very neat, thanks for checking!
(verified by compiling Firecracker against this, and everything indeed still works without changes)
Fix wrongly put rust-vmm#197 changelog and add entry for rust-vmm#190. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Fix wrongly put rust-vmm#197 changelog and add entry for rust-vmm#190. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Fix wrongly put rust-vmm#197 changelog and add entry for rust-vmm#190. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Fix wrongly put rust-vmm#197 changelog and add entry for rust-vmm#190. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Fix wrongly put rust-vmm#197 changelog and add entry for rust-vmm#190. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Fix wrongly put rust-vmm#197 changelog and add entry for rust-vmm#190. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Summary of the PR
loader: Re-organize module layout
Re-organize modules of
loader
to follow image format, enable reuse ofcode across different architectures.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.