diff --git a/xtask/src/run.rs b/xtask/src/run.rs index 8bba7a53..770de67e 100644 --- a/xtask/src/run.rs +++ b/xtask/src/run.rs @@ -340,6 +340,27 @@ pub fn run(opts: Options) -> Result<()> { } } } + + // WIP: copy kernel config as well + // This is currently based on name conventions and + // configs are not passed-in, so not ideal + let config_path = PathBuf::from( + kernel_image + .to_string_lossy() + .replace("vmlinuz-", "config-"), + ); + if config_path.exists() { + for bytes in [ + "file /boot/".as_bytes(), + config_path.as_os_str().as_bytes(), + " ".as_bytes(), + config_path.as_os_str().as_bytes(), + " 0755 0 0\n".as_bytes(), + ] { + stdin.write_all(bytes).expect("write"); + } + } + // Must explicitly close to signal EOF. drop(stdin);