docs: add distro comparison, recommend dumpling-wayland for Qt/glibc

Key updates:
- README: comprehensive distro comparison table (spaetzle vs dumpling-wayland)
- Recommend dumpling-wayland (glibc) for Qt/GUI applications
- spaetzle (musl) explicitly blocks Qt: SKIP_RECIPE[tq-image-qt6]
- Both distros are 2038-safe (glibc 2.39 and musl 1.2+ both use 64-bit time_t)
- Updated 2038 analysis to cover both C library options
- Updated license tables with both glibc and musl entries
- Fixed remaining config references (imx → mainline)
- Added image availability matrix per distro
- Corrected package versions to match Scarthgap 5.0.11
This commit is contained in:
Siggi (OpenClaw)
2026-03-01 19:55:10 +00:00
parent 227e1f259f
commit 7f9761b915
7 changed files with 240 additions and 250 deletions

View File

@@ -1,207 +1,105 @@
# Year 2038 Problem Analysis for TQMa6UL
# 2038 Compliance Analysis TQMa6UL
**Document ID:** ANA-2038-001
**Date:** 2026-03-01
**Author:** Siggi ⚙️
**Status:** Approved for Implementation
## Overview
---
The Year 2038 problem (Y2K38) occurs when a signed 32-bit integer used for
Unix timestamps overflows on **2038-01-19 03:14:07 UTC**. This affects all
32-bit ARM systems using traditional 32-bit `time_t`.
## Executive Summary
The TQMa6UL (NXP i.MX6 UltraLite) is a 32-bit ARM Cortex-A7 processor. Without proper software stack, it will be affected by the Year 2038 Problem. **Yocto Scarthgap (5.0) provides a complete solution** with 64-bit time_t support on 32-bit architectures.
**Recommendation:** Migrate from legacy PTXdist BSP to Yocto Scarthgap immediately.
---
## 1. The Year 2038 Problem Explained
### 1.1 Technical Background
Unix-based systems traditionally use a signed 32-bit integer (`time_t`) to represent time:
- Counts seconds since January 1, 1970 (Unix Epoch)
- Maximum value: 2,147,483,647 (2³¹ - 1)
- **Critical date:** 03:14:07 UTC on 19 January 2038
After this date, the counter overflows to -2,147,483,648, causing:
- System time jumps to 13 December 1901
- Software crashes or undefined behavior
- File timestamps corrupted
- Security certificates invalid
- Scheduled tasks fail
### 1.2 Impact on 32-bit ARM Systems
The i.MX6 UltraLite (Cortex-A7) is a 32-bit processor:
- Cannot natively execute 64-bit instructions
- Requires software-level solution for 64-bit time
- Kernel, glibc, and all user-space libraries must be 2038-compliant
---
## 2. Solution: 64-bit time_t on 32-bit ARM
### 2.1 Three-Layer Solution Required
## Architecture
```
┌─────────────────────────────────────┐
User Space Applications
→ Compiled with 64-bit time_t
Application Layer
(all userspace uses 64-bit t)
├─────────────────────────────────────┤
│ C Library (glibc)
→ musl 1.2+ with 64-bit time_t
C Library │
glibc 2.39: 64-bit time_t (Y2038)
│ musl 1.2+: 64-bit time_t (Y2038) │
├─────────────────────────────────────┤
│ Linux Kernel
→ 5.1+ with CONFIG_TIME_LOW_RES
│ → 5.6+ with complete y2038 syscalls│
Linux Kernel (Mainline 6.x)
64-bit time syscalls on ARM32
├─────────────────────────────────────┤
│ i.MX6 UltraLite (Cortex-A7) │
└─────────────────────────────────────┘
```
### 2.2 Yocto Scarthgap (5.0) Compliance
## C Library Options
Yocto Project 5.0 (Scarthgap) released April 2024 provides:
### Option 1: glibc (recommended for Qt/GUI)
| Component | Version | 2038 Feature | Status |
|-----------|---------|--------------|--------|
| **glibc** | 2.38+ | 64-bit `time_t` default on 32-bit | ✅ |
| **Linux Kernel** | 6.6 LTS | `CONFIG_COMPAT_32BIT_TIME` | ✅ |
| **GCC** | 13.x | Supports 64-bit time_t | ✅ |
| **BitBake** | 2.6 | Build system support | ✅ |
**Distro:** `dumpling-wayland`
**Target triplet:** `arm-tq-linux-gnueabi`
**Critical:** musl 1.2+ uses 64-bit `time_t` BY DEFAULT for 32-bit ARM in Yocto.
glibc provides 64-bit `time_t` on 32-bit ARM since version 2.34, when built
with `_TIME_BITS=64` (which Yocto Scarthgap enables by default). The BSP
includes glibc 2.39.
---
Advantages:
- Full compatibility with third-party software
- Qt5/Qt6 support
- Broader library ecosystem
## 3. TQ BSP Scarthgap Analysis
### Option 2: musl (for minimal/headless)
### 3.1 TQ BSP Version Information
**Distro:** `spaetzle`
**Target triplet:** `arm-tq-linux-musleabi`
**BSP Version:** `scarthgap.TQ.ARM.BSP.0006`
musl has provided 64-bit `time_t` unconditionally on all 32-bit architectures
since version 1.2.0 (February 2020).
From TQ documentation:
| Component | Version | 2038 Status |
|-----------|---------|-------------|
| Linux Kernel | 6.6.y (LTS) | ✅ CONFIG_COMPAT_32BIT_TIME |
| U-Boot | 2023.10 | ✅ (no time-critical operations) |
| glibc | 2.38+ | ✅ 64-bit time_t |
Advantages:
- Smaller footprint
- Simpler, no locale overhead
### 3.2 Machine Configuration
Limitations:
- Qt is blocked (`SKIP_RECIPE`)
- Some third-party software may not build
For TQMa6UL-AB on MBa6ULx:
```
MACHINE = "tqma6ul-multi-mba6ulx"
```
## Kernel Support
Verified supported features with kernel 6.6:
- RTC (hardware clock) - 2038 compliant with 64-bit time
- Ethernet time stamping (PTP) - supported
- File systems (ext4, ubifs) - 2038 ready
The mainline kernel (6.x) provides:
- 64-bit time variants of all relevant syscalls (`clock_gettime64`,
`futex_time64`, etc.)
- `CONFIG_COMPAT_32BIT_TIME=y` for backwards compatibility
- ext4 timestamps beyond 2038
### 3.3 Comparison with Legacy PTXdist
## Compliance Matrix
| Aspect | Old PTXdist BSP | Yocto Scarthgap | Impact |
|--------|-----------------|-----------------|--------|
| Kernel | 4.x or 5.4 | 6.6 LTS | Major upgrade |
| glibc | 2.31 or older | 2.38+ | **64-bit time_t** |
| time_t size | 32-bit | **64-bit** | **2038 compliant** |
| Support End | Already ended | April 2028+ | Extended life |
| Component | glibc (dumpling) | musl (spaetzle) | 2038-safe? |
|-----------|-----------------|-----------------|-----------|
| Kernel | Mainline 6.x | Mainline 6.x | ✅ |
| C Library | glibc 2.39 | musl 1.2+ | ✅ |
| Userspace | 64-bit time_t | 64-bit time_t | ✅ |
| U-Boot | Mainline | Mainline | ✅ |
| Qt6 | ✅ supported | ❌ blocked | ✅ (glibc) |
---
## Verification
## 4. Verification Steps
### 4.1 Build-Time Verification
After building Yocto image, verify:
After building, verify on the target:
```bash
# Check glibc time_t size
bitbake -e core-image-minimal | grep TIME_BITS
echo "TIME_BITS=64" # Expected output
# Check kernel config
bitbake -e virtual/kernel | grep CONFIG_COMPAT_32BIT_TIME
# Should be "y"
# Check time_t size (should print 8)
cat << 'C' > /tmp/check_time.c
#include <stdio.h>
#include <time.h>
int main() { printf("sizeof(time_t) = %zu\n", sizeof(time_t)); return 0; }
C
$CC /tmp/check_time.c -o /tmp/check_time && /tmp/check_time
```
### 4.2 Runtime Verification
## Risk Assessment
On target system:
| Risk | Severity | Status |
|------|----------|--------|
| time_t overflow | Critical | ✅ Mitigated (both libc options) |
| Filesystem timestamps | Medium | ✅ ext4 supports >2038 |
| Network protocols (NTP) | Low | ✅ 64-bit aware |
| Third-party binaries | Medium | ⚠️ Must verify pre-built binaries |
| Qt5 compatibility | Medium | ⚠️ meta-qt5 not included, add manually |
```bash
# Check time_t size in compiled binaries
echo '#include <time.h>' | gcc -x c - -dM -E | grep TIME_BITS
#define __TIME_BITS 64
## References
# Test with date command (requires setting date beyond 2038)
date -s "2039-01-01 12:00:00"
date # Should display correctly
```
### 4.3 Static Analysis
Check for 2038-sensitive APIs:
```bash
# Scan for deprecated time functions
grep -r "time_t\|gettimeofday\|stime" ${IMAGE_ROOTFS}/usr/bin/
```
---
## 5. Risk Assessment
### 5.1 Without Migration (PTXdist)
| Risk | Probability | Impact | Mitigation |
|------|-------------|--------|------------|
| System failure after 2038 | Certain | Critical | None possible |
| Security certificate issues | High | High | None possible |
| Log corruption | Certain | Medium | None possible |
| **Overall Risk** | **CRITICAL** | | **Immediate action required** |
### 5.2 With Migration (Yocto Scarthgap)
| Risk | Probability | Impact | Mitigation |
|------|-------------|--------|------------|
| 2038 compliance | Near-zero | None | Full support until 2106+ |
| Migration effort | Medium | Medium | Documented procedure |
| Testing required | Certain | Low | Comprehensive test plan |
| **Overall Risk** | **LOW** | | **Recommended path** |
---
## 6. Conclusion
### 6.1 Findings
1. **Yocto Scarthgap (5.0) is 2038-compliant** for 32-bit ARM
2. **TQ BSP scarthgap.TQ.ARM.BSP.0006** uses compliant kernel 6.6 + musl 1.2
3. **Migration from PTXdist is mandatory** for systems operating beyond 2038
4. **Offline mirror required** for software approval process
### 6.2 Recommendation
**APPROVED FOR IMPLEMENTATION**
Proceed with:
1. Creating complete Yocto source mirror
2. Generating license compliance documentation
3. Obtaining software approval
4. Deploying in corporate network
---
## 7. References
- [Y2038 Wiki](https://en.wikipedia.org/wiki/Year_2038_problem)
- [Yocto Project 5.0 Release Notes](https://docs.yoctoproject.org/5.0/migration-guides/migration-5.0.html)
- [glibc Y2038 Statement](https://sourceware.org/glibc/wiki/Y2038ProofnessDesign)
- [TQ BSP Documentation](https://github.com/tq-systems/meta-tq/tree/scarthgap.TQ.ARM.BSP.0006)
- [Kernel Y2038 Documentation](https://www.kernel.org/doc/html/latest/y2038.html)
---
**Approved by:** Siggi ⚙️
**Date:** 2026-03-01
**Classification:** Internal Use
- [glibc Y2038 Design](https://sourceware.org/glibc/wiki/Y2038ProofnessDesign)
- [musl time64](https://musl.libc.org/time64.html)
- [Kernel Y2038 work](https://kernelnewbies.org/y2038)