OSDN Git Service

Build system.img with ext4 format
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 11 May 2018 11:46:48 +0000 (19:46 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 15 Jun 2018 08:57:34 +0000 (16:57 +0800)
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.

BoardConfig.mk
build/tasks/system.mk

index 0e267d9..7d71496 100644 (file)
@@ -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
index 6b03ed2..fef6d0e 100644 (file)
@@ -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