diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-30 21:35:20 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-30 22:16:10 +0100 |
commit | c09cae578e5568c0ac975124db31f9cac05d50e9 (patch) | |
tree | 1183a51498c1d2c7874ea0d3741c4f70dbfc66ef /meta/recipes-bsp | |
parent | a51df11c1596746c85b015562ed67f37382b88b5 (diff) | |
download | poky-c09cae578e5568c0ac975124db31f9cac05d50e9.tar.gz |
Move prism-firmware, spectrum-fw, python-urlgrabber, python-iniparse and yum-metadata to meta-extras
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r-- | meta/recipes-bsp/orinoco/spectrum-fw.bb | 22 | ||||
-rwxr-xr-x | meta/recipes-bsp/orinoco/spectrum-fw/get_symbol_fw | 29 | ||||
-rwxr-xr-x | meta/recipes-bsp/orinoco/spectrum-fw/parse_symbol_fw | 129 | ||||
-rw-r--r-- | meta/recipes-bsp/prism-firmware/prism-firmware.bb | 32 | ||||
-rw-r--r-- | meta/recipes-bsp/prism-firmware/prism-firmware/hostap.rules | 4 | ||||
-rw-r--r-- | meta/recipes-bsp/prism-firmware/prism-firmware/prism-fw.sh | 32 |
6 files changed, 0 insertions, 248 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 @@ | |||
1 | DESCRIPTION = "Firmware for Spectrum Wireless LAN cards" | ||
2 | DEPENDS += " unzip-native " | ||
3 | LICENSE = "closed" | ||
4 | PR = "r2" | ||
5 | |||
6 | SRC_URI = "http://ftp.osuosl.org/pub/nslu2/sources/MC&DriverOnlyInstallers.zip \ | ||
7 | file://get_symbol_fw \ | ||
8 | file://parse_symbol_fw" | ||
9 | S = "${WORKDIR}" | ||
10 | |||
11 | do_configure() { | ||
12 | ./get_symbol_fw | ||
13 | } | ||
14 | |||
15 | do_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 | |||
21 | PACKAGE_ARCH = "all" | ||
22 | FILES_${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 | |||
16 | set -e | ||
17 | |||
18 | DL_INT1='S24DRVR392B67-01.exe' | ||
19 | DL_INT2='Driver Only Installer/NetWLan5.sys' | ||
20 | DRIVER1=symbol1.drv | ||
21 | DRIVER2=symbol2.drv | ||
22 | |||
23 | unzip -p $DL_INT1 "$DL_INT2" >$DRIVER2 | ||
24 | |||
25 | perl parse_symbol_fw $DRIVER2 spectrum_fw.h symbol_sp24t_prim_fw \ | ||
26 | symbol_sp24t_sec_fw | ||
27 | |||
28 | rm -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 | |||
15 | use strict; | ||
16 | |||
17 | # Print message and exit (like "die", but without raising an exception). | ||
18 | # Newline is added at the end. | ||
19 | sub error | ||
20 | { | ||
21 | printf STDERR "ERROR: "; | ||
22 | printf STDERR @_; | ||
23 | printf STDERR "\n"; | ||
24 | exit 1; | ||
25 | } | ||
26 | |||
27 | sub 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 | |||
37 | if ($#ARGV != 3) { | ||
38 | error ("Usage: parse_symbol_fw infile header binfile1 binfile2"); | ||
39 | } | ||
40 | |||
41 | unless (open (INFILE, "< $ARGV[0]")) { | ||
42 | error ("couldn't open $ARGV[0] for reading: $!"); | ||
43 | } | ||
44 | |||
45 | unless (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 | ||
50 | sub 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 | |||
125 | process_one_array("primsym", $ARGV[2]); | ||
126 | process_one_array("secsym", $ARGV[3]); | ||
127 | |||
128 | close(INFILE); | ||
129 | close(OUTFILE); | ||
diff --git a/meta/recipes-bsp/prism-firmware/prism-firmware.bb b/meta/recipes-bsp/prism-firmware/prism-firmware.bb deleted file mode 100644 index 903c55e15e..0000000000 --- a/meta/recipes-bsp/prism-firmware/prism-firmware.bb +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | DESCRIPTION = "Firmware for the Prism 2.x/3 cards" | ||
2 | SECTION = "base" | ||
3 | LICENSE = "closed" | ||
4 | RDEPENDS = "hostap-utils" | ||
5 | RREPLACES = "prism3-firmware prism3-support" | ||
6 | RCONFLICTS = "prism3-firmware prism3-support" | ||
7 | PACKAGE_ARCH = "all" | ||
8 | PR = "r3" | ||
9 | |||
10 | SRC_URI = "http://www.red-bean.com/~proski/firmware/primary.tar.bz2 \ | ||
11 | http://www.red-bean.com/~proski/firmware/1.7.4.tar.bz2 \ | ||
12 | file://prism-fw.sh \ | ||
13 | file://hostap.rules" | ||
14 | |||
15 | do_install() { | ||
16 | install -d ${D}${base_libdir}/firmware/ | ||
17 | install -d ${D}${base_libdir}/udev/ | ||
18 | install -d ${D}${sysconfdir}/pcmcia/ | ||
19 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
20 | |||
21 | install -m 0644 ${WORKDIR}/primary/af010104.hex ${D}${base_libdir}/firmware/ | ||
22 | install -m 0644 ${WORKDIR}/primary/ak010104.hex ${D}${base_libdir}/firmware/ | ||
23 | install -m 0644 ${WORKDIR}/primary/pm010102.hex ${D}${base_libdir}/firmware/ | ||
24 | |||
25 | install -m 0644 ${WORKDIR}/1.7.4/rf010704.hex ${D}${base_libdir}/firmware/ | ||
26 | |||
27 | install -m 0755 ${WORKDIR}/prism-fw.sh ${D}${base_libdir}/udev/ | ||
28 | install -m 0644 ${WORKDIR}/hostap.rules ${D}${sysconfdir}/udev/rules.d/ | ||
29 | } | ||
30 | |||
31 | PACKAGES = "${PN}" | ||
32 | FILES_${PN} += "${base_libdir}" | ||
diff --git a/meta/recipes-bsp/prism-firmware/prism-firmware/hostap.rules b/meta/recipes-bsp/prism-firmware/prism-firmware/hostap.rules deleted file mode 100644 index dece98ae93..0000000000 --- a/meta/recipes-bsp/prism-firmware/prism-firmware/hostap.rules +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | # | ||
2 | # update firmware on Prism cards (load it to RAM, not to Flash) | ||
3 | # | ||
4 | SUBSYSTEM=="net", KERNEL=="wlan*" RUN="/lib/udev/prism-fw.sh" | ||
diff --git a/meta/recipes-bsp/prism-firmware/prism-firmware/prism-fw.sh b/meta/recipes-bsp/prism-firmware/prism-firmware/prism-fw.sh deleted file mode 100644 index 619f612be1..0000000000 --- a/meta/recipes-bsp/prism-firmware/prism-firmware/prism-fw.sh +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | CARD_ID=`/usr/sbin/hostap_diag $INTERFACE|grep NICID|awk '{print $2}'|sed -e 's/id=0x//'` | ||
4 | |||
5 | # 801d cards lack even Primary firmware so we cannot use hostap_diag | ||
6 | PRI=/lib/firmware/pm010102.hex | ||
7 | STA=/lib/firmware/rf010704.hex | ||
8 | |||
9 | if [ $CARD_ID = '800c' ] || [ $CARD_ID = '8013' ] || [ $CARD_ID = '8017' ] || \ | ||
10 | [ $CARD_ID = '801b' ] || [ $CARD_ID = '8022' ] || [ $CARD_ID = '8023' ] ; then | ||
11 | PRI=/lib/firmware/ak010104.hex | ||
12 | elif [ $CARD_ID = '800b' ] || [ $CARD_ID = '8012' ] || [ $CARD_ID = '8016' ] || \ | ||
13 | [ $CARD_ID = '801a' ] ; then | ||
14 | PRI=/lib/firmware/af010104.hex | ||
15 | elif [ $CARD_ID = '800e' ] || [ $CARD_ID = '8015' ] || [ $CARD_ID = '8019' ] || \ | ||
16 | [ $CARD_ID = '801d' ] ; then | ||
17 | PRI=/lib/firmware/pm010102.hex | ||
18 | fi | ||
19 | |||
20 | DIR=/proc/net/hostap/wlan0 | ||
21 | |||
22 | if [ ! -d $DIR ]; then | ||
23 | exit 1 | ||
24 | fi | ||
25 | |||
26 | if grep -q no_pri=1 $DIR/debug; then | ||
27 | /usr/sbin/prism2_srec -gs wlan0 $PRI | ||
28 | /usr/sbin/prism2_srec -gp wlan0 $PRI | ||
29 | fi | ||
30 | |||
31 | /usr/sbin/prism2_srec -rp wlan0 $STA | ||
32 | |||