docs: update readmes and agents

This commit is contained in:
2026-09-13 20:31:42 +02:00
parent 3c6963b5e1
commit b7049b21a4
3 changed files with 18 additions and 149 deletions
+16 -86
View File
@@ -8,11 +8,11 @@ Qualcomm MSM8926 / msm8226, Linux kernel 3.4).
```
build_twrp.sh TWRP -> recovery.img (omni twrp-5.1)
build_los.sh LOS -> boot.img / lineage_rubenslte-*.zip (cm-14.1, Jack)
build_los-14.1.sh LOS -> boot.img / lineage_rubenslte-*.zip (cm-14.1, Jack)
common.sh shared: apply_patches (idempotent patch application)
shell.nix nix-shell FHS env for both builds (nixpkgs 22.11 pinned)
patches/{twrp,kernel,los} post-sync fixes; kernel/ is shared by both builds
local_manifests/ rubenslte.xml (LOS overlay) + twrp.xml (TWRP overlay)
patches/twrp post-sync fixes
local_manifests/ los-14.1.xml + twrp.xml
twrp-build/ los-build/ .ccache/ .jack-repository/ (gitignored workspaces)
```
@@ -23,13 +23,10 @@ Everything rubenslte lives on gitea, fetched anonymously over https:
- `twrp_device_samsung_rubenslte` — TWRP device tree, **self-contained**
(own BoardConfig.mk / mkbootimg.mk / dtbtool, no platform imports).
- `android_kernel_samsung_rubenslte` — stock msm8226 kernel, built from
source, shared by both builds.
- `android_kernel_samsung_msm8226-rubenslte` — S3NEO msm8226 kernel
fork, built from source
- `android_device_samsung_rubenslte` — LOS device tree; inherits the shared
msm8226-common / qcom-common platform layers (cm-14.1). rubenslte is its own
device family, so the former millet-common family layer is gone and the
family bits are owned in-tree (`rootdir/`, `init/`, `liblights/`,
`libshims/`, `keylayout/`, `audio/`, `wifi/`).
msm8226-common / qcom-common platform layers (cm-14.1)
- `android_vendor_samsung_rubenslte` — LOS proprietary blobs.
`android_device_samsung_msm8226-common` lives on gitea too (cm-14.1) — a mirror
@@ -49,10 +46,10 @@ and re-patched — there is no skip-sync mode.
./build_twrp.sh clean # remove twrp-build/out and recovery.img
./build_twrp.sh prune # remove all of twrp-build and recovery.img
./build_los.sh bootimage # build boot.img (kernel + dt.img + ramdisk, fast gate)
./build_los.sh bacon # full build -> lineage_rubenslte-*.zip
./build_los.sh clean # mka clean
./build_los.sh prune # remove all of los-build
./build_los-14.1.sh bootimage # build boot.img (kernel + dt.img + ramdisk, fast gate)
./build_los-14.1.sh bacon # full build -> lineage_rubenslte-*.zip
./build_los-14.1.sh clean # mka clean
./build_los-14.1.sh prune # remove all of los-build
```
Cheap checks without nix: `bash -n common.sh build_twrp.sh build_los.sh`.
@@ -62,18 +59,13 @@ Flashing / boot keys: README.md.
## How the builds work
- **Env**: everything runs inside the nix-shell FHS env (`shell.nix`). Run
`nix-shell` first, then invoke the scripts — they do **not** self-re-enter
the env anymore. Don't rely on `nix-shell --run` (the shellHook does
`exec android-env`); don't run two nix-shells at once (nix store deadlock).
`nix-shell` first, then invoke the scripts.
- **TWRP sources**: `repo init` of omni `twrp-5.1`
(`platform_manifest_twrp_omni`) + `local_manifests/twrp.xml` copied into
`.repo/local_manifests/` before `repo sync -c -j$(nproc)`, then
`apply_patches patches/twrp` and `apply_patches patches/kernel`.
`apply_patches patches/twrp`.
- **LOS sources**: `repo init` of cm-14.1 (`LineageOS/android`) +
`local_manifests/rubenslte.xml` copied in before `repo sync -c -j$(nproc)`,
then `apply_patches patches/kernel` and `apply_patches patches/los`.
Sync wipes in-tree edits; `apply_patches` is idempotent so re-applying each
full build is harmless.
`local_manifests/rubenslte.xml` copied in before `repo sync -c -j$(nproc)`.
- **Patches**: `common.sh::apply_patches` dry-runs each patch with `LC_ALL=C`
first. An already-applied patch makes GNU patch (2.8, from the nix env)
report `Reversed (or previously applied) patch detected` on the forward dry
@@ -88,12 +80,7 @@ Flashing / boot keys: README.md.
- **Compiler (LOS)**: Jack only, in-process (`JACK_SERVER=false
JACK_NO_SERVER=1`); the jack/jill jars are seeded into `.jack-repository/`
from `prebuilts/sdk/tools/jacks/` with `cp -n`.
- **Kernel**: built from source via the omni/lineage kernel build rules. The
variant defconfig (`msm8926-sec_rubenslte_defconfig`) enables only
`CONFIG_MACH_RUBENSLTE_OPEN` (EUR); dtbTool packs dt.img for the bootloader.
- **Recovery ramdisk**: the stock minigzip ramdisk overflows the 10,485,248 B
partition, so `mkbootimg.mk` drops tzdata + f2fs tools and compresses with
**LZMA**. Result: 10,479,632 B, 19-language TWRP.
- **Kernel**: built from source via the omni/lineage kernel build rules.
- **SEANDROIDENFORCE**: `build_los.sh` appends the trailer to the LOS boot.img
(`append_seandroidenforce`) — required by Samsung bootloaders.
@@ -107,16 +94,9 @@ Artifacts: `recovery.img` (repo root; `build_twrp.sh` checks it against
*recursive* (`=`, expanded after `PRODUCT_OUT`/`KERNEL_OUT` exist) — never `:=`.
- `mkbootimg.mk`: the dt.img rule depends on `INSTALLED_KERNEL_TARGET`; the
ramdisk must stay LZMA + trimmed or the image overflows the partition.
- **F2FS is off** (no kernel driver): never re-add
`TARGET_USERIMAGES_USE_F2FS`. The LOS `rootdir/etc/fstab.qcom` is EXT4-only
and TWRP's mkbootimg strips f2fs tools from the ramdisk.
- dt.img is **EUR-only** (`CONFIG_MACH_RUBENSLTE_OPEN`); other variants
(T365Y/T365M) need their `CONFIG_MACH_RUBENSLTE_*` enabled.
- **SEANDROIDENFORCE** trailer + `--dt` are required for Samsung bootloaders
(`append_seandroidenforce` appends it to LOS boot.img).
- LOS is Jack-only and the ROM is **bare** (no GApps, `/data` ext4).
- Kernel fixes go in `patches/kernel/` and must apply in **both** `twrp-build/`
and `los-build/`.
## Gotchas
@@ -130,14 +110,6 @@ Artifacts: `recovery.img` (repo root; `build_twrp.sh` checks it against
and warns that it can't auto-update to a newer repo version — harmless.
- Don't switch LOS off Jack or re-enable the Jack server (host TLS breaks the
server path and aborts the build).
- **LOS family bits in the device tree are ported Samsung msm8926-tablet
baselines, not device-extracted data**: `audio/mixer_paths.xml`,
`wifi/WCNSS_*`, `keylayout/*`, and the bootloader-match table in
`init/init_rubenslte.cpp` come from the matisse/millet cm-14.1 trees.
They build and boot (per the platform), but re-verify against stock
rubenslte `/system/etc` before trusting camera/audio/wifi calibration; only
`rootdir/etc/fstab.qcom` is rubens-extracted (partition map from stock
recovery.fstab).
- `repo sync` wipes in-tree edits — expected. Prefer editing the **device
repos**, not patching; patches are only for upstream 5.1/14.1 sources that
can't live in the device tree.
@@ -152,49 +124,7 @@ whole manifest. (`repo` reads the copy the build script drops into
`twrp-build/` / `los-build/.repo/local_manifests/` — edit the source files,
every build re-copies them.)
- **`twrp.xml`** (TWRP): gitea `twrp_device_samsung_rubenslte` +
`android_kernel_samsung_rubenslte` (both `main`). The omni twrp-5.1 manifest
has no rubenslte entries, hence the overlay; the arm-eabi-4.8 toolchain is
already in the primary manifest (default `r28`), so no override is needed.
- **`rubenslte.xml`** (LOS): the cm-14.1 manifest is LineageOS's shared
project list — no rubenslte entries, no gitea remote, and it pins
chromium-webview prebuilts that fail to clone from GitHub (repos packed over
GitHub's object limits). The overlay adds:
- gitea device/vendor/kernel (`main`)
- `device/samsung/msm8226-common` (gitea, `cm-14.1`) + the two qcom-common
layers (LineageOS, `cm-14.1`)
- `<remove-project>`s the four broken `chromium-webview_prebuilt_*` repos and
adds the intact AOSP copy instead: `external/chromium-webview`
(`platform/external/chromium-webview` on `nougat-mr1.2-release`, via the
primary manifest's `aosp` remote).
## Troubleshooting (most likely first)
- `repo sync` fails `remote <name> already exists with different
attributes` — a local-manifest `<remote>` redeclares a remote the primary
manifest already defines with different attributes (only `aosp` shares the
primary's remote name; as long as no local `<remote name="aosp">` is added
it resolves from `default.xml`). The primary `aosp` remote has absolute
fetch, unlike `github` (`fetch=".."`), which is why that one gets a local
`los` remote alias instead.
- adb `CANNOT LINK ... libc.so` — `/system` isn't mounted in recovery; normal.
Mount System in TWRP.
- `make: ... [/dt.img] Błąd 255` — the recursive-variable /
`INSTALLED_KERNEL_TARGET` invariant broke; restore per above.
- Recovery image won't fit — ramdisk isn't LZMA/trimmed; check `mkbootimg.mk`.
- f2fs tools reappear in the ramdisk — stale
`out/target/product/rubenslte/root/sbin/` from a past build; delete + `root.ts`.
- Jack jar "not readable" — re-seed `.jack-repository/` from
`los-build/prebuilts/sdk/tools/jacks/` (`cp -n jack-*.jar jill-*.jar`).
- Bacon JVM SIGSEGV in libconscrypt (`signapk.jar`, `pc=0x300`) — the full
`jdk8`'s GTK/GNOME startup stack loads OpenSSL 3 into global symbol scope and
interposes AOSP host `libconscrypt_openjdk_jni.so`'s embedded BoringSSL.
Fixed by `jdk8_headless` in `shell.nix` (no desktop stack). If it ever
returns, check `LD_DEBUG=libs` on a signapk run for `openssl-3.0.9` loads and
confirm `shell.nix` still uses `jdk8_headless`.
Device: SM-T365, MSM8926, Adreno 305, 1.5 GB/16 GB, recovery partition
10,485,248 B; similar devices: milletlte, matisselte, motorola_thea.
# Else
For depth: `patches/README.md`, `twrp_device_samsung_rubenslte/README.md`,
`local_manifests/rubenslte.xml`.
`local_manifests/rubenslte.xml`.
+1 -15
View File
@@ -46,19 +46,5 @@ factory reset, then flash the ROM zip.
| Display | 800x1280 px |
| Rear camera | 3.1 Mpx |
| Front camera | 1.2 Mpx |
| Similar devices | milletlte, matisselte, motorola_thea |
## Links
### Kernel, vendor & device trees
- https://git.cfpi-fpsi.eu/rubenslte/android_kernel_samsung_rubenslte
- https://git.cfpi-fpsi.eu/rubenslte/android_vendor_samsung_rubenslte
- https://git.cfpi-fpsi.eu/rubenslte/android_device_samsung_rubenslte
- https://git.cfpi-fpsi.eu/rubenslte/twrp_device_samsung_rubenslte
### Similar device trees
- https://github.com/matteo0026/android_device_samsung_msm8226-common
- https://github.com/matteo0026/android_device_samsung_matisse-common
- https://github.com/matteo0026/twrp_device_samsung_milletlte
- https://github.com/matteo0026/twrp_device_samsung_matisselte
| Similar devices | milletlte, matisselte |
+1 -48
View File
@@ -1,19 +1,6 @@
# Patches
These patches make the 2015-era sources build on a modern host toolchain, and
fix the small LOS 14.1 source-tree issues this project hit. They are applied
automatically by the build scripts (`build_twrp.sh` and `build_los.sh`) and are
idempotent (already-applied patches are detected and skipped), so re-running
after a `repo sync` is safe.
Applied by which script:
- `patches/twrp/` — **build_twrp.sh** (applied at the root of the omni twrp-5.1
workspace in `twrp-build/`)
- `patches/kernel/` — **both** scripts (applied at `kernel/samsung/rubenslte/`
in each workspace, the gitea kernel clone `android_kernel_samsung_rubenslte`)
- `patches/los/` — **build_los.sh** (applied at the root of the cm-14.1
workspace in `los-build/`)
These patches make the 2015-era sources build on a modern host toolchain.
## TWRP / omni 5.1 (`patches/twrp/`)
@@ -27,37 +14,3 @@ Applied by which script:
These target the omni `twrp-5.1` manifest sources — they only apply inside the
repo workspace, not on a host.
## Kernel (`patches/kernel/`)
All target `kernel/samsung/rubenslte/...` as checked out by either build
script. Shared by both builds.
| Patch | File(s) | Problem fixed |
|-------|---------|---------------|
| `0001-kernel-arch-msm-config-and-defconfig-fixes.patch` | `arch/arm/mach-msm/Kconfig`, `arch/arm/configs/msm8926-sec_rubenslte_defconfig` | adds the missing `ARCH_MSM` Kconfig entry and enables `CONFIG_OF`/`ARCH_MSM` in the variant defconfig (fresh kernel tree lacks them) |
| `0002-kernel-timeconst-pl-fix.patch` | `kernel/timeconst.pl` | `defined(@array)` removed in Perl 5.22+; use `!@val` |
| `0003-kernel-modpost-nonfatal.patch` | `scripts/Makefile.modpost` | drops the `-E` flag so section mismatches are warnings, not errors (newer host binutils) |
| `0004-kernel-dtc-fcommon-host-build.patch` | `scripts/dtc/Makefile` | `-fcommon` for the flex/bison host objects (GCC 10 default `-fno-common` breaks the dtc host build) |
## LineageOS 14.1 (`patches/los/`)
| Patch | File(s) | Problem fixed |
|-------|---------|---------------|
| `0001-libbt-vendor-define-tiocpm-ioctls.patch` | `hardware/qcom/bt-caf/libbt-vendor/include/hci_uart.h` | `TIOCPMGET`/`TIOCPMPUT`/`TIOCPMACT` (MSM-serial UART power-management ioctls) are missing from the bionic kernel uapi headers, so `hci_uart.c`/`bt_vendor_qcom.c` fail with "use of undeclared identifier" under the modern clang build |
The former `0001-vendor-cmsdk-droiddoc-support-libs-classpath.patch` was deleted:
it added the android-support libraries to `cmplat_docs_java_libraries`
(vendor/cmsdk/Android.mk), but upstream builds the docs with only
`org.cyanogenmod.platform.sdk`; putting the support jars on the docs classpath
made doclava try to load them and crash on the missing
`android.support.v4.view.AbsSavedState`, and once `android-support-v4` was
added the resolved superclass names diverged from the committed
`vendor/cmsdk/api/cm_current.txt` baseline, breaking `checkpublicapi`. The
later `0001-device-millet-common-allow-rubenslte.patch` was also deleted:
millet-common is no longer part of this LOS tree — rubenslte owns its family
layer in-tree.
Anything needed from the shared kernel/device trees that can't be
expressed in a device repo should go under `patches/kernel/` (kernel) or
`patches/los/` (other LOS vendor trees).