From 42b42aa1ea6426d138ff9fb1b7169f5a5957e215 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Wed, 19 Jun 2024 21:52:05 +0300 Subject: [PATCH] begin adding x86 v3 check --- data/db_kernel_cachy.json | 31 +++-------------- data/kernel_branches.json | 3 +- data/resources.gresource.xml | 2 ++ data/scripts/core | Bin 10530816 -> 10530816 bytes data/scripts/kernel-cachyos-init.sh | 20 +++++++++++ data/tux-download-symbolic.svg | 5 +++ data/tux-settings-symbolic.svg | 5 +++ src/content/mod.rs | 6 ++-- src/kernel_pkg/mod.rs | 52 +++++++++++++++++++++++++++- src/sched_ext/mod.rs | 18 +++++++--- 10 files changed, 106 insertions(+), 36 deletions(-) create mode 100644 data/scripts/kernel-cachyos-init.sh create mode 100644 data/tux-download-symbolic.svg create mode 100644 data/tux-settings-symbolic.svg diff --git a/data/db_kernel_cachy.json b/data/db_kernel_cachy.json index 6edd25d..673417b 100644 --- a/data/db_kernel_cachy.json +++ b/data/db_kernel_cachy.json @@ -4,37 +4,14 @@ { "name": "CachyOS Default Kernel", "package": "kernel-cachyos", - "description": "CachyOS Kernel with default scheduler." - }, - { - "name": "CachyOS BORE Kernel", - "package": "kernel-cachyos-bore", - "description": "CachyOS Kernel with Burst-Oriented Response Enhancer\n Scheduler by firelzrd (BORE)." - }, - { - "name": "CachyOS BORE + EEVDF Kernel", - "package": "kernel-cachyos-bore-eevdf", - "description": "CachyOS Kernel with Burst-Oriented Response Enhancer\n Scheduler by firelzrd (BORE) + Earliest Eligible Virtual Deadline (EEVDF)." - }, - { - "name": "CachyOS BORE + EEVDF Kernel (RT)", - "package": "kernel-cachyos-bore-eevdf-rt", - "description": "CachyOS Kernel with Burst-Oriented Response Enhancer\n Scheduler by firelzrd (BORE) + Earliest Eligible Virtual Deadline (EEVDF) with Real-Time compilation." - }, - { - "name": "CachyOS BORE Kernel (LTO)", - "package": "kernel-cachyos-bore-lto", - "description": "CachyOS Kernel with Burst-Oriented Response Enhancer\n Scheduler by firelzrd (BORE) with Link-Time-Optimizations (LTO)." + "description": "CachyOS Kernel with default scheduler.", + "min_x86_march": 3, }, { "name": "CachyOS LTS Kernel", "package": "kernel-cachyos-lts", - "description": "CachyOS Long Term Support Kernel." - }, - { - "name": "CachyOS Kernel (RT)", - "package": "kernel-cachyos-rt", - "description": "CachyOS Kernel with default scheduler and Real-Time compilation." + "description": "CachyOS Long Term Support Kernel.", + "min_x86_march": 2 } ] } \ No newline at end of file diff --git a/data/kernel_branches.json b/data/kernel_branches.json index 280f520..b800ed2 100644 --- a/data/kernel_branches.json +++ b/data/kernel_branches.json @@ -2,7 +2,8 @@ "branches": [ { "name": "kernel-cachyos", - "db_url": "https://raw.githubusercontent.com/CosmicFusion/fedora-kernel-manager/main/data/db_kernel_cachy.json" + "db_url": "https://raw.githubusercontent.com/CosmicFusion/fedora-kernel-manager/main/data/db_kernel_cachy.json", + "init_script": "" } ] } \ No newline at end of file diff --git a/data/resources.gresource.xml b/data/resources.gresource.xml index e2b697e..26f00dc 100644 --- a/data/resources.gresource.xml +++ b/data/resources.gresource.xml @@ -2,6 +2,8 @@ tux-symbolic.svg + tux-download-symbolic.svg + tux-settings-symbolic.svg style.css diff --git a/data/scripts/core b/data/scripts/core index 3924f8b78a23fe37100d7209577cda0593fc4d35..7db5efa07db1c9e4702d54ec1f0f57f7b49c4449 100644 GIT binary patch delta 17518 zcmeHPeRx#G)xUQ)frSKElYj{!VZ%2hz>)Ati>QleaaSzOvlNViHV9$_3smJXR(-{)@Sd4DCk(5;^^f*>|LH!@ z$#2e?bIzRkxHEI_of~i4{qbI);3(Y`u4~BCpN@09xTTs!zHuh6eQ~1&sB^t3NeCNy zneyW%LvF(?NKD~sWjXVbS@^XZEe%IZ2@Ts!-G3-f>&!JZO=CL_*IeFUHTRC2%6*J5 z=f{=uL~M&3b-aTEoz|w74?v z>#Df?xN`1GjlaQ&OOjI6i?v%|qb$L?@CO#w_@uZWNb5~;4cEkX|6xXhm(*vMK^3;d z+v2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4{J}l$!J;=;VXpS5cZmfj)xFVBAh{ZJK=i5^!b=Sk8nES z9KvOUbtXapO{CaO7$tm*@C(9k32pSrcLCuH!bOB$!bb@C667*N-$u#DlcsC>eD@zd zCKn%$H>PDgMtz*WVXG~fbkn5bF!Z4hQ^GqgG9J|@j-OaoRyIMqeEy;Zvr4bIe8K#i zE}uPp*+nbHuUN6nIevw+q_}ALvXTi!lZq=QPM+i}UNQNim6O72CL5W0LQ&D=V)4Kf zBO`IVbMoZLPVv+fV~lmegc9-o6ythGo>U}CrW$$3xu+VpBovLGFe!X=sxcm|!wJ)k QJd35cC_MUN + + + + diff --git a/data/tux-settings-symbolic.svg b/data/tux-settings-symbolic.svg new file mode 100644 index 0000000..065ce05 --- /dev/null +++ b/data/tux-settings-symbolic.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/content/mod.rs b/src/content/mod.rs index d4e6e08..5830e79 100644 --- a/src/content/mod.rs +++ b/src/content/mod.rs @@ -117,7 +117,7 @@ pub fn content( .build(); let browse_kernels_button = gtk::Button::builder() - .icon_name("web") + .icon_name("tux-settings-symbolic") .halign(Align::Start) .margin_start(10) .margin_end(10) @@ -139,7 +139,7 @@ pub fn content( ); let config_kernel_button = gtk::Button::builder() - .icon_name("settings") + .icon_name("tux-download-symbolic") .halign(Align::End) .margin_start(10) .margin_end(10) @@ -413,7 +413,7 @@ pub fn get_current_scheduler(version: String) -> String { println!("sched_ext is detected, getting scx scheduler"); let scx_sched = match fs::read_to_string("/sys/kernel/sched_ext/root/ops") { Ok(t) => t, - Err(_) => "unknown!".to_string(), + Err(_) => "disabled".to_string(), }; "sched_ext: ".to_owned() + &scx_sched } else if bore_check() { diff --git a/src/kernel_pkg/mod.rs b/src/kernel_pkg/mod.rs index 615575f..5cef474 100644 --- a/src/kernel_pkg/mod.rs +++ b/src/kernel_pkg/mod.rs @@ -1,3 +1,4 @@ +use std::process::Stdio; use crate::content::get_running_kernel_info; use crate::{kernel_package_row, KernelBranch, RunningKernelInfo}; use adw::prelude::*; @@ -42,6 +43,23 @@ pub fn kernel_pkg_page( main_label.add_css_class("symbolic-accent-bg"); main_label.add_css_class("size-20-font"); + let main_icon = gtk::Image::builder() + .pixel_size(48) + .halign(Align::Start) + .margin_start(20) + .margin_end(20) + .margin_bottom(20) + .margin_top(20) + .build(); + + main_icon.set_icon_name(Some("tux-settings-symbolic")); + + main_icon.add_css_class("symbolic-accent-bg"); + + let main_label_box = gtk::Box::new(Orientation::Horizontal, 0); + main_label_box.append(&main_icon); + main_label_box.append(&main_label); + let searchbar = gtk::SearchEntry::builder() .search_delay(500) .margin_bottom(15) @@ -105,7 +123,7 @@ pub fn kernel_pkg_page( window_bottombar.append(&back_button); - main_box.append(&main_label); + main_box.append(&main_label_box); main_box.append(&searchbar); main_box.append(&packages_viewport); main_box.append(&window_bottombar); @@ -120,6 +138,12 @@ fn add_package_rows( rows_size_group: >k::SizeGroup, searchbar: >k::SearchEntry ) { + let cpu_feature_level: u64 = match get_cpu_feature_level().as_str() { + "x86-64-v4" => 4, + "x86-64-v3" => 3, + "x86-64-v2" => 2, + _ => 1 + }; let res: serde_json::Value = serde_json::from_str(&data).expect("Unable to parse"); if let serde_json::Value::Array(kernels) = &res["kernels"] { for kernel in kernels { @@ -130,6 +154,10 @@ fn add_package_rows( .to_owned() .unwrap() .to_string(); + let kernel_min_x86_march = kernel["min_x86_march"] + .as_u64() + .to_owned() + .unwrap(); let kernel_package_version = match Command::new("/usr/lib/fedora-kernel-manager/scripts/get_version.sh") .args([&kernel_package]) .output() { @@ -354,6 +382,8 @@ fn add_package_rows( }); })); // + //if kernel_needs_v3 = false || kernel_needs_v3 = true && cpu_feature_level = "x86-64-v3" + println!("{}", cpu_feature_level); boxedlist.append(&kernel_expander_row); } }; @@ -403,3 +433,23 @@ fn kernel_modify( Ok(()) } + +fn get_cpu_feature_level() -> String { + let base_command = Command::new("/lib64/ld-linux-x86-64.so.2") // `ps` command... + .arg("--help") // with argument `axww`... + .stdout(Stdio::piped()) // of which we will pipe the output. + .spawn() // Once configured, we actually spawn the command... + .unwrap(); // and assert everything went right. + let grep_command = Command::new("grep") + .arg("(supported, searched2)") + .stdin(Stdio::from(base_command.stdout.unwrap())) + .stdout(Stdio::piped()) + .spawn() + .unwrap(); + let output = grep_command.wait_with_output().expect("Output failed"); + let result = match String::from_utf8(output.stdout).expect("stringing failed").lines().next() { + Some(t) => t.trim_end_matches("(supported, searched)").trim().to_string(), + _ => "x86_64-v1".to_string() + }; + result +} \ No newline at end of file diff --git a/src/sched_ext/mod.rs b/src/sched_ext/mod.rs index f98da5b..517521d 100644 --- a/src/sched_ext/mod.rs +++ b/src/sched_ext/mod.rs @@ -28,7 +28,7 @@ pub fn sched_ext_page(content_stack: >k::Stack) -> gtk::Box { .margin_top(20) .build(); - main_icon.set_icon_name(Some("tux-symbolic")); + main_icon.set_icon_name(Some("tux-settings-symbolic")); main_icon.add_css_class("symbolic-accent-bg"); @@ -174,6 +174,7 @@ fn scx_sched_expandable(expander_row: &adw::ExpanderRow) -> gtk::ListBox { if let serde_json::Value::Array(scheds) = &res["scx_schedulers"] { for sched in scheds { let sched = sched["name"].as_str().to_owned().unwrap().to_string(); + let sched_clone0 = sched.clone(); let sched_checkbutton = gtk::CheckButton::builder() .valign(Align::Center) .can_focus(false) @@ -192,9 +193,9 @@ fn scx_sched_expandable(expander_row: &adw::ExpanderRow) -> gtk::ListBox { } }), ); - //if current_keyboard.contains(&(keyboard_layout_clone)) { - // keyboard_layout_checkbutton.set_active(true); - //} + if format!("scx_{}",get_current_scx_scheduler()).as_str() == sched_clone0 { + sched_checkbutton.set_active(true) + } } }; @@ -231,3 +232,12 @@ fn scx_sched_expandable(expander_row: &adw::ExpanderRow) -> gtk::ListBox { boxedlist } + +fn get_current_scx_scheduler() -> String { + let scx_sched = match fs::read_to_string("/sys/kernel/sched_ext/root/ops") { + Ok(t) => t, + Err(_) => "disabled".to_string(), + }; + + scx_sched +} \ No newline at end of file