build: Respect fs_config when generating recovery ramdisk

Without the -d $(TARGET_OUT) option for mkbootfs, only the
compiled-in fs_config (from AOSP) is used for the generated
ramdisk image. Device-specific additions are ignored.

This is why AOSP sets this option for both the boot- and recovery
ramdisk [1]. However, the option was removed for the recovery ramdisk
in review.lineageos.org/c/LineageOS/android_build/+/222722

This causes device-specific fs_config additions to be ignored when
generating the recovery ramdisk, potentially setting the wrong
permissions.

[1]: android.googlesource.com/platform/build/+/refs/tags/android-9.0.0_r37/core/Makefile#1388

Change-Id: I0f77a49d8b2f08791e60b34ddbb6f3b32bc2f0bc
This commit is contained in:
lambdadroid 2021-11-13 11:06:35 +01:00 committed by Bartłomiej Rudecki
parent 453fe9d9a0
commit 8b69c4d0a0
Signed by: przekichane
GPG key ID: 751F23C6F014EF76

View file

@ -2768,7 +2768,7 @@ $(INTERNAL_RECOVERY_RAMDISK_FILES_TIMESTAMP): $(MKBOOTFS) \
$(recovery_uncompressed_ramdisk): $(INTERNAL_RECOVERY_RAMDISK_FILES_TIMESTAMP) $(recovery_uncompressed_ramdisk): $(INTERNAL_RECOVERY_RAMDISK_FILES_TIMESTAMP)
@echo ----- Making uncompressed recovery ramdisk ------ @echo ----- Making uncompressed recovery ramdisk ------
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) > $@ $(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_RECOVERY_ROOT_OUT) > $@
$(recovery_ramdisk): $(recovery_uncompressed_ramdisk) $(COMPRESSION_COMMAND_DEPS) $(recovery_ramdisk): $(recovery_uncompressed_ramdisk) $(COMPRESSION_COMMAND_DEPS)
@echo ----- Making compressed recovery ramdisk ------ @echo ----- Making compressed recovery ramdisk ------