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 intwrp-build/)patches/kernel/— both scripts (applied atkernel/samsung/rubenslte/in each workspace, the gitea kernel cloneandroid_kernel_samsung_rubenslte)patches/los/— build_los.sh (applied at the root of the cm-14.1 workspace inlos-build/)
TWRP / omni 5.1 (patches/twrp/)
| Patch | File(s) | Problem fixed |
|---|---|---|
0001-host-cflags-suppress-stringop-truncation.patch |
build/core/combo/HOST_linux-x86*.mk |
-Werror=stringop-truncation errors with host GCC >= 8 |
0002-build-core-fix-ar-absolute-paths.patch |
build/core/definitions.mk |
host ar/absolute path handling in whole-archive extraction breaks with newer binutils; extract to a temp dir instead |
0003-recovery-add-std-gnu++11-for-nullptr-support.patch |
bootable/recovery/Android.mk |
adds -std=gnu++11 for nullptr under the recovery Clang build |
0004-build-core-combo-remove-icf-safe-for-BFD-ld.patch |
build/core/combo/TARGET_linux-arm.mk |
-Wl,--icf=safe is gold-only; commented out for the BFD linker supplied by the toolchain download |
0005-build-core-tasks-kernel-fix-KERNEL_CONFIG_OVERRIDE-ordering-and-passthrough.patch |
build/core/tasks/kernel.mk |
applies the additional config before the override, drops the clobbering oldconfig after override, and passes the override on the kernel build command line |
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).