diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2007-09-02 18:16:10 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2007-09-02 18:16:10 +0000 |
commit | 53986b365cf820d2dd7d7070cfe88b7330fb408d (patch) | |
tree | 6aa540d2c09183604e70a9d60641911e6f435ff9 /rbutil/rbutilqt | |
parent | e73f287b5aa14a209627617cbab2f219be59b775 (diff) | |
download | rockbox-53986b365cf820d2dd7d7070cfe88b7330fb408d.tar.gz rockbox-53986b365cf820d2dd7d7070cfe88b7330fb408d.zip |
rbutil: removed the wx version of rbutil.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14581 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt')
-rwxr-xr-x | rbutil/rbutilqt/irivertools/mksums.pl | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/irivertools/mksums.pl b/rbutil/rbutilqt/irivertools/mksums.pl new file mode 100755 index 0000000000..99786fe161 --- /dev/null +++ b/rbutil/rbutilqt/irivertools/mksums.pl @@ -0,0 +1,69 @@ +#!/usr/bin/perl + +# This script creates the h100sums.h and h300sums.h files for fwpatcher. +# +# It expects a file tree with scrambled and descrambled +# firmwares like this: +# orig-firmware/ +# h1xx/ +# 1.66jp/ +# ihp_100.bin +# ihp_100.hex +# ihp_120.bin +# ihp_120.hex +# h3xx/ +# 1.29jp/ +# H300.bin +# H300.hex +# etc. +# +# It also expects the bootloader binaries in the current directory: +# bootloader-h100.bin +# bootloader-h120.bin +# bootloader-h300.bin + +$orig_path = "~/orig-firmware"; + +mksumfile("100"); +mksumfile("120"); +mksumfile("300"); + +sub mksumfile { + ($model) = @_; + + open FILE, ">h${model}sums.h" or die "Can't open h${model}sums.h"; + + print FILE "/* Checksums of firmwares for ihp_$model */\n"; + print FILE "/* order: unpatched, patched */\n\n"; + + if($model < 300) { + foreach("1.63eu","1.63k", "1.63us", "1.65eu","1.65k", "1.65us", + "1.66eu", "1.66k", "1.66us", "1.66jp") { + `../mkboot $orig_path/h1xx/$_/ihp_$model.bin bootloader-h$model.bin ihp_$model.bin`; + `../scramble -iriver ihp_$model.bin ihp_$model.hex`; + $origsum = `md5sum $orig_path/h1xx/$_/ihp_$model.hex`; + chomp $origsum; + ($os, $or) = split / /, $origsum; + $sum = `md5sum ihp_$model.hex`; + chomp $sum; + ($s, $r) = split / /, $sum; + print FILE "/* $_ */\n"; + print FILE "{\"$os\", \"$s\"},\n"; + } + } else { + foreach("1.28eu", "1.28k", "1.28jp", "1.29eu", "1.29k", "1.29jp", + "1.30eu") { + `../mkboot -h300 $orig_path/h3xx/$_/H$model.bin bootloader-h$model.bin H$model.bin`; + `../scramble -iriver H$model.bin H$model.hex`; + $origsum = `md5sum $orig_path/h3xx/$_/H$model.hex`; + chomp $origsum; + ($os, $or) = split / /, $origsum; + $sum = `md5sum H$model.hex`; + chomp $sum; + ($s, $r) = split / /, $sum; + print FILE "/* $_ */\n"; + print FILE "{\"$os\", \"$s\"},\n"; + } + } + close FILE; +} |