aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-09-29 17:15:18 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-10-06 17:51:11 +0200
commit92b01f201e923c912c240c08637286131b0d229d (patch)
tree9edf1985376fefb43f8e410bdae7b1ef80786adc
parent0ef20819b71445598e672efa15348ab997041a54 (diff)
downloaddevice_samsung_i9100-92b01f201e923c912c240c08637286131b0d229d.tar.gz
device_samsung_i9100-92b01f201e923c912c240c08637286131b0d229d.tar.bz2
device_samsung_i9100-92b01f201e923c912c240c08637286131b0d229d.zip
fstab: Add ext4 cache partition
Without BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE, when building Replicant 11 for the GT-I9300 with 'make otapackage' we have the following build failure: 2021-10-06 17:37:04 - blockimgdiff.py - INFO : Finding transfers... Traceback (most recent call last): File "[...]/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main File "[...]/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 72, in _run_code File "[...]/out/host/linux-x86/bin/ota_from_target_files/__main__.py", line 12, in <module> File "[...]/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main File "[...]/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 72, in _run_code File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2258, in <module> File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2237, in main File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1980, in GenerateNonAbOtaPackage File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 755, in WriteFullOTAPackage File "[...]/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 679, in GetBlockDifferences File "[...]/out/host/linux-x86/bin/ota_from_target_files/common.py", line 2630, in __init__ File "[...]/out/host/linux-x86/bin/ota_from_target_files/blockimgdiff.py", line 342, in Compute File "[...]/out/host/linux-x86/bin/ota_from_target_files/blockimgdiff.py", line 1561, in FindTransfers AssertionError 17:37:04 ninja failed with: exit status 1 This is because for some reasons the cache_size variable is None. I've not been able to track exactly why though. And with BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE but without the entry in fstab, in Replicant 11, also when running 'make otapackage' we have the following build failure: Traceback (most recent call last): File "[...]/out/host/linux-x86/bin/add_img_to_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main File "[...]/out/host/linux-x86/bin/add_img_to_target_files/internal/stdlib/runpy.py", line 72, in _run_code File "[...]/out/host/linux-x86/bin/add_img_to_target_files/__main__.py", line 12, in <module> File "[...]/out/host/linux-x86/bin/add_img_to_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main File "[...]/out/host/linux-x86/bin/add_img_to_target_files/internal/stdlib/runpy.py", line 72, in _run_code File "[...]/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 999, in <module> File "[...]/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 993, in main File "[...]/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 876, in AddImagesToTargetFiles File "[...]/out/host/linux-x86/bin/add_img_to_target_files/add_img_to_target_files.py", line 539, in AddCache File "[...]/out/host/linux-x86/bin/add_img_to_target_files/common.py", line 1872, in CheckSize KeyError: '/cache' 17:05:43 ninja failed with: exit status 1 In Replicant 6, for the GT-I9300, f2fs is being used, and we have the following in rootdir/fstab.smdk4x12 in device/samsung/i9300: /dev/block/mmcblk0p8 /cache f2fs noatime,discard,inline_xattr,inline_data,nosuid,nodev wait /dev/block/mmcblk0p8 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait And for the GT-I9305 we have have the following in rootdir/fstab.smdk4x12 in device/samsung/i9405: /dev/block/platform/dw_mmc/by-name/CACHE /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check For now we will use ext4 instead of f2fs as ext4 is already been used for and tested with the system and data partitions in Replicant 11, so the diff is smaller than with f2fs. If it works fine we could then switch to f2fs (and spot regressions if there are som): - to stay compatible with Replicant 6 - because a log-structured file system seems more adapted for cache than regular filesystems like ext4. And even if f2fs design is more recent than ext4, and that increases the risk of loosing data, the cache partion can easily be reformated in the recovery. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--BoardConfig.mk1
-rw-r--r--fstab.smdk4x121
2 files changed, 2 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index ec211c2..a1bbb0a 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -27,6 +27,7 @@ BOARD_RECOVERYIMAGE_PARTITION_SIZE := 8388608
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736
# TODO: figure out if it is possible to increase USERDATA partition size
BOARD_USERDATAIMAGE_PARTITION_SIZE := 11378320
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_CACHEIMAGE_PARTITION_SIZE := 1073741824
BOARD_BOOTIMAGE_PARTITION_SIZE := 8388608
BOARD_FLASH_BLOCK_SIZE := 512
diff --git a/fstab.smdk4x12 b/fstab.smdk4x12
index f5f63eb..122f752 100644
--- a/fstab.smdk4x12
+++ b/fstab.smdk4x12
@@ -15,6 +15,7 @@
#
/dev/block/platform/soc/12550000.mmc/by-name/SYSTEM / ext4 ro,noatime wait
+/dev/block/platform/soc/12550000.mmc/by-name/CACHE /cache ext4 rw,noatime,nosuid,nodev,journal_async_commit,errors=panic wait
/dev/block/platform/soc/12550000.mmc/by-name/USERDATA /data ext4 rw,noatime wait
# Recovery