general: drop f2fs and modify documentation

This commit is contained in:
2026-09-13 20:04:26 +02:00
parent 04e83acad5
commit f0b24a6093
3 changed files with 85 additions and 1 deletions
+16 -1
View File
@@ -1,3 +1,10 @@
# BoardConfig for rubenslte (SM-T365 msm8226) TWRP builds.
#
# The kernel is built from source (kernel/samsung/rubenslte, Samsung msm8226
# stock tree) and shipped as a separate device tree blob (dt.img) that the
# bootloader uses to pick the right DTB per hardware variant. All boot-image
# work (mkbootimg, dt.img, ramdisk trim) happens in mkbootimg.mk.
DEVICE_TREE := device/samsung/rubenslte
# Architecture
@@ -30,6 +37,12 @@ KERNEL_TOOLCHAIN_PREFIX := arm-eabi-
# Boot image with separate device tree blob (dt.img via dtbtool)
BOARD_CUSTOM_BOOTIMG_MK := $(DEVICE_TREE)/mkbootimg.mk
BOARD_KERNEL_SEPARATED_DT := true
# NOTE: these two must stay *recursive* ("=", not ":="). BoardConfig.mk is
# parsed by build/envsetup.mk before PRODUCT_OUT/KERNEL_OUT are defined, while
# mkbootimg.mk is included from build/core/Makefile:993 -- before
# build/core/tasks/kernel.mk (included at :1942) defines KERNEL_OUT.
# ":=" would freeze empty values here and break the dt.img rule.
INSTALLED_DTIMAGE_TARGET = $(PRODUCT_OUT)/dt.img
BOARD_KERNEL_CMDLINE := console=null androidboot.console=null androidboot.hardware=qcom user_debug=23 androidboot.selinux=permissive
@@ -40,7 +53,9 @@ BOARD_MKBOOTIMG_ARGS = --kernel_offset 0x00008000 --ramdisk_offset 0x02000000 --
# Filesystems
BOARD_HAS_LARGE_FILESYSTEM := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
# F2FS intentionally NOT enabled: the rubenslte kernel has no F2FS driver,
# so offering "Data (F2FS)" in the TWRP format menu would only produce an
# unreadable /data partition.
BOARD_SUPPRESS_SECURE_ERASE := true
# Partitions
+53
View File
@@ -0,0 +1,53 @@
# twrp_device_samsung_rubenslte
TWRP device tree for the Samsung Galaxy Tab Active **SM-T365** (msm8226,
codename `rubenslte`), targeting omni's `twrp-5.1` manifest.
```text
Android.mk includes subdirs only when TARGET_DEVICE == rubenslte
AndroidProducts.mk product makefile = omni_rubenslte.mk
BoardConfig.mk architecture, kernel-from-source, partitions, TWRP opts
mkbootimg.mk custom boot/recovery image rules (dt.img, LZMA ramdisk)
dtbtool/ dtbToolLineage sources (packs .dtb files into dt.img)
```
## How it fits together
- The kernel is **built from source** from `rubenslte/android_kernel_samsung_rubenslte`
(base defconfig + rubenslte variant + selinux defconfigs, see the `TARGET_KERNEL_*`
variables in `BoardConfig.mk`).
- `mkbootimg.mk` is pulled in through `BOARD_CUSTOM_BOOTIMG_MK`. Two things it
does that the core build does not:
1. builds `dt.img` from the kernel's compiled `.dtb` files and passes it to
`mkbootimg` (`--dt`), because Samsung bootloaders validate `dt.img`;
2. appends the **`SEANDROIDENFORCE`** trailer to boot/recovery images, which
the stock bootloader also requires.
## Known gotchas (read before touching anything)
- `board_config.mk`: `INSTALLED_DTIMAGE_TARGET` and `BOARD_MKBOOTIMG_ARGS` must
stay **recursive** (`=`, not `:=`). This file is parsed before `PRODUCT_OUT`
exists and `mkbootimg.mk` is included from `build/core/Makefile:993` — before
`tasks/kernel.mk` (included at `:1942`) defines `KERNEL_OUT`. The dt.img rule
therefore depends on `INSTALLED_KERNEL_TARGET` (defined at `core/Makefile:480`),
not on `TARGET_PREBUILT_INT_KERNEL`.
- The recovery partition is only 10,485,248 bytes; the stock gzip ramdisk
overflows it. `mkbootimg.mk` overrides the core ramdisk recipes (our file is
included after `core/Makefile`, so these win) to drop tzdata, keep only
`en.xml`/`pl.xml` languages, and compress with **LZMA** (the kernel has
`CONFIG_RD_LZMA=y`). Do not revert these rules without rechecking the size.
- **F2FS is intentionally disabled** (`TARGET_USERIMAGES_USE_F2FS` absent):
the kernel ships no F2FS driver, so offering an F2FS format in TWRP would
only produce an unreadable `/data`.
- The variant defconfig enables only `CONFIG_MACH_RUBENSLTE_OPEN`, so **dt.img
carries just the EUR DTBs** (r02/r03). SM-T365Y/AUS, SM-T365M/KOR units need
the matching `CONFIG_MACH_RUBENSLTE_*` entries and a rebuild.
## Building
Do not build here directly: the driver is `builders_rubenslte/build_twrp.sh`,
which clones this tree into the omni workspace and builds `recovery.img`.
```text
./build_twrp.sh # in builders_rubenslte; produces recovery.img
```
+16
View File
@@ -1,3 +1,19 @@
# Custom boot/recovery image rules for rubenslte.
#
# This file is picked up via BOARD_CUSTOM_BOOTIMG_MK and included from
# build/core/Makefile:993, *before* build/core/tasks/kernel.mk (included at
# :1942) defines KERNEL_OUT. This is why everything kernel-related below uses
# recursive variables and why the dt.img rule depends on INSTALLED_KERNEL_TARGET
# (defined earlier, at core/Makefile:480) rather than on
# TARGET_PREBUILT_INT_KERNEL.
#
# Rules defined here override the core ones because our file is included after
# core/Makefile, so these recipe bodies win. That is used deliberately at the
# bottom: the recovery ramdisk recipes get replaced to fix an oversize image.
#
# Samsung bootloaders also validate a "SEANDROIDENFORCE" trailer on boot images,
# which the stock rules do not add.
LOCAL_PATH := $(call my-dir)
# Build dt.img from the kernel's compiled .dtb files using dtbToolLineage