Initial commit: Geminux 0.1.0 (helio) for Planet Computers Gemini PDA (MT6797X)
This commit is contained in:
commit
034c1f61b1
816 files changed
+223435
No files matched your search
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Compile and verify Geminux Gemini PDA US XKB keymap using xkbcomp inside Docker."""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
XKB_OVERLAY = os.path.join(BASE_DIR, "overlay", "rootfs", "usr", "share", "X11", "xkb")
|
||||
|
||||
|
||||
def main():
|
||||
script = r"""
|
||||
set -eu
|
||||
cat > /etc/apk/repositories <<EOF
|
||||
https://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||
https://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||
EOF
|
||||
apk add --no-cache xkbcomp setxkbmap xkeyboard-config >/dev/null
|
||||
cp -a /geminux-xkb/. /usr/share/X11/xkb/
|
||||
cat > /tmp/gemini.xkb <<'XKB'
|
||||
xkb_keymap {
|
||||
xkb_keycodes { include "evdev+aliases(qwerty)" };
|
||||
xkb_types { include "complete+geminux" };
|
||||
xkb_compat { include "complete" };
|
||||
xkb_symbols { include "pc+planet_vndr/geminux(us)+inet(evdev)" };
|
||||
xkb_geometry { include "pc(pc105)" };
|
||||
};
|
||||
XKB
|
||||
xkbcomp -w 3 -I/usr/share/X11/xkb /tmp/gemini.xkb /tmp/gemini.xkm
|
||||
xkbcomp /tmp/gemini.xkm /tmp/gemini_dump.xkb
|
||||
cat /tmp/gemini_dump.xkb
|
||||
"""
|
||||
res = subprocess.run(
|
||||
["docker", "run", "--rm", "--network=host", "-v", f"{XKB_OVERLAY}:/geminux-xkb:ro",
|
||||
"alpine:3.24", "sh", "-eu", "-c", script],
|
||||
capture_output=True, text=True, check=False
|
||||
)
|
||||
if res.returncode != 0:
|
||||
print(res.stdout)
|
||||
print(res.stderr, file=sys.stderr)
|
||||
return res.returncode
|
||||
|
||||
dump = res.stdout
|
||||
checks = [
|
||||
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
|
||||
"asciitilde", "EuroSign", "Super_L", "ISO_Level3_Shift", "Mod4", "Mod5",
|
||||
"GEMINUX_LALT", "GEMINUX_FN",
|
||||
]
|
||||
for token in checks:
|
||||
assert token in dump, f"Expected '{token}' in compiled XKB dump"
|
||||
# Verify digit AE01 order: [ 1, exclam, F1, asciitilde ]
|
||||
assert "[ 1, exclam, F1, asciitilde ]" in dump or \
|
||||
"1, exclam, F1, asciitilde" in " ".join(dump.split()), \
|
||||
"AE01 digit/F1/tilde mapping mismatch"
|
||||
print("[PASS] XKB compilation & Fn+Alt=Mod4 / Fn+1..0=F1..F10 / Shift+Fn+1..0 symbols verified")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Reference in new issue
Block a user