Skip to content

feat: add Xiaomi Mi 10S (thyme) device variant - #27

Merged
code002-2 merged 5 commits into
code002-2:mainfrom
yuweiyuan8:thyme-port
Oct 29, 2026
Merged

code002-2 merged 5 commits into
code002-2:mainfrom
yuweiyuan8:thyme-port

Conversation

@yuweiyuan8

Copy link
Copy Markdown
Contributor

Port Armada to Xiaomi Mi 10S (thyme, SM8250).

What's included

  • kernel-thyme/: build against the community mainline thyme tree (yuweiyuan8/linux-xiaomi-thyme-mainline) with the board config plus Armada runtime fragments; produces the tarball layout 20-install-kernel.sh consumes, including sm8250-xiaomi-thyme DTBs.
  • Device files: bootimg-args / device conf / supported-dtbs entries, disk_config/disk-thyme.toml, and 52-thyme-device-fixes.sh (sshd + RNDIS gadget, Steam offline fallback, permissive SELinux).
  • Firmware: ADSP/CDSP/Venus/SLPI/ZAP (qcom/sm8250/umi), CS35L41 speaker tuning incl. RCV variants, ath11k/QCA6390 WiFi, QCA BT nv files — extracted from the device.
  • Audio (UCM2) for XIAOMI-UMI-WCD9380-CS35L41-VA-DMIC:
    • The Mi 10S has an independent earpiece on the WCD938x EAR output — it is NOT the top speaker. The Earpiece device routes through the RX_CODEC_DMA_RX_0 backend (rxmacro INT0 -> HPHL_OUT -> IN1_HPHL -> RX1 -> RDAC3 -> EAR), with RX_EAR Mode Switch as the critical enable, instead of the CS35L41 right amp.
    • Voice Call uses the RX_CODEC_DMA_RX_0 CS-Voice mixer.
    • RX HPH Mode stays at the driver default: the stock CLS_H_LOHIFI value is completely silent on this board under the mainline driver (verified on-device).
  • docs/flashing-xiaomi-thyme.md: flashing guide, known issues, and the earpiece A/B/C test procedure.
  • CI: build-thyme-container.yml + thyme flashable export/test hooks; README/Justfile/Containerfile/device-env updated for the second device.

Known issues (documented in docs/flashing-xiaomi-thyme.md)

  • Earpiece audio has periodic dropouts; digital chain (PCM/XRUN/DSP/SWR) verified clean, under investigation (suspect class-H supply or SWR packing).
  • Voice calls are silent: q6voice calibration registration rejected by CVD 2.4 (cal files need re-extraction), and the CVP session defaults to the TERT speaker port.

Tested on-device: boot to GNOME, touchscreen, WiFi, speakers, independent earpiece routing (media), microphone.

UBports Redmi Note 3 added 5 commits October 25, 2026 10:45
Port Armada to Xiaomi Mi 10S (thyme, SM8250):

- kernel-thyme/: build against the community mainline thyme tree
  (yuweiyuan8/linux-xiaomi-thyme-mainline) with the board config plus
  Armada runtime fragments; produces the tarball layout 20-install-kernel
  consumes, including sm8250-xiaomi-thyme DTBs.
- device files: bootimg-args / device conf / supported-dtbs entries,
  disk_config/disk-thyme.toml, and 52-thyme-device-fixes.sh (sshd +
  RNDIS gadget, Steam offline fallback, permissive SELinux).
- firmware: vendor ADSP/CDSP/Venus/SLPI/ZAP (qcom/sm8250/umi), CS35L41
  speaker tuning incl. RCV variants, ath11k/QCA6390 WiFi, and QCA BT
  nv files extracted from the device.
- audio: UCM2 for the XIAOMI-UMI-WCD9380-CS35L41-VA-DMIC card.
  The Mi 10S has an INDEPENDENT earpiece on the WCD938x EAR output --
  it is not the top speaker -- so the Earpiece device routes through
  the RX_CODEC_DMA_RX_0 backend (rxmacro INT0 -> HPHL_OUT -> IN1_HPHL
  -> RX1 -> RDAC3 -> EAR) with 'RX_EAR Mode Switch' as the critical
  enable, instead of the CS35L41 right amp. Voice Call uses the
  RX_CODEC_DMA_RX_0 CS-Voice mixer. Keep 'RX HPH Mode' at the driver
  default: the stock CLS_H_LOHIFI value is completely silent on this
  board under the mainline driver.
- docs/flashing-xiaomi-thyme.md: flashing guide, known issues (voice
  call calibration rejected by CVD 2.4, earpiece quality), and the
  A/B/C earpiece test procedure.
- workflows/build-thyme-container.yml + thyme flashable export/test
  hooks; README/Justfile/Containerfile/device-env updated for the
  second device.
The thyme board config (sm8250.config) baked an initramfs into the
kernel via an absolute path to the porting workstation's
sm8250-xiaomi-lmi initramfs checkout, so the CI kernel build failed
with 'No rule to make target .../initramfs-sm8250-xiaomi-lmi.cpio.gz'.

Vendor the device-validated cpio.gz under kernel-thyme/initramfs/,
point CONFIG_INITRAMFS_SOURCE at it by a tree-relative name, and have
build.sh stage it into the kernel tree before building. CI and local
builds now produce the same kernel the phone was validated with.
kernel-thyme/Containerfile was empty, so 'buildah bud' failed with
'no contents' at the Push kernel image step. Package the kernel-thyme/out/
tarball the same way kernel-sheng does (FROM scratch, ADD out/ /kernel/),
which is what the root Containerfile mounts at /packages/kernel.
The thyme workflow's pin had an extra character and transposed digits
(...1642'8'c8f0a66'31'... vs the real ...1642c8f0a66'13'...), so the
rootfs job died at 'Set up job' with 'unable to find version'.
The root Containerfile's stages are FROM ${XXX_REF} build args. The
thyme workflow never passed them, so buildah died with 'no FROM
statement found' once the rootfs job finally ran.

Resolve every packages/ entry to its upstream content-hash image
(ghcr.io/armada-os/armada/pkg/<pkg>:<hash>, same mechanism as pr.yml)
and feed them via --build-arg-file. This port does not modify
packages/, so upstream tags always apply; fail loudly if one is
missing instead of silently baking a broken stage.
@github-actions

Copy link
Copy Markdown
Contributor

Disk image

armada-disk-pr27, built from b7be099

Downloads as a zip holding armada-*.img.gz and its .sha256.
GitHub requires you to be signed in to download run artifacts.

@code002-2
code002-2 merged commit 374d4be into code002-2:main Oct 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants