summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Kryszyn <j.kryszyn@samsung.com>2024-05-23 12:25:47 +0200
committerJacek Kryszyn <j.kryszyn@samsung.com>2024-05-23 14:21:17 +0200
commit909e621519439b61284cc0b08b6c7637adad21a3 (patch)
treebe03844667d9b52099af5c253e280ba36f64d710
parentfd75c9b88ee8d6cf62b2b9db80e1eaba2050759c (diff)
downloadu-boot-909e621519439b61284cc0b08b6c7637adad21a3.tar.gz
u-boot-909e621519439b61284cc0b08b6c7637adad21a3.tar.bz2
u-boot-909e621519439b61284cc0b08b6c7637adad21a3.zip
Dynamic partitions: fuse tarballs containing super.img
Allow to fuse tarballs prepared in such a way that they already contain super.img and do not contain rootfs.img and hal.img. Change-Id: Iac09011bd92f51354e16e70d3bb5f9ab12f299b2 Signed-off-by: Jacek Kryszyn <j.kryszyn@samsung.com>
-rwxr-xr-xscripts/tizen/sd_fusing.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/tizen/sd_fusing.py b/scripts/tizen/sd_fusing.py
index 7624f69097..e5fbbc75f2 100755
--- a/scripts/tizen/sd_fusing.py
+++ b/scripts/tizen/sd_fusing.py
@@ -21,6 +21,7 @@ Format = False
Device = ""
File = ""
Yes = False
+SuperDelivered = False
LOGGING_NOTICE = int((logging.INFO + logging.WARNING) / 2)
@@ -869,6 +870,7 @@ def mkpart(args, target):
def check_args(args):
global Format
global Yes
+ global SuperDelivered
logging.info(f"Device: {args.device}")
@@ -893,6 +895,9 @@ def check_args(args):
else:
Format = False
+ if args.super_delivered:
+ SuperDelivered = True
+
def check_device(args):
global Format
global Device
@@ -1076,7 +1081,7 @@ def do_fuse_image_super(tmpd, target):
def do_fuse_image_tarball(tarball, tmpd, target):
with tarfile.open(tarball) as tf:
for entry in tf:
- if target.with_super:
+ if target.with_super and not SuperDelivered:
if entry.name in('hal.img', 'rootfs.img'):
tf.extract(entry, path=tmpd)
continue
@@ -1108,12 +1113,12 @@ def fuse_image(args, target):
do_fuse_image_tarball(b, tmpd, target)
else:
fn = os.path.split(b)[-1]
- if target.with_super and fn in ('rootfs.img', 'hal.img'):
+ if target.with_super and fn in ('rootfs.img', 'hal.img') and not SuperDelivered:
shutil.copy(b, os.path.join(tmpd, fn))
else:
do_fuse_image(b, target)
- if target.with_super:
+ if target.with_super and not SuperDelivered:
do_fuse_image_super(tmpd, target)
def logger_notice(self, msg, *args, **kws):
@@ -1163,6 +1168,8 @@ if __name__ == '__main__':
version=f"%(prog)s {__version__}")
parser.add_argument("--YES", action="store_true",
help="agree to destroy data on the DEVICE")
+ parser.add_argument("--super_delivered", action="store_true",
+ help="indicate that super.img is already in tarball and doesn't have to be created during fusing")
args = parser.parse_args()
if args.target == 'list':