Skip to content

CoreFreq for Clear Linux

CyrIng edited this page Mar 19, 2022 · 4 revisions

Clear Linux Installation

Clear Linux Project

  • Download the Clear Linux OS Server ISO image

Prepare

  • VM [ Clear Linux ]
  • HOST [ Arch Linux ]
  • Hard disk of 40 GB minimum space size for the Clear Linux Kernel bundle
    • Base is requiring 2.5 GB and Kernel bundle 29 GB
qemu-img create clearlinux.img 40G
qemu-system-x86_64 -cpu EPYC-v3 -smp 4 -m 4096 -cdrom clear-36010-live-server.iso clearlinux.img

Boot

  • Run the Clear Linux installer ( 7' )
    • Stay with the default us keyboard map during the whole installation
    • You must create one User as Administrator > root account will be deactivated
clr-installer

Development prerequisites

  • Once installed and rebooted, log with the User account and set the keyboard map
    • Remember keyboard is still us
    • Wait until the end of the post-installation processes
sudo loadkeys fr
  • Set up kernel development environment ( 13' )
sudo swupd bundle-add git
git --version
curl --version
sudo swupd bundle-add kernel-native-dkms
  • Reboot with the installed Kernel and the KVM hardware acceleration enabled
 qemu-system-x86_64 -cpu EPYC-v3 -smp 4 -m 4096 --enable-kvm clearlinux.img
## as root
mkdir -p /etc/kernel/cmdline.d
$EDITOR /etc/kernel/cmdline.d/allow-unsigned-modules.conf

module.sig_unenforce

## as root
clr-boot-manager update
reboot

CoreFreq installation

Download and Build

git clone https://github.com/cyring/CoreFreq.git
cd CoreFreq
make clean all

Run

Driver and Daemon

  • Start the Driver
sudo insmod corefreqk.ko
  • Start the Daemon
# option '-q' for quiet mode
sudo ./corefreqd -q &

Client

  • Start the Client
./corefreq-cli

CoreFreq_ClearLinux

Exit

Client

  • Press [Ctrl] + [x] to exit from the Client

Daemon

  • Get the Daemon job pid
jobs -p
435
  • Kill the Daemon
sudo kill 435
[1]+ Done sudo ./corefreqd -q

Driver

  • Unload the Driver
sudo rmmod corefreqk