Bring up nokia-sparkler SMP/cpufreq/lk2nd/cam/haptics, fix timer and EDL USB timeout

- Add 0013 early-SCM 4-core SMP + cpufreq kernel patch and clock-frequency DT nodes
- Complete nokia-sparkler lk2nd port, boot/X11 session startup, 180-deg cached camera, and 157 Hz haptic audio
- Replace root-only timer backend with permissionless sxmo_timer.sh and keypad/hook cancellation
- Fix EDL Firehose rawmode ACK, USB active-config preservation, *+# hint, and 30 s default USB timeout
- Sync a1120 (cocojamboo) prebuilts, docs, tests, and verified checksums in check-rebuild.sh
This commit is contained in:
Luxferre committed 2026-11-16 11:45:38 +02:00
1 parent ab53423e33
commit d7992904bf
56 files changed
+31850 -28281

No files matched your search

+82
View File
@@ -1210,6 +1210,7 @@ clear_all_notifications_now(void)
"dunstctl close-all >/dev/null 2>&1; "
"dunstctl history-clear >/dev/null 2>&1; "
"pkill -x dunstify >/dev/null 2>&1; "
"/usr/bin/sxmo_timer.sh stop_ringing >/dev/null 2>&1; "
"sxmo_hook_statusbar.sh notifications >/dev/null 2>&1");
}
@@ -2211,6 +2212,72 @@ bt_is_unblocked_fast(void)
return unblocked;
}
static int
timer_menu_state(char *desc, size_t desc_len)
{
if (desc && desc_len > 0)
desc[0] = '\0';
const char *rdir = getenv("XDG_RUNTIME_DIR");
const char *roots[3];
int nroots = 0;
if (rdir && rdir[0])
roots[nroots++] = rdir;
if (!rdir || strcmp(rdir, "/run/user/10000") != 0)
roots[nroots++] = "/run/user/10000";
if (!rdir || strcmp(rdir, "/tmp") != 0)
roots[nroots++] = "/tmp";
int state = 0;
for (int i = 0; i < nroots && state < 2; i++) {
char tdir[256];
snprintf(tdir, sizeof(tdir), "%s/sxmo_timers", roots[i]);
DIR *d = opendir(tdir);
if (!d)
continue;
struct dirent *ent;
while ((ent = readdir(d)) != NULL) {
size_t nlen = strlen(ent->d_name);
if (nlen <= 6 || strcmp(ent->d_name + nlen - 6, ".timer") != 0)
continue;
char *endp = NULL;
long pid = strtol(ent->d_name, &endp, 10);
if (!endp || strcmp(endp, ".timer") != 0 || pid <= 0 ||
kill((pid_t)pid, 0) != 0)
continue;
char fpath[384];
snprintf(fpath, sizeof(fpath), "%s/%s", tdir, ent->d_name);
char line[128] = "";
if (!read_first_line(fpath, line, sizeof(line)))
continue;
char tmode[32] = "", tend[32] = "", tlabel[64] = "";
int nf = sscanf(line, "%31s %31s %63[^\n]", tmode, tend, tlabel);
if (nf >= 1 && strcmp(tmode, "ringing") == 0) {
state = 2;
if (desc && desc_len > 0 && tlabel[0])
snprintf(desc, desc_len, "%s", tlabel);
break;
}
if (nf >= 1 && strcmp(tmode, "running") == 0 && state == 0) {
state = 1;
if (desc && desc_len > 0 && tlabel[0])
snprintf(desc, desc_len, "%s", tlabel);
}
}
closedir(d);
}
if (state < 2 && access("/tmp/sxmo_timer_ringing", F_OK) == 0) {
char rbuf[32] = "";
if (read_first_line("/tmp/sxmo_timer_ringing", rbuf, sizeof(rbuf))) {
long rpid = strtol(rbuf, NULL, 10);
if (rpid > 0 && kill((pid_t)rpid, 0) == 0)
state = 2;
}
}
return state;
}
static int
count_notifications(void)
{
@@ -2653,6 +2720,21 @@ open_builtin_menu(const char *menu_name, int keep_idx)
if (strcmp(menu_name, "sys") == 0) {
reset_session_defaults(1, "Sys");
append_active_call_entries();
char tdesc[64] = "";
int tstate = timer_menu_state(tdesc, sizeof(tdesc));
if (tstate == 2) {
if (tdesc[0])
snprintf(label, sizeof(label), "%s Stop Timer (%s)", ICON_CLK, tdesc);
else
snprintf(label, sizeof(label), "%s Stop Timer", ICON_CLK);
add_menu_item(label, "/usr/bin/sxmo_timer.sh stop", 0);
} else if (tstate == 1) {
if (tdesc[0])
snprintf(label, sizeof(label), "%s Cancel Timer (%s)", ICON_CLK, tdesc);
else
snprintf(label, sizeof(label), "%s Cancel Timer", ICON_CLK);
add_menu_item(label, "/usr/bin/sxmo_timer.sh stop", 0);
}
int nnotifs = count_notifications();
int dunst_vis = dunst_window_visible();
if (nnotifs > 0) {