From: Tao Bao Date: Wed, 22 Jul 2015 01:01:20 +0000 (-0700) Subject: build: Support packaging for system_root_image. X-Git-Tag: android-x86-7.1-r1~608^2~19^2~147^2~101^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=62bd479fdf6c3069f77bf34ea3466ff0d21dd964;p=android-x86%2Fbuild.git 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 --- diff --git a/core/Makefile b/core/Makefile index d43cb789a..f7f6e4850 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1435,8 +1435,14 @@ ifdef BOARD_KERNEL_PAGESIZE 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 @@ -1528,7 +1534,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 -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 -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 -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 -S $(SELINUX_FC) > $(zip_root)/META/boot_filesystem_config.txt +endif $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="RECOVERY/RAMDISK/" } /^RECOVERY\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -S $(SELINUX_FC) > $(zip_root)/META/recovery_filesystem_config.txt $(hide) (cd $(zip_root) && zip -q ../$(notdir $@) META/*filesystem_config.txt) $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \