From: Chih-Wei Huang Date: Fri, 11 May 2018 11:46:48 +0000 (+0800) Subject: Build system.img with ext4 format X-Git-Tag: android-x86-8.1-r1~31 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fdevice-generic-common.git;a=commitdiff_plain;h=04169f95a74e2b373baf4ce4eaae725cc59d662b Build system.img with ext4 format We use mksquashfsimage.sh to build system.img since oreo-x86. However, it causes trouble to read-write installation mode. To conquer that, I have tried several methods like restorecon, overlayfs or even generate ext4 system.img on-the-fly. However, none of them works flawless. Let's just build system.img as before. This effectively reverts commit 9668827da362f3ab8dad9902ee77e255825bffa6. --- diff --git a/BoardConfig.mk b/BoardConfig.mk index 0e267d9..7d71496 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -10,10 +10,7 @@ BOARD_HAVE_BLUETOOTH_LINUX := true BOARD_USE_LEGACY_UI := true -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 -BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := squashfs -BOARD_SYSTEMIMAGE_SQUASHFS_COMPRESSOR := gzip -#TARGET_USERIMAGES_SPARSE_SQUASHFS_DISABLED := true +BOARD_SYSTEMIMAGE_PARTITION_SIZE = $(if $(MKSQUASHFS),0,1610612736) # customize the malloced address to be 16-byte aligned BOARD_MALLOC_ALIGNMENT := 16 diff --git a/build/tasks/system.mk b/build/tasks/system.mk index 6b03ed2..fef6d0e 100644 --- a/build/tasks/system.mk +++ b/build/tasks/system.mk @@ -4,6 +4,6 @@ $(PRODUCT_OUT)/build.prop: $(INSTALLED_BUILD_PROP_TARGET) $(BUILT_SYSTEMIMAGE): $(PRODUCT_OUT)/build.prop ifneq ($(MKSQUASHFS),) -$(PRODUCT_OUT)/system.sfs: $(BUILT_SYSTEMIMAGE) | $(SIMG2IMG) - $(hide) $(SIMG2IMG) $< $@ +$(systemimg): $(BUILT_SYSTEMIMAGE) | $(MKSQUASHFS) + $(call build-squashfs-target,$^,$@) endif