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:39:10 +0200
commitb3f87a2ca46a197bea2fc17e031e63af6181fd62 (patch)
treed0eb2bf2f2bf10fbaa67714a22829472db3dcd9b
parent68f04bca7408ccea109f281923ad0170f02cb008 (diff)
downloaddevice_samsung_i9300-b3f87a2ca46a197bea2fc17e031e63af6181fd62.tar.gz
device_samsung_i9300-b3f87a2ca46a197bea2fc17e031e63af6181fd62.tar.bz2
device_samsung_i9300-b3f87a2ca46a197bea2fc17e031e63af6181fd62.zip
fstab: Add ext4 cache partition
Without BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE, in Replicant 11, when running '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, 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 But for now ext4 is used instead of f2fs as ext4 is already been used for and tested with the system and data partitions, 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 994bf48..e56e4ca 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 303c47e..a72387d 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
/dev/block/platform/soc/12550000.mmc/by-name/EFS /efs ext4 rw,noatime wait