projects
/
open-ath9k-htc-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
firmware: rewrite build system using cmake
[open-ath9k-htc-firmware.git]
/
target_firmware
/
firmware-crc.pl
diff --git a/target_firmware/firmware-crc.pl
b/target_firmware/firmware-crc.pl
new file mode 100755
(executable)
index 0000000..
2e8c9d3
--- /dev/null
+++ b/
target_firmware/firmware-crc.pl
@@ -0,0
+1,11
@@
+#!/usr/bin/env perl
+use strict;
+my $crc = 0;
+my $bytes;
+my $buf;
+while (($bytes = read(STDIN, $buf, 4)) == 4) {
+ print $buf;
+ my $v = unpack("N", $buf);
+ $crc = $crc ^ $v;
+}
+print pack("N", $crc);