Bring up SSD2092 display/touch, USB NCM, HiDPI XLibre/DWM, and USB charging

This commit is contained in:
Luxferre committed 2026-11-22 15:49:38 +02:00
1 parent 034c1f61b1
commit 9db15e30ce
150 files changed
+2356 -446

No files matched your search

+74 -3
View File
@@ -189,14 +189,32 @@ for line in kcfg.splitlines():
break
else:
raise SystemExit(f"FAIL: {sys.argv[3]} missing CONFIG_CMDLINE")
if "CONFIG_REGULATOR_FIXED_VOLTAGE=y" not in kcfg.splitlines():
raise SystemExit(f"FAIL: {sys.argv[3]} missing CONFIG_REGULATOR_FIXED_VOLTAGE=y")
rootfs = sys.argv[4]
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/lib/dri/simpledrm_dri.so", "etc/runlevels/boot/geminux-usb-gadget",
"usr/share/X11/xkb/types/custom", "usr/sbin/dnsmasq"):
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")):
raise SystemExit("FAIL: hwdrivers must not be enabled in sysinit")
with open(os.path.join(rootfs, "etc/inittab"), "r", encoding="utf-8") as f:
for line in f:
if line.startswith("tty1::respawn:"):
raise SystemExit("FAIL: rootfs/etc/inittab must not run getty on tty1 (reserved for tinydm/XLibre)")
for rel, needle in (
("etc/X11/xorg.conf.d/10-geminux-gpu.conf", 'Option "AccelMethod" "none"'),
("etc/X11/xorg.conf.d/10-geminux-gpu.conf", 'Option "ShadowFB" "true"'),
("etc/X11/xorg.conf.d/30-geminux-keyboard.conf", "custom:types"),
("etc/X11/xorg.conf.d/20-geminux-touch.conf", "0 -1 1 1 0 0 0 0 1"),
("etc/conf.d/geminux-hwinit", 'GEMINUX_ENABLE_MEDIATEK_DRM="yes"'),
):
p = os.path.join(rootfs, rel)
with open(p, "r", encoding="utf-8") as f:
if needle not in f.read():
raise SystemExit(f"FAIL: {p} missing '{needle}'")
xorg_mode = os.stat(os.path.join(rootfs, "usr/bin/Xorg")).st_mode & 0o7777
if xorg_mode != 0o4755:
raise SystemExit(f"FAIL: rootfs/usr/bin/Xorg mode is {oct(xorg_mode)}, expected 0o4755")
@@ -223,7 +241,7 @@ if missing:
print(f"OK (kernel_addr=0x40080000, noautodetect, {len(names)} BusyBox applets linked)")
PYEOF
docker run --rm -v "$IMAGES_DIR:/images:ro" -v "$BASE_DIR/prebuilt/kernel/boot:/kboot:ro" alpine:3.24 sh -eu -c '
docker run --rm -i -v "$IMAGES_DIR:/images:ro" -v "$BASE_DIR/prebuilt/kernel/boot:/kboot:ro" alpine:3.24 sh -eu <<'SH_EOF'
apk add --no-cache e2fsprogs e2fsprogs-extra dtc >/dev/null
e2fsck -fn /images/geminux-rootfs.img
debugfs -R "stat /usr/bin/Xorg" /images/geminux-rootfs.img | grep -qE "Mode:[[:space:]]*04755\b" || {
@@ -248,7 +266,60 @@ docker run --rm -v "$IMAGES_DIR:/images:ro" -v "$BASE_DIR/prebuilt/kernel/boot:/
echo "FAIL: DTB contains static memory@7df00000 that triggers LK reserved_memory_conflict_check" >&2
exit 1
fi
'
printf "%s\n" "$DTS_OUT" | grep -q 'compatible = "pwm-backlight";' || {
echo "FAIL: DTB missing pwm-backlight node" >&2
exit 1
}
printf "%s\n" "$DTS_OUT" | awk '
/^\ti2c@11007000 \{/ { in_i2c=1; depth=1; next }
in_i2c {
if ($0 ~ /\{/) depth++
if ($0 ~ /\}/) { depth--; if (depth == 0) in_i2c=0 }
if (in_i2c && depth == 1 && $0 ~ /status = "okay";/) found_ok=1
if (in_i2c && depth == 1 && $0 ~ /status = "disabled";/) found_dis=1
}
/^\tpwm@1100f000 \{/ { in_pwm=1; depth_p=1; next }
in_pwm {
if ($0 ~ /\{/) depth_p++
if ($0 ~ /\}/) { depth_p--; if (depth_p == 0) in_pwm=0 }
if (in_pwm && depth_p == 1 && $0 ~ /status = "okay";/) pwm_ok=1
if (in_pwm && depth_p == 1 && $0 ~ /status = "disabled";/) pwm_dis=1
if (in_pwm && depth_p == 1 && $0 ~ /power-domains[[:space:]]*=/) pwm_pd=1
}
/^\tusb@11271000 \{/ { in_usb=1; depth_u=1; next }
in_usb {
if ($0 ~ /\{/) depth_u++
if ($0 ~ /\}/) { depth_u--; if (depth_u == 0) in_usb=0 }
if (in_usb && depth_u == 1 && $0 ~ /dr_mode = "peripheral";/) usb_periph=1
if (in_usb && depth_u == 1 && $0 ~ /usb-role-switch/) usb_rolesw=1
}
/ldo-vusb33 \{/ { in_vusb=1; next }
in_vusb && /\};/ { in_vusb=0 }
in_vusb && /regulator-always-on;/ { found_vusb=1 }
END {
if (!found_ok || found_dis) {
print "FAIL: DTB i2c@11007000 (&i2c0) must have status = \"okay\"" > "/dev/stderr"
exit 1
}
if (!found_vusb) {
print "FAIL: DTB ldo-vusb33 must have regulator-always-on" > "/dev/stderr"
exit 1
}
if (!pwm_ok || pwm_dis || pwm_pd) {
print "FAIL: DTB pwm@1100f000 (&disp_pwm) must be okay without power-domains" > "/dev/stderr"
exit 1
}
if (!usb_periph || usb_rolesw) {
print "FAIL: DTB usb@11271000 (&ssusb) must have dr_mode = \"peripheral\" and no usb-role-switch" > "/dev/stderr"
exit 1
}
}
'
SH_EOF
if readelf -Ws "$ROOTFS_DIR/usr/bin/Xorg" | grep -q systemd_logind_take_fd; then
echo "FAIL: rootfs/usr/bin/Xorg was still built with systemd_logind support" >&2
exit 1
fi
(cd "$IMAGES_DIR" && sha256sum -c SHA256SUMS)
echo "[8/8] Running all 5 Python unit/verification suites..."