]>
Commit | Line | Data |
---|---|---|
1 | #! /bin/sh -e | |
2 | ## | |
3 | ## This file is part of the sigrok-util project. | |
4 | ## | |
5 | ## Copyright (C) 2015 Daniel Elstner <daniel.kitta@gmail.com> | |
6 | ## | |
7 | ## This program is free software; you can redistribute it and/or modify | |
8 | ## it under the terms of the GNU General Public License as published by | |
9 | ## the Free Software Foundation; either version 3 of the License, or | |
10 | ## (at your option) any later version. | |
11 | ## | |
12 | ## This program is distributed in the hope that it will be useful, | |
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ## GNU General Public License for more details. | |
16 | ## | |
17 | ## You should have received a copy of the GNU General Public License | |
18 | ## along with this program; if not, see <http://www.gnu.org/licenses/>. | |
19 | ## | |
20 | ||
21 | instdir=$1 | |
22 | if [ -z "$instdir" ]; then | |
23 | echo "Usage: $0 LWLA1016-INST-DIR" >&2 | |
24 | exit 1 | |
25 | fi | |
26 | dlldir=$instdir/bin | |
27 | ||
28 | # Verify the checksums to make sure these are the right files | |
29 | sha256sum -c <<_EOF | |
30 | cb9db3a81606865db2fd3a5075e3c66e071c4b0b6150cc1a22ee03889b236d7f *$dlldir/lwla1016.dll | |
31 | 19b6229d0d0372c7e2e98c6f0a514370678cc055c47150a0c3c05b74c1361524 *$dlldir/lwla1016_2008.dll | |
32 | 0191b2257279e44b476e30240f3ff57b84725d971f39c09fb9109546c79278b3 *$dlldir/lwla1016_2508.dll | |
33 | _EOF | |
34 | ||
35 | # Extract the firmware binaries from the executable | |
36 | dd bs=1 skip=112300 count=69334 if="$dlldir/lwla1016.dll" of=sysclk-lwla1016-100.rbf | |
37 | dd bs=1 skip=41708 count=70588 if="$dlldir/lwla1016.dll" of=sysclk-lwla1016-100-ts.rbf | |
38 | ||
39 | dd bs=1 skip=115424 count=69451 if="$dlldir/lwla1016_2008.dll" of=sysclk-lwla1016-200.rbf | |
40 | dd bs=1 skip=41708 count=73711 if="$dlldir/lwla1016_2008.dll" of=sysclk-lwla1016-200-ts.rbf | |
41 | ||
42 | dd bs=1 skip=116664 count=69337 if="$dlldir/lwla1016_2508.dll" of=sysclk-lwla1016-250.rbf | |
43 | dd bs=1 skip=41708 count=74951 if="$dlldir/lwla1016_2508.dll" of=sysclk-lwla1016-250-ts.rbf |