diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-15 21:04:28 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-24 18:05:53 +0100 |
commit | c876d3bbefe0dc00c27ca0c12d29da5874946962 (patch) | |
tree | 69f468a185a369b01998314bc3ecc19b70f4fcaa /utils/rbutilqt/irivertools | |
parent | 6c6f0757d7a902feb293be165d1490c42bc8e7ad (diff) | |
download | rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.tar.gz rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.zip |
rbutil: Merge rbutil with utils folder.
rbutil uses several components from the utils folder, and can be
considered part of utils too. Having it in a separate folder is an
arbitrary split that doesn't help anymore these days, so merge them.
This also allows other utils to easily use libtools.make without the
need to navigate to a different folder.
Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
Diffstat (limited to 'utils/rbutilqt/irivertools')
-rw-r--r-- | utils/rbutilqt/irivertools/h100sums.h | 23 | ||||
-rw-r--r-- | utils/rbutilqt/irivertools/h120sums.h | 23 | ||||
-rw-r--r-- | utils/rbutilqt/irivertools/h300sums.h | 19 | ||||
-rwxr-xr-x | utils/rbutilqt/irivertools/mksums.pl | 69 |
4 files changed, 134 insertions, 0 deletions
diff --git a/utils/rbutilqt/irivertools/h100sums.h b/utils/rbutilqt/irivertools/h100sums.h new file mode 100644 index 0000000000..d52ca0d13b --- /dev/null +++ b/utils/rbutilqt/irivertools/h100sums.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* Checksums of firmwares for ihp_100 */ | ||
2 | /* order: unpatched, patched */ | ||
3 | |||
4 | /* 1.63eu */ | ||
5 | {"86103cb05658970b43ce1f40f93d53a8", "6922876c5ef94bf4bab484e3a4f89c71"}, | ||
6 | /* 1.63k */ | ||
7 | {"70127fa9ee69afab7645297fbb61636d", "a4e7bb3b5d79ea8a0c9ef911e39b07a6"}, | ||
8 | /* 1.63us */ | ||
9 | {"7a504a450c76a0dda757fdb6b5531b22", "cc826c4bafb51d98a06b839c3afc0042"}, | ||
10 | /* 1.65eu */ | ||
11 | {"478dc657b97e77d1b4944ef26c3dcb8e", "8b1daa624b183cc8bc92edf65d1ef3a7"}, | ||
12 | /* 1.65k */ | ||
13 | {"97ba82fb8099bb23ca0c78fc119f8cce", "992121c09393f833f8ef17a540436457"}, | ||
14 | /* 1.65us */ | ||
15 | {"d3725865e0948cd5f604b00db2ec89aa", "274ac6548283fa105b71176b30a53632"}, | ||
16 | /* 1.66eu */ | ||
17 | {"fc59f742fe383da3e4d17a660c46afb9", "90920de15cdd91c454dae42a82999591"}, | ||
18 | /* 1.66k */ | ||
19 | {"22d214401994c276ec6878288caa0dba", "45a6ab666cc563b5e93e4a629839b3a9"}, | ||
20 | /* 1.66us */ | ||
21 | {"0ae247f567aeafcafecf823a50cbf33e", "124ddbaeb475583afa5f16fb3954d8a3"}, | ||
22 | /* 1.66jp */ | ||
23 | {"8bfc8ae5805c270597232efeafade5fd", "05841b026cdbcb478fc6c635edd6a5f4"}, | ||
diff --git a/utils/rbutilqt/irivertools/h120sums.h b/utils/rbutilqt/irivertools/h120sums.h new file mode 100644 index 0000000000..118b40b549 --- /dev/null +++ b/utils/rbutilqt/irivertools/h120sums.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* Checksums of firmwares for ihp_120 */ | ||
2 | /* order: unpatched, patched */ | ||
3 | |||
4 | /* 1.63eu */ | ||
5 | {"14488347a171480c63c94bc7b885225d", "5bbcb9c060abaecc2e51a42cdbd9db8c"}, | ||
6 | /* 1.63k */ | ||
7 | {"3401fe8845e569156abfaddf05ca7771", "ed1c05a9830589abc95e79bfa7cbed5b"}, | ||
8 | /* 1.63us */ | ||
9 | {"d9078209105c186cee5246055fdb99c9", "f3dc2ba361db1d0b99fda54c2b54e2d3"}, | ||
10 | /* 1.65eu */ | ||
11 | {"c9e71aac4a498f1e2f0e684c2d554ea1", "821e3338e198f10fca214407fcbf148e"}, | ||
12 | /* 1.65k */ | ||
13 | {"360c0c565266f84e9bca610c596f3207", "a5ce6655ff9f20786c23101f76b84768"}, | ||
14 | /* 1.65us */ | ||
15 | {"b9e516d4b8a0265605f46f254897bfb0", "4e2e14122d4856247aab4070c912c56e"}, | ||
16 | /* 1.66eu */ | ||
17 | {"a094999b41781f4322a57b9be7fa4534", "63afa15e3305a737e931f61affb5266a"}, | ||
18 | /* 1.66k */ | ||
19 | {"79daba973bb31b60b4b87c2ef497587d", "a3e592920dc600a5e51cf0288f55712d"}, | ||
20 | /* 1.66us */ | ||
21 | {"7fa020a3104c76fbbfcb8313e287dbe2", "3046fec093a8b7f24c394d4a67ee8a31"}, | ||
22 | /* 1.66jp */ | ||
23 | {"271d151eb6586929da24b3458ea965fe", "47820bbef1550ec0fb2815fa599d32be"}, | ||
diff --git a/utils/rbutilqt/irivertools/h300sums.h b/utils/rbutilqt/irivertools/h300sums.h new file mode 100644 index 0000000000..e4e321b0e7 --- /dev/null +++ b/utils/rbutilqt/irivertools/h300sums.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* Checksums of firmwares for ihp_300 */ | ||
2 | /* order: unpatched, patched */ | ||
3 | |||
4 | /* 1.28eu */ | ||
5 | {"0b2083d37f24899b82d21a14d2b38060", "371d2f6dae171ccaaa57894640be2f10"}, | ||
6 | /* 1.28k */ | ||
7 | {"c6f854ae3d8f48e8982819a4b5302fb0", "5dc417d14ba6de264f1c2f9fc4cae420"}, | ||
8 | /* 1.28jp */ | ||
9 | {"7fcd7bca6b98a34134e2518a616f4e85", "87183596af1574335bc91755b96ce978"}, | ||
10 | /* 1.29eu */ | ||
11 | {"27d90fc316709c096979ab24c914ee31", "9d5c8655a35b1a7373daf6e7a3bb76db"}, | ||
12 | /* 1.29k */ | ||
13 | {"44416d97737fc47cd417a64d44064768", "90b976d1a7078848382c6ff7f63132d9"}, | ||
14 | /* 1.29jp */ | ||
15 | {"1ac242c645572a0a5de99ae2b23453b8", "ea96dbef4d52409d9d1510959abcf795"}, | ||
16 | /* 1.30eu */ | ||
17 | {"8d2d775b018f0532235d38f5317ae10c", "d88b2e853a38672e8547a07f05f9a197"}, | ||
18 | /* 1.31k */ | ||
19 | {"8241f66c5b64beeeeeb8fdfc8263f75f", "e77be3b112a7eb65ef75f886b3a55984"}, | ||
diff --git a/utils/rbutilqt/irivertools/mksums.pl b/utils/rbutilqt/irivertools/mksums.pl new file mode 100755 index 0000000000..99786fe161 --- /dev/null +++ b/utils/rbutilqt/irivertools/mksums.pl | |||
@@ -0,0 +1,69 @@ | |||
1 | #!/usr/bin/perl | ||
2 | |||
3 | # This script creates the h100sums.h and h300sums.h files for fwpatcher. | ||
4 | # | ||
5 | # It expects a file tree with scrambled and descrambled | ||
6 | # firmwares like this: | ||
7 | # orig-firmware/ | ||
8 | # h1xx/ | ||
9 | # 1.66jp/ | ||
10 | # ihp_100.bin | ||
11 | # ihp_100.hex | ||
12 | # ihp_120.bin | ||
13 | # ihp_120.hex | ||
14 | # h3xx/ | ||
15 | # 1.29jp/ | ||
16 | # H300.bin | ||
17 | # H300.hex | ||
18 | # etc. | ||
19 | # | ||
20 | # It also expects the bootloader binaries in the current directory: | ||
21 | # bootloader-h100.bin | ||
22 | # bootloader-h120.bin | ||
23 | # bootloader-h300.bin | ||
24 | |||
25 | $orig_path = "~/orig-firmware"; | ||
26 | |||
27 | mksumfile("100"); | ||
28 | mksumfile("120"); | ||
29 | mksumfile("300"); | ||
30 | |||
31 | sub mksumfile { | ||
32 | ($model) = @_; | ||
33 | |||
34 | open FILE, ">h${model}sums.h" or die "Can't open h${model}sums.h"; | ||
35 | |||
36 | print FILE "/* Checksums of firmwares for ihp_$model */\n"; | ||
37 | print FILE "/* order: unpatched, patched */\n\n"; | ||
38 | |||
39 | if($model < 300) { | ||
40 | foreach("1.63eu","1.63k", "1.63us", "1.65eu","1.65k", "1.65us", | ||
41 | "1.66eu", "1.66k", "1.66us", "1.66jp") { | ||
42 | `../mkboot $orig_path/h1xx/$_/ihp_$model.bin bootloader-h$model.bin ihp_$model.bin`; | ||
43 | `../scramble -iriver ihp_$model.bin ihp_$model.hex`; | ||
44 | $origsum = `md5sum $orig_path/h1xx/$_/ihp_$model.hex`; | ||
45 | chomp $origsum; | ||
46 | ($os, $or) = split / /, $origsum; | ||
47 | $sum = `md5sum ihp_$model.hex`; | ||
48 | chomp $sum; | ||
49 | ($s, $r) = split / /, $sum; | ||
50 | print FILE "/* $_ */\n"; | ||
51 | print FILE "{\"$os\", \"$s\"},\n"; | ||
52 | } | ||
53 | } else { | ||
54 | foreach("1.28eu", "1.28k", "1.28jp", "1.29eu", "1.29k", "1.29jp", | ||
55 | "1.30eu") { | ||
56 | `../mkboot -h300 $orig_path/h3xx/$_/H$model.bin bootloader-h$model.bin H$model.bin`; | ||
57 | `../scramble -iriver H$model.bin H$model.hex`; | ||
58 | $origsum = `md5sum $orig_path/h3xx/$_/H$model.hex`; | ||
59 | chomp $origsum; | ||
60 | ($os, $or) = split / /, $origsum; | ||
61 | $sum = `md5sum H$model.hex`; | ||
62 | chomp $sum; | ||
63 | ($s, $r) = split / /, $sum; | ||
64 | print FILE "/* $_ */\n"; | ||
65 | print FILE "{\"$os\", \"$s\"},\n"; | ||
66 | } | ||
67 | } | ||
68 | close FILE; | ||
69 | } | ||