Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,48 @@ If in doubt, best ask before working on a larger bounty.

https://github.com/rxrbln/t2sde/issues?q=is%3Aopen+is%3Aissue+author%3Arxrbln

# Build architecture

T2 builds in stages to bootstrap from nothing:

| Stage | What | How |
|-------|------|-----|
| 0 | Cross-compiler toolchain | Builds binutils + gcc for `$arch` targeting the build host |
| 1 | Minimal target base | Cross-compiles glibc, kernel headers, core utils into a sysroot |
| 2 | Target GCC | Rebuilds gcc natively inside the fresh sysroot |
| 3-8 | Full system | Cross-compiles packages against the stage-2 sysroot |
| 9 | Final rebuild | `Emerge-Pkg` / `t2 install` — natively on the running target |

All package recipes are plain shell + metadata (`.desc` files). No custom
DSL, no Python, no XML — just `sh` and `make`. The build is reproducible:
same config = same binary checksums.

# Portability

T2 currently targets these architectures — many bootstrapped nightly
with automated ISO generation:

`alpha`, `arm`, `arm64`, `hppa`, `ia64`, `loongarch64`, `m68k`,
`microblaze`, `mips64`, `mipsel`, `openrisc`, `ppc64le`, `ppc64-32`,
`riscv32`, `riscv64`, `sparc64`, `x86`, `x86-64`

# Bug philosophy

T2 ships "rolling with tags" — packages land in the tree as soon as they
build. If a build breaks, we revert or fix it forward. There is no
separate "stable" branch; stability comes from the stage system and
automated rebuild infrastructure.

Known rough edges:
- Python cross-compilation (KB#8 on t2sde.org)
- GObject introspection on cross-compiled ISOs
- PowerPC 32-bit GRUB boot
- NVIDIA nouveau support for Turing+ GPUs

If you hit a failure, `scripts/Build-Target` with `-xtrace` will show
exactly where it broke. Patches welcome — bounties available for larger
fixes (see below).

# History

"T2" started as a community driven fork of the ROCK Linux project in
Expand Down
5 changes: 5 additions & 0 deletions package/develop/tcmalloc/tcmalloc.desc
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@
[V] 2e33a32

[D] a5a048338557095cf5a29479839b36ff52420905b7118775db546133 tcmalloc-2e33a32.tar.gz https://github.com/google/tcmalloc/archive/2e33a32/

# tcmalloc's test targets unconditionally link against absl::status_matchers,
# a test-only abseil library that T2 does not build. Disable tests to avoid
# the build failure: "Target links to absl::status_matchers but not found."
var_append cmakeopt ' ' "-DBUILD_TESTING=OFF -DTCMALLOC_BUILD_TESTING=OFF"
48 changes: 48 additions & 0 deletions package/x11/glew/hotfix-no-git-download.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# --- T2-COPYRIGHT-BEGIN ---
# t2/package/*/glew/hotfix-no-git-download.patch
# Copyright (C) 2026 The T2 SDE Project
# SPDX-License-Identifier: GPL-2.0 or patched project license
# --- T2-COPYRIGHT-END ---
#
# glew's auto/Makefile unconditionally runs git clone to download the
# OpenGL and EGL Registries from KhronosGroup GitHub repos during the
# "extensions" build target. This fails in offline or internet-restricted
# build environments (e.g. build chroot without git).
#
# The released tarball already ships with pre-generated headers in
# include/GL/*.h and pre-generated sources in src/glew.c. The registry
# download is only needed when RE-generating those files.
#
# Fix: skip git clone and use the shimmed .dummy stamps instead.

--- auto/Makefile.vanilla 2026-06-07 00:00:00.000000000 +0200
+++ auto/Makefile 2026-06-07 00:00:00.000000000 +0200
@@ -76,19 +76,20 @@
ext: $(EXT)/.dummy

OpenGL-Registry/.dummy:
- @echo "--------------------------------------------------------------------"
- @echo "Downloading OpenGL-Registry"
- @echo "--------------------------------------------------------------------"
- git clone --depth=1 $(REPO_OPENGL) OpenGL-Registry
- git clone --depth=1 --branch glew $(REPO_GLFIXES) glfixes
+ @echo "--------------------------------------------------------------------"
+ @echo "SKIP: OpenGL-Registry download (use bundled headers)"
+ @echo "--------------------------------------------------------------------"
+ [ -d $(EXT) ] || mkdir -p $(EXT)
+ touch $(EXT)/.dummy
touch $@

EGL-Registry/.dummy:
- @echo "--------------------------------------------------------------------"
- @echo "Downloading EGL-Registry"
- @echo "--------------------------------------------------------------------"
- git clone --depth=1 $(REPO_EGL) EGL-Registry
+ @echo "--------------------------------------------------------------------"
+ @echo "SKIP: EGL-Registry download (use bundled headers)"
+ @echo "--------------------------------------------------------------------"
+ [ -d $(EXT) ] || mkdir -p $(EXT)
+ touch $(EXT)/.dummy
touch $@

$(EXT)/.dummy: OpenGL-Registry/.dummy EGL-Registry/.dummy