Fix boot sequence errors, enable instant Chrony online sync, and add timezone UI
- Boot sequence cleanups:
- Scope ModemManager's musl shared-plugin LD_PRELOAD to the child daemon via
supervise_daemon_args="--env LD_PRELOAD=..." so OpenRC helpers and plugins
start cleanly with zero "symbol not found" errors.
- Link XLibre fbdev_drv.so against libfbdevhw.so and libshadow.so, pin
libxfont2 in rootfs-packages.txt, populate /usr/share/fonts/*/fonts.dir,
provide XKeysymDB entries, create ~/.cache before dmenu_run, disable TearFree
for ShadowFB modesetting, and avoid D-Bus autolaunch collision with
ModemManager.
- Enable CONFIG_SYN_COOKIES=y and disable IPMI_HANDLER in
geminux-mt6797x.config, add /etc/sysctl.d/00-alpine.conf, drop x86
kernel.nmi_watchdog from 99-geminux-power.conf, and disable module
load/unload in zram-init for built-in zram.
- Add MT6797 ALSA UCM2 DL2/DL3/UL2/UL3/UL_MONO_1 backend DAI routes in
HiFi.conf and apply 0006-mt6797-boot-cleanups.patch (stk3310 ID 0x11,
mt6797-fm firmware search path, mt6797_mac_wq, and pre-auth TX abort).
- Chrony immediate online time sync:
- Enable FAST_STARTUP, configure makestep 1.0 -1 with sourcedir
/etc/chrony/sources.d, and trigger burst/waitsync/makestep/hwclock on
NetworkManager interface up via 30-geminux-chrony.
- Date, Time & Timezone UI:
- Add geminux-datetime libgemui X11 utility with zoneinfo browser, live
search, region filters, and NTP sync trigger.
- Add doas-authorized geminux-tzctl helper with zoneinfo validation and
update geminux-statusd to reload /etc/timezone cleanly under musl.
This commit is contained in:
1 parent
6aea73cbeb
commit
8843558f3b
65 files changed
+1060
-37
No files matched your search
@@ -162,6 +162,22 @@ for svc in geminux-hwinit geminux-ccci geminux-powerd geminux-leds bluetooth pol
|
||||
fi
|
||||
done
|
||||
|
||||
for fdir in misc TTF OTF; do
|
||||
mkdir -p "$TARGET_ROOTFS/usr/share/fonts/$fdir"
|
||||
if [ ! -f "$TARGET_ROOTFS/usr/share/fonts/$fdir/fonts.dir" ]; then
|
||||
printf '0\n' > "$TARGET_ROOTFS/usr/share/fonts/$fdir/fonts.dir"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -f "$TARGET_ROOTFS/usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service" ]; then
|
||||
sed -i 's|^Exec=.*|Exec=/bin/false|' \
|
||||
"$TARGET_ROOTFS/usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service"
|
||||
fi
|
||||
|
||||
if [ -f "$TARGET_ROOTFS/etc/rc.conf" ] && ! grep -q '^rc_logger=' "$TARGET_ROOTFS/etc/rc.conf"; then
|
||||
printf '\nrc_logger="YES"\n' >> "$TARGET_ROOTFS/etc/rc.conf"
|
||||
fi
|
||||
|
||||
if [ -x "$BASE_DIR/scripts/version.sh" ]; then
|
||||
"$BASE_DIR/scripts/version.sh" "$TARGET_ROOTFS"
|
||||
fi
|
||||
@@ -186,7 +202,8 @@ for f in .bashrc .profile .bash_profile; do
|
||||
done
|
||||
|
||||
echo "[4/4] Populating /home/user skel and setting permissions..."
|
||||
mkdir -p "$TARGET_ROOTFS/home/user/.config" "$TARGET_ROOTFS/home/user/.local/share/geminux" \
|
||||
mkdir -p "$TARGET_ROOTFS/home/user/.cache" "$TARGET_ROOTFS/home/user/.config" \
|
||||
"$TARGET_ROOTFS/home/user/.local/share/geminux" \
|
||||
"$TARGET_ROOTFS/home/user/Pictures" "$TARGET_ROOTFS/home/user/Videos" \
|
||||
"$TARGET_ROOTFS/home/user/Downloads"
|
||||
if [ -d "$TARGET_ROOTFS/etc/skel" ]; then
|
||||
@@ -195,5 +212,11 @@ fi
|
||||
chown -R 10000:10000 "$TARGET_ROOTFS/home/user" 2>/dev/null || true
|
||||
chmod 0600 "$TARGET_ROOTFS/etc/NetworkManager/system-connections/"*.nmconnection \
|
||||
"$TARGET_ROOTFS/usr/lib/NetworkManager/system-connections/"*.nmconnection 2>/dev/null || true
|
||||
chown 0:0 "$TARGET_ROOTFS/etc/NetworkManager/dispatcher.d/"* 2>/dev/null || true
|
||||
chmod 0755 "$TARGET_ROOTFS/etc/NetworkManager/dispatcher.d/"* 2>/dev/null || true
|
||||
if [ ! -f "$TARGET_ROOTFS/etc/timezone" ] && [ -f "$TARGET_ROOTFS/usr/share/zoneinfo/UTC" ]; then
|
||||
printf 'UTC\n' > "$TARGET_ROOTFS/etc/timezone"
|
||||
ln -sfn /usr/share/zoneinfo/UTC "$TARGET_ROOTFS/etc/localtime"
|
||||
fi
|
||||
chmod 0640 "$TARGET_ROOTFS/etc/doas.d/"* 2>/dev/null || true
|
||||
echo "Applied Geminux overlay and @geminux APKs for $DEVICE."
|
||||
@@ -253,6 +253,10 @@ EOF
|
||||
-I"$SYSROOT/usr/include/X11/dri" \
|
||||
-I"$SYSROOT/usr/include/libdrm" \
|
||||
"$XF86_FBDEV_SRC/src/fbdev.c" \
|
||||
-Wl,-rpath,"$ABI_MOD_DIR" \
|
||||
-L"/geminux/prebuilt/xlibre$ABI_MOD_DIR" \
|
||||
-l:libfbdevhw.so \
|
||||
-l:libshadow.so \
|
||||
-o "/geminux/prebuilt/xlibre$ABI_MOD_DIR/drivers/fbdev_drv.so"
|
||||
fi
|
||||
|
||||
|
||||
@@ -196,7 +196,10 @@ for req_rel in ("etc/pam.d/autologin", "etc/init.d/geminux-hwinit",
|
||||
"usr/lib/dri/simpledrm_dri.so", "etc/runlevels/boot/geminux-usb-gadget",
|
||||
"usr/share/X11/xkb/types/custom", "usr/sbin/dnsmasq",
|
||||
"etc/NetworkManager/conf.d/20-geminux-wifi.conf", "etc/shells",
|
||||
"usr/sbin/geminux-wifi-nvram", "etc/polkit-1/rules.d/10-geminux.rules"):
|
||||
"usr/sbin/geminux-wifi-nvram", "usr/sbin/geminux-tzctl",
|
||||
"usr/bin/geminux-datetime",
|
||||
"etc/NetworkManager/dispatcher.d/30-geminux-chrony",
|
||||
"etc/polkit-1/rules.d/10-geminux.rules"):
|
||||
if not os.path.lexists(os.path.join(rootfs, req_rel)):
|
||||
raise SystemExit(f"FAIL: missing required path {os.path.join(rootfs, req_rel)}")
|
||||
if os.path.lexists(os.path.join(rootfs, "etc/runlevels/sysinit/hwdrivers")):
|
||||
|
||||
@@ -255,6 +255,9 @@ make_pkg(
|
||||
"alpine-baselayout-data",
|
||||
"alpine-release",
|
||||
"bluez",
|
||||
"chrony",
|
||||
"chrony-common",
|
||||
"chrony-openrc",
|
||||
"tinydm",
|
||||
"tinydm-openrc",
|
||||
"xinit",
|
||||
|
||||
@@ -71,6 +71,7 @@ libpng
|
||||
libva
|
||||
libva-utils
|
||||
libxcvt
|
||||
libxfont2
|
||||
libxft
|
||||
libxi
|
||||
libxinerama
|
||||
|
||||
@@ -34,6 +34,7 @@ C_TEST = r"""
|
||||
#include "geminux-wifi-list.h"
|
||||
#include "geminux-bt-list.h"
|
||||
#include "geminux-audio-parse.h"
|
||||
#include "geminux-tz-valid.h"
|
||||
|
||||
static int count_decision(const geminux_gesture_action_t *a, int mode) {
|
||||
int c = 0;
|
||||
@@ -288,6 +289,38 @@ int main(void) {
|
||||
assert(strcmp(profs[1].card_label, "WH-1000XM5") == 0);
|
||||
assert(profs[1].active && profs[1].available);
|
||||
assert(!profs[2].active && strcmp(profs[2].profile_name, "headset-head-unit") == 0);
|
||||
|
||||
assert(geminux_tz_name_valid("UTC"));
|
||||
assert(geminux_tz_name_valid("Europe/Berlin"));
|
||||
assert(geminux_tz_name_valid("America/Argentina/Buenos_Aires"));
|
||||
assert(geminux_tz_name_valid("Etc/GMT+2"));
|
||||
assert(!geminux_tz_name_valid(""));
|
||||
assert(!geminux_tz_name_valid("/UTC"));
|
||||
assert(!geminux_tz_name_valid("Europe/"));
|
||||
assert(!geminux_tz_name_valid("../etc/passwd"));
|
||||
assert(!geminux_tz_name_valid("Europe//Berlin"));
|
||||
assert(!geminux_tz_name_valid("UTC;id"));
|
||||
|
||||
char tzdir[128];
|
||||
snprintf(tzdir, sizeof(tzdir), "/tmp/geminux-tz-test-%ld", (long)getpid());
|
||||
mkdir(tzdir, 0755);
|
||||
char okp[256], badp[256];
|
||||
snprintf(okp, sizeof(okp), "%s/GoodZone", tzdir);
|
||||
snprintf(badp, sizeof(badp), "%s/BadZone", tzdir);
|
||||
FILE *zf = fopen(okp, "wb");
|
||||
assert(zf != NULL);
|
||||
fwrite("TZif2\0", 1, 6, zf);
|
||||
fclose(zf);
|
||||
zf = fopen(badp, "wb");
|
||||
assert(zf != NULL);
|
||||
fwrite("BAD!\0", 1, 5, zf);
|
||||
fclose(zf);
|
||||
assert(geminux_tz_file_valid(tzdir, "GoodZone"));
|
||||
assert(!geminux_tz_file_valid(tzdir, "BadZone"));
|
||||
assert(!geminux_tz_file_valid(tzdir, "MissingZone"));
|
||||
unlink(okp);
|
||||
unlink(badp);
|
||||
rmdir(tzdir);
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user