From ff2f5f91615adf4132b64e09dc2e8eacaad6a461 Mon Sep 17 00:00:00 2001 From: carbon Date: Tue, 25 Jun 2024 22:08:36 +0800 Subject: [PATCH] create part info for the sd card version of u-boot The partition size in partition_sd.xml is not used when generating the sd image, but some of this information will be used later in u-boot. Signed-off-by: carbon --- build/tools/common/image_tool/mkcvipart.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/tools/common/image_tool/mkcvipart.py b/build/tools/common/image_tool/mkcvipart.py index 3f38ac450..189d6549d 100644 --- a/build/tools/common/image_tool/mkcvipart.py +++ b/build/tools/common/image_tool/mkcvipart.py @@ -137,7 +137,6 @@ def gen_cvipart_h(output, parser): if p["label"] == "ROOTFS": of.write('#define ROOTFS_DEV "/dev/mmcblk0p%d"\n' % (i+1)) break - of.write('#define PARTS_OFFSET ""\n') elif parser.getStorage() == "none": of.write('#define PART_LAYOUT ""\n') @@ -160,10 +159,10 @@ def gen_cvipart_h(output, parser): ) # Generintg PART_ENV - if parser.getStorage() == "emmc": + if parser.getStorage() == "emmc" or parser.getStorage() == "sd": LBA_SIZE = 512 - if parser.getStorage() != "none" and parser.getStorage() != "sd": + if parser.getStorage() != "none": of.write("#define PARTS_OFFSET \\\n") for i, p in enumerate(parts): of.write('"%s_PART_OFFSET=0x%x\\0" \\\n' % (p["label"], int(p["offset"] / LBA_SIZE)))