Files
android_vendor_pawlet/recovery_ui/gui/Android.bp
T
oxmc af29205167 recovery: unblock Soong analysis on android-16
The recovery_toolkit/recovery_ui merge broke ninja generation for the
whole tree (everything runs at analysis time, even for modules nothing
builds). Fixes, in the order the errors surfaced:

- BoardConfigSoong.mk: export TW_THEME=landscape_hdpi via the
  twrpVarsPlugin soong config namespace (RPi 4/5 are 1080p HDMI);
  libguitwrp's theme selection hard-exits analysis when unset
- soong/copy.go: re-anchor runtime.Caller path derivation — the
  'bootable' anchor never matches at vendor/pawlet/recovery_ui and the
  slice paniced; recovery dir is now derived relative to this file
- scrypt sources.bp + libpixelflinger: hoist arch.arm.neon.* contents
  into plain arm blocks — the neon variant was removed in android-16
  Soong (NEON is mandatory on armv7-a+)
- recovery_ui/Android.bp: port twrp_defaults verbatim from
  android_vendor_twrp (android-14.1, build/soong) — it never lived in
  bootable/recovery; pure soong_config machinery, contributes no flags
  until twrpGlobalVars vars are set
- gui/Android.bp: drop libaosprecovery from libguitwrp's shared_libs —
  the module doesn't exist (TWRP's forked install/*.cpp was never
  ported) and an undefined dep is analysis-fatal; compile is unaffected
  (static lib), the gap moves to link time and is documented
- recovery_ui/Android.bp: librecovery_ui_pawlet_twrp shared -> static
  (librecovery_ui_ext absorbs TARGET_RECOVERY_UI_LIB via
  whole_static_libs) and libpixelflinger_twrp moved to static_libs
- scrypt Android.bp + libminuitwrp_defaults.go: rewrite leftover
  bootable/recovery/* self-referential paths to the new
  vendor/pawlet locations

Requires the libminadbd_headers visibility patch in the patches repo.
m nothing now completes for pawlet_rpi4-bp4a-userdebug.
2026-07-15 02:35:09 -07:00

104 lines
3.2 KiB
Plaintext

bootstrap_go_package {
name: "soong-libguitwrp_defaults",
pkgPath: "bootable/recovery/gui",
deps: [
"soong",
"soong-android",
"soong-cc"
],
srcs: [
"libguitwrp_defaults.go",
"../soong/copy.go",
"../soong/makevars.go"
],
pluginFor: ["soong_build"]
}
libguitwrp_defaults {
name: "libguitwrp_defaults"
}
cc_library_static {
name: "libguitwrp",
defaults: ["libguitwrp_defaults", "twrp_defaults"],
cflags: [
"-fno-strict-aliasing",
"-Wno-implicit-fallthrough",
"-D_USE_SYSTEM_ZIPARCHIVE",
"-DTWRES=\"/twres/\""
],
// Paths under vendor/pawlet/recovery_ui and vendor/pawlet/recovery_toolkit
// are this port's own modules (moved out of bootable/recovery, see
// NOTES-ota-recovery-ab.md). Paths still under bootable/recovery/* are
// genuinely still there, untouched, in stock AOSP.
include_dirs: [
"vendor/pawlet/recovery_toolkit/crypto/scrypt/lib/util",
"bootable/recovery/otautil/include",
"bootable/recovery/install/include",
"system/libziparchive/include",
"bootable/recovery/recovery_ui/include",
"bootable/recovery/fuse_sideload/include",
"vendor/pawlet/recovery_ui/gui/include",
"vendor/pawlet/recovery_toolkit/twrpinstall",
"vendor/pawlet/recovery_toolkit/twrpinstall/include",
"vendor/pawlet/recovery_ui/libpixelflinger/include",
"vendor/pawlet/recovery_ui/minuitwrp/include",
"bionic",
"system/libbase/include",
"system/core/libcutils/include",
"system/core/include",
"external/freetype/include",
"external/libpng"
],
srcs: [
"gui.cpp",
"resources.cpp",
"pages.cpp",
"text.cpp",
"image.cpp",
"action.cpp",
"console.cpp",
"fill.cpp",
"button.cpp",
"checkbox.cpp",
"fileselector.cpp",
"progressbar.cpp",
"animation.cpp",
"object.cpp",
"slider.cpp",
"slidervalue.cpp",
"listbox.cpp",
"keyboard.cpp",
"input.cpp",
"blanktimer.cpp",
"partitionlist.cpp",
"mousecursor.cpp",
"scrolllist.cpp",
"patternpassword.cpp",
"textbox.cpp",
"terminal.cpp",
"twmsg.cpp"
],
// Upstream also lists libaosprecovery (TWRP's repackaging of its FORKED
// bootable/recovery install/*.cpp) here. This port keeps bootable/recovery
// stock and hasn't ported those sources, and referencing an undefined
// module is analysis-fatal for the whole tree — so the dep is dropped.
// libguitwrp is a static lib: nothing is lost at compile time (action.cpp
// only needs twinstall/ headers, provided via include_dirs). The debt
// moves to link time of librecovery_ui_pawlet_twrp, which will need the
// forked install symbols (apply_from_adb & co.) ported into
// recovery_toolkit before it can produce a .so.
shared_libs: [
"libminuitwrp",
"libc",
"libstdc++",
"libselinux",
"libziparchive"
],
static_libs: [
"libotautil",
"libpng"
]
}