From 97b906b004f29551b222b4b68dccc84a20ee6508 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 21 Jul 2015 18:01:20 -0700 Subject: [PATCH] build: Support packaging for system_root_image. If system image contains the root directory (BOARD_BUILD_SYSTEM_ROOT_IMAGE == "true"), we package the root directory into ROOT/ instead of BOOT/RAMDISK/ in the target_files zip. Change-Id: I817776ca97194991308b2131d0e34ab136283464 --- core/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/Makefile b/core/Makefile index 6ee44d6e5..ab58b83e1 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1456,8 +1456,14 @@ endif endif @# Components of the boot image $(hide) mkdir -p $(zip_root)/BOOT +ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) + $(hide) mkdir -p $(zip_root)/ROOT + $(hide) $(call package_files-copy-root, \ + $(TARGET_ROOT_OUT),$(zip_root)/ROOT) +else $(hide) $(call package_files-copy-root, \ $(TARGET_ROOT_OUT),$(zip_root)/BOOT/RAMDISK) +endif ifdef INSTALLED_KERNEL_TARGET $(hide) $(ACP) $(INSTALLED_KERNEL_TARGET) $(zip_root)/BOOT/kernel endif @@ -1549,7 +1555,11 @@ endif @# and recovery ramdisk files in the zip, and save the output $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="SYSTEM/" } /^SYSTEM\// {print "system/" $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -D $(TARGET_OUT) -S $(SELINUX_FC) > $(zip_root)/META/filesystem_config.txt $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="VENDOR/" } /^VENDOR\// {print "vendor/" $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -D $(TARGET_OUT) -S $(SELINUX_FC) > $(zip_root)/META/vendor_filesystem_config.txt +ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) + $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="ROOT/" } /^ROOT\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -D $(TARGET_OUT)-S $(SELINUX_FC) > $(zip_root)/META/root_filesystem_config.txt +else $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="BOOT/RAMDISK/" } /^BOOT\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -D $(TARGET_OUT) -S $(SELINUX_FC) > $(zip_root)/META/boot_filesystem_config.txt +endif ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="RECOVERY/RAMDISK/" } /^RECOVERY\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -D $(TARGET_OUT) -S $(SELINUX_FC) > $(zip_root)/META/recovery_filesystem_config.txt endif -- 2.11.0