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)

View File

@@ -224,7 +224,7 @@ cd ${UT_BASE}/ci-meta-tq
export MACHINE=tqma6ul-multi-mba6ulx
# Fill mirror (downloads all git repos and tarballs)
ci/fill_mirror build_ut imx
ci/fill_mirror build_ut mainline
# Verify mirror contents
ls -la /srv/yocto/premirror/

View File

@@ -1,19 +1,15 @@
Package|Version|Recipe|License|MilitaryUse|SourceLocation|Notes
---|---|---|---|---|---|---
linux-yocto|6.6.y|linux-yocto_6.6|GPL-2.0-only|Yes|sources/poky/meta/recipes-kernel/linux/|Kernel with 2038 support
u-boot-tq|2023.10|u-boot-tq_2023.10|GPL-2.0+|Yes|sources/meta-tq/recipes-bsp/u-boot/|Bootloader
glibc|2.38|glibc_2.38|LGPL-2.1+|Yes|sources/poky/meta/recipes-core/glibc/|C library with 64-bit time_t
busybox|1.36.1|busybox_1.36|GPL-2.0-only|Yes|sources/poky/meta/recipes-core/busybox/|Core utilities
systemd|254|systemd_254|LGPL-2.1+|Yes|sources/poky/meta/recipes-core/systemd/|Init system
e2fsprogs|1.47.0|e2fsprogs_1.47|GPL-2.0+|Yes|sources/poky/meta/recipes-devtools/e2fsprogs/|Filesystem tools
iptables|1.8.9|iptables_1.8|GPL-2.0+|Yes|sources/poky/meta/recipes-extended/iptables/|Firewall
openssl|3.1.4|openssl_3.1|Apache-2.0|Yes|sources/poky/meta/recipes-connectivity/openssl/|Crypto library
dropbear|2022.83|dropbear_2022.83|MIT|Yes|sources/poky/meta/recipes-core/dropbear/|SSH server
util-linux|2.39|util-linux_2.39|GPL-2.0+|Yes|sources/poky/meta/recipes-core/util-linux/|System utilities
gcc|13.2|gcc_13.2|GPL-3.0+|Review|sources/poky/meta/recipes-devtools/gcc/|Compiler suite
binutils|2.40|binutils_2.40|GPL-3.0+|Review|sources/poky/meta/recipes-devtools/binutils/|Linker/assembler
coreutils|9.3|coreutils_9.3|GPL-3.0+|Review|sources/poky/meta/recipes-core/coreutils/|Core GNU utils
bash|5.2|bash_5.2|GPL-3.0+|Review|sources/poky/meta/recipes-extended/bash/|Shell
imx-firmware|N/A|firmware-imx|NXP-SLA|Review|sources/meta-tq/recipes-bsp/firmware/|NXP firmware blobs
imx-gpu-viv|6.4.11|imx-gpu-viv|Proprietary|Review|sources/meta-tq/recipes-graphics/|Vivante GPU driver
linux-firmware|N/A|linux-firmware|Various|Review|sources/poky/meta/recipes-kernel/linux-firmware/|Various vendor blobs
# License Table (Excel-compatible)
| Package | Version | License | 2038-Safe | Military Use | Notes |
|---------|---------|---------|-----------|-------------|-------|
| linux-mainline | 6.x | GPL-2.0-only | Yes | Yes | Mainline kernel |
| u-boot-tq | 2023.10+ | GPL-2.0+ | Yes | Yes | Bootloader |
| glibc | 2.39 | LGPL-2.1+ | Yes | Yes | C lib (dumpling-wayland) |
| musl | 1.2+ | MIT | Yes | Yes | C lib (spaetzle) |
| busybox | 1.36+ | GPL-2.0-only | Yes | Yes | spaetzle only |
| systemd | 254+ | LGPL-2.1+ | Yes | Yes | dumpling-wayland only |
| gcc | 13.4 | GPL-3.0 + RLE | Yes | Review | Runtime exception |
| openssl | 3.x | Apache-2.0 | Yes | Yes | Crypto |
| Qt6 | 6.x | GPL-2.0/LGPL-3.0 | Yes | Yes | dumpling-wayland only |
| imx-firmware | N/A | NXP-EULA | N/A | Review | Proprietary |
| linux-firmware | N/A | Various | N/A | Review | Vendor blobs |

View File

