-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
if [ $# -ne 1 ]; then | ||
echo "$0: usage: $0 <bin size in bytes>" | ||
exit 1 | ||
fi | ||
|
||
echo "Creating total flash image (mtd0.dmp.uboot_new)" | ||
cp u-boot-DS211j_x16cs0size128_flash.bin mtd0.dmp.uboot_new | ||
dd if=mtd0.dmp.orig of=mtd0.dmp.uboot_new seek=$1 skip=$1 bs=1 | ||
|
||
echo "Exporting partition #1 (mtd0.dmp.part1)" | ||
dd if=mtd0.dmp.uboot_new of=mtd0.dmp.part1 bs=1 count=524288 | ||
|
||
echo "Diffing input/output (there should be NO diff output!)" | ||
diff <(xxd u-boot-DS211j_x16cs0size128_flash.bin) <(xxd -l $1 mtd0.dmp.part1) | ||
|
||
echo "Image ready!" |
Binary file not shown.