Conditionally generate META/boot_filesystem_config.txt.

if BOARD_BUILD_SYSTEM_ROOT_IMAGE != true:  # case A
  - BOOT/RAMDISK corresponds to the / under normal boot, with matching
    fs_config in META/boot_filesystem_config.txt.
  - RECOVERY/RAMDISK corresponds to the / under recovery, with fs_config
    in META/recovery_filesystem_config.txt.
else:
  if BOARD_USES_RECOVERY_AS_BOOT == true:  # case B
    - ROOT/ corresponds to the / under normal boot, with fs_config in
      META/root_filesystem_config.txt.
    - BOOT/RAMDISK corresponds to the / under recovery, with fs_config
      in META/boot_filesystem_config.txt.
  else:  # case C
    - ROOT/ corresponds to the / under normal boot, with fs_config in
      META/root_filesystem_config.txt.
    - RECOVERY/RAMDISK corresponds to the / under recovery, with fs_config
      in META/recovery_filesystem_config.txt.
    - BOOT/RAMDISK doesn't exist.

This CL fixes case C, where we shouldn't try to generate
'META/boot_filesystem_config.txt' for BOOT/RAMDISK. It wouldn't be fatal
without this fix, but would wrongly scan the current directory and
include a large fs_config output into target-files.zip.

Bug: 72731506
Test: `lunch aosp_bullhead-userdebug` and `m dist`. (case A)
Test: `lunch aosp_marlin-userdebug` and `m dist`. (case B)
Test: Define 'BOARD_BUILD_SYSTEM_ROOT_IMAGE := true' for angler. `m
      dist` and check the generated target-files.zip. (case C)
Change-Id: I5582ce8cca464d535af0718be0fd8e65791bd6c2
Merged-In: I5582ce8cca464d535af0718be0fd8e65791bd6c2
(cherry picked from commit da01b211f816cd63f7fb245012d67e654e625c3e)
1 file changed
tree: 7b2070345f3b3bde0180f952701fb022b28a696f
  1. core/
  2. target/
  3. tests/
  4. tools/
  5. .gitignore
  6. Android.mk
  7. buildspec.mk.default
  8. Changes.md
  9. CleanSpec.mk
  10. envsetup.sh
  11. help.sh
  12. navbar.md
  13. OWNERS
  14. README.md
  15. tapasHelp.sh
  16. Usage.txt
README.md

Android Make Build System

This is the Makefile-based portion of the Android Build System.

For documentation on how to run a build, see Usage.txt

For a list of behavioral changes useful for Android.mk writers see Changes.md

For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.

This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.