From cd1d787e083c6c2446e5bcb17f8fd1fc990e4442 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Mon, 31 Mar 2025 09:17:20 +0900 Subject: [PATCH] scripts: sd_fusing: Add a backup partition for RPi board To locate the ramdisk-recovery images, add a backup partition. There will be ramdisk-recovery images according to each architecture. e.g) ramdisk-recovery.img.32 / ramdisk-recovery.img.64 When run tfm, the proper ramdisk will be loaded. To write ext4 on u-boot, disable metatdata_csum feature. - Change a name from reserved2 to backup. Change-Id: I18a81d95da2eb5d393d0ed6093ce36b7ce6a6ee5 Signed-off-by: Jaehoon Chung --- scripts/sd_fusing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/sd_fusing.py b/scripts/sd_fusing.py index 4d0dc0c..d28e958 100755 --- a/scripts/sd_fusing.py +++ b/scripts/sd_fusing.py @@ -15,7 +15,7 @@ import sys import tarfile import tempfile -__version__ = "1.1.13" +__version__ = "1.1.14" Format = False Device = "" @@ -442,8 +442,8 @@ class Rpi4(InitParams, SdFusingTargetAB): {"size": 256, "name": "hal_b", "binaries_b": "hal.img"}, {"size": 4, "name": "reserved0"}, - {"size": 64, "name": "reserved1"}, - {"size": 125, "name": "reserved2"}, + {"size": 64, "name": "reserved1", "fstype": "ext4"}, + {"size": 125, "name": "backup", "fstype": "ext4"}, ] def __init__(self, device, args): @@ -1070,7 +1070,7 @@ def mkpart(args, target): logging.error(f"Failed to create FAT filesystem on {d}") sys.exit(1) elif part['fstype'] == 'ext4': - argv = ['mkfs.ext4', '-F', '-q', '-L', part['name'], d] + argv = ['mkfs.ext4', '-F', '-q', '-O ^metadata_csum', '-L', part['name'], d] logging.debug(" ".join(argv)) proc = subprocess.run(argv, stdin=subprocess.DEVNULL, -- 2.34.1