@@ -1,18 +1,12 @@
Package,Version,Recipe,License,LicenseFile,MilitaryUse,SourceLocation,Notes
linux-yocto,6.6.y,linux-yocto_6.6,GPL-2.0-only,COPYING,Yes,sources/poky/meta/recipes-kernel/linux/,Kernel with 2038 support
u-boot-tq,2023.10,u-boot-tq_2023.10,GPL-2.0+,Licenses/README,Yes,sources/meta-tq/recipes-bsp/u-boot/,Bootloader
glibc,2.38,glibc_2.38,LGPL-2.1+,LICENSES,Yes,sources/poky/meta/recipes-core/glibc/,C library with 64-bit time_t
busybox,1.36.1,busybox_1.36,GPL-2.0-only,LICENSE,Yes,sources/poky/meta/recipes-core/busybox/,Core utilities
systemd,254,systemd_254,LGPL-2.1+,LICENSE.LGPL2.1,Yes,sources/poky/meta/recipes-core/systemd/,Init system
e2fsprogs,1.47.0,e2fsprogs_1.47,GPL-2.0+,NOTICE,Yes,sources/poky/meta/recipes-devtools/e2fsprogs/,Filesystem tools
iptables,1.8.9,iptables_1.8,GPL-2.0+,COPYING,Yes,sources/poky/meta/recipes-extended/iptables/,Firewall
openssl,3.1.4,openssl_3.1,Apache-2.0,LICENSE,Yes,sources/poky/meta/recipes-connectivity/openssl/,Crypto library
dropbear,2022.83,dropbear_2022.83,MIT,LICENSE,Yes,sources/poky/meta/recipes-core/dropbear/,SSH server
util-linux,2.39,util-linux_2.39,GPL-2.0+,COPYING,Yes,sources/poky/meta/recipes-core/util-linux/,System utilities
gcc,13.2,gcc_13.2,GPL-3.0+,COPYING3,Review,sources/poky/meta/recipes-devtools/gcc/,Compiler suite
binutils,2.40,binutils_2.40,GPL-3.0+,COPYING3,Review,sources/poky/meta/recipes-devtools/binutils/,Linker/assembler
coreutils,9.3,coreutils_9.3,GPL-3.0+,COPYING,Review,sources/poky/meta/recipes-core/coreutils/,Core GNU utils
bash,5.2,bash_5.2,GPL-3.0+,COPYING,Review,sources/poky/meta/recipes-extended/bash/,Shell
imx-firmware,N/A,firmware-imx,NXP-SLA,SLA,Review,sources/meta-tq/recipes-bsp/firmware/,NXP firmware blobs
imx-gpu-viv,6.4.11,imx-gpu-viv,Proprietary,EULA,Review,sources/meta-tq/recipes-graphics/,Vivante GPU driver
linux-firmware,N/A,linux-firmware,Various,LICENCE,Review,sources/poky/meta/recipes-kernel/linux-firmware/,Various vendor blobs
Package,Version,License,2038-Safe,MilitaryUse,Notes
linux-mainline,6.x,GPL-2.0-only,Yes,Yes,Mainline kernel with 64-bit time syscalls
u-boot-tq,2023.10+,GPL-2.0+,Yes,Yes,Bootloader
glibc,2.39,LGPL-2.1+,Yes,Yes,"C library (dumpling-wayland), 64-bit time_t"
musl,1.2+,MIT,Yes,Yes,"C library (spaetzle), 64-bit time_t"
busybox,1.36+,GPL-2.0-only,Yes,Yes,Core utilities (spaetzle only)
systemd,254+,LGPL-2.1+,Yes,Yes,Init system (dumpling-wayland only)
gcc,13.4,GPL-3.0 + Runtime Exception,Yes,Review,Compiler runtime exception covers compiled code
openssl,3.x,Apache-2.0,Yes,Yes,Crypto library
Qt6,6.x,GPL-2.0 / LGPL-3.0,Yes,Yes,GUI framework (dumpling-wayland only)
imx-firmware,N/A,NXP-EULA,N/A,Review,NXP proprietary firmware blobs
linux-firmware,N/A,Various,N/A,Review,Various vendor firmware blobs
1 Package Version Recipe License 2038-Safe LicenseFile MilitaryUse Notes SourceLocation
2 linux-yocto linux-mainline 6.6.y 6.x linux-yocto_6.6 GPL-2.0-only Yes COPYING Yes Kernel with 2038 support Mainline kernel with 64-bit time syscalls sources/poky/meta/recipes-kernel/linux/
3 u-boot-tq 2023.10 2023.10+ u-boot-tq_2023.10 GPL-2.0+ Yes Licenses/README Yes Bootloader sources/meta-tq/recipes-bsp/u-boot/
4 glibc 2.38 2.39 glibc_2.38 LGPL-2.1+ Yes LICENSES Yes C library with 64-bit time_t C library (dumpling-wayland), 64-bit time_t sources/poky/meta/recipes-core/glibc/
5 busybox musl 1.36.1 1.2+ busybox_1.36 GPL-2.0-only MIT Yes LICENSE Yes Core utilities C library (spaetzle), 64-bit time_t sources/poky/meta/recipes-core/busybox/
6 systemd busybox 254 1.36+ systemd_254 LGPL-2.1+ GPL-2.0-only Yes LICENSE.LGPL2.1 Yes Init system Core utilities (spaetzle only) sources/poky/meta/recipes-core/systemd/
7 e2fsprogs systemd 1.47.0 254+ e2fsprogs_1.47 GPL-2.0+ LGPL-2.1+ Yes NOTICE Yes Filesystem tools Init system (dumpling-wayland only) sources/poky/meta/recipes-devtools/e2fsprogs/
8 iptables gcc 1.8.9 13.4 iptables_1.8 GPL-2.0+ GPL-3.0 + Runtime Exception Yes COPYING Yes Review Firewall Compiler – runtime exception covers compiled code sources/poky/meta/recipes-extended/iptables/
9 openssl 3.1.4 3.x openssl_3.1 Apache-2.0 Yes LICENSE Yes Crypto library sources/poky/meta/recipes-connectivity/openssl/
10 dropbear Qt6 2022.83 6.x dropbear_2022.83 MIT GPL-2.0 / LGPL-3.0 Yes LICENSE Yes SSH server GUI framework (dumpling-wayland only) sources/poky/meta/recipes-core/dropbear/
11 util-linux imx-firmware 2.39 N/A util-linux_2.39 GPL-2.0+ NXP-EULA N/A COPYING Yes Review System utilities NXP proprietary firmware blobs sources/poky/meta/recipes-core/util-linux/
12 gcc linux-firmware 13.2 N/A gcc_13.2 GPL-3.0+ Various N/A COPYING3 Review Compiler suite Various vendor firmware blobs sources/poky/meta/recipes-devtools/gcc/
binutils 2.40 binutils_2.40 GPL-3.0+ COPYING3 Review Linker/assembler sources/poky/meta/recipes-devtools/binutils/
coreutils 9.3 coreutils_9.3 GPL-3.0+ COPYING Review Core GNU utils sources/poky/meta/recipes-core/coreutils/
bash 5.2 bash_5.2 GPL-3.0+ COPYING Review Shell sources/poky/meta/recipes-extended/bash/
imx-firmware N/A firmware-imx NXP-SLA SLA Review NXP firmware blobs sources/meta-tq/recipes-bsp/firmware/
imx-gpu-viv 6.4.11 imx-gpu-viv Proprietary EULA Review Vivante GPU driver sources/meta-tq/recipes-graphics/
linux-firmware N/A linux-firmware Various LICENCE Review Various vendor blobs sources/poky/meta/recipes-kernel/linux-firmware/

