summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/orinoco
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/orinoco')
-rw-r--r--meta/recipes-bsp/orinoco/spectrum-fw.bb22
-rwxr-xr-xmeta/recipes-bsp/orinoco/spectrum-fw/get_symbol_fw29
-rwxr-xr-xmeta/recipes-bsp/orinoco/spectrum-fw/parse_symbol_fw129
3 files changed, 0 insertions, 180 deletions
diff --git a/meta/recipes-bsp/orinoco/spectrum-fw.bb b/meta/recipes-bsp/orinoco/spectrum-fw.bb
deleted file mode 100644
index 45011d336c..0000000000
--- a/meta/recipes-bsp/orinoco/spectrum-fw.bb
+++ /dev/null
@@ -1,22 +0,0 @@
1DESCRIPTION = "Firmware for Spectrum Wireless LAN cards"
2DEPENDS += " unzip-native "
3LICENSE = "closed"
4PR = "r2"
5
6SRC_URI = "http://ftp.osuosl.org/pub/nslu2/sources/MC&DriverOnlyInstallers.zip \
7 file://get_symbol_fw \
8 file://parse_symbol_fw"
9S = "${WORKDIR}"
10
11do_configure() {
12 ./get_symbol_fw
13}
14
15do_install() {
16 install -d ${D}${base_libdir}/firmware/
17 install -m 0755 ${WORKDIR}/symbol_sp24t_prim_fw ${D}${base_libdir}/firmware/symbol_sp24t_prim_fw
18 install -m 0755 ${WORKDIR}/symbol_sp24t_sec_fw ${D}${base_libdir}/firmware/symbol_sp24t_sec_fw
19}
20
21PACKAGE_ARCH = "all"
22FILES_${PN} += "${base_libdir}/firmware/symbol*"
diff --git a/meta/recipes-bsp/orinoco/spectrum-fw/get_symbol_fw b/meta/recipes-bsp/orinoco/spectrum-fw/get_symbol_fw
deleted file mode 100755
index 80420b01a8..0000000000
--- a/meta/recipes-bsp/orinoco/spectrum-fw/get_symbol_fw
+++ /dev/null
@@ -1,29 +0,0 @@
1#!/bin/sh
2
3# Get firmware for Symbol Spectrum24 Trilogy.
4# Both the header file and the binary firmware files are produced.
5
6# Copyright (C) 2004 Pavel Roskin <proski@gnu.org>
7
8# This script is Free Software, and it can be copied, distributed and
9# modified as defined in the GNU General Public License. A copy of
10# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
11
12# Usage: get_symbol_fw
13# Output: spectrum_fw.h symbol_sp24t_prim_fw symbol_sp24t_sec_fw
14# Needed tools: curl (or wget), unzip, perl.
15
16set -e
17
18DL_INT1='S24DRVR392B67-01.exe'
19DL_INT2='Driver Only Installer/NetWLan5.sys'
20DRIVER1=symbol1.drv
21DRIVER2=symbol2.drv
22
23unzip -p $DL_INT1 "$DL_INT2" >$DRIVER2
24
25perl parse_symbol_fw $DRIVER2 spectrum_fw.h symbol_sp24t_prim_fw \
26 symbol_sp24t_sec_fw
27
28rm -f $DRIVER1 $DRIVER2
29
diff --git a/meta/recipes-bsp/orinoco/spectrum-fw/parse_symbol_fw b/meta/recipes-bsp/orinoco/spectrum-fw/parse_symbol_fw
deleted file mode 100755
index 7fe0ea57c4..0000000000
--- a/meta/recipes-bsp/orinoco/spectrum-fw/parse_symbol_fw
+++ /dev/null
@@ -1,129 +0,0 @@
1#!/usr/bin/perl -w
2
3# Extract Symbol firmware and convert is to a header file and two binary
4# files.
5
6# Copyright (C) 2004 Pavel Roskin <proski@gnu.org>
7
8# This script is Free Software, and it can be copied, distributed and
9# modified as defined in the GNU General Public License. A copy of
10# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
11
12# Usage:
13# parse_symbol_fw infile header binfile1 binfile2
14
15use strict;
16
17# Print message and exit (like "die", but without raising an exception).
18# Newline is added at the end.
19sub error
20{
21 printf STDERR "ERROR: ";
22 printf STDERR @_;
23 printf STDERR "\n";
24 exit 1;
25}
26
27sub readnum_ba ()
28{
29 my $byte_a;
30 read INFILE,$byte_a,1;
31 my $byte_b;
32 read INFILE,$byte_b,1;
33 return (ord($byte_b) << 8) + ord($byte_a);
34}
35
36
37if ($#ARGV != 3) {
38 error ("Usage: parse_symbol_fw infile header binfile1 binfile2");
39}
40
41unless (open (INFILE, "< $ARGV[0]")) {
42 error ("couldn't open $ARGV[0] for reading: $!");
43}
44
45unless (open (OUTFILE, "> $ARGV[1]")) {
46 error ("couldn't open $ARGV[1] for writing: $!");
47}
48
49# Process one array, either for primary or for secondary firmware
50sub process_one_array($$) {
51 my $arrname = shift(@_);
52 my $binfile = shift(@_);
53 my $offset = -1;
54 my $str_offset = 0;
55
56 # Skip to the beginning of firmware
57 $/ = "\x00";
58 while (<INFILE>) {
59 if (m{FILE: }g) {
60 $offset = $str_offset + pos() - 6;
61 last;
62 }
63 $str_offset = tell(INFILE);
64 }
65
66 if ($offset == -1) {
67 error("Cannot find FILE: marker");
68 }
69
70 my @fwdata = split;
71 print $fwdata[1] . "\n";
72 seek(INFILE, $offset, 0);
73
74 my $blknum = $fwdata[3];
75 my $pdrlen = $fwdata[4];
76 my $crclen = $fwdata[5];
77 my $compatlen = $fwdata[6];
78
79 while (!eof(INFILE)) {
80 my $byte;
81 read INFILE, $byte, 1;
82 last if (ord($byte) == 0x1a);
83 }
84
85 # Walk all blocks
86 my $block = $blknum;
87 while ($block-- > 0) {
88 seek(INFILE, 4, 1);
89 my $len = readnum_ba();
90 seek(INFILE, $len, 1);
91 }
92
93 my $img_len = tell(INFILE) - $offset + $pdrlen + $crclen + $compatlen + 2;
94 seek(INFILE, $offset, 0);
95
96 # Write binary file for the section
97 unless (open (BINFILE, "> $binfile")) {
98 error ("couldn't open $binfile for writing: $!");
99 }
100
101 # Output the array
102 printf OUTFILE "/* %s %s */\n", $fwdata[1], $fwdata[2];
103 printf OUTFILE "static u8 %s[] = {\n", $arrname;
104
105 my $count = 0;
106 while ($count++ < $img_len) {
107 my $byte;
108 read INFILE, $byte, 1;
109 $byte = ord($byte);
110 printf OUTFILE "0x%02x,", $byte;
111 printf BINFILE "%c", $byte;
112 if ($count % 16 == 0) {
113 printf OUTFILE "\n";
114 }
115 }
116
117 if ($img_len % 16) {
118 printf OUTFILE "\n";
119 }
120
121 print OUTFILE "};\n";
122 close(BINFILE);
123}
124
125process_one_array("primsym", $ARGV[2]);
126process_one_array("secsym", $ARGV[3]);
127
128close(INFILE);
129close(OUTFILE);