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.
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
<physical_partition type="sd">
|
||||
<partition label="BOOT" size_in_kb="80960" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="204800" readonly="false" file="rootfs.sd" />
|
||||
<partition label="DATA" size_in_kb="512000" readonly="false" file="data.sd" mountpoint="/mnt/data" type="ext4" />
|
||||
<partition label="BOOT" size_in_kb="131072" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="768432" readonly="false" file="rootfs.sd" />
|
||||
</physical_partition>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<physical_partition type="sd">
|
||||
<partition label="BOOT" size_in_kb="262144" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="262144" readonly="false" file="rootfs.sd" />
|
||||
<partition label="BOOT" size_in_kb="131072" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="768432" readonly="false" file="rootfs.sd" />
|
||||
</physical_partition>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<physical_partition type="sd">
|
||||
<partition label="BOOT" size_in_kb="262144" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="262144" readonly="false" file="rootfs.sd" />
|
||||
<partition label="BOOT" size_in_kb="131072" readonly="false" file="boot.sd"/>
|
||||
<partition label="ROOTFS" size_in_kb="768432" readonly="false" file="rootfs.sd" />
|
||||
</physical_partition>
|
||||
|
||||
@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user