]> sigrok.org Git - sigrok-util.git/blame - firmware/sysclk-lwla/sigrok-fwextract-sysclk-lwla1034
sigrok-cross-mingw: README: Freeze Qt5 to 5.7.x for Windows XP support.
[sigrok-util.git] / firmware / sysclk-lwla / sigrok-fwextract-sysclk-lwla1034
CommitLineData
7d2e3129
DE
1#! /bin/sh -e
2##
3## This file is part of the sigrok-util project.
4##
5## Copyright (C) 2014 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
21infile=$1
22if [ -z "$infile" ]; then
23 echo "Usage: $0 SETUP-EXE" >&2
24 exit 1
25fi
26
27# Verify the checksum to make sure this is the right binary file
28expectsum=f2a9333329200ad1d939d051257f914200cf0c765ff4962b2907dcf30716f455
29set '' $(sha256sum -b "$infile")
30
31if [ "$2" != "$expectsum" ]; then
32 echo "$0: checksum mismatch for '$infile'" >&2
33 echo "$0: make sure you picked the right file (lwla1034_EN_setup.exe on the CD-ROM)" >&2
34 exit 1
35fi
36
37# Extract the firmware binaries from the executable
4b1b0a9f
DE
38dd bs=1 skip=34110342 count=78394 if="$infile" of=sysclk-lwla1034-int.rbf
39dd bs=1 skip=34266241 count=78243 if="$infile" of=sysclk-lwla1034-extpos.rbf
40dd bs=1 skip=34344488 count=79141 if="$infile" of=sysclk-lwla1034-extneg.rbf
41dd bs=1 skip=34578635 count=48521 if="$infile" of=sysclk-lwla1034-off.rbf