use new overclock.elf

This commit is contained in:
Shaun Inman 2023-03-18 21:04:14 -04:00
parent 2e6a5f722f
commit 3e26e6e854
5 changed files with 19 additions and 30 deletions

View file

@ -23,7 +23,6 @@ echo on > /sys/devices/b0230000.mmc/mmc_host/mmc1/power/control
export CPU_SPEED_MENU=504000 export CPU_SPEED_MENU=504000
export CPU_SPEED_GAME=1296000 export CPU_SPEED_GAME=1296000
export CPU_SPEED_PERF=1488000 export CPU_SPEED_PERF=1488000
export CPU_PATH=/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
####################################### #######################################
@ -43,19 +42,20 @@ keymon.elf & # &> $LOGS_PATH/keymon.txt &
####################################### #######################################
cd $(dirname "$0") cd $(dirname "$0")
export EXEC_PATH=/tmp/minui_exec
EXEC_PATH=/tmp/minui_exec
NEXT_PATH="/tmp/next"
touch "$EXEC_PATH" && sync touch "$EXEC_PATH" && sync
while [ -f "$EXEC_PATH" ]; do while [ -f "$EXEC_PATH" ]; do
echo $CPU_SPEED_PERF > "$CPU_PATH" overclock.elf $CPU_SPEED_PERF
./minui.elf &> $LOGS_PATH/minui.txt ./minui.elf &> $LOGS_PATH/minui.txt
sync sync
NEXT="/tmp/next" if [ -f $NEXT_PATH ]; then
if [ -f $NEXT ]; then CMD=`cat $NEXT_PATH`
CMD=`cat $NEXT`
eval $CMD eval $CMD
rm -f $NEXT rm -f $NEXT_PATH
echo $CPU_SPEED_PERF > "$CPU_PATH" overclock.elf $CPU_SPEED_PERF
sync sync
fi fi
done done

View file

@ -1311,7 +1311,6 @@ static void* POW_monitorBattery(void *arg) {
void POW_init(void) { void POW_init(void) {
pow.can_poweroff = 1; pow.can_poweroff = 1;
pow.previous_speed = CPU_SPEED_NORMAL;
pow.can_autosleep = 1; pow.can_autosleep = 1;
pow.should_warn = 0; pow.should_warn = 0;
pow.charge = POW_LOW_CHARGE; pow.charge = POW_LOW_CHARGE;
@ -1430,12 +1429,11 @@ void POW_powerOff(void) {
} }
#define BACKLIGHT_PATH "/sys/class/backlight/backlight.2/bl_power" #define BACKLIGHT_PATH "/sys/class/backlight/backlight.2/bl_power"
#define CPU_SPEED_SET_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
#define CPU_SPEED_GET_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq"
void POW_setCPUSpeed(int speed) { void POW_setCPUSpeed(int speed) {
putInt(CPU_SPEED_SET_PATH, speed); char cmd[32];
sync(); sprintf(cmd,"overclock.elf %d\n", speed);
system(cmd);
} }
static void POW_enterSleep(void) { static void POW_enterSleep(void) {
@ -1443,9 +1441,6 @@ static void POW_enterSleep(void) {
putInt(BACKLIGHT_PATH, FB_BLANK_POWERDOWN); putInt(BACKLIGHT_PATH, FB_BLANK_POWERDOWN);
system("killall -STOP keymon.elf"); system("killall -STOP keymon.elf");
// TODO: not sure this is necessary
// pow.previous_speed = getInt(CPU_SPEED_GET_PATH);
// POW_setCPUSpeed(CPU_SPEED_MENU);
sync(); sync();
} }
static void POW_exitSleep(void) { static void POW_exitSleep(void) {
@ -1454,9 +1449,6 @@ static void POW_exitSleep(void) {
putInt(BACKLIGHT_PATH, FB_BLANK_UNBLANK); putInt(BACKLIGHT_PATH, FB_BLANK_UNBLANK);
SetVolume(GetVolume()); SetVolume(GetVolume());
// TODO: not sure this is necessary
// POW_setCPUSpeed(pow.previous_speed);
sync(); sync();
} }
static void POW_waitForWake(void) { static void POW_waitForWake(void) {

View file

@ -9,11 +9,6 @@ FLAG_PATH=/misc/.minstalled
echo "installing/updating" echo "installing/updating"
# old rootfs.img (alpha-only)
if [ -f $SYSTEM_PATH/rootfs.img ]; then
rm $SYSTEM_PATH/rootfs.img
fi
if [ ! -f $FLAG_PATH ]; then if [ ! -f $FLAG_PATH ]; then
echo "backing up" echo "backing up"
BAK_PATH=$TF1_PATH/bak BAK_PATH=$TF1_PATH/bak

View file

@ -65,7 +65,6 @@ static struct cpu_opp {
int volt; int volt;
char* desc; char* desc;
} cpu_opps[] = { } cpu_opps[] = {
{ CLKMAX, VOLTMAX}, // just a smidge above 1.5GHz
{1488000, 1375000}, // 1.5GHz, MinUI Performance + launch {1488000, 1375000}, // 1.5GHz, MinUI Performance + launch
{1392000, 1325000}, // 1.4GHz {1392000, 1325000}, // 1.4GHz
{1296000, 1275000}, // 1.3GHz, MinUI Normal {1296000, 1275000}, // 1.3GHz, MinUI Normal
@ -74,7 +73,7 @@ static struct cpu_opp {
{1008000, 1100000}, // 1.0GHz, Anbernic default max, overvolted to stabilize {1008000, 1100000}, // 1.0GHz, Anbernic default max, overvolted to stabilize
{ 840000, 1075000}, // 840MHz, overvolted to stabilize { 840000, 1075000}, // 840MHz, overvolted to stabilize
{ 720000, 1025000}, // 720MHz, overvolted to stabilize { 720000, 1025000}, // 720MHz, overvolted to stabilize
{ 504000, 1000000}, // 500MHz, overvolted to stabilize, MinUI Menus { 504000, 1000000}, // 500MHz, overvolted to stabilize, MinUI menus
{ 240000, 975000}, // 240MHz, overvolted to stabilize { 240000, 975000}, // 240MHz, overvolted to stabilize
{ 0, 0}, { 0, 0},
}; };
@ -101,10 +100,10 @@ int main(int argc, char* argv[]) {
if (clk>=cpu->clk) { if (clk>=cpu->clk) {
setcpu( cpu->clk, cpu->volt ); setcpu( cpu->clk, cpu->volt );
// TODO: this doesn't work... // TODO: this doesn't work...
// char cmd[128]; char cmd[128];
// sprintf(cmd, "echo %i > /tmp/cpu_freq", cpu->clk); sprintf(cmd, "echo %i > /tmp/cpu_freq\n", cpu->clk);
// puts(cmd); puts(cmd);
// system(cmd); system(cmd);
break; break;
} }
} }

View file

@ -12,6 +12,9 @@ Please see the README.txt in the zip file for installation and update instructio
------------------------------- -------------------------------
BUG:
minui.elf treats bare tag rom folders as empty
hardware rev hardware rev
volumn and menu buttons no longer work volumn and menu buttons no longer work
headphone jack detection no longer works headphone jack detection no longer works