mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-29 19:42:41 +00:00
tegra-flash-init: add BCT redundant copies to mmcblk0boot0 writes
in the program-boot-device script. Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
@@ -74,6 +74,22 @@ program_mmcboot_partition() {
|
|||||||
if ! dd if="$part_file" of="$bootpart" bs=1 seek=$part_offset count=$file_size > /dev/null; then
|
if ! dd if="$part_file" of="$bootpart" bs=1 seek=$part_offset count=$file_size > /dev/null; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
# Multiple copies of the BCT get installed at 16KiB boundaries
|
||||||
|
# within the defined BCT partition
|
||||||
|
if [ "$partname" = "BCT" ]; then
|
||||||
|
local slotsize=16384
|
||||||
|
local curr_offset=$(expr $part_offset \+ $slotsize)
|
||||||
|
local copycount=$(expr $part_size / $slotsize)
|
||||||
|
local i=1
|
||||||
|
while [ $i -lt $copycount ]; do
|
||||||
|
echo "Writing $part_file (size=$file_size) to BCT+$i (offset=$curr_offset)"
|
||||||
|
if ! dd if="$part_file" of="$bootpart" bs=1 seek=$curr_offset count=$file_size > /dev/null; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
i=$(expr $i \+ 1)
|
||||||
|
curr_offset=$(expr $curr_offset \+ $slotsize)
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user