From 91a8157d9918cfa668bacfb01e9f0c1b025e5260 Mon Sep 17 00:00:00 2001 From: Davide Bertola Date: Mon, 16 Sep 2024 21:42:01 +0200 Subject: [PATCH] .. --- xtask/src/run.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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);