View File

@@ -48,7 +48,7 @@ Download as CSV: [license-table-template.csv](license-table-template.csv)
| Package Name | Version | License (SPDX) | License File | Source Location | Military Use | Notes |
|--------------|---------|----------------|--------------|-----------------|--------------|-------|
| linux-yocto | 6.6.y | GPL-2.0-only | COPYING | sources/poky-scarthgap/meta/recipes-kernel/linux/ | ✅ Yes | Kernel with 2038 support |
| glibc | 2.38+ | LGPL-2.1-or-later | LICENSES | sources/poky-scarthgap/meta/recipes-core/glibc/ | ✅ Yes | 64-bit time_t |
| glibc | 2.39 | LGPL-2.1-or-later | LICENSES | sources/poky-scarthgap/meta/recipes-core/glibc/ | ✅ Yes | 64-bit time_t |
| busybox | 1.36.x | GPL-2.0-only | LICENSE | sources/poky-scarthgap/meta/recipes-core/busybox/ | ✅ Yes | Core utilities |
| u-boot-tq | 2023.10 | GPL-2.0-or-later | Licenses/ | sources/meta-tq/recipes-bsp/u-boot/ | ✅ Yes | Bootloader |
| [Additional packages] | | | | | | |

View File

@@ -59,7 +59,7 @@
|---------|---------|---------|----------|-----------------|
| linux-yocto | 6.6.y | GPL-2.0-only | ✅ Yes | ✅ Yes |
| u-boot-tq | 2023.10 | GPL-2.0+ | ✅ Yes | ✅ Yes |
| glibc | 2.38+ | LGPL-2.1+ | ✅ Yes | ✅ Yes |
| glibc | 2.39 | LGPL-2.1+ | ✅ Yes | ✅ Yes |
| busybox | 1.36.x | GPL-2.0-only | ✅ Yes | ✅ Yes |
| gcc | 13.x | GPL-3.0+ | ⚠️ Review* | ✅ Yes |