Copy resolution-matched logo and battery images in select_devices.sh - #194
Copy resolution-matched logo and battery images in select_devices.sh#194ronyeh2 wants to merge 2 commits into
Conversation
select_device.ps1 already picks logo-<resolution>.bmp using the 'resolution' key from r36_devices.ini, but select_devices.sh only copies the DTB pair. On a 720x720 device (e.g. R36S Plus-V20 2025-03-18) the shell selector leaves the default 640x480 logo.bmp in place, so U-Boot draws 640-wide rows into a 720-wide framebuffer and the splash appears sheared/scrambled for the first few seconds of boot. Build the filename from the resolution string instead of hardcoding the two known sizes, so future panel resolutions need no code change. No-ops when 'resolution' is absent or the logo file is missing.
dtb/logo ships battery-640x480.zip and battery-720x270.zip, but neither selector script installs them, so the boot partition ends up with no battery_*.bmp at all and U-Boot has nothing to draw for the charging and low-battery screens. Extract the archive matching the device's resolution. Archive names do not always match the resolution exactly (720x720 panels ship battery-720x270.zip, whose bitmaps are in fact 720x720), so fall back to matching on width. Skips cleanly when unzip is unavailable or no archive matches.
Note:
|
|
This is not the place but I don't know where to address you @southoz, there is no way to open a issue for a K36 Panel 5 for R36S Clone R36S-V12 2023-08-18 I think Variant 3 idk is a weird one. |
|
@igoutta currently southoz is taking what seems to the community as an extended personal hiatus, we are unsure as too when he will return but it has been ~4 months since he last made any contact. In the meantime Darkos Enhanced maintained by djparent is designed as a project to bridge the gap for new devices and updates. The best place I have found to find this project is in the r/R36S subreddit. |
Problem
select_devices.shcopies the DTB pair for the selected device but never toucheslogo.bmp, so the boot partition keeps the default 640x480 splash regardless of which device was chosen.On a 720x720 panel (e.g.
R36S Plus-V20 2025-03-18) U-Boot then draws 640-pixel-wide rows into a 720-pixel-wide framebuffer. Every row lands 80px offset from the one above, and the splash appears sheared/scrambled for the first few seconds of boot, until the kernel loads the DTB and reinitialises the display.This is a parity gap, not a missing feature.
select_device.ps1already does the right thing — it reads theresolutionkey fromr36_devices.iniand pickslogo-640x480.bmporlogo-720x720.bmp. Only the shell selector is missing it, so Windows users get a correct splash while Mac/Linux users don't.Changes
1. Copy resolution-matched boot logo — brings
select_devices.shto parity withselect_device.ps1.The filename is built from the resolution string (
logo-${resolution}.bmp) rather than hardcoding the two currently-known sizes, so adding a new panel resolution needs only the asset plus the.inientry — no code change.2. Install resolution-matched battery images — a genuine gap in both selectors.
dtb/logo/shipsbattery-640x480.zipandbattery-720x270.zip, but neither script installs them, so the boot partition has nobattery_*.bmpat all and U-Boot has nothing to draw for the charging / low-battery screens. Archive names don't always match the resolution exactly — the720x270archive actually contains 720x720 bitmaps — so this falls back to matching on width.The two are split into separate commits in case you'd rather take only the parity fix.
Safety
Both blocks are purely additive and guard before acting:
resolutionkey for the device → leaves the boot images untoucheddtb/logo/folder → skipslogo-<res>.bmp→ leaveslogo.bmpuntouchedunzipunavailable → skips with a messageSo no currently-working device can regress, including any that relies on the existing default.
Testing
Verified on real hardware — an
R36S Plus-V20 2025-03-18(batch 2551, 720x720) runningdArkOSRE_R36_trixie_04262026.Applying
logo-720x720.bmpeliminated the scrambled boot splash entirely; the 720x720 battery set installed cleanly alongside it. Device identification was confirmed against/boot/darkosre_device.log, which reportsHardware string: 'R36S Plus-V20 2025-03-18'andResolution from devices.ini: 720x720.The added code was syntax-checked with
bash -n.Known follow-up (not addressed here)
select_devices.shrequires bash 4.2+ — it usesdeclare -A(line 44) and[[ -v arr[key] ]](line 90). macOS ships bash 3.2, so the script can't run at all there:The wiki points Mac users at this script, so in practice they currently have to place DTBs by hand. That's a larger rewrite and out of scope for this PR, but I'm happy to open a separate one if useful.
🤖 Generated with Claude Code