embed LKM to ksud (#1472)

This commit is contained in:
weishu
2024-03-18 23:12:46 +08:00
committed by GitHub
parent 4bad691ec8
commit 9759a779cd
6 changed files with 105 additions and 57 deletions

View File

@@ -22,7 +22,8 @@ struct Asset;
pub fn ensure_binaries(ignore_if_exist: bool) -> Result<()> {
for file in Asset::iter() {
if file == "ksuinit" {
if file == "ksuinit" || file.ends_with(".ko") {
// don't extract ksuinit and kernel modules
continue;
}
let asset = Asset::get(&file).ok_or(anyhow::anyhow!("asset not found: {}", file))